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