update
[empathy/jpizarro.git] / configure.ac
blob8493f53a719b861f7cd63c62a059f681912c7044
1 AC_INIT(Empathy, 0.23.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 Collabora Ltd.
6 ])
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=14
13 LIBEMPATHY_AGE=0
14 LIBEMPATHY_REVISION=0
16 LIBEMPATHY_GTK_CURRENT=14
17 LIBEMPATHY_GTK_AGE=0
18 LIBEMPATHY_GTK_REVISION=0
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)
27 # Minimal version required
28 GLIB_REQUIRED=2.16.0
29 GTK_REQUIRED=2.12.0
30 GCONF_REQUIRED=1.2.0
31 LIBGLADE_REQUIRED=2.0.0
32 LIBPANELAPPLET_REQUIRED=2.10.0
33 TELEPATHY_GLIB_REQUIRED=0.7.7
34 MISSION_CONTROL_REQUIRED=4.61
35 ENCHANT_REQUIRED=1.2.0
36 ISO_CODES_REQUIRED=0.35
38 # Uncomment that to build without deprecated symbols
39 # AC_DEFINE(GTK_DISABLE_DEPRECATED, 1, [Disable deprecated GTK symbols])
40 # AC_DEFINE(G_DISABLE_DEPRECATED, 1, [Disable deprecated GLib symbols])
42 AC_CONFIG_MACRO_DIR([m4])
43 AC_CONFIG_HEADERS([config.h])
44 AC_CONFIG_SRCDIR([configure.ac])
45 AC_CONFIG_AUX_DIR(.)
47 GNOME_COMMON_INIT
49 AM_INIT_AUTOMAKE(1.9 dist-bzip2 no-define -Wno-portability)
50 AM_MAINTAINER_MODE
51 AC_ISC_POSIX
52 AC_PROG_CC
53 AC_HEADER_STDC
54 AM_PROG_LIBTOOL
55 AM_PROG_MKDIR_P
56 AM_PATH_GLIB_2_0
57 AC_PATH_XTRA
58 IT_PROG_INTLTOOL([0.35.0])
59 GTK_DOC_CHECK([1.3])
60 GNOME_DOC_INIT
61 IDT_COMPILE_WARNINGS
62 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
63 AC_PATH_PROG(GCONFTOOL, gconftool-2)
64 AM_GCONF_SOURCE_2
65 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
66 AC_SUBST(GLIB_GENMARSHAL)
68 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
69 if test -z "$XSLTPROC"; then
70   AC_MSG_ERROR([xsltproc (from libxslt) is required])
72 AC_CHECK_PROGS([PYTHON], [python python2.3 python2.4 python2.5])
73 if test -z "$PYTHON"; then
74   AC_MSG_ERROR([Python is required])
77 EMPATHY_ARG_VALGRIND
79 # -----------------------------------------------------------
80 # Pkg-Config dependency checks
81 # -----------------------------------------------------------
83 PKG_CHECK_MODULES(LIBEMPATHY,
85    glib-2.0 >= $GLIB_REQUIRED
86    gobject-2.0
87    libxml-2.0
88    telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
89    libmissioncontrol >= $MISSION_CONTROL_REQUIRED
92 PKG_CHECK_MODULES(EMPATHY,
94    glib-2.0 >= $GLIB_REQUIRED
95    gobject-2.0
96    gio-2.0 >= $GLIB_REQUIRED
97    gconf-2.0 >= $GCONF_REQUIRED
98    telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
99    libmissioncontrol >= $MISSION_CONTROL_REQUIRED
100    gtk+-2.0 >= $GTK_REQUIRED
101    x11
102    libglade-2.0 >= $LIBGLADE_REQUIRED
103    libebook-1.2
106 # ******
107 # WebKit
108 # ******
110 PKG_CHECK_MODULES(WEBKIT, webkit-1.0)
112 AC_SUBST(WEBKIT_CFLAGS)
113 AC_SUBST(WEBKIT_LIBS)
115 # -----------------------------------------------------------
116 # Enable debug
117 # -----------------------------------------------------------
119 AC_ARG_ENABLE(debug,
120   AC_HELP_STRING([--disable-debug],[compile without debug code]),
121     enable_debug=$enableval, enable_debug=yes )
123 if test x$enable_debug = xyes; then
124   AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
127 # -----------------------------------------------------------
128 # Language Support
129 # -----------------------------------------------------------
131 GETTEXT_PACKAGE=empathy
132 AC_SUBST(GETTEXT_PACKAGE)
133 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
135 AM_GLIB_GNU_GETTEXT
137 # -----------------------------------------------------------
138 # spellchecking checks: enchant and iso-codes
139 # -----------------------------------------------------------
140 AC_ARG_ENABLE(spell,
141               AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
142                              [Enable spell checking]), ,
143                              enable_spell=auto)
145 if test "x$enable_spell" != "xno"; then
146    PKG_CHECK_MODULES(ENCHANT,
147    [
148       enchant >= $ENCHANT_REQUIRED,
149       iso-codes >= $ISO_CODES_REQUIRED
150    ], have_enchant="yes", have_enchant="no")
152    if test "x$have_enchant" = "xyes"; then
153       AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
154       if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
155          $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
156             AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
157             AC_DEFINE(HAVE_ENCHANT, 1, [Define if you have libenchant])
158             result=yes
159       else
160             result=no
161             have_enchant="no"
162       fi
163       AC_MSG_RESULT([$result])
164    fi
165 else
166    have_enchant=no
169 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
170    AC_MSG_ERROR([Couldn't find spell dependencies.])
173 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
175 # -----------------------------------------------------------
176 # Megaphone
177 # -----------------------------------------------------------
178 AC_ARG_ENABLE(megaphone,
179               AS_HELP_STRING([--enable-megaphone=@<:@no/yes/auto@:>@],
180                              [build megaphone applet]), ,
181                              enable_megaphone=auto)
183 if test "x$enable_megaphone" != "xno"; then
184    PKG_CHECK_MODULES(MEGAPHONE, 
185    [
186       libpanelapplet-2.0 >= $LIBPANELAPPLET_REQUIRED
187       glib-2.0 >= $GLIB_REQUIRED
188       gtk+-2.0 >= $GTK_REQUIRED
189       gconf-2.0 >= $GCONF_REQUIRED
190       libglade-2.0 >= $LIBGLADE_REQUIRED 
191       libmissioncontrol >= $MISSION_CONTROL_REQUIRED
192    ], have_megaphone="yes", have_megaphone="no")
193 else
194    have_megaphone=no
197 if test "x$enable_megaphone" = "xyes" -a "x$have_megaphone" != "xyes"; then
198    AC_MSG_ERROR([Couldn't find megaphone dependencies.])
201 AM_CONDITIONAL(HAVE_MEGAPHONE, test "x$have_megaphone" = "xyes")
203 # -----------------------------------------------------------
204 # Nothere
205 # -----------------------------------------------------------
206 AC_ARG_ENABLE(nothere,
207               AS_HELP_STRING([--enable-nothere=@<:@no/yes/auto@:>@],
208                              [build nothere applet]), ,
209                              enable_nothere=auto)
211 if test "x$enable_nothere" != "xno"; then
212    PKG_CHECK_MODULES(NOTHERE, 
213    [
214       libpanelapplet-2.0 >= $LIBPANELAPPLET_REQUIRED
215       glib-2.0 >= $GLIB_REQUIRED
216       gtk+-2.0 >= $GTK_REQUIRED
217       gconf-2.0 >= $GCONF_REQUIRED
218       libglade-2.0 >= $LIBGLADE_REQUIRED 
219       libmissioncontrol >= $MISSION_CONTROL_REQUIRED
220    ], have_nothere="yes", have_nothere="no")
221 else
222    have_nothere=no
225 if test "x$enable_nothere" = "xyes" -a "x$have_nothere" != "xyes"; then
226    AC_MSG_ERROR([Couldn't find nothere dependencies.])
229 AM_CONDITIONAL(HAVE_NOTHERE, test "x$have_nothere" = "xyes")
231 # -----------------------------------------------------------
232 # Tests
233 # -----------------------------------------------------------
234 AC_ARG_ENABLE(tests,
235               AS_HELP_STRING([--enable-tests=@<:@no/yes/auto@:>@],
236                              [build tests]), ,
237                              enable_tests=auto)
239 if test "x$enable_tests" != "xno"; then
240    PKG_CHECK_MODULES(CHECK,
241    [
242       check >= 0.9.4
243    ], have_check="yes", have_check="no")
244 else
245    have_check=no
248 if test "x$enable_tests" = "xyes" -a "x$have_check" != "xyes"; then
249    AC_MSG_ERROR([Couldn't find check dependencies.])
252 AM_CONDITIONAL(HAVE_TESTS, test "x$have_check" = "xyes")
254 # -----------------------------------------------------------
255 # Python Bindings
256 # -----------------------------------------------------------
257 AC_ARG_ENABLE(python,
258               AS_HELP_STRING([--enable-python=@<:@no/yes/auto@:>@],
259                              [build python bindings to libempathy and libempathy-gtk]), ,
260                              enable_python=auto)
262 if test "x$enable_python" != "xno"; then
263    AM_PATH_PYTHON
264    if test -z "$PYTHON" ; then
265       have_python="no"
266    else
267       PKG_CHECK_MODULES(PYTHON_BINDING,
268       [
269          pygtk-2.0,
270          glib-2.0 >= $GLIB_REQUIRED
271          gobject-2.0
272          gconf-2.0 >= $GCONF_REQUIRED
273          libxml-2.0
274          libmissioncontrol >= $MISSION_CONTROL_REQUIRED
275          gtk+-2.0 >= $GTK_REQUIRED
276          libglade-2.0 >= $LIBGLADE_REQUIRED
277       ], have_python="yes", have_python="no")
278       if test "x$have_python" = "xyes" ; then
279          AM_CHECK_PYTHON_HEADERS(,have_python="no")
280       fi
281    fi
282 else
283    have_python=no
286 if test "x$enable_python" = "xyes" -a "x$have_python" != "xyes"; then
287    AC_MSG_ERROR([Couldn't find python.])
290 AM_CONDITIONAL(HAVE_PYTHON, test "x$have_python" = "xyes")
292 # -----------------------------------------------------------
294 AC_OUTPUT([
295    Makefile
296    data/Makefile
297    data/empathy.desktop.in
298    data/icons/Makefile
299    extensions/Makefile
300    po/Makefile.in
301    libempathy/Makefile
302    libempathy/libempathy.pc
303    libempathy-gtk/Makefile
304    libempathy-gtk/libempathy-gtk.pc
305    src/Makefile
306    megaphone/Makefile
307    megaphone/src/Makefile
308    megaphone/data/Makefile
309    nothere/Makefile
310    nothere/src/Makefile
311    nothere/data/Makefile
312    docs/Makefile
313    docs/libempathy/Makefile
314    docs/libempathy/version.xml
315    docs/libempathy-gtk/Makefile
316    docs/libempathy-gtk/version.xml
317    help/Makefile
318    python/Makefile
319    python/pyempathy/Makefile
320    python/pyempathygtk/Makefile
321    tests/Makefile
322    tests/xml/Makefile
323    tools/Makefile