]> git.0d.be Git - empathy.git/blob - configure.ac
Bump version to 2.27.4
[empathy.git] / configure.ac
1 AC_INIT(Empathy, 2.27.4, http://bugzilla.gnome.org/browse.cgi?product=empathy)
2 AC_PREREQ(2.59)
3 AC_COPYRIGHT([
4   Copyright (C) 2003-2007 Imendio AB
5   Copyright (C) 2007-2008 Collabora Ltd.
6 ])
7
8 # LT Version numbers, remember to change them just *before* a release.
9 #   (Interfaces removed:    CURRENT++, AGE=0, REVISION=0)
10 #   (Interfaces added:      CURRENT++, AGE++, REVISION=0)
11 #   (No interfaces changed:                   REVISION++)
12 LIBEMPATHY_CURRENT=26
13 LIBEMPATHY_AGE=0
14 LIBEMPATHY_REVISION=0
15
16 LIBEMPATHY_GTK_CURRENT=24
17 LIBEMPATHY_GTK_AGE=0
18 LIBEMPATHY_GTK_REVISION=0
19
20 AC_SUBST(LIBEMPATHY_CURRENT)
21 AC_SUBST(LIBEMPATHY_AGE)
22 AC_SUBST(LIBEMPATHY_REVISION)
23 AC_SUBST(LIBEMPATHY_GTK_CURRENT)
24 AC_SUBST(LIBEMPATHY_GTK_AGE)
25 AC_SUBST(LIBEMPATHY_GTK_REVISION)
26
27 # Minimal version required
28 GLIB_REQUIRED=2.16.0
29 GTK_REQUIRED=2.16.0
30 GCONF_REQUIRED=1.2.0
31 LIBPANELAPPLET_REQUIRED=2.10.0
32 TELEPATHY_GLIB_REQUIRED=0.7.31
33 MISSION_CONTROL_REQUIRED=4.61
34 ENCHANT_REQUIRED=1.2.0
35 ISO_CODES_REQUIRED=0.35
36 LIBNOTIFY_REQUIRED=0.4.4
37 LIBCANBERRA_GTK_REQUIRED=0.4
38 LIBCHAMPLAIN_REQUIRED=0.3.3
39 LIBCHAMPLAIN_GTK_REQUIRED=0.3.3
40 CLUTTER_GTK_REQUIRED=0.8.2
41 GEOCLUE_REQUIRED=0.11
42 WEBKIT_REQUIRED=1.1.7
43
44 # Use --enable-maintainer-mode to disabled deprecated symbols
45 GNOME_MAINTAINER_MODE_DEFINES
46
47 # Uncomment that to build with single include disabled
48 #AC_DEFINE(G_DISABLE_SINGLE_INCLUDES, [], [Disable single includes for GLib])
49 #AC_DEFINE(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES, [], [Disable single includes for GDK pixbuf])
50 #AC_DEFINE(GTK_DISABLE_SINGLE_INCLUDES, [], [Disable single includes for GTK])
51
52 AC_CONFIG_MACRO_DIR([m4])
53 AC_CONFIG_HEADERS([config.h])
54 AC_CONFIG_SRCDIR([configure.ac])
55 AC_CONFIG_AUX_DIR(.)
56
57 GNOME_COMMON_INIT
58
59 AM_INIT_AUTOMAKE(1.9 dist-bzip2 no-define -Wno-portability)
60 AC_ISC_POSIX
61 AC_PROG_CC
62 AC_HEADER_STDC
63 AM_PROG_LIBTOOL
64 AM_PROG_MKDIR_P
65 AM_PATH_GLIB_2_0
66 AC_PATH_XTRA
67 IT_PROG_INTLTOOL([0.35.0])
68 GTK_DOC_CHECK([1.3])
69 GNOME_DOC_INIT
70 IDT_COMPILE_WARNINGS
71 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
72 AC_PATH_PROG(GCONFTOOL, gconftool-2)
73 AM_GCONF_SOURCE_2
74 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
75 AC_SUBST(GLIB_GENMARSHAL)
76
77 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
78 if test -z "$XSLTPROC"; then
79   AC_MSG_ERROR([xsltproc (from libxslt) is required])
80 fi
81 AM_PATH_PYTHON([2.3])
82
83 EMPATHY_ARG_VALGRIND
84
85 # -----------------------------------------------------------
86 # Pkg-Config dependency checks
87 # -----------------------------------------------------------
88
89 PKG_CHECK_MODULES(LIBEMPATHY,
90 [
91    glib-2.0 >= $GLIB_REQUIRED
92    gobject-2.0
93    gio-2.0 >= $GLIB_REQUIRED
94    gio-unix-2.0 >= $GLIB_REQUIRED
95    libxml-2.0
96    telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
97    libmissioncontrol >= $MISSION_CONTROL_REQUIRED
98    telepathy-farsight
99 ])
100
101 PKG_CHECK_MODULES(LIBEMPATHYGTK,
102 [
103    glib-2.0 >= $GLIB_REQUIRED
104    gobject-2.0
105    gio-2.0 >= $GLIB_REQUIRED
106    gconf-2.0 >= $GCONF_REQUIRED
107    x11
108    gtk+-2.0 >= $GTK_REQUIRED
109    libcanberra-gtk >= $LIBCANBERRA_GTK_REQUIRED
110    telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
111    libmissioncontrol >= $MISSION_CONTROL_REQUIRED
112    telepathy-farsight
113    farsight2-0.10
114    gstreamer-0.10
115    gstreamer-interfaces-0.10
116 ])
117
118 PKG_CHECK_MODULES(EMPATHY,
119 [
120    glib-2.0 >= $GLIB_REQUIRED
121    gobject-2.0
122    gio-2.0 >= $GLIB_REQUIRED
123    gconf-2.0 >= $GCONF_REQUIRED
124    x11
125    gtk+-2.0 >= $GTK_REQUIRED
126    libcanberra-gtk >= $LIBCANBERRA_GTK_REQUIRED
127    libebook-1.2
128    telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
129    libmissioncontrol >= $MISSION_CONTROL_REQUIRED
130    telepathy-farsight
131    gstreamer-0.10
132    gstreamer-interfaces-0.10
133 ])
134
135 PKG_CHECK_MODULES(LIBNOTIFY, libnotify >= $LIBNOTIFY_REQUIRED)
136
137 # -----------------------------------------------------------
138 # Enable debug
139 # -----------------------------------------------------------
140
141 AC_ARG_ENABLE(debug,
142   AC_HELP_STRING([--disable-debug],[compile without debug code]),
143     enable_debug=$enableval, enable_debug=yes )
144
145 if test x$enable_debug = xyes; then
146   AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
147 fi
148
149 # -----------------------------------------------------------
150 # Language Support
151 # -----------------------------------------------------------
152
153 GETTEXT_PACKAGE=empathy
154 AC_SUBST(GETTEXT_PACKAGE)
155 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
156
157 AM_GLIB_GNU_GETTEXT
158
159 # -----------------------------------------------------------
160 # Webkit
161 # -----------------------------------------------------------
162 AC_ARG_ENABLE(webkit,
163               AS_HELP_STRING([--enable-webkit=@<:@no/yes/auto@:>@],
164                              [build with webkit support]), ,
165                              enable_webkit=auto)
166
167 if test "x$enable_webkit" != "xno"; then
168    PKG_CHECK_MODULES(WEBKIT,
169    [
170       webkit-1.0 >= $WEBKIT_REQUIRED
171    ], have_webkit="yes", have_webkit="no")
172
173    if test "x$have_webkit" = "xyes"; then
174       AC_DEFINE(HAVE_WEBKIT, 1, [Define if you have libwebkitgtk])
175    fi
176 else
177    have_webkit=no
178 fi
179
180 if test "x$enable_webkit" = "xyes" -a "x$have_webkit" != "xyes"; then
181    AC_MSG_ERROR([Couldn't find webkit dependencies.])
182 fi
183
184 AM_CONDITIONAL(HAVE_WEBKIT, test "x$have_webkit" = "xyes")
185
186 # -----------------------------------------------------------
187 # spellchecking checks: enchant and iso-codes
188 # -----------------------------------------------------------
189 AC_ARG_ENABLE(spell,
190               AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
191                              [Enable spell checking]), ,
192                              enable_spell=auto)
193
194 if test "x$enable_spell" != "xno"; then
195    PKG_CHECK_MODULES(ENCHANT,
196    [
197       enchant >= $ENCHANT_REQUIRED,
198       iso-codes >= $ISO_CODES_REQUIRED
199    ], have_enchant="yes", have_enchant="no")
200
201    if test "x$have_enchant" = "xyes"; then
202       AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
203       if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
204          $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
205             AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
206             AC_DEFINE(HAVE_ENCHANT, [], [Define if you have libenchant])
207             result=yes
208       else
209             result=no
210             have_enchant="no"
211       fi
212       AC_MSG_RESULT([$result])
213    fi
214 else
215    have_enchant=no
216 fi
217
218 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
219    AC_MSG_ERROR([Couldn't find spell dependencies.])
220 fi
221
222 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
223
224 # -----------------------------------------------------------
225 # Map view checks: libchamplain
226 # -----------------------------------------------------------
227 AC_ARG_ENABLE(map,
228               AS_HELP_STRING([--enable-map=@<:@no/yes/auto@:>@],
229                              [Enable map view]), ,
230                              enable_map=auto)
231
232 if test "x$enable_map" != "xno"; then
233    PKG_CHECK_MODULES(LIBCHAMPLAIN,
234    [
235       champlain-0.3 >= $LIBCHAMPLAIN_REQUIRED,
236       champlain-gtk-0.3 >= $LIBCHAMPLAIN_GTK_REQUIRED
237       clutter-gtk-0.8 >= $CLUTTER_GTK_REQUIRED
238    ], have_libchamplain="yes", have_libchamplain="no")
239
240    if test "x$have_libchamplain" = "xyes"; then
241       AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [Define if you have libchamplain])
242    fi
243 else
244    have_libchamplain=no
245 fi
246
247 if test "x$enable_map" = "xyes" -a "x$have_libchamplain" != "xyes"; then
248    AC_MSG_ERROR([Couldn't find map view dependencies.])
249 fi
250
251 AM_CONDITIONAL(HAVE_LIBCHAMPLAIN, test "x$have_libchamplain" = "xyes")
252
253 # -----------------------------------------------------------
254 # location checks: geoclue
255 # -----------------------------------------------------------
256 AC_ARG_ENABLE(location,
257               AS_HELP_STRING([--enable-location=@<:@no/yes/auto@:>@],
258                              [Enable location awareness]), ,
259                              enable_location=auto)
260
261 if test "x$enable_location" != "xno"; then
262    PKG_CHECK_MODULES(GEOCLUE,
263    [
264       geoclue >= $GEOCLUE_REQUIRED
265    ], have_geoclue="yes", have_geoclue="no")
266
267    if test "x$have_geoclue" = "xyes"; then
268       AC_DEFINE(HAVE_GEOCLUE, 1, [Define if you have geoclue])
269    fi
270 else
271    have_geoclue="no"
272 fi
273
274 if test "x$enable_location" = "xyes" -a "x$have_geoclue" != "xyes"; then
275    AC_MSG_ERROR([Couldn't find location dependencies.])
276 fi
277
278 AM_CONDITIONAL(HAVE_GEOCLUE, test "x$have_geoclue" = "xyes")
279 AC_SUBST(GEOCLUE_CFLAGS)
280 AC_SUBST(GEOCLUE_LIBS)
281
282 # -----------------------------------------------------------
283 # Megaphone
284 # -----------------------------------------------------------
285 AC_ARG_ENABLE(megaphone,
286               AS_HELP_STRING([--enable-megaphone=@<:@no/yes/auto@:>@],
287                              [build megaphone applet]), ,
288                              enable_megaphone=auto)
289
290 if test "x$enable_megaphone" != "xno"; then
291    PKG_CHECK_MODULES(MEGAPHONE, 
292    [
293       libpanelapplet-2.0 >= $LIBPANELAPPLET_REQUIRED
294       glib-2.0 >= $GLIB_REQUIRED
295       gtk+-2.0 >= $GTK_REQUIRED
296       gconf-2.0 >= $GCONF_REQUIRED
297       libmissioncontrol >= $MISSION_CONTROL_REQUIRED
298    ], have_megaphone="yes", have_megaphone="no")
299 else
300    have_megaphone=no
301 fi
302
303 if test "x$enable_megaphone" = "xyes" -a "x$have_megaphone" != "xyes"; then
304    AC_MSG_ERROR([Couldn't find megaphone dependencies.])
305 fi
306
307 AM_CONDITIONAL(HAVE_MEGAPHONE, test "x$have_megaphone" = "xyes")
308
309 # -----------------------------------------------------------
310 # Nothere
311 # -----------------------------------------------------------
312 AC_ARG_ENABLE(nothere,
313               AS_HELP_STRING([--enable-nothere=@<:@no/yes/auto@:>@],
314                              [build nothere applet]), ,
315                              enable_nothere=auto)
316
317 if test "x$enable_nothere" != "xno"; then
318    PKG_CHECK_MODULES(NOTHERE, 
319    [
320       libpanelapplet-2.0 >= $LIBPANELAPPLET_REQUIRED
321       glib-2.0 >= $GLIB_REQUIRED
322       gtk+-2.0 >= $GTK_REQUIRED
323       gconf-2.0 >= $GCONF_REQUIRED
324       libmissioncontrol >= $MISSION_CONTROL_REQUIRED
325    ], have_nothere="yes", have_nothere="no")
326 else
327    have_nothere=no
328 fi
329
330 if test "x$enable_nothere" = "xyes" -a "x$have_nothere" != "xyes"; then
331    AC_MSG_ERROR([Couldn't find nothere dependencies.])
332 fi
333
334 AM_CONDITIONAL(HAVE_NOTHERE, test "x$have_nothere" = "xyes")
335
336 # -----------------------------------------------------------
337 # Tests
338 # -----------------------------------------------------------
339 AC_ARG_ENABLE(tests,
340               AS_HELP_STRING([--enable-tests=@<:@no/yes/auto@:>@],
341                              [build tests]), ,
342                              enable_tests=auto)
343
344 if test "x$enable_tests" != "xno"; then
345    PKG_CHECK_MODULES(CHECK,
346    [
347       check >= 0.9.4
348    ], have_check="yes", have_check="no")
349 else
350    have_check=no
351 fi
352
353 if test "x$enable_tests" = "xyes" -a "x$have_check" != "xyes"; then
354    AC_MSG_ERROR([Couldn't find check dependencies.])
355 fi
356
357 AM_CONDITIONAL(HAVE_TESTS, test "x$have_check" = "xyes")
358
359 # -----------------------------------------------------------
360 # Python Bindings
361 # -----------------------------------------------------------
362 AC_ARG_ENABLE(python,
363               AS_HELP_STRING([--enable-python=@<:@no/yes/auto@:>@],
364                              [build python bindings to libempathy and libempathy-gtk]), ,
365                              enable_python=auto)
366
367 if test "x$enable_python" != "xno"; then
368    PKG_CHECK_MODULES(PYTHON_BINDING,
369    [
370       pygtk-2.0,
371       glib-2.0 >= $GLIB_REQUIRED
372       gobject-2.0
373       gconf-2.0 >= $GCONF_REQUIRED
374       libxml-2.0
375       libmissioncontrol >= $MISSION_CONTROL_REQUIRED
376       gtk+-2.0 >= $GTK_REQUIRED
377       gstreamer-0.10
378       gstreamer-interfaces-0.10
379       telepathy-farsight
380    ], have_python="yes", have_python="no")
381    if test "x$have_python" = "xyes" ; then
382       AM_CHECK_PYTHON_HEADERS(,have_python="no")
383       AC_CHECK_PROGS([PYGOBJECTCODEGEN], [pygobject-codegen-2.0 pygtk-codegen-2.0])
384    fi
385 else
386    have_python=no
387 fi
388
389 if test "x$enable_python" = "xyes" -a "x$have_python" != "xyes"; then
390    AC_MSG_ERROR([Couldn't find python.])
391 fi
392
393 AM_CONDITIONAL(HAVE_PYTHON, test "x$have_python" = "xyes")
394
395 # -----------------------------------------------------------
396 # Coding style checks
397 # -----------------------------------------------------------
398 AC_ARG_ENABLE(coding-style-checks,
399   AC_HELP_STRING([--disable-coding-style-checks],
400                  [don't check coding style using grep]),
401     [ENABLE_CODING_STYLE_CHECKS=$enableval], [ENABLE_CODING_STYLE_CHECKS=yes])
402
403 AC_SUBST([ENABLE_CODING_STYLE_CHECKS])
404 # -----------------------------------------------------------
405
406 SHAVE_INIT(.)
407
408 AC_OUTPUT([
409    Makefile
410    data/Makefile
411    data/empathy.desktop.in
412    data/icons/Makefile
413    extensions/Makefile
414    po/Makefile.in
415    libempathy/Makefile
416    libempathy/libempathy.pc
417    libempathy-gtk/Makefile
418    libempathy-gtk/libempathy-gtk.pc
419    src/Makefile
420    megaphone/Makefile
421    megaphone/src/Makefile
422    megaphone/data/Makefile
423    nothere/Makefile
424    nothere/src/Makefile
425    nothere/data/Makefile
426    docs/Makefile
427    docs/libempathy/Makefile
428    docs/libempathy/version.xml
429    docs/libempathy-gtk/Makefile
430    docs/libempathy-gtk/version.xml
431    help/Makefile
432    python/Makefile
433    python/pyempathy/Makefile
434    python/pyempathygtk/Makefile
435    tests/Makefile
436    tests/xml/Makefile
437    tools/Makefile
438    shave
439    shave-libtool
440 ])
441
442 echo "
443 Configure summary:
444
445         Compiler....................:  ${CC}
446         Compiler Flags..............:  ${CFLAGS}
447         Prefix......................:  ${prefix}
448         Shaved build................:  ${enable_shave}
449         Tests.......................:  ${have_check}
450         Coding style checks.........:  ${ENABLE_CODING_STYLE_CHECKS}
451
452     Features:
453         Spell checking (enchant)....:  ${have_enchant}
454         Display maps (libchamplain).:  ${have_libchamplain}
455         Location awareness (Geoclue):  ${have_geoclue}
456         Adium themes (Webkit).......:  ${have_webkit}
457
458     Extras:
459         Documentation...............:  ${enable_gtk_doc}
460         Python bindings.............:  ${have_python}
461         Megaphone applet............:  ${have_megaphone}
462         Nothere applet..............:  ${have_nothere}
463 "