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