]> git.0d.be Git - empathy.git/blob - configure.ac
Remove last references to mission-control 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 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.3
38 LIBCHAMPLAIN_GTK_REQUIRED=0.3.3
39 CLUTTER_GTK_REQUIRED=0.8.2
40 GEOCLUE_REQUIRED=0.11
41 WEBKIT_REQUIRED=1.1.7
42 NETWORK_MANAGER_REQUIRED=0.7.0
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    telepathy-farsight
98    farsight2-0.10
99    gstreamer-0.10
100 ])
101
102 PKG_CHECK_MODULES(LIBEMPATHYGTK,
103 [
104    glib-2.0 >= $GLIB_REQUIRED
105    gobject-2.0
106    gio-2.0 >= $GLIB_REQUIRED
107    gconf-2.0 >= $GCONF_REQUIRED
108    x11
109    gtk+-2.0 >= $GTK_REQUIRED
110    libcanberra-gtk >= $LIBCANBERRA_GTK_REQUIRED
111    telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
112    farsight2-0.10
113    gstreamer-0.10
114    gstreamer-interfaces-0.10
115 ])
116
117 PKG_CHECK_MODULES(EMPATHY,
118 [
119    glib-2.0 >= $GLIB_REQUIRED
120    gobject-2.0
121    gio-2.0 >= $GLIB_REQUIRED
122    gdk-x11-2.0
123    gtk+-2.0 >= $GTK_REQUIRED
124    libebook-1.2
125    dbus-glib-1
126    telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
127    telepathy-farsight
128    gstreamer-0.10
129 ])
130
131 PKG_CHECK_MODULES(LIBNOTIFY, libnotify >= $LIBNOTIFY_REQUIRED)
132
133 # -----------------------------------------------------------
134 # Enable debug
135 # -----------------------------------------------------------
136
137 AC_ARG_ENABLE(debug,
138   AC_HELP_STRING([--disable-debug],[compile without debug code]),
139     enable_debug=$enableval, enable_debug=yes )
140
141 if test x$enable_debug = xyes; then
142   AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
143 fi
144
145 # -----------------------------------------------------------
146 # Language Support
147 # -----------------------------------------------------------
148
149 GETTEXT_PACKAGE=empathy
150 AC_SUBST(GETTEXT_PACKAGE)
151 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
152
153 AM_GLIB_GNU_GETTEXT
154
155 # -----------------------------------------------------------
156 # NM integration
157 # -----------------------------------------------------------
158 AC_ARG_ENABLE(network-manager,
159               AS_HELP_STRING([--enable-network-manager=@<:@no/yes/auto@:>@],
160                              [build with network-manager support]), ,
161                              enable_webkit=auto)
162
163 if test "x$enable_network_manager" != "xno"; then
164    PKG_CHECK_MODULES(NETWORK_MANAGER,
165    [
166       libnm_glib >= $NETWORK_MANAGER_REQUIRED
167    ], have_nm="yes", have_nm="no")
168
169    if test "x$have_nm" = "xyes"; then
170       AC_DEFINE(HAVE_NM, 1, [Define if you have libnm-glib])
171    fi
172 else
173    have_nm=no
174 fi
175
176 if test "x$enable_network_manager" = "xyes" -a "x$have_nm" != "xyes"; then
177    AC_MSG_ERROR([Couldn't find libnm-glib dependencies.])
178 fi
179 AM_CONDITIONAL(HAVE_NM, test "x$have_NM" = "xyes")
180
181 # -----------------------------------------------------------
182 # Webkit
183 # -----------------------------------------------------------
184 AC_ARG_ENABLE(webkit,
185               AS_HELP_STRING([--enable-webkit=@<:@no/yes/auto@:>@],
186                              [build with webkit support]), ,
187                              enable_webkit=auto)
188
189 if test "x$enable_webkit" != "xno"; then
190    PKG_CHECK_MODULES(WEBKIT,
191    [
192       webkit-1.0 >= $WEBKIT_REQUIRED
193    ], have_webkit="yes", have_webkit="no")
194
195    if test "x$have_webkit" = "xyes"; then
196       AC_DEFINE(HAVE_WEBKIT, 1, [Define if you have libwebkitgtk])
197    fi
198 else
199    have_webkit=no
200 fi
201
202 if test "x$enable_webkit" = "xyes" -a "x$have_webkit" != "xyes"; then
203    AC_MSG_ERROR([Couldn't find webkit dependencies.])
204 fi
205 AM_CONDITIONAL(HAVE_WEBKIT, test "x$have_webkit" = "xyes")
206
207 # -----------------------------------------------------------
208 # spellchecking checks: enchant and iso-codes
209 # -----------------------------------------------------------
210 AC_ARG_ENABLE(spell,
211               AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
212                              [Enable spell checking]), ,
213                              enable_spell=auto)
214
215 if test "x$enable_spell" != "xno"; then
216    PKG_CHECK_MODULES(ENCHANT,
217    [
218       enchant >= $ENCHANT_REQUIRED,
219       iso-codes >= $ISO_CODES_REQUIRED
220    ], have_enchant="yes", have_enchant="no")
221
222    if test "x$have_enchant" = "xyes"; then
223       AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
224       if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
225          $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
226             AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
227             AC_DEFINE(HAVE_ENCHANT, [], [Define if you have libenchant])
228             result=yes
229       else
230             result=no
231             have_enchant="no"
232       fi
233       AC_MSG_RESULT([$result])
234    fi
235 else
236    have_enchant=no
237 fi
238
239 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
240    AC_MSG_ERROR([Couldn't find spell dependencies.])
241 fi
242
243 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
244
245 # -----------------------------------------------------------
246 # Map view checks: libchamplain
247 # -----------------------------------------------------------
248 AC_ARG_ENABLE(map,
249               AS_HELP_STRING([--enable-map=@<:@no/yes/auto@:>@],
250                              [Enable map view]), ,
251                              enable_map=auto)
252
253 if test "x$enable_map" != "xno"; then
254    PKG_CHECK_MODULES(LIBCHAMPLAIN,
255    [
256       champlain-0.3 >= $LIBCHAMPLAIN_REQUIRED,
257       champlain-gtk-0.3 >= $LIBCHAMPLAIN_GTK_REQUIRED
258       clutter-gtk-0.8 >= $CLUTTER_GTK_REQUIRED
259    ], have_libchamplain="yes", have_libchamplain="no")
260
261    if test "x$have_libchamplain" = "xyes"; then
262       AC_DEFINE(HAVE_LIBCHAMPLAIN, 1, [Define if you have libchamplain])
263    fi
264 else
265    have_libchamplain=no
266 fi
267
268 if test "x$enable_map" = "xyes" -a "x$have_libchamplain" != "xyes"; then
269    AC_MSG_ERROR([Couldn't find map view dependencies.])
270 fi
271
272 AM_CONDITIONAL(HAVE_LIBCHAMPLAIN, test "x$have_libchamplain" = "xyes")
273
274 # -----------------------------------------------------------
275 # location checks: geoclue
276 # -----------------------------------------------------------
277 AC_ARG_ENABLE(location,
278               AS_HELP_STRING([--enable-location=@<:@no/yes/auto@:>@],
279                              [Enable location awareness]), ,
280                              enable_location=auto)
281
282 if test "x$enable_location" != "xno"; then
283    PKG_CHECK_MODULES(GEOCLUE,
284    [
285       geoclue >= $GEOCLUE_REQUIRED
286    ], have_geoclue="yes", have_geoclue="no")
287
288    if test "x$have_geoclue" = "xyes"; then
289       AC_DEFINE(HAVE_GEOCLUE, 1, [Define if you have geoclue])
290    fi
291 else
292    have_geoclue="no"
293 fi
294
295 if test "x$enable_location" = "xyes" -a "x$have_geoclue" != "xyes"; then
296    AC_MSG_ERROR([Couldn't find location dependencies.])
297 fi
298
299 AM_CONDITIONAL(HAVE_GEOCLUE, test "x$have_geoclue" = "xyes")
300 AC_SUBST(GEOCLUE_CFLAGS)
301 AC_SUBST(GEOCLUE_LIBS)
302
303 # -----------------------------------------------------------
304 # Megaphone
305 # -----------------------------------------------------------
306 AC_ARG_ENABLE(megaphone,
307               AS_HELP_STRING([--enable-megaphone=@<:@no/yes/auto@:>@],
308                              [build megaphone applet]), ,
309                              enable_megaphone=auto)
310
311 if test "x$enable_megaphone" != "xno"; then
312    PKG_CHECK_MODULES(MEGAPHONE, 
313    [
314       libpanelapplet-2.0 >= $LIBPANELAPPLET_REQUIRED
315       glib-2.0 >= $GLIB_REQUIRED
316       gtk+-2.0 >= $GTK_REQUIRED
317       gconf-2.0 >= $GCONF_REQUIRED
318       telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
319    ], have_megaphone="yes", have_megaphone="no")
320 else
321    have_megaphone=no
322 fi
323
324 if test "x$enable_megaphone" = "xyes" -a "x$have_megaphone" != "xyes"; then
325    AC_MSG_ERROR([Couldn't find megaphone dependencies.])
326 fi
327
328 AM_CONDITIONAL(HAVE_MEGAPHONE, test "x$have_megaphone" = "xyes")
329
330 # -----------------------------------------------------------
331 # Nothere
332 # -----------------------------------------------------------
333 AC_ARG_ENABLE(nothere,
334               AS_HELP_STRING([--enable-nothere=@<:@no/yes/auto@:>@],
335                              [build nothere applet]), ,
336                              enable_nothere=auto)
337
338 if test "x$enable_nothere" != "xno"; then
339    PKG_CHECK_MODULES(NOTHERE, 
340    [
341       libpanelapplet-2.0 >= $LIBPANELAPPLET_REQUIRED
342       glib-2.0 >= $GLIB_REQUIRED
343       gtk+-2.0 >= $GTK_REQUIRED
344       gconf-2.0 >= $GCONF_REQUIRED
345       telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
346    ], have_nothere="yes", have_nothere="no")
347 else
348    have_nothere=no
349 fi
350
351 if test "x$enable_nothere" = "xyes" -a "x$have_nothere" != "xyes"; then
352    AC_MSG_ERROR([Couldn't find nothere dependencies.])
353 fi
354
355 AM_CONDITIONAL(HAVE_NOTHERE, test "x$have_nothere" = "xyes")
356
357 # -----------------------------------------------------------
358 # Tests
359 # -----------------------------------------------------------
360 AC_ARG_ENABLE(tests,
361               AS_HELP_STRING([--enable-tests=@<:@no/yes/auto@:>@],
362                              [build tests]), ,
363                              enable_tests=auto)
364
365 if test "x$enable_tests" != "xno"; then
366    PKG_CHECK_MODULES(CHECK,
367    [
368       check >= 0.9.4
369    ], have_check="yes", have_check="no")
370 else
371    have_check=no
372 fi
373
374 if test "x$enable_tests" = "xyes" -a "x$have_check" != "xyes"; then
375    AC_MSG_ERROR([Couldn't find check dependencies.])
376 fi
377
378 AM_CONDITIONAL(HAVE_TESTS, test "x$have_check" = "xyes")
379
380 # -----------------------------------------------------------
381 # Python Bindings
382 # -----------------------------------------------------------
383 AC_ARG_ENABLE(python,
384               AS_HELP_STRING([--enable-python=@<:@no/yes/auto@:>@],
385                              [build python bindings to libempathy and libempathy-gtk]), ,
386                              enable_python=auto)
387
388 if test "x$enable_python" != "xno"; then
389    PKG_CHECK_MODULES(PYTHON_BINDING,
390    [
391       pygtk-2.0,
392       glib-2.0 >= $GLIB_REQUIRED
393       gobject-2.0
394       gconf-2.0 >= $GCONF_REQUIRED
395       libxml-2.0
396       gtk+-2.0 >= $GTK_REQUIRED
397       gstreamer-0.10
398       gstreamer-interfaces-0.10
399       telepathy-farsight
400    ], have_python="yes", have_python="no")
401    if test "x$have_python" = "xyes" ; then
402       AM_CHECK_PYTHON_HEADERS(,have_python="no")
403       AC_CHECK_PROGS([PYGOBJECTCODEGEN], [pygobject-codegen-2.0 pygtk-codegen-2.0])
404    fi
405 else
406    have_python=no
407 fi
408
409 if test "x$enable_python" = "xyes" -a "x$have_python" != "xyes"; then
410    AC_MSG_ERROR([Couldn't find python.])
411 fi
412
413 AM_CONDITIONAL(HAVE_PYTHON, test "x$have_python" = "xyes")
414
415 # -----------------------------------------------------------
416 # Coding style checks
417 # -----------------------------------------------------------
418 AC_ARG_ENABLE(coding-style-checks,
419   AC_HELP_STRING([--disable-coding-style-checks],
420                  [don't check coding style using grep]),
421     [ENABLE_CODING_STYLE_CHECKS=$enableval], [ENABLE_CODING_STYLE_CHECKS=yes])
422
423 AC_SUBST([ENABLE_CODING_STYLE_CHECKS])
424 # -----------------------------------------------------------
425
426 SHAVE_INIT(.)
427
428 AC_OUTPUT([
429    Makefile
430    data/Makefile
431    data/empathy.desktop.in
432    data/icons/Makefile
433    extensions/Makefile
434    po/Makefile.in
435    libempathy/Makefile
436    libempathy/libempathy.pc
437    libempathy-gtk/Makefile
438    libempathy-gtk/libempathy-gtk.pc
439    src/Makefile
440    megaphone/Makefile
441    megaphone/src/Makefile
442    megaphone/data/Makefile
443    nothere/Makefile
444    nothere/src/Makefile
445    nothere/data/Makefile
446    docs/Makefile
447    docs/libempathy/Makefile
448    docs/libempathy/version.xml
449    docs/libempathy-gtk/Makefile
450    docs/libempathy-gtk/version.xml
451    help/Makefile
452    python/Makefile
453    python/pyempathy/Makefile
454    python/pyempathygtk/Makefile
455    tests/Makefile
456    tests/xml/Makefile
457    tools/Makefile
458    shave
459    shave-libtool
460 ])
461
462 echo "
463 Configure summary:
464
465         Compiler....................:  ${CC}
466         Compiler Flags..............:  ${CFLAGS}
467         Prefix......................:  ${prefix}
468         Shaved build................:  ${enable_shave}
469         Tests.......................:  ${have_check}
470         Coding style checks.........:  ${ENABLE_CODING_STYLE_CHECKS}
471
472     Features:
473         Spell checking (enchant)....:  ${have_enchant}
474         Display maps (libchamplain).:  ${have_libchamplain}
475         Location awareness (Geoclue):  ${have_geoclue}
476         Adium themes (Webkit).......:  ${have_webkit}
477         NetworkManager integration..:  ${have_nm}
478
479     Extras:
480         Documentation...............:  ${enable_gtk_doc}
481         Python bindings.............:  ${have_python}
482         Megaphone applet............:  ${have_megaphone}
483         Nothere applet..............:  ${have_nothere}
484 "