Bump revision version of ABI
[empathy.git] / configure.ac
1 AC_INIT(Empathy, 0.22.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 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=11
13 LIBEMPATHY_AGE=0
14 LIBEMPATHY_REVISION=1
15
16 LIBEMPATHY_GTK_CURRENT=11
17 LIBEMPATHY_GTK_AGE=0
18 LIBEMPATHY_GTK_REVISION=1
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.14.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_REQUIRED=0.3.1
34 TELEPATHY_GLIB_REQUIRED=0.7.3
35 MISSION_CONTROL_REQUIRED=4.53
36
37 # Uncomment that to build without deprecated symbols
38 # AC_DEFINE(GTK_DISABLE_DEPRECATED, 1, [Disable deprecated GTK symbols])
39 # AC_DEFINE(G_DISABLE_DEPRECATED, 1, [Disable deprecated GLib symbols])
40 # AC_DEFINE(LIBTELEPATHY_DISABLE_DEPRECATED, 1, [Disable deprecated libtelepathy 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 IDT_COMPILE_WARNINGS
61 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
62 AC_PATH_PROG(GCONFTOOL, gconftool-2)
63 AM_GCONF_SOURCE_2
64 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
65 AC_SUBST(GLIB_GENMARSHAL)
66
67 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
68 if test -z "$XSLTPROC"; then
69   AC_MSG_ERROR([xsltproc (from libxslt) is required])
70 fi
71 AC_CHECK_PROGS([PYTHON], [python2.3 python2.4 python2.5 python])
72 if test -z "$PYTHON"; then
73   AC_MSG_ERROR([Python is required])
74 fi
75
76 EMPATHY_ARG_VALGRIND
77
78 # -----------------------------------------------------------
79 # Pkg-Config dependency checks
80 # -----------------------------------------------------------
81
82 PKG_CHECK_MODULES(LIBEMPATHY,
83 [
84    glib-2.0 >= $GLIB_REQUIRED
85    gobject-2.0
86    libxml-2.0
87    libtelepathy >= $TELEPATHY_REQUIRED
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    gconf-2.0 >= $GCONF_REQUIRED
97    libtelepathy >= $TELEPATHY_REQUIRED
98    telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
99    libmissioncontrol >= $MISSION_CONTROL_REQUIRED
100    gnome-vfs-2.0
101    gtk+-2.0 >= $GTK_REQUIRED
102    x11
103    libglade-2.0 >= $LIBGLADE_REQUIRED
104    libebook-1.2
105 ])
106
107 # -----------------------------------------------------------
108 # Language Support
109 # -----------------------------------------------------------
110
111 GETTEXT_PACKAGE=empathy
112 AC_SUBST(GETTEXT_PACKAGE)
113 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
114
115 AM_GLIB_GNU_GETTEXT
116
117 # -----------------------------------------------------------
118 # ISO codes, used for aspell support
119 # -----------------------------------------------------------
120 AC_MSG_CHECKING([whether iso-codes exists and has iso-639 domain])
121 if $PKG_CONFIG --variable=domains iso-codes | grep -q 639 ; then
122    AC_MSG_RESULT([yes])
123    iso_codes_prefix=`$PKG_CONFIG --variable=prefix iso-codes`
124    iso_codes_pkgconfig=iso-codes
125    have_iso_codes=yes
126 else
127    AC_MSG_RESULT([no])
128    iso_codes_prefix=
129    iso_codes_pkgconfig=
130    have_iso_codes=no
131 fi
132
133 AC_DEFINE_UNQUOTED([ISO_CODES_PREFIX],["$iso_codes_prefix"],[ISO codes prefix])
134
135 # -----------------------------------------------------------
136 # ASpell
137 # -----------------------------------------------------------
138 AC_ARG_ENABLE(aspell,
139               AS_HELP_STRING([--enable-aspell=@<:@no/yes/auto@:>@],
140                              [compile with aspell support]), ,
141                              enable_aspell=auto)
142
143 if test "x$enable_aspell" = "xyes" -a "x$have_iso_codes" != "xyes"; then
144    AC_MSG_ERROR([You must have iso-codes with the iso-639 domain to use aspell.])
145 fi
146
147 if test "x$enable_aspell" != "xno" -a "x$have_iso_codes" = "xyes"; then
148    AC_CHECK_LIB(aspell, aspell_speller_check,have_aspell=yes,have_aspell=no,)
149
150    if test "x$have_aspell" = "xyes"; then
151       AC_DEFINE(HAVE_ASPELL, 1, [Define if we have aspell])
152       EMPATHY_LIBS="$EMPATHY_LIBS -laspell"
153    else
154       have_aspell=no
155    fi
156 else
157    have_aspell=no
158 fi
159
160 if test "x$enable_aspell" = "xyes" -a "x$have_aspell" != "xyes"; then
161    AC_MSG_ERROR([Couldn't find aspell.])
162 fi
163
164
165 # -----------------------------------------------------------
166 # Megaphone
167 # -----------------------------------------------------------
168 AC_ARG_ENABLE(megaphone,
169               AS_HELP_STRING([--enable-megaphone=@<:@no/yes/auto@:>@],
170                              [build megaphone applet]), ,
171                              enable_megaphone=auto)
172
173 if test "x$enable_megaphone" != "xno"; then
174    PKG_CHECK_MODULES(MEGAPHONE, 
175    [
176       libpanelapplet-2.0 >= $LIBPANELAPPLET_REQUIRED
177       glib-2.0 >= $GLIB_REQUIRED
178       gtk+-2.0 >= $GTK_REQUIRED
179       gconf-2.0 >= $GCONF_REQUIRED
180       libglade-2.0 >= $LIBGLADE_REQUIRED 
181       gnome-vfs-2.0
182       libtelepathy >= $TELEPATHY_REQUIRED
183       libmissioncontrol >= $MISSION_CONTROL_REQUIRED
184    ], have_megaphone="yes", have_megaphone="no")
185 else
186    have_megaphone=no
187 fi
188
189 if test "x$enable_megaphone" = "xyes" -a "x$have_megaphone" != "xyes"; then
190    AC_MSG_ERROR([Couldn't find megaphone dependencies.])
191 fi
192
193 AM_CONDITIONAL(HAVE_MEGAPHONE, test "x$have_megaphone" = "xyes")
194
195 # -----------------------------------------------------------
196 # Nothere
197 # -----------------------------------------------------------
198 AC_ARG_ENABLE(nothere,
199               AS_HELP_STRING([--enable-nothere=@<:@no/yes/auto@:>@],
200                              [build nothere applet]), ,
201                              enable_nothere=no)
202
203 if test "x$enable_nothere" != "xno"; then
204    PKG_CHECK_MODULES(NOTHERE, 
205    [
206       libpanelapplet-2.0 >= $LIBPANELAPPLET_REQUIRED
207       glib-2.0 >= $GLIB_REQUIRED
208       gtk+-2.0 >= $GTK_REQUIRED
209       gconf-2.0 >= $GCONF_REQUIRED
210       libglade-2.0 >= $LIBGLADE_REQUIRED 
211       libtelepathy >= $TELEPATHY_REQUIRED
212       libmissioncontrol >= $MISSION_CONTROL_REQUIRED
213    ], have_nothere="yes", have_nothere="no")
214 else
215    have_nothere=no
216 fi
217
218 if test "x$enable_nothere" = "xyes" -a "x$have_nothere" != "xyes"; then
219    AC_MSG_ERROR([Couldn't find nothere dependencies.])
220 fi
221
222 AM_CONDITIONAL(HAVE_NOTHERE, test "x$have_nothere" = "xyes")
223
224 # -----------------------------------------------------------
225 # Tests
226 # -----------------------------------------------------------
227 AC_ARG_ENABLE(tests,
228               AS_HELP_STRING([--enable-tests=@<:@no/yes/auto@:>@],
229                              [build tests]), ,
230                              enable_tests=auto)
231
232 if test "x$enable_tests" != "xno"; then
233    PKG_CHECK_MODULES(CHECK,
234    [
235       check >= 0.9.4
236    ], have_check="yes", have_check="no")
237 else
238    have_check=no
239 fi
240
241 if test "x$enable_tests" = "xyes" -a "x$have_check" != "xyes"; then
242    AC_MSG_ERROR([Couldn't find check dependencies.])
243 fi
244
245 AM_CONDITIONAL(HAVE_TESTS, test "x$have_check" = "xyes")
246
247 # -----------------------------------------------------------
248 # Python Bindings
249 # -----------------------------------------------------------
250 AC_ARG_ENABLE(python,
251               AS_HELP_STRING([--enable-python=@<:@no/yes/auto@:>@],
252                              [build python bindings to libempathy and libempathy-gtk]), ,
253                              enable_python=auto)
254
255 if test "x$enable_python" != "xno"; then
256    AM_PATH_PYTHON
257    if test -z "$PYTHON" ; then
258       have_python="no"
259    else
260       PKG_CHECK_MODULES(PYTHON_BINDING,
261       [
262          pygtk-2.0,
263          glib-2.0 >= $GLIB_REQUIRED
264          gobject-2.0
265          gconf-2.0 >= $GCONF_REQUIRED
266          libxml-2.0
267          gnome-vfs-2.0
268          libtelepathy >= $TELEPATHY_REQUIRED
269          libmissioncontrol >= $MISSION_CONTROL_REQUIRED
270          gtk+-2.0 >= $GTK_REQUIRED
271          libglade-2.0 >= $LIBGLADE_REQUIRED
272       ], have_python="yes", have_python="no")
273    fi
274 else
275    have_python=no
276 fi
277
278 if test "x$enable_python" = "xyes" -a "x$have_python" != "xyes"; then
279    AC_MSG_ERROR([Couldn't find python.])
280 fi
281
282 AM_CONDITIONAL(HAVE_PYTHON, test "x$have_python" = "xyes")
283
284 # -----------------------------------------------------------
285 # VoIP support
286 # -----------------------------------------------------------
287 AC_ARG_ENABLE(voip,
288               AS_HELP_STRING([--enable-voip=@<:@no/yes@:>@],
289                              [Add support for Voice and Video call]), ,
290                              enable_voip=no)
291
292 if test "x$enable_voip" = "xyes"; then
293    AC_DEFINE(HAVE_VOIP, 1, [Define if we have voip])
294 fi
295
296 AM_CONDITIONAL(HAVE_VOIP, test "x$enable_voip" = "xyes")
297
298 # -----------------------------------------------------------
299
300 AC_OUTPUT([
301    Makefile
302    data/Makefile
303    data/empathy.desktop.in
304    data/icons/Makefile
305    extensions/Makefile
306    po/Makefile.in
307    libempathy/Makefile
308    libempathy/libempathy.pc
309    libempathy-gtk/Makefile
310    libempathy-gtk/libempathy-gtk.pc
311    src/Makefile
312    megaphone/Makefile
313    megaphone/src/Makefile
314    megaphone/data/Makefile
315    nothere/Makefile
316    nothere/src/Makefile
317    nothere/data/Makefile
318    docs/Makefile
319    docs/libempathy/Makefile
320    docs/libempathy/version.xml
321    docs/libempathy-gtk/Makefile
322    docs/libempathy-gtk/version.xml
323    python/Makefile
324    python/pyempathy/Makefile
325    python/pyempathygtk/Makefile
326    tests/Makefile
327    tests/xml/Makefile
328    tools/Makefile
329 ])