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