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