]> git.0d.be Git - empathy.git/blob - configure.ac
Add a features property on EmpathyContactListView to enable/disable each action.
[empathy.git] / configure.ac
1 AC_INIT(Empathy, 0.21.6, 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=9
13 LIBEMPATHY_AGE=2
14 LIBEMPATHY_REVISION=0
15
16 LIBEMPATHY_GTK_CURRENT=9
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.14.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_REQUIRED=0.3.1
34 TELEPATHY_GLIB_REQUIRED=0.7.0
35 MISSION_CONTROL_REQUIRED=4.53
36
37 # Uncomment that to build without deprecated symbols
38 # AC_DEFINE(GTK_DISABLE_DEPRECATED, 1, [Disable deprecated GTK symbols])
39 # AC_DEFINE(G_DISABLE_DEPRECATED, 1, [Disable deprecated GLib symbols])
40 # AC_DEFINE(LIBTELEPATHY_DISABLE_DEPRECATED, 1, [Disable deprecated libtelepathy 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)
50 AM_MAINTAINER_MODE
51 AC_ISC_POSIX
52 AC_PROG_CC
53 AC_HEADER_STDC
54 AM_PROG_LIBTOOL
55 AM_PATH_GLIB_2_0
56 AC_PATH_XTRA
57 IT_PROG_INTLTOOL([0.35.0])
58 GTK_DOC_CHECK([1.3])
59 IDT_COMPILE_WARNINGS
60 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
61 AC_PATH_PROG(GCONFTOOL, gconftool-2)
62 AM_GCONF_SOURCE_2
63 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
64 AC_SUBST(GLIB_GENMARSHAL)
65
66 EMPATHY_ARG_VALGRIND
67
68 # -----------------------------------------------------------
69 # Pkg-Config dependency checks
70 # -----------------------------------------------------------
71
72 PKG_CHECK_MODULES(LIBEMPATHY,
73 [
74    glib-2.0 >= $GLIB_REQUIRED
75    gobject-2.0
76    gconf-2.0 >= $GCONF_REQUIRED
77    libxml-2.0
78    libtelepathy >= $TELEPATHY_REQUIRED
79    telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
80    libmissioncontrol >= $MISSION_CONTROL_REQUIRED
81 ])
82
83 PKG_CHECK_MODULES(EMPATHY,
84 [
85    glib-2.0 >= $GLIB_REQUIRED
86    gobject-2.0
87    gconf-2.0 >= $GCONF_REQUIRED
88    libxml-2.0
89    libtelepathy >= $TELEPATHY_REQUIRED
90    telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
91    libmissioncontrol >= $MISSION_CONTROL_REQUIRED
92    gnome-vfs-2.0
93    gtk+-2.0 >= $GTK_REQUIRED
94    x11
95    libglade-2.0 >= $LIBGLADE_REQUIRED
96    libebook-1.2
97 ])
98
99 # -----------------------------------------------------------
100 # Language Support
101 # -----------------------------------------------------------
102
103 GETTEXT_PACKAGE=empathy
104 AC_SUBST(GETTEXT_PACKAGE)
105 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
106
107 AM_GLIB_GNU_GETTEXT
108
109 # -----------------------------------------------------------
110 # ISO codes, used for aspell support
111 # -----------------------------------------------------------
112 AC_MSG_CHECKING([whether iso-codes exists and has iso-639 domain])
113 if $PKG_CONFIG --variable=domains iso-codes | grep -q 639 ; then
114    AC_MSG_RESULT([yes])
115    iso_codes_prefix=`$PKG_CONFIG --variable=prefix iso-codes`
116    iso_codes_pkgconfig=iso-codes
117    have_iso_codes=yes
118 else
119    AC_MSG_RESULT([no])
120    iso_codes_prefix=
121    iso_codes_pkgconfig=
122    have_iso_codes=no
123 fi
124
125 AC_DEFINE_UNQUOTED([ISO_CODES_PREFIX],["$iso_codes_prefix"],[ISO codes prefix])
126
127 # -----------------------------------------------------------
128 # ASpell
129 # -----------------------------------------------------------
130 AC_ARG_ENABLE(aspell,
131               AS_HELP_STRING([--enable-aspell=@<:@no/yes/auto@:>@],
132                              [compile with aspell support]), ,
133                              enable_aspell=auto)
134
135 if test "x$enable_aspell" = "xyes" -a "x$have_iso_codes" != "xyes"; then
136    AC_MSG_ERROR([You must have iso-codes with the iso-639 domain to use aspell.])
137 fi
138
139 if test "x$enable_aspell" != "xno" -a "x$have_iso_codes" = "xyes"; then
140    AC_CHECK_LIB(aspell, aspell_speller_check,have_aspell=yes,have_aspell=no,)
141
142    if test "x$have_aspell" = "xyes"; then
143       AC_DEFINE(HAVE_ASPELL, 1, [Define if we have aspell])
144       EMPATHY_LIBS="$EMPATHY_LIBS -laspell"
145    else
146       have_aspell=no
147    fi
148 else
149    have_aspell=no
150 fi
151
152 if test "x$enable_aspell" = "xyes" -a "x$have_aspell" != "xyes"; then
153    AC_MSG_ERROR([Couldn't find aspell.])
154 fi
155
156
157 # -----------------------------------------------------------
158 # Megaphone
159 # -----------------------------------------------------------
160 AC_ARG_ENABLE(megaphone,
161               AS_HELP_STRING([--enable-megaphone=@<:@no/yes/auto@:>@],
162                              [build megaphone applet]), ,
163                              enable_megaphone=auto)
164
165 if test "x$enable_megaphone" != "xno"; then
166    PKG_CHECK_MODULES(MEGAPHONE, 
167    [
168       libpanelapplet-2.0 >= $LIBPANELAPPLET_REQUIRED
169       glib-2.0 >= $GLIB_REQUIRED
170       gtk+-2.0 >= $GTK_REQUIRED
171       gconf-2.0 >= $GCONF_REQUIRED
172       libglade-2.0 >= $LIBGLADE_REQUIRED 
173       gnome-vfs-2.0
174       libtelepathy >= $TELEPATHY_REQUIRED
175       libmissioncontrol >= $MISSION_CONTROL_REQUIRED
176    ], have_megaphone="yes", have_megaphone="no")
177 else
178    have_megaphone=no
179 fi
180
181 if test "x$enable_megaphone" = "xyes" -a "x$have_megaphone" != "xyes"; then
182    AC_MSG_ERROR([Couldn't find megaphone dependencies.])
183 fi
184
185 AM_CONDITIONAL(HAVE_MEGAPHONE, test "x$have_megaphone" = "xyes")
186
187 # -----------------------------------------------------------
188 # Nothere
189 # -----------------------------------------------------------
190 AC_ARG_ENABLE(nothere,
191               AS_HELP_STRING([--enable-nothere=@<:@no/yes/auto@:>@],
192                              [build nothere applet]), ,
193                              enable_nothere=no)
194
195 if test "x$enable_nothere" != "xno"; then
196    PKG_CHECK_MODULES(NOTHERE, 
197    [
198       libpanelapplet-2.0 >= $LIBPANELAPPLET_REQUIRED
199       glib-2.0 >= $GLIB_REQUIRED
200       gtk+-2.0 >= $GTK_REQUIRED
201       gconf-2.0 >= $GCONF_REQUIRED
202       libglade-2.0 >= $LIBGLADE_REQUIRED 
203       libtelepathy >= $TELEPATHY_REQUIRED
204       libmissioncontrol >= $MISSION_CONTROL_REQUIRED
205    ], have_nothere="yes", have_nothere="no")
206 else
207    have_nothere=no
208 fi
209
210 if test "x$enable_nothere" = "xyes" -a "x$have_nothere" != "xyes"; then
211    AC_MSG_ERROR([Couldn't find nothere dependencies.])
212 fi
213
214 AM_CONDITIONAL(HAVE_NOTHERE, test "x$have_nothere" = "xyes")
215
216 # -----------------------------------------------------------
217 # Tests
218 # -----------------------------------------------------------
219 AC_ARG_ENABLE(tests,
220               AS_HELP_STRING([--enable-tests=@<:@no/yes/auto@:>@],
221                              [build tests]), ,
222                              enable_tests=auto)
223
224 if test "x$enable_tests" != "xno"; then
225    PKG_CHECK_MODULES(CHECK,
226    [
227       check >= 0.9.4
228    ], have_check="yes", have_check="no")
229 else
230    have_check=no
231 fi
232
233 if test "x$enable_tests" = "xyes" -a "x$have_check" != "xyes"; then
234    AC_MSG_ERROR([Couldn't find check dependencies.])
235 fi
236
237 AM_CONDITIONAL(HAVE_TESTS, test "x$have_check" = "xyes")
238
239 # -----------------------------------------------------------
240 # Python Bindings
241 # -----------------------------------------------------------
242 AC_ARG_ENABLE(python,
243               AS_HELP_STRING([--enable-python=@<:@no/yes/auto@:>@],
244                              [build python bindings to libempathy and libempathy-gtk]), ,
245                              enable_python=auto)
246
247 if test "x$enable_python" != "xno"; then
248    AM_PATH_PYTHON
249    if test -z "$PYTHON" ; then
250       have_python="no"
251    else
252       PKG_CHECK_MODULES(PYTHON_BINDING,
253       [
254          pygtk-2.0,
255          glib-2.0 >= $GLIB_REQUIRED
256          gobject-2.0
257          gconf-2.0 >= $GCONF_REQUIRED
258          libxml-2.0
259          gnome-vfs-2.0
260          libtelepathy >= $TELEPATHY_REQUIRED
261          libmissioncontrol >= $MISSION_CONTROL_REQUIRED
262          gtk+-2.0 >= $GTK_REQUIRED
263          libglade-2.0 >= $LIBGLADE_REQUIRED
264       ], have_python="yes", have_python="no")
265    fi
266 else
267    have_python=no
268 fi
269
270 if test "x$enable_python" = "xyes" -a "x$have_python" != "xyes"; then
271    AC_MSG_ERROR([Couldn't find python.])
272 fi
273
274 AM_CONDITIONAL(HAVE_PYTHON, test "x$have_python" = "xyes")
275
276 # -----------------------------------------------------------
277 # VoIP support
278 # -----------------------------------------------------------
279 AC_ARG_ENABLE(voip,
280               AS_HELP_STRING([--enable-voip=@<:@no/yes@:>@],
281                              [Add support for Voice and Video call]), ,
282                              enable_voip=no)
283
284 if test "x$enable_voip" = "xyes"; then
285    AC_DEFINE(HAVE_VOIP, 1, [Define if we have voip])
286 fi
287
288 AM_CONDITIONAL(HAVE_VOIP, test "x$enable_voip" = "xyes")
289
290 # -----------------------------------------------------------
291
292 AC_OUTPUT([
293    Makefile
294    data/Makefile
295    data/empathy.desktop.in
296    data/icons/Makefile
297    po/Makefile.in
298    libempathy/Makefile
299    libempathy/libempathy.pc
300    libempathy-gtk/Makefile
301    libempathy-gtk/libempathy-gtk.pc
302    src/Makefile
303    megaphone/Makefile
304    megaphone/src/Makefile
305    megaphone/data/Makefile
306    nothere/Makefile
307    nothere/src/Makefile
308    nothere/data/Makefile
309    docs/Makefile
310    docs/libempathy/Makefile
311    docs/libempathy/version.xml
312    docs/libempathy-gtk/Makefile
313    docs/libempathy-gtk/version.xml
314    python/Makefile
315    python/pyempathy/Makefile
316    python/pyempathygtk/Makefile
317    tests/Makefile
318 ])