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