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