]> git.0d.be Git - empathy.git/blob - configure.ac
Add AC_CONFIG_AUX_DIR(.) to fix autogen.sh
[empathy.git] / configure.ac
1 AC_INIT(Empathy, 0.21.5, 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 AC_CONFIG_AUX_DIR(.)
9
10 AM_CONFIG_HEADER(config.h)
11 AM_INIT_AUTOMAKE(1.9 dist-bzip2 no-define)
12
13 AM_MAINTAINER_MODE
14
15 AC_ISC_POSIX
16 AC_PROG_CC
17 AC_HEADER_STDC
18
19 # LT Version numbers, remember to change them just *before* a release.
20 #   (Interfaces removed:    CURRENT++, AGE=0, REVISION=0)
21 #   (Interfaces added:      CURRENT++, AGE++, REVISION=0)
22 #   (No interfaces changed:                   REVISION++)
23 LIBEMPATHY_CURRENT=8
24 LIBEMPATHY_AGE=1
25 LIBEMPATHY_REVISION=0
26
27 LIBEMPATHY_GTK_CURRENT=8
28 LIBEMPATHY_GTK_AGE=1
29 LIBEMPATHY_GTK_REVISION=0
30
31 AC_SUBST(LIBEMPATHY_CURRENT)
32 AC_SUBST(LIBEMPATHY_AGE)
33 AC_SUBST(LIBEMPATHY_REVISION)
34 AC_SUBST(LIBEMPATHY_GTK_CURRENT)
35 AC_SUBST(LIBEMPATHY_GTK_AGE)
36 AC_SUBST(LIBEMPATHY_GTK_REVISION)
37
38 AM_PROG_LIBTOOL
39 AM_PATH_GLIB_2_0
40 AC_PATH_XTRA
41
42 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
43 AC_PATH_PROG(GCONFTOOL, gconftool-2)
44 AM_GCONF_SOURCE_2
45
46 IT_PROG_INTLTOOL([0.35.0])
47
48 GTK_DOC_CHECK([1.3])
49
50 GLIB_REQUIRED=2.14.0
51 GTK_REQUIRED=2.12.0
52 GCONF_REQUIRED=1.2.0
53 LIBGLADE_REQUIRED=2.0.0
54 LIBPANELAPPLET_REQUIRED=2.10.0
55 TELEPATHY_REQUIRED=0.3.1
56 TELEPATHY_GLIB_REQUIRED=0.7.0
57 MISSION_CONTROL_REQUIRED=4.37
58
59 IDT_COMPILE_WARNINGS
60
61 dnl Uncomment that to build without deprecated symbols
62 dnl AC_DEFINE(GTK_DISABLE_DEPRECATED, 1, [Disable deprecated GTK symbols])
63 dnl AC_DEFINE(G_DISABLE_DEPRECATED, 1, [Disable deprecated GLib symbols])
64 dnl AC_DEFINE(LIBTELEPATHY_DISABLE_DEPRECATED, 1, [Disable deprecated libtelepathy symbols])
65
66 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
67 AC_SUBST(GLIB_GENMARSHAL)
68
69 dnl -----------------------------------------------------------
70 dnl SVN for ChangeLog generation
71 dnl -----------------------------------------------------------
72
73 AC_SUBST([SVN_ROOT],[http://svn.gnome.org/svn])
74 AC_SUBST([SVN_MODULE],[empathy])
75 AC_SUBST([SVN_BRANCH],["trunk"])
76
77 dnl -----------------------------------------------------------
78 dnl Language Support
79 dnl -----------------------------------------------------------
80
81 GETTEXT_PACKAGE=empathy
82 AC_SUBST(GETTEXT_PACKAGE)
83 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
84
85 AM_GLIB_GNU_GETTEXT
86
87 dnl -----------------------------------------------------------
88 dnl Pkg-Config dependency checks
89 dnl -----------------------------------------------------------
90
91 PKG_CHECK_MODULES(LIBEMPATHY,
92 [
93    glib-2.0 >= $GLIB_REQUIRED
94    gobject-2.0
95    gconf-2.0 >= $GCONF_REQUIRED
96    libxml-2.0
97    libtelepathy >= $TELEPATHY_REQUIRED
98    telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
99    libmissioncontrol >= $MISSION_CONTROL_REQUIRED
100 ])
101
102 PKG_CHECK_MODULES(EMPATHY,
103 [
104    glib-2.0 >= $GLIB_REQUIRED
105    gobject-2.0
106    gconf-2.0 >= $GCONF_REQUIRED
107    libxml-2.0
108    libtelepathy >= $TELEPATHY_REQUIRED
109    telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
110    libmissioncontrol >= $MISSION_CONTROL_REQUIRED
111    gnome-vfs-2.0
112    gtk+-2.0 >= $GTK_REQUIRED
113    x11
114    libglade-2.0 >= $LIBGLADE_REQUIRED
115    libebook-1.2
116 ])
117
118 dnl -----------------------------------------------------------
119 dnl ISO codes, used for aspell support
120 dnl -----------------------------------------------------------
121 AC_MSG_CHECKING([whether iso-codes exists and has iso-639 domain])
122 if $PKG_CONFIG --variable=domains iso-codes | grep -q 639 ; then
123    AC_MSG_RESULT([yes])
124    iso_codes_prefix=`$PKG_CONFIG --variable=prefix iso-codes`
125    iso_codes_pkgconfig=iso-codes
126    have_iso_codes=yes
127 else
128    AC_MSG_RESULT([no])
129    iso_codes_prefix=
130    iso_codes_pkgconfig=
131    have_iso_codes=no
132 fi
133
134 AC_DEFINE_UNQUOTED([ISO_CODES_PREFIX],["$iso_codes_prefix"],[ISO codes prefix])
135
136 dnl -----------------------------------------------------------
137 dnl ASpell
138 dnl -----------------------------------------------------------
139 AC_ARG_ENABLE(aspell,
140               AS_HELP_STRING([--enable-aspell=@<:@no/yes/auto@:>@],
141                              [compile with aspell support]), ,
142                              enable_aspell=auto)
143
144 if test "x$enable_aspell" = "xyes" -a "x$have_iso_codes" != "xyes"; then
145    AC_MSG_ERROR([You must have iso-codes with the iso-639 domain to use aspell.])
146 fi
147
148 if test "x$enable_aspell" != "xno" -a "x$have_iso_codes" = "xyes"; then
149    AC_CHECK_LIB(aspell, aspell_speller_check,have_aspell=yes,have_aspell=no,)
150
151    if test "x$have_aspell" = "xyes"; then
152       AC_DEFINE(HAVE_ASPELL, 1, [Define if we have aspell])
153       EMPATHY_LIBS="$EMPATHY_LIBS -laspell"
154    else
155       have_aspell=no
156    fi
157 else
158    have_aspell=no
159 fi
160
161 if test "x$enable_aspell" = "xyes" -a "x$have_aspell" != "xyes"; then
162    AC_MSG_ERROR([Couldn't find aspell.])
163 fi
164
165
166 dnl -----------------------------------------------------------
167 dnl Megaphone
168 dnl -----------------------------------------------------------
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       gnome-vfs-2.0
183       libtelepathy >= $TELEPATHY_REQUIRED
184       libmissioncontrol >= $MISSION_CONTROL_REQUIRED
185    ], have_megaphone="yes", have_megaphone="no")
186 else
187    have_megaphone=no
188 fi
189
190 if test "x$enable_megaphone" = "xyes" -a "x$have_megaphone" != "xyes"; then
191    AC_MSG_ERROR([Couldn't find megaphone dependencies.])
192 fi
193
194 AM_CONDITIONAL(HAVE_MEGAPHONE, test "x$have_megaphone" = "xyes")
195
196 dnl -----------------------------------------------------------
197 dnl Nothere
198 dnl -----------------------------------------------------------
199 AC_ARG_ENABLE(nothere,
200               AS_HELP_STRING([--enable-nothere=@<:@no/yes/auto@:>@],
201                              [build nothere applet]), ,
202                              enable_nothere=no)
203
204 if test "x$enable_nothere" != "xno"; then
205    PKG_CHECK_MODULES(NOTHERE, 
206    [
207       libpanelapplet-2.0 >= $LIBPANELAPPLET_REQUIRED
208       glib-2.0 >= $GLIB_REQUIRED
209       gtk+-2.0 >= $GTK_REQUIRED
210       gconf-2.0 >= $GCONF_REQUIRED
211       libglade-2.0 >= $LIBGLADE_REQUIRED 
212       libtelepathy >= $TELEPATHY_REQUIRED
213       libmissioncontrol >= $MISSION_CONTROL_REQUIRED
214    ], have_nothere="yes", have_nothere="no")
215 else
216    have_nothere=no
217 fi
218
219 if test "x$enable_nothere" = "xyes" -a "x$have_nothere" != "xyes"; then
220    AC_MSG_ERROR([Couldn't find nothere dependencies.])
221 fi
222
223 AM_CONDITIONAL(HAVE_NOTHERE, test "x$have_nothere" = "xyes")
224
225 dnl -----------------------------------------------------------
226 dnl Tests
227 dnl -----------------------------------------------------------
228 AC_ARG_ENABLE(tests,
229               AS_HELP_STRING([--enable-tests=@<:@no/yes@:>@],
230                              [build tests]), ,
231                              enable_tests=no)
232
233 AM_CONDITIONAL(HAVE_TESTS, test "x$enable_tests" = "xyes")
234
235 dnl -----------------------------------------------------------
236 dnl Python Bindings
237 dnl -----------------------------------------------------------
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 dnl -----------------------------------------------------------
273 dnl VoIP support
274 dnl -----------------------------------------------------------
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 dnl -----------------------------------------------------------
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 ])