]> git.0d.be Git - empathy.git/blob - configure.ac
Drop libgnomeui dependency (Cosimo Cecchi).
[empathy.git] / configure.ac
1 AC_INIT(Empathy, 2.25.3, 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=17
13 LIBEMPATHY_AGE=0
14 LIBEMPATHY_REVISION=0
15
16 LIBEMPATHY_GTK_CURRENT=16
17 LIBEMPATHY_GTK_AGE=1
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.16.0
29 GTK_REQUIRED=2.14.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.15
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 AM_PATH_PYTHON([2.3])
73
74 EMPATHY_ARG_VALGRIND
75
76 # -----------------------------------------------------------
77 # Pkg-Config dependency checks
78 # -----------------------------------------------------------
79
80 PKG_CHECK_MODULES(LIBEMPATHY,
81 [
82    glib-2.0 >= $GLIB_REQUIRED
83    gobject-2.0
84    libxml-2.0
85    telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
86    libmissioncontrol >= $MISSION_CONTROL_REQUIRED
87    gio-2.0 >= $GLIB_REQUIRED
88    gio-unix-2.0 >= $GLIB_REQUIRED
89 ])
90
91 PKG_CHECK_MODULES(EMPATHY,
92 [
93    glib-2.0 >= $GLIB_REQUIRED
94    gobject-2.0
95    gio-2.0 >= $GLIB_REQUIRED
96    gconf-2.0 >= $GCONF_REQUIRED
97    telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
98    libmissioncontrol >= $MISSION_CONTROL_REQUIRED
99    gtk+-2.0 >= $GTK_REQUIRED
100    x11
101    libglade-2.0 >= $LIBGLADE_REQUIRED
102    libebook-1.2
103 ])
104
105 # -----------------------------------------------------------
106 # Enable debug
107 # -----------------------------------------------------------
108
109 AC_ARG_ENABLE(debug,
110   AC_HELP_STRING([--disable-debug],[compile without debug code]),
111     enable_debug=$enableval, enable_debug=yes )
112
113 if test x$enable_debug = xyes; then
114   AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
115 fi
116
117 # -----------------------------------------------------------
118 # Language Support
119 # -----------------------------------------------------------
120
121 GETTEXT_PACKAGE=empathy
122 AC_SUBST(GETTEXT_PACKAGE)
123 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
124
125 AM_GLIB_GNU_GETTEXT
126
127 # -----------------------------------------------------------
128 # spellchecking checks: enchant and iso-codes
129 # -----------------------------------------------------------
130 AC_ARG_ENABLE(spell,
131               AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
132                              [Enable spell checking]), ,
133                              enable_spell=auto)
134
135 if test "x$enable_spell" != "xno"; then
136    PKG_CHECK_MODULES(ENCHANT,
137    [
138       enchant >= $ENCHANT_REQUIRED,
139       iso-codes >= $ISO_CODES_REQUIRED
140    ], have_enchant="yes", have_enchant="no")
141
142    if test "x$have_enchant" = "xyes"; then
143       AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
144       if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
145          $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
146             AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
147             AC_DEFINE(HAVE_ENCHANT, 1, [Define if you have libenchant])
148             result=yes
149       else
150             result=no
151             have_enchant="no"
152       fi
153       AC_MSG_RESULT([$result])
154    fi
155 else
156    have_enchant=no
157 fi
158
159 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
160    AC_MSG_ERROR([Couldn't find spell dependencies.])
161 fi
162
163 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
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       libmissioncontrol >= $MISSION_CONTROL_REQUIRED
182    ], have_megaphone="yes", have_megaphone="no")
183 else
184    have_megaphone=no
185 fi
186
187 if test "x$enable_megaphone" = "xyes" -a "x$have_megaphone" != "xyes"; then
188    AC_MSG_ERROR([Couldn't find megaphone dependencies.])
189 fi
190
191 AM_CONDITIONAL(HAVE_MEGAPHONE, test "x$have_megaphone" = "xyes")
192
193 # -----------------------------------------------------------
194 # Nothere
195 # -----------------------------------------------------------
196 AC_ARG_ENABLE(nothere,
197               AS_HELP_STRING([--enable-nothere=@<:@no/yes/auto@:>@],
198                              [build nothere applet]), ,
199                              enable_nothere=auto)
200
201 if test "x$enable_nothere" != "xno"; then
202    PKG_CHECK_MODULES(NOTHERE, 
203    [
204       libpanelapplet-2.0 >= $LIBPANELAPPLET_REQUIRED
205       glib-2.0 >= $GLIB_REQUIRED
206       gtk+-2.0 >= $GTK_REQUIRED
207       gconf-2.0 >= $GCONF_REQUIRED
208       libglade-2.0 >= $LIBGLADE_REQUIRED 
209       libmissioncontrol >= $MISSION_CONTROL_REQUIRED
210    ], have_nothere="yes", have_nothere="no")
211 else
212    have_nothere=no
213 fi
214
215 if test "x$enable_nothere" = "xyes" -a "x$have_nothere" != "xyes"; then
216    AC_MSG_ERROR([Couldn't find nothere dependencies.])
217 fi
218
219 AM_CONDITIONAL(HAVE_NOTHERE, test "x$have_nothere" = "xyes")
220
221 # -----------------------------------------------------------
222 # Tests
223 # -----------------------------------------------------------
224 AC_ARG_ENABLE(tests,
225               AS_HELP_STRING([--enable-tests=@<:@no/yes/auto@:>@],
226                              [build tests]), ,
227                              enable_tests=auto)
228
229 if test "x$enable_tests" != "xno"; then
230    PKG_CHECK_MODULES(CHECK,
231    [
232       check >= 0.9.4
233    ], have_check="yes", have_check="no")
234 else
235    have_check=no
236 fi
237
238 if test "x$enable_tests" = "xyes" -a "x$have_check" != "xyes"; then
239    AC_MSG_ERROR([Couldn't find check dependencies.])
240 fi
241
242 AM_CONDITIONAL(HAVE_TESTS, test "x$have_check" = "xyes")
243
244 # -----------------------------------------------------------
245 # Python Bindings
246 # -----------------------------------------------------------
247 AC_ARG_ENABLE(python,
248               AS_HELP_STRING([--enable-python=@<:@no/yes/auto@:>@],
249                              [build python bindings to libempathy and libempathy-gtk]), ,
250                              enable_python=auto)
251
252 if test "x$enable_python" != "xno"; then
253    PKG_CHECK_MODULES(PYTHON_BINDING,
254    [
255       pygtk-2.0,
256       glib-2.0 >= $GLIB_REQUIRED
257       gobject-2.0
258       gconf-2.0 >= $GCONF_REQUIRED
259       libxml-2.0
260       libmissioncontrol >= $MISSION_CONTROL_REQUIRED
261       gtk+-2.0 >= $GTK_REQUIRED
262       libglade-2.0 >= $LIBGLADE_REQUIRED
263    ], have_python="yes", have_python="no")
264    if test "x$have_python" = "xyes" ; then
265       AM_CHECK_PYTHON_HEADERS(,have_python="no")
266       AC_CHECK_PROGS([PYGOBJECTCODEGEN], [pygobject-codegen-2.0 pygtk-codegen-2.0])
267    fi
268 else
269    have_python=no
270 fi
271
272 if test "x$enable_python" = "xyes" -a "x$have_python" != "xyes"; then
273    AC_MSG_ERROR([Couldn't find python.])
274 fi
275
276 AM_CONDITIONAL(HAVE_PYTHON, test "x$have_python" = "xyes")
277
278 # -----------------------------------------------------------
279
280 AC_OUTPUT([
281    Makefile
282    data/Makefile
283    data/empathy.desktop.in
284    data/icons/Makefile
285    extensions/Makefile
286    po/Makefile.in
287    libempathy/Makefile
288    libempathy/libempathy.pc
289    libempathy-gtk/Makefile
290    libempathy-gtk/libempathy-gtk.pc
291    src/Makefile
292    megaphone/Makefile
293    megaphone/src/Makefile
294    megaphone/data/Makefile
295    nothere/Makefile
296    nothere/src/Makefile
297    nothere/data/Makefile
298    docs/Makefile
299    docs/libempathy/Makefile
300    docs/libempathy/version.xml
301    docs/libempathy-gtk/Makefile
302    docs/libempathy-gtk/version.xml
303    help/Makefile
304    python/Makefile
305    python/pyempathy/Makefile
306    python/pyempathygtk/Makefile
307    tests/Makefile
308    tests/xml/Makefile
309    tools/Makefile
310 ])