]> git.0d.be Git - empathy.git/blob - configure.ac
Remove "override server settings" frame in ICQ widget.
[empathy.git] / configure.ac
1 AC_INIT(Empathy, 0.21.91, 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=10
13 LIBEMPATHY_AGE=0
14 LIBEMPATHY_REVISION=0
15
16 LIBEMPATHY_GTK_CURRENT=10
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    libxml-2.0
77    libtelepathy >= $TELEPATHY_REQUIRED
78    telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
79    libmissioncontrol >= $MISSION_CONTROL_REQUIRED
80 ])
81
82 PKG_CHECK_MODULES(EMPATHY,
83 [
84    glib-2.0 >= $GLIB_REQUIRED
85    gobject-2.0
86    gconf-2.0 >= $GCONF_REQUIRED
87    libtelepathy >= $TELEPATHY_REQUIRED
88    telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
89    libmissioncontrol >= $MISSION_CONTROL_REQUIRED
90    gnome-vfs-2.0
91    gtk+-2.0 >= $GTK_REQUIRED
92    x11
93    libglade-2.0 >= $LIBGLADE_REQUIRED
94    libebook-1.2
95 ])
96
97 # -----------------------------------------------------------
98 # Language Support
99 # -----------------------------------------------------------
100
101 GETTEXT_PACKAGE=empathy
102 AC_SUBST(GETTEXT_PACKAGE)
103 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
104
105 AM_GLIB_GNU_GETTEXT
106
107 # -----------------------------------------------------------
108 # ISO codes, used for aspell support
109 # -----------------------------------------------------------
110 AC_MSG_CHECKING([whether iso-codes exists and has iso-639 domain])
111 if $PKG_CONFIG --variable=domains iso-codes | grep -q 639 ; then
112    AC_MSG_RESULT([yes])
113    iso_codes_prefix=`$PKG_CONFIG --variable=prefix iso-codes`
114    iso_codes_pkgconfig=iso-codes
115    have_iso_codes=yes
116 else
117    AC_MSG_RESULT([no])
118    iso_codes_prefix=
119    iso_codes_pkgconfig=
120    have_iso_codes=no
121 fi
122
123 AC_DEFINE_UNQUOTED([ISO_CODES_PREFIX],["$iso_codes_prefix"],[ISO codes prefix])
124
125 # -----------------------------------------------------------
126 # ASpell
127 # -----------------------------------------------------------
128 AC_ARG_ENABLE(aspell,
129               AS_HELP_STRING([--enable-aspell=@<:@no/yes/auto@:>@],
130                              [compile with aspell support]), ,
131                              enable_aspell=auto)
132
133 if test "x$enable_aspell" = "xyes" -a "x$have_iso_codes" != "xyes"; then
134    AC_MSG_ERROR([You must have iso-codes with the iso-639 domain to use aspell.])
135 fi
136
137 if test "x$enable_aspell" != "xno" -a "x$have_iso_codes" = "xyes"; then
138    AC_CHECK_LIB(aspell, aspell_speller_check,have_aspell=yes,have_aspell=no,)
139
140    if test "x$have_aspell" = "xyes"; then
141       AC_DEFINE(HAVE_ASPELL, 1, [Define if we have aspell])
142       EMPATHY_LIBS="$EMPATHY_LIBS -laspell"
143    else
144       have_aspell=no
145    fi
146 else
147    have_aspell=no
148 fi
149
150 if test "x$enable_aspell" = "xyes" -a "x$have_aspell" != "xyes"; then
151    AC_MSG_ERROR([Couldn't find aspell.])
152 fi
153
154
155 # -----------------------------------------------------------
156 # Megaphone
157 # -----------------------------------------------------------
158 AC_ARG_ENABLE(megaphone,
159               AS_HELP_STRING([--enable-megaphone=@<:@no/yes/auto@:>@],
160                              [build megaphone applet]), ,
161                              enable_megaphone=auto)
162
163 if test "x$enable_megaphone" != "xno"; then
164    PKG_CHECK_MODULES(MEGAPHONE, 
165    [
166       libpanelapplet-2.0 >= $LIBPANELAPPLET_REQUIRED
167       glib-2.0 >= $GLIB_REQUIRED
168       gtk+-2.0 >= $GTK_REQUIRED
169       gconf-2.0 >= $GCONF_REQUIRED
170       libglade-2.0 >= $LIBGLADE_REQUIRED 
171       gnome-vfs-2.0
172       libtelepathy >= $TELEPATHY_REQUIRED
173       libmissioncontrol >= $MISSION_CONTROL_REQUIRED
174    ], have_megaphone="yes", have_megaphone="no")
175 else
176    have_megaphone=no
177 fi
178
179 if test "x$enable_megaphone" = "xyes" -a "x$have_megaphone" != "xyes"; then
180    AC_MSG_ERROR([Couldn't find megaphone dependencies.])
181 fi
182
183 AM_CONDITIONAL(HAVE_MEGAPHONE, test "x$have_megaphone" = "xyes")
184
185 # -----------------------------------------------------------
186 # Nothere
187 # -----------------------------------------------------------
188 AC_ARG_ENABLE(nothere,
189               AS_HELP_STRING([--enable-nothere=@<:@no/yes/auto@:>@],
190                              [build nothere applet]), ,
191                              enable_nothere=no)
192
193 if test "x$enable_nothere" != "xno"; then
194    PKG_CHECK_MODULES(NOTHERE, 
195    [
196       libpanelapplet-2.0 >= $LIBPANELAPPLET_REQUIRED
197       glib-2.0 >= $GLIB_REQUIRED
198       gtk+-2.0 >= $GTK_REQUIRED
199       gconf-2.0 >= $GCONF_REQUIRED
200       libglade-2.0 >= $LIBGLADE_REQUIRED 
201       libtelepathy >= $TELEPATHY_REQUIRED
202       libmissioncontrol >= $MISSION_CONTROL_REQUIRED
203    ], have_nothere="yes", have_nothere="no")
204 else
205    have_nothere=no
206 fi
207
208 if test "x$enable_nothere" = "xyes" -a "x$have_nothere" != "xyes"; then
209    AC_MSG_ERROR([Couldn't find nothere dependencies.])
210 fi
211
212 AM_CONDITIONAL(HAVE_NOTHERE, test "x$have_nothere" = "xyes")
213
214 # -----------------------------------------------------------
215 # Tests
216 # -----------------------------------------------------------
217 AC_ARG_ENABLE(tests,
218               AS_HELP_STRING([--enable-tests=@<:@no/yes/auto@:>@],
219                              [build tests]), ,
220                              enable_tests=auto)
221
222 if test "x$enable_tests" != "xno"; then
223    PKG_CHECK_MODULES(CHECK,
224    [
225       check >= 0.9.4
226    ], have_check="yes", have_check="no")
227 else
228    have_check=no
229 fi
230
231 if test "x$enable_tests" = "xyes" -a "x$have_check" != "xyes"; then
232    AC_MSG_ERROR([Couldn't find check dependencies.])
233 fi
234
235 AM_CONDITIONAL(HAVE_TESTS, test "x$have_check" = "xyes")
236
237 # -----------------------------------------------------------
238 # Python Bindings
239 # -----------------------------------------------------------
240 AC_ARG_ENABLE(python,
241               AS_HELP_STRING([--enable-python=@<:@no/yes/auto@:>@],
242                              [build python bindings to libempathy and libempathy-gtk]), ,
243                              enable_python=auto)
244
245 if test "x$enable_python" != "xno"; then
246    AM_PATH_PYTHON
247    if test -z "$PYTHON" ; then
248       have_python="no"
249    else
250       PKG_CHECK_MODULES(PYTHON_BINDING,
251       [
252          pygtk-2.0,
253          glib-2.0 >= $GLIB_REQUIRED
254          gobject-2.0
255          gconf-2.0 >= $GCONF_REQUIRED
256          libxml-2.0
257          gnome-vfs-2.0
258          libtelepathy >= $TELEPATHY_REQUIRED
259          libmissioncontrol >= $MISSION_CONTROL_REQUIRED
260          gtk+-2.0 >= $GTK_REQUIRED
261          libglade-2.0 >= $LIBGLADE_REQUIRED
262       ], have_python="yes", have_python="no")
263    fi
264 else
265    have_python=no
266 fi
267
268 if test "x$enable_python" = "xyes" -a "x$have_python" != "xyes"; then
269    AC_MSG_ERROR([Couldn't find python.])
270 fi
271
272 AM_CONDITIONAL(HAVE_PYTHON, test "x$have_python" = "xyes")
273
274 # -----------------------------------------------------------
275 # VoIP support
276 # -----------------------------------------------------------
277 AC_ARG_ENABLE(voip,
278               AS_HELP_STRING([--enable-voip=@<:@no/yes@:>@],
279                              [Add support for Voice and Video call]), ,
280                              enable_voip=no)
281
282 if test "x$enable_voip" = "xyes"; then
283    AC_DEFINE(HAVE_VOIP, 1, [Define if we have voip])
284 fi
285
286 AM_CONDITIONAL(HAVE_VOIP, test "x$enable_voip" = "xyes")
287
288
289 # -----------------------------------------------------------
290 # Misc
291 # -----------------------------------------------------------
292 AC_DEFINE_UNQUOTED([UNINSTALLED_GLADE_DIR], ["`pwd`/libempathy-gtk"], [path to glade files])
293 AC_DEFINE_UNQUOTED([UNINSTALLED_DTD_DIR], ["`pwd`/libempathy"], [path to dtd files])
294 AC_DEFINE_UNQUOTED([UNINSTALLED_IRC_DIR], ["`pwd`/libempathy"], [path to IRC network file])
295
296 # -----------------------------------------------------------
297
298 AC_OUTPUT([
299    Makefile
300    data/Makefile
301    data/empathy.desktop.in
302    data/icons/Makefile
303    po/Makefile.in
304    libempathy/Makefile
305    libempathy/libempathy.pc
306    libempathy-gtk/Makefile
307    libempathy-gtk/libempathy-gtk.pc
308    src/Makefile
309    megaphone/Makefile
310    megaphone/src/Makefile
311    megaphone/data/Makefile
312    nothere/Makefile
313    nothere/src/Makefile
314    nothere/data/Makefile
315    docs/Makefile
316    docs/libempathy/Makefile
317    docs/libempathy/version.xml
318    docs/libempathy-gtk/Makefile
319    docs/libempathy-gtk/version.xml
320    python/Makefile
321    python/pyempathy/Makefile
322    python/pyempathygtk/Makefile
323    tests/Makefile
324 ])