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