]> git.0d.be Git - empathy.git/blob - configure.ac
Cleanup the spell code.
[empathy.git] / configure.ac
1 AC_INIT(Empathy, 0.23.2, 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 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 # Language Support
108 # -----------------------------------------------------------
109
110 GETTEXT_PACKAGE=empathy
111 AC_SUBST(GETTEXT_PACKAGE)
112 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
113
114 AM_GLIB_GNU_GETTEXT
115
116 # -----------------------------------------------------------
117 # spellchecking checks: enchant and iso-codes
118 # -----------------------------------------------------------
119 AC_ARG_ENABLE(spell,
120               AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
121                              [Enable spell checking]), ,
122                              enable_spell=auto)
123
124 if test "x$enable_spell" != "xno"; then
125    PKG_CHECK_MODULES(ENCHANT,
126    [
127       enchant >= $ENCHANT_REQUIRED,
128       iso-codes >= $ISO_CODES_REQUIRED
129    ], have_enchant="yes", have_enchant="no")
130
131    if test "x$have_enchant" = "xyes"; then
132       AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
133       if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
134          $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
135             AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
136             AC_DEFINE(HAVE_ENCHANT, 1, [Define if you have libenchant])
137             result=yes
138       else
139             result=no
140             have_enchant="no"
141       fi
142       AC_MSG_RESULT([$result])
143    fi
144 else
145    have_enchant=no
146 fi
147
148 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
149    AC_MSG_ERROR([Couldn't find spell dependencies.])
150 fi
151
152 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
153
154 # -----------------------------------------------------------
155 # Megaphone
156 # -----------------------------------------------------------
157 AC_ARG_ENABLE(megaphone,
158               AS_HELP_STRING([--enable-megaphone=@<:@no/yes/auto@:>@],
159                              [build megaphone applet]), ,
160                              enable_megaphone=auto)
161
162 if test "x$enable_megaphone" != "xno"; then
163    PKG_CHECK_MODULES(MEGAPHONE, 
164    [
165       libpanelapplet-2.0 >= $LIBPANELAPPLET_REQUIRED
166       glib-2.0 >= $GLIB_REQUIRED
167       gtk+-2.0 >= $GTK_REQUIRED
168       gconf-2.0 >= $GCONF_REQUIRED
169       libglade-2.0 >= $LIBGLADE_REQUIRED 
170       libmissioncontrol >= $MISSION_CONTROL_REQUIRED
171    ], have_megaphone="yes", have_megaphone="no")
172 else
173    have_megaphone=no
174 fi
175
176 if test "x$enable_megaphone" = "xyes" -a "x$have_megaphone" != "xyes"; then
177    AC_MSG_ERROR([Couldn't find megaphone dependencies.])
178 fi
179
180 AM_CONDITIONAL(HAVE_MEGAPHONE, test "x$have_megaphone" = "xyes")
181
182 # -----------------------------------------------------------
183 # Nothere
184 # -----------------------------------------------------------
185 AC_ARG_ENABLE(nothere,
186               AS_HELP_STRING([--enable-nothere=@<:@no/yes/auto@:>@],
187                              [build nothere applet]), ,
188                              enable_nothere=auto)
189
190 if test "x$enable_nothere" != "xno"; then
191    PKG_CHECK_MODULES(NOTHERE, 
192    [
193       libpanelapplet-2.0 >= $LIBPANELAPPLET_REQUIRED
194       glib-2.0 >= $GLIB_REQUIRED
195       gtk+-2.0 >= $GTK_REQUIRED
196       gconf-2.0 >= $GCONF_REQUIRED
197       libglade-2.0 >= $LIBGLADE_REQUIRED 
198       libmissioncontrol >= $MISSION_CONTROL_REQUIRED
199    ], have_nothere="yes", have_nothere="no")
200 else
201    have_nothere=no
202 fi
203
204 if test "x$enable_nothere" = "xyes" -a "x$have_nothere" != "xyes"; then
205    AC_MSG_ERROR([Couldn't find nothere dependencies.])
206 fi
207
208 AM_CONDITIONAL(HAVE_NOTHERE, test "x$have_nothere" = "xyes")
209
210 # -----------------------------------------------------------
211 # Tests
212 # -----------------------------------------------------------
213 AC_ARG_ENABLE(tests,
214               AS_HELP_STRING([--enable-tests=@<:@no/yes/auto@:>@],
215                              [build tests]), ,
216                              enable_tests=auto)
217
218 if test "x$enable_tests" != "xno"; then
219    PKG_CHECK_MODULES(CHECK,
220    [
221       check >= 0.9.4
222    ], have_check="yes", have_check="no")
223 else
224    have_check=no
225 fi
226
227 if test "x$enable_tests" = "xyes" -a "x$have_check" != "xyes"; then
228    AC_MSG_ERROR([Couldn't find check dependencies.])
229 fi
230
231 AM_CONDITIONAL(HAVE_TESTS, test "x$have_check" = "xyes")
232
233 # -----------------------------------------------------------
234 # Python Bindings
235 # -----------------------------------------------------------
236 AC_ARG_ENABLE(python,
237               AS_HELP_STRING([--enable-python=@<:@no/yes/auto@:>@],
238                              [build python bindings to libempathy and libempathy-gtk]), ,
239                              enable_python=auto)
240
241 if test "x$enable_python" != "xno"; then
242    AM_PATH_PYTHON
243    if test -z "$PYTHON" ; then
244       have_python="no"
245    else
246       PKG_CHECK_MODULES(PYTHON_BINDING,
247       [
248          pygtk-2.0,
249          glib-2.0 >= $GLIB_REQUIRED
250          gobject-2.0
251          gconf-2.0 >= $GCONF_REQUIRED
252          libxml-2.0
253          libmissioncontrol >= $MISSION_CONTROL_REQUIRED
254          gtk+-2.0 >= $GTK_REQUIRED
255          libglade-2.0 >= $LIBGLADE_REQUIRED
256       ], have_python="yes", have_python="no")
257       if test "x$have_python" = "xyes" ; then
258          AM_CHECK_PYTHON_HEADERS(,have_python="no")
259       fi
260    fi
261 else
262    have_python=no
263 fi
264
265 if test "x$enable_python" = "xyes" -a "x$have_python" != "xyes"; then
266    AC_MSG_ERROR([Couldn't find python.])
267 fi
268
269 AM_CONDITIONAL(HAVE_PYTHON, test "x$have_python" = "xyes")
270
271 # -----------------------------------------------------------
272 # VoIP support
273 # -----------------------------------------------------------
274 AC_ARG_ENABLE(voip,
275               AS_HELP_STRING([--enable-voip=@<:@no/yes@:>@],
276                              [Add support for Voice and Video call]), ,
277                              enable_voip=yes)
278
279 if test "x$enable_voip" = "xyes"; then
280    AC_DEFINE(HAVE_VOIP, 1, [Define if we have voip])
281 fi
282
283 AM_CONDITIONAL(HAVE_VOIP, test "x$enable_voip" = "xyes")
284
285 # -----------------------------------------------------------
286
287 AC_OUTPUT([
288    Makefile
289    data/Makefile
290    data/empathy.desktop.in
291    data/icons/Makefile
292    extensions/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    help/Makefile
311    python/Makefile
312    python/pyempathy/Makefile
313    python/pyempathygtk/Makefile
314    tests/Makefile
315    tests/xml/Makefile
316    tools/Makefile
317 ])