]> git.0d.be Git - empathy.git/blob - configure.ac
Add nothere files to gitignore.
[empathy.git] / configure.ac
1 AC_INIT(Empathy, 0.23.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=11
13 LIBEMPATHY_AGE=0
14 LIBEMPATHY_REVISION=1
15
16 LIBEMPATHY_GTK_CURRENT=11
17 LIBEMPATHY_GTK_AGE=0
18 LIBEMPATHY_GTK_REVISION=1
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
36 # Uncomment that to build without deprecated symbols
37 # AC_DEFINE(GTK_DISABLE_DEPRECATED, 1, [Disable deprecated GTK symbols])
38 # AC_DEFINE(G_DISABLE_DEPRECATED, 1, [Disable deprecated GLib symbols])
39
40 AC_CONFIG_MACRO_DIR([m4])
41 AC_CONFIG_HEADERS([config.h])
42 AC_CONFIG_SRCDIR([configure.ac])
43 AC_CONFIG_AUX_DIR(.)
44
45 GNOME_COMMON_INIT
46
47 AM_INIT_AUTOMAKE(1.9 dist-bzip2 no-define -Wno-portability)
48 AM_MAINTAINER_MODE
49 AC_ISC_POSIX
50 AC_PROG_CC
51 AC_HEADER_STDC
52 AM_PROG_LIBTOOL
53 AM_PROG_MKDIR_P
54 AM_PATH_GLIB_2_0
55 AC_PATH_XTRA
56 IT_PROG_INTLTOOL([0.35.0])
57 GTK_DOC_CHECK([1.3])
58 IDT_COMPILE_WARNINGS
59 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
60 AC_PATH_PROG(GCONFTOOL, gconftool-2)
61 AM_GCONF_SOURCE_2
62 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
63 AC_SUBST(GLIB_GENMARSHAL)
64
65 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
66 if test -z "$XSLTPROC"; then
67   AC_MSG_ERROR([xsltproc (from libxslt) is required])
68 fi
69 AC_CHECK_PROGS([PYTHON], [python python2.3 python2.4 python2.5])
70 if test -z "$PYTHON"; then
71   AC_MSG_ERROR([Python is required])
72 fi
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 ])
88
89 PKG_CHECK_MODULES(EMPATHY,
90 [
91    glib-2.0 >= $GLIB_REQUIRED
92    gobject-2.0
93    gio-2.0 >= $GLIB_REQUIRED
94    gconf-2.0 >= $GCONF_REQUIRED
95    telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
96    libmissioncontrol >= $MISSION_CONTROL_REQUIRED
97    gtk+-2.0 >= $GTK_REQUIRED
98    x11
99    libglade-2.0 >= $LIBGLADE_REQUIRED
100    libebook-1.2
101 ])
102
103 # -----------------------------------------------------------
104 # Language Support
105 # -----------------------------------------------------------
106
107 GETTEXT_PACKAGE=empathy
108 AC_SUBST(GETTEXT_PACKAGE)
109 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
110
111 AM_GLIB_GNU_GETTEXT
112
113 # -----------------------------------------------------------
114 # ISO codes, used for aspell support
115 # -----------------------------------------------------------
116 AC_MSG_CHECKING([whether iso-codes exists and has iso-639 domain])
117 if $PKG_CONFIG --variable=domains iso-codes | grep -q 639 ; then
118    AC_MSG_RESULT([yes])
119    iso_codes_prefix=`$PKG_CONFIG --variable=prefix iso-codes`
120    iso_codes_pkgconfig=iso-codes
121    have_iso_codes=yes
122 else
123    AC_MSG_RESULT([no])
124    iso_codes_prefix=
125    iso_codes_pkgconfig=
126    have_iso_codes=no
127 fi
128
129 AC_DEFINE_UNQUOTED([ISO_CODES_PREFIX],["$iso_codes_prefix"],[ISO codes prefix])
130
131 # -----------------------------------------------------------
132 # ASpell
133 # -----------------------------------------------------------
134 AC_ARG_ENABLE(aspell,
135               AS_HELP_STRING([--enable-aspell=@<:@no/yes/auto@:>@],
136                              [compile with aspell support]), ,
137                              enable_aspell=auto)
138
139 if test "x$enable_aspell" = "xyes" -a "x$have_iso_codes" != "xyes"; then
140    AC_MSG_ERROR([You must have iso-codes with the iso-639 domain to use aspell.])
141 fi
142
143 if test "x$enable_aspell" != "xno" -a "x$have_iso_codes" = "xyes"; then
144    AC_CHECK_LIB(aspell, aspell_speller_check,have_aspell=yes,have_aspell=no,)
145
146    if test "x$have_aspell" = "xyes"; then
147       AC_DEFINE(HAVE_ASPELL, 1, [Define if we have aspell])
148       EMPATHY_LIBS="$EMPATHY_LIBS -laspell"
149    else
150       have_aspell=no
151    fi
152 else
153    have_aspell=no
154 fi
155
156 if test "x$enable_aspell" = "xyes" -a "x$have_aspell" != "xyes"; then
157    AC_MSG_ERROR([Couldn't find aspell.])
158 fi
159
160
161 # -----------------------------------------------------------
162 # Megaphone
163 # -----------------------------------------------------------
164 AC_ARG_ENABLE(megaphone,
165               AS_HELP_STRING([--enable-megaphone=@<:@no/yes/auto@:>@],
166                              [build megaphone applet]), ,
167                              enable_megaphone=auto)
168
169 if test "x$enable_megaphone" != "xno"; then
170    PKG_CHECK_MODULES(MEGAPHONE, 
171    [
172       libpanelapplet-2.0 >= $LIBPANELAPPLET_REQUIRED
173       glib-2.0 >= $GLIB_REQUIRED
174       gtk+-2.0 >= $GTK_REQUIRED
175       gconf-2.0 >= $GCONF_REQUIRED
176       libglade-2.0 >= $LIBGLADE_REQUIRED 
177       libmissioncontrol >= $MISSION_CONTROL_REQUIRED
178    ], have_megaphone="yes", have_megaphone="no")
179 else
180    have_megaphone=no
181 fi
182
183 if test "x$enable_megaphone" = "xyes" -a "x$have_megaphone" != "xyes"; then
184    AC_MSG_ERROR([Couldn't find megaphone dependencies.])
185 fi
186
187 AM_CONDITIONAL(HAVE_MEGAPHONE, test "x$have_megaphone" = "xyes")
188
189 # -----------------------------------------------------------
190 # Nothere
191 # -----------------------------------------------------------
192 AC_ARG_ENABLE(nothere,
193               AS_HELP_STRING([--enable-nothere=@<:@no/yes/auto@:>@],
194                              [build nothere applet]), ,
195                              enable_nothere=auto)
196
197 if test "x$enable_nothere" != "xno"; then
198    PKG_CHECK_MODULES(NOTHERE, 
199    [
200       libpanelapplet-2.0 >= $LIBPANELAPPLET_REQUIRED
201       glib-2.0 >= $GLIB_REQUIRED
202       gtk+-2.0 >= $GTK_REQUIRED
203       gconf-2.0 >= $GCONF_REQUIRED
204       libglade-2.0 >= $LIBGLADE_REQUIRED 
205       libmissioncontrol >= $MISSION_CONTROL_REQUIRED
206    ], have_nothere="yes", have_nothere="no")
207 else
208    have_nothere=no
209 fi
210
211 if test "x$enable_nothere" = "xyes" -a "x$have_nothere" != "xyes"; then
212    AC_MSG_ERROR([Couldn't find nothere dependencies.])
213 fi
214
215 AM_CONDITIONAL(HAVE_NOTHERE, test "x$have_nothere" = "xyes")
216
217 # -----------------------------------------------------------
218 # Tests
219 # -----------------------------------------------------------
220 AC_ARG_ENABLE(tests,
221               AS_HELP_STRING([--enable-tests=@<:@no/yes/auto@:>@],
222                              [build tests]), ,
223                              enable_tests=auto)
224
225 if test "x$enable_tests" != "xno"; then
226    PKG_CHECK_MODULES(CHECK,
227    [
228       check >= 0.9.4
229    ], have_check="yes", have_check="no")
230 else
231    have_check=no
232 fi
233
234 if test "x$enable_tests" = "xyes" -a "x$have_check" != "xyes"; then
235    AC_MSG_ERROR([Couldn't find check dependencies.])
236 fi
237
238 AM_CONDITIONAL(HAVE_TESTS, test "x$have_check" = "xyes")
239
240 # -----------------------------------------------------------
241 # Python Bindings
242 # -----------------------------------------------------------
243 AC_ARG_ENABLE(python,
244               AS_HELP_STRING([--enable-python=@<:@no/yes/auto@:>@],
245                              [build python bindings to libempathy and libempathy-gtk]), ,
246                              enable_python=auto)
247
248 if test "x$enable_python" != "xno"; then
249    AM_PATH_PYTHON
250    if test -z "$PYTHON" ; then
251       have_python="no"
252    else
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       fi
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 # VoIP support
280 # -----------------------------------------------------------
281 AC_ARG_ENABLE(voip,
282               AS_HELP_STRING([--enable-voip=@<:@no/yes@:>@],
283                              [Add support for Voice and Video call]), ,
284                              enable_voip=yes)
285
286 if test "x$enable_voip" = "xyes"; then
287    AC_DEFINE(HAVE_VOIP, 1, [Define if we have voip])
288 fi
289
290 AM_CONDITIONAL(HAVE_VOIP, test "x$enable_voip" = "xyes")
291
292 # -----------------------------------------------------------
293
294 AC_OUTPUT([
295    Makefile
296    data/Makefile
297    data/empathy.desktop.in
298    data/icons/Makefile
299    extensions/Makefile
300    po/Makefile.in
301    libempathy/Makefile
302    libempathy/libempathy.pc
303    libempathy-gtk/Makefile
304    libempathy-gtk/libempathy-gtk.pc
305    src/Makefile
306    megaphone/Makefile
307    megaphone/src/Makefile
308    megaphone/data/Makefile
309    nothere/Makefile
310    nothere/src/Makefile
311    nothere/data/Makefile
312    docs/Makefile
313    docs/libempathy/Makefile
314    docs/libempathy/version.xml
315    docs/libempathy-gtk/Makefile
316    docs/libempathy-gtk/version.xml
317    python/Makefile
318    python/pyempathy/Makefile
319    python/pyempathygtk/Makefile
320    tests/Makefile
321    tests/xml/Makefile
322    tools/Makefile
323 ])