]> git.0d.be Git - empathy.git/blob - configure.ac
Bump verison to 2.23.6 to match GNOME version
[empathy.git] / configure.ac
1 AC_INIT(Empathy, 2.23.6, 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 ])
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=15
13 LIBEMPATHY_AGE=1
14 LIBEMPATHY_REVISION=0
15
16 LIBEMPATHY_GTK_CURRENT=15
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.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
37
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])
41
42 AC_CONFIG_MACRO_DIR([m4])
43 AC_CONFIG_HEADERS([config.h])
44 AC_CONFIG_SRCDIR([configure.ac])
45 AC_CONFIG_AUX_DIR(.)
46
47 GNOME_COMMON_INIT
48
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)
67
68 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
69 if test -z "$XSLTPROC"; then
70   AC_MSG_ERROR([xsltproc (from libxslt) is required])
71 fi
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])
75 fi
76
77 EMPATHY_ARG_VALGRIND
78
79 # -----------------------------------------------------------
80 # Pkg-Config dependency checks
81 # -----------------------------------------------------------
82
83 PKG_CHECK_MODULES(LIBEMPATHY,
84 [
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
90 ])
91
92 PKG_CHECK_MODULES(EMPATHY,
93 [
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
104 ])
105
106 # -----------------------------------------------------------
107 # Enable debug
108 # -----------------------------------------------------------
109
110 AC_ARG_ENABLE(debug,
111   AC_HELP_STRING([--disable-debug],[compile without debug code]),
112     enable_debug=$enableval, enable_debug=yes )
113
114 if test x$enable_debug = xyes; then
115   AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
116 fi
117
118 # -----------------------------------------------------------
119 # Language Support
120 # -----------------------------------------------------------
121
122 GETTEXT_PACKAGE=empathy
123 AC_SUBST(GETTEXT_PACKAGE)
124 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
125
126 AM_GLIB_GNU_GETTEXT
127
128 # -----------------------------------------------------------
129 # spellchecking checks: enchant and iso-codes
130 # -----------------------------------------------------------
131 AC_ARG_ENABLE(spell,
132               AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
133                              [Enable spell checking]), ,
134                              enable_spell=auto)
135
136 if test "x$enable_spell" != "xno"; then
137    PKG_CHECK_MODULES(ENCHANT,
138    [
139       enchant >= $ENCHANT_REQUIRED,
140       iso-codes >= $ISO_CODES_REQUIRED
141    ], have_enchant="yes", have_enchant="no")
142
143    if test "x$have_enchant" = "xyes"; then
144       AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
145       if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
146          $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
147             AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
148             AC_DEFINE(HAVE_ENCHANT, 1, [Define if you have libenchant])
149             result=yes
150       else
151             result=no
152             have_enchant="no"
153       fi
154       AC_MSG_RESULT([$result])
155    fi
156 else
157    have_enchant=no
158 fi
159
160 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
161    AC_MSG_ERROR([Couldn't find spell dependencies.])
162 fi
163
164 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
165
166 # -----------------------------------------------------------
167 # Megaphone
168 # -----------------------------------------------------------
169 AC_ARG_ENABLE(megaphone,
170               AS_HELP_STRING([--enable-megaphone=@<:@no/yes/auto@:>@],
171                              [build megaphone applet]), ,
172                              enable_megaphone=auto)
173
174 if test "x$enable_megaphone" != "xno"; then
175    PKG_CHECK_MODULES(MEGAPHONE, 
176    [
177       libpanelapplet-2.0 >= $LIBPANELAPPLET_REQUIRED
178       glib-2.0 >= $GLIB_REQUIRED
179       gtk+-2.0 >= $GTK_REQUIRED
180       gconf-2.0 >= $GCONF_REQUIRED
181       libglade-2.0 >= $LIBGLADE_REQUIRED 
182       libmissioncontrol >= $MISSION_CONTROL_REQUIRED
183    ], have_megaphone="yes", have_megaphone="no")
184 else
185    have_megaphone=no
186 fi
187
188 if test "x$enable_megaphone" = "xyes" -a "x$have_megaphone" != "xyes"; then
189    AC_MSG_ERROR([Couldn't find megaphone dependencies.])
190 fi
191
192 AM_CONDITIONAL(HAVE_MEGAPHONE, test "x$have_megaphone" = "xyes")
193
194 # -----------------------------------------------------------
195 # Nothere
196 # -----------------------------------------------------------
197 AC_ARG_ENABLE(nothere,
198               AS_HELP_STRING([--enable-nothere=@<:@no/yes/auto@:>@],
199                              [build nothere applet]), ,
200                              enable_nothere=auto)
201
202 if test "x$enable_nothere" != "xno"; then
203    PKG_CHECK_MODULES(NOTHERE, 
204    [
205       libpanelapplet-2.0 >= $LIBPANELAPPLET_REQUIRED
206       glib-2.0 >= $GLIB_REQUIRED
207       gtk+-2.0 >= $GTK_REQUIRED
208       gconf-2.0 >= $GCONF_REQUIRED
209       libglade-2.0 >= $LIBGLADE_REQUIRED 
210       libmissioncontrol >= $MISSION_CONTROL_REQUIRED
211    ], have_nothere="yes", have_nothere="no")
212 else
213    have_nothere=no
214 fi
215
216 if test "x$enable_nothere" = "xyes" -a "x$have_nothere" != "xyes"; then
217    AC_MSG_ERROR([Couldn't find nothere dependencies.])
218 fi
219
220 AM_CONDITIONAL(HAVE_NOTHERE, test "x$have_nothere" = "xyes")
221
222 # -----------------------------------------------------------
223 # Tests
224 # -----------------------------------------------------------
225 AC_ARG_ENABLE(tests,
226               AS_HELP_STRING([--enable-tests=@<:@no/yes/auto@:>@],
227                              [build tests]), ,
228                              enable_tests=auto)
229
230 if test "x$enable_tests" != "xno"; then
231    PKG_CHECK_MODULES(CHECK,
232    [
233       check >= 0.9.4
234    ], have_check="yes", have_check="no")
235 else
236    have_check=no
237 fi
238
239 if test "x$enable_tests" = "xyes" -a "x$have_check" != "xyes"; then
240    AC_MSG_ERROR([Couldn't find check dependencies.])
241 fi
242
243 AM_CONDITIONAL(HAVE_TESTS, test "x$have_check" = "xyes")
244
245 # -----------------------------------------------------------
246 # Python Bindings
247 # -----------------------------------------------------------
248 AC_ARG_ENABLE(python,
249               AS_HELP_STRING([--enable-python=@<:@no/yes/auto@:>@],
250                              [build python bindings to libempathy and libempathy-gtk]), ,
251                              enable_python=auto)
252
253 if test "x$enable_python" != "xno"; then
254    AM_PATH_PYTHON
255    if test -z "$PYTHON" ; then
256       have_python="no"
257    else
258       PKG_CHECK_MODULES(PYTHON_BINDING,
259       [
260          pygtk-2.0,
261          glib-2.0 >= $GLIB_REQUIRED
262          gobject-2.0
263          gconf-2.0 >= $GCONF_REQUIRED
264          libxml-2.0
265          libmissioncontrol >= $MISSION_CONTROL_REQUIRED
266          gtk+-2.0 >= $GTK_REQUIRED
267          libglade-2.0 >= $LIBGLADE_REQUIRED
268       ], have_python="yes", have_python="no")
269       if test "x$have_python" = "xyes" ; then
270          AM_CHECK_PYTHON_HEADERS(,have_python="no")
271       fi
272    fi
273 else
274    have_python=no
275 fi
276
277 if test "x$enable_python" = "xyes" -a "x$have_python" != "xyes"; then
278    AC_MSG_ERROR([Couldn't find python.])
279 fi
280
281 AM_CONDITIONAL(HAVE_PYTHON, test "x$have_python" = "xyes")
282
283 # -----------------------------------------------------------
284
285 AC_OUTPUT([
286    Makefile
287    data/Makefile
288    data/empathy.desktop.in
289    data/empathy-properties.desktop.in
290    data/icons/Makefile
291    extensions/Makefile
292    po/Makefile.in
293    libempathy/Makefile
294    libempathy/libempathy.pc
295    libempathy-gtk/Makefile
296    libempathy-gtk/libempathy-gtk.pc
297    src/Makefile
298    megaphone/Makefile
299    megaphone/src/Makefile
300    megaphone/data/Makefile
301    nothere/Makefile
302    nothere/src/Makefile
303    nothere/data/Makefile
304    docs/Makefile
305    docs/libempathy/Makefile
306    docs/libempathy/version.xml
307    docs/libempathy-gtk/Makefile
308    docs/libempathy-gtk/version.xml
309    help/Makefile
310    python/Makefile
311    python/pyempathy/Makefile
312    python/pyempathygtk/Makefile
313    tests/Makefile
314    tests/xml/Makefile
315    tools/Makefile
316 ])