Update for 0.3.0 release
[entangle:entangle.git] / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2
3 AC_INIT([entangle], [0.3.0])
4 AC_CONFIG_SRCDIR([src/entangle-main.c])
5 AM_CONFIG_HEADER([config.h])
6 dnl Make automake keep quiet about wildcards & other GNUmake-isms
7 AM_INIT_AUTOMAKE([-Wno-portability])
8
9 AC_CONFIG_MACRO_DIR([m4])
10
11 # Use the silent-rules feature when possible.
12 m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
13 AM_SILENT_RULES([yes])
14
15 AC_CANONICAL_HOST
16
17 dnl *******************************************************************************
18 dnl Declare required library versions
19 dnl *******************************************************************************
20
21 GLIB_REQUIRED=2.26.0
22 AC_SUBST(GLIB_REQUIRED)
23 GIO_REQUIRED=2.26.0
24 AC_SUBST(GIO_REQUIRED)
25 GTHREAD_REQUIRED=2.26.0
26 AC_SUBST(GTHREAD_REQUIRED)
27 GDK_PIXBUF_REQUIRED=2.12.0
28 AC_SUBST(GDK_PIXBUF_REQUIRED)
29 GTK_REQUIRED=3.0.0
30 AC_SUBST(GTK_REQUIRED)
31 GPHOTO2_REQUIRED=2.4.11
32 AC_SUBST(GPHOTO2_REQUIRED)
33 GUDEV_REQUIRED=145
34 AC_SUBST(GUDEV_REQUIRED)
35 DBUS_GLIB_REQUIRED=0.60
36 AC_SUBST(DBUS_GLIB_REQUIRED)
37 GOBJECT_INTROSPECTION_REQUIRED=0.9.3
38 AC_SUBST(GOBJECT_INTROSPECTION_REQUIRED)
39 LCMS_REQUIRED=1.18
40 AC_SUBST(LCMS_REQUIRED)
41 LIBPEAS_REQUIRED=0.5.5
42 AC_SUBST(LIBPEAS_REQUIRED)
43 GEXIV2_REQUIRED=0.2.2
44 AC_SUBST(GEXIV2_REQUIRED)
45
46 dnl *******************************************************************************
47 dnl Setup core compilers / build helpers
48 dnl *******************************************************************************
49
50 AC_PROG_CC_STDC
51 AM_PROG_CC_C_O
52
53 AM_PROG_LIBTOOL
54
55
56 PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED)
57 AC_SUBST(GLIB_CFLAGS)
58 AC_SUBST(GLIB_LIBS)
59
60 PKG_CHECK_MODULES(GIO, glib-2.0 >= $GIO_REQUIRED)
61 AC_SUBST(GIO_CFLAGS)
62 AC_SUBST(GIO_LIBS)
63
64 PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_REQUIRED)
65 AC_SUBST(GMODULE_CFLAGS)
66 AC_SUBST(GMODULE_LIBS)
67
68 PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= $GTHREAD_REQUIRED)
69 AC_SUBST(GTHREAD_CFLAGS)
70 AC_SUBST(GTHREAD_LIBS)
71
72 PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED)
73 AC_SUBST(GDK_PIXBUF_CFLAGS)
74 AC_SUBST(GDK_PIXBUF_LIBS)
75
76 PKG_CHECK_MODULES(GTK, gtk+-3.0 >= $GTK_REQUIRED)
77 AC_SUBST(GTK_CFLAGS)
78 AC_SUBST(GTK_LIBS)
79
80 PKG_CHECK_MODULES(GPHOTO2, libgphoto2 >= $GPHOTO2_REQUIRED)
81 AC_SUBST(GPHOTO2_CFLAGS)
82 AC_SUBST(GPHOTO2_LIBS)
83
84 PKG_CHECK_MODULES(GUDEV, gudev-1.0 >= $GUDEV_REQUIRED)
85 AC_SUBST(GUDEV_CFLAGS)
86 AC_SUBST(GUDEV_LIBS)
87
88 PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1 >= $DBUS_GLIB_REQUIRED)
89 AC_SUBST(DBUS_GLIB_CFLAGS)
90 AC_SUBST(DBUS_GLIB_LIBS)
91
92 PKG_CHECK_MODULES(LCMS, lcms >= $LCMS_REQUIRED)
93 AC_SUBST(LCMS_CFLAGS)
94 AC_SUBST(LCMS_LIBS)
95
96 PKG_CHECK_MODULES(GEXIV2, gexiv2 >= $GEXIV2_REQUIRED)
97 AC_SUBST(GEXIV2_CFLAGS)
98 AC_SUBST(GEXIV2_LIBS)
99
100 GTK_DOC_CHECK([1.10],[--flavour no-tmpl])
101
102 PKG_CHECK_MODULES([GOBJECT_INTROSPECTION],
103                   [gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_REQUIRED],
104                   [enable_introspection=yes],
105                   [AC_MSG_ERROR([gobject-introspection is not available])])
106 AC_DEFINE([WITH_GOBJECT_INTROSPECTION], [1], [enable GObject introspection support])
107 AC_SUBST(GOBJECT_INTROSPECTION_CFLAGS)
108 AC_SUBST(GOBJECT_INTROSPECTION_LIBS)
109 AC_SUBST([G_IR_SCANNER], [$($PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0)])
110 AC_SUBST([G_IR_COMPILER], [$($PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0)])
111
112 PKG_CHECK_MODULES(PEAS, libpeas-1.0 >= $LIBPEAS_REQUIRED,
113                   [],[AC_MSG_ERROR([libpeas >= $LIBPEAS_REQUIRED is required for plugins])])
114 PKG_CHECK_MODULES(PEAS_UI, libpeas-gtk-1.0 >= $LIBPEAS_REQUIRED,
115                   [],[AC_MSG_ERROR([libpeas-gtk >= $LIBPEAS_REQUIRED is required for plugins])])
116 AC_SUBST(LIBPEAS_CFLAGS)
117 AC_SUBST(LIBPEAS_LIBS)
118 AC_SUBST(LIBPEAS_UI_CFLAGS)
119 AC_SUBST(LIBPEAS_UI_LIBS)
120
121 ENTANGLE_COMPILE_WARNINGS
122
123
124 AC_CONFIG_FILES(
125   Makefile
126   entangle.spec
127   src/Makefile
128   docs/Makefile
129   docs/reference/Makefile
130   )
131
132 AC_OUTPUT