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