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