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