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