]> git.0d.be Git - empathy.git/blob - configure.ac
Bump ABI version
[empathy.git] / configure.ac
1 AC_INIT(Empathy, 2.27.2, 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-2008 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=25
13 LIBEMPATHY_AGE=0
14 LIBEMPATHY_REVISION=0
15
16 LIBEMPATHY_GTK_CURRENT=23
17 LIBEMPATHY_GTK_AGE=0
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.16.0
29 GTK_REQUIRED=2.16.0
30 GCONF_REQUIRED=1.2.0
31 LIBPANELAPPLET_REQUIRED=2.10.0
32 TELEPATHY_GLIB_REQUIRED=0.7.27
33 MISSION_CONTROL_REQUIRED=4.61
34 ENCHANT_REQUIRED=1.2.0
35 ISO_CODES_REQUIRED=0.35
36 LIBNOTIFY_REQUIRED=0.4.4
37 LIBCANBERRA_GTK_REQUIRED=0.4
38
39 # Use --enable-maintainer-mode to disabled deprecated symbols
40 GNOME_MAINTAINER_MODE_DEFINES
41
42 # Uncomment that to build with single include disabled
43 #AC_DEFINE(G_DISABLE_SINGLE_INCLUDES, [], [Disable single includes for GLib])
44 #AC_DEFINE(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES, [], [Disable single includes for GDK pixbuf])
45 #AC_DEFINE(GTK_DISABLE_SINGLE_INCLUDES, [], [Disable single includes for GTK])
46
47 AC_CONFIG_MACRO_DIR([m4])
48 AC_CONFIG_HEADERS([config.h])
49 AC_CONFIG_SRCDIR([configure.ac])
50 AC_CONFIG_AUX_DIR(.)
51
52 GNOME_COMMON_INIT
53
54 AM_INIT_AUTOMAKE(1.9 dist-bzip2 no-define -Wno-portability)
55 AC_ISC_POSIX
56 AC_PROG_CC
57 AC_HEADER_STDC
58 AM_PROG_LIBTOOL
59 AM_PROG_MKDIR_P
60 AM_PATH_GLIB_2_0
61 AC_PATH_XTRA
62 IT_PROG_INTLTOOL([0.35.0])
63 GTK_DOC_CHECK([1.3])
64 GNOME_DOC_INIT
65 IDT_COMPILE_WARNINGS
66 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
67 AC_PATH_PROG(GCONFTOOL, gconftool-2)
68 AM_GCONF_SOURCE_2
69 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
70 AC_SUBST(GLIB_GENMARSHAL)
71
72 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
73 if test -z "$XSLTPROC"; then
74   AC_MSG_ERROR([xsltproc (from libxslt) is required])
75 fi
76 AM_PATH_PYTHON([2.3])
77
78 EMPATHY_ARG_VALGRIND
79
80 # -----------------------------------------------------------
81 # Pkg-Config dependency checks
82 # -----------------------------------------------------------
83
84 PKG_CHECK_MODULES(LIBEMPATHY,
85 [
86    glib-2.0 >= $GLIB_REQUIRED
87    gobject-2.0
88    gio-2.0 >= $GLIB_REQUIRED
89    gio-unix-2.0 >= $GLIB_REQUIRED
90    libxml-2.0
91    telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
92    libmissioncontrol >= $MISSION_CONTROL_REQUIRED
93    telepathy-farsight
94 ])
95
96 PKG_CHECK_MODULES(LIBEMPATHYGTK,
97 [
98    glib-2.0 >= $GLIB_REQUIRED
99    gobject-2.0
100    gio-2.0 >= $GLIB_REQUIRED
101    gconf-2.0 >= $GCONF_REQUIRED
102    x11
103    gtk+-2.0 >= $GTK_REQUIRED
104    libcanberra-gtk >= $LIBCANBERRA_GTK_REQUIRED
105    telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
106    libmissioncontrol >= $MISSION_CONTROL_REQUIRED
107    telepathy-farsight
108    farsight2-0.10
109    gstreamer-0.10
110    gstreamer-interfaces-0.10
111 ])
112
113 PKG_CHECK_MODULES(EMPATHY,
114 [
115    glib-2.0 >= $GLIB_REQUIRED
116    gobject-2.0
117    gio-2.0 >= $GLIB_REQUIRED
118    gconf-2.0 >= $GCONF_REQUIRED
119    x11
120    gtk+-2.0 >= $GTK_REQUIRED
121    libcanberra-gtk >= $LIBCANBERRA_GTK_REQUIRED
122    libebook-1.2
123    telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
124    libmissioncontrol >= $MISSION_CONTROL_REQUIRED
125    telepathy-farsight
126    gstreamer-0.10
127    gstreamer-interfaces-0.10
128 ])
129
130 PKG_CHECK_MODULES(LIBNOTIFY, libnotify >= $LIBNOTIFY_REQUIRED)
131
132 # -----------------------------------------------------------
133 # Enable debug
134 # -----------------------------------------------------------
135
136 AC_ARG_ENABLE(debug,
137   AC_HELP_STRING([--disable-debug],[compile without debug code]),
138     enable_debug=$enableval, enable_debug=yes )
139
140 if test x$enable_debug = xyes; then
141   AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
142 fi
143
144 # -----------------------------------------------------------
145 # Language Support
146 # -----------------------------------------------------------
147
148 GETTEXT_PACKAGE=empathy
149 AC_SUBST(GETTEXT_PACKAGE)
150 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
151
152 AM_GLIB_GNU_GETTEXT
153
154 # -----------------------------------------------------------
155 # spellchecking checks: enchant and iso-codes
156 # -----------------------------------------------------------
157 AC_ARG_ENABLE(spell,
158               AS_HELP_STRING([--enable-spell=@<:@no/yes/auto@:>@],
159                              [Enable spell checking]), ,
160                              enable_spell=auto)
161
162 if test "x$enable_spell" != "xno"; then
163    PKG_CHECK_MODULES(ENCHANT,
164    [
165       enchant >= $ENCHANT_REQUIRED,
166       iso-codes >= $ISO_CODES_REQUIRED
167    ], have_enchant="yes", have_enchant="no")
168
169    if test "x$have_enchant" = "xyes"; then
170       AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
171       if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
172          $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
173             AC_DEFINE_UNQUOTED(ISO_CODES_PREFIX, ["`$PKG_CONFIG --variable=prefix iso-codes`"], [ISO codes prefix])
174             AC_DEFINE(HAVE_ENCHANT, [], [Define if you have libenchant])
175             result=yes
176       else
177             result=no
178             have_enchant="no"
179       fi
180       AC_MSG_RESULT([$result])
181    fi
182 else
183    have_enchant=no
184 fi
185
186 if test "x$enable_spell" = "xyes" -a "x$have_enchant" != "xyes"; then
187    AC_MSG_ERROR([Couldn't find spell dependencies.])
188 fi
189
190 AM_CONDITIONAL(HAVE_ENCHANT, test "x$have_enchant" = "xyes")
191
192 # -----------------------------------------------------------
193 # Megaphone
194 # -----------------------------------------------------------
195 AC_ARG_ENABLE(megaphone,
196               AS_HELP_STRING([--enable-megaphone=@<:@no/yes/auto@:>@],
197                              [build megaphone applet]), ,
198                              enable_megaphone=auto)
199
200 if test "x$enable_megaphone" != "xno"; then
201    PKG_CHECK_MODULES(MEGAPHONE, 
202    [
203       libpanelapplet-2.0 >= $LIBPANELAPPLET_REQUIRED
204       glib-2.0 >= $GLIB_REQUIRED
205       gtk+-2.0 >= $GTK_REQUIRED
206       gconf-2.0 >= $GCONF_REQUIRED
207       libmissioncontrol >= $MISSION_CONTROL_REQUIRED
208    ], have_megaphone="yes", have_megaphone="no")
209 else
210    have_megaphone=no
211 fi
212
213 if test "x$enable_megaphone" = "xyes" -a "x$have_megaphone" != "xyes"; then
214    AC_MSG_ERROR([Couldn't find megaphone dependencies.])
215 fi
216
217 AM_CONDITIONAL(HAVE_MEGAPHONE, test "x$have_megaphone" = "xyes")
218
219 # -----------------------------------------------------------
220 # Nothere
221 # -----------------------------------------------------------
222 AC_ARG_ENABLE(nothere,
223               AS_HELP_STRING([--enable-nothere=@<:@no/yes/auto@:>@],
224                              [build nothere applet]), ,
225                              enable_nothere=auto)
226
227 if test "x$enable_nothere" != "xno"; then
228    PKG_CHECK_MODULES(NOTHERE, 
229    [
230       libpanelapplet-2.0 >= $LIBPANELAPPLET_REQUIRED
231       glib-2.0 >= $GLIB_REQUIRED
232       gtk+-2.0 >= $GTK_REQUIRED
233       gconf-2.0 >= $GCONF_REQUIRED
234       libmissioncontrol >= $MISSION_CONTROL_REQUIRED
235    ], have_nothere="yes", have_nothere="no")
236 else
237    have_nothere=no
238 fi
239
240 if test "x$enable_nothere" = "xyes" -a "x$have_nothere" != "xyes"; then
241    AC_MSG_ERROR([Couldn't find nothere dependencies.])
242 fi
243
244 AM_CONDITIONAL(HAVE_NOTHERE, test "x$have_nothere" = "xyes")
245
246 # -----------------------------------------------------------
247 # Tests
248 # -----------------------------------------------------------
249 AC_ARG_ENABLE(tests,
250               AS_HELP_STRING([--enable-tests=@<:@no/yes/auto@:>@],
251                              [build tests]), ,
252                              enable_tests=auto)
253
254 if test "x$enable_tests" != "xno"; then
255    PKG_CHECK_MODULES(CHECK,
256    [
257       check >= 0.9.4
258    ], have_check="yes", have_check="no")
259 else
260    have_check=no
261 fi
262
263 if test "x$enable_tests" = "xyes" -a "x$have_check" != "xyes"; then
264    AC_MSG_ERROR([Couldn't find check dependencies.])
265 fi
266
267 AM_CONDITIONAL(HAVE_TESTS, test "x$have_check" = "xyes")
268
269 # -----------------------------------------------------------
270 # Python Bindings
271 # -----------------------------------------------------------
272 AC_ARG_ENABLE(python,
273               AS_HELP_STRING([--enable-python=@<:@no/yes/auto@:>@],
274                              [build python bindings to libempathy and libempathy-gtk]), ,
275                              enable_python=auto)
276
277 if test "x$enable_python" != "xno"; then
278    PKG_CHECK_MODULES(PYTHON_BINDING,
279    [
280       pygtk-2.0,
281       glib-2.0 >= $GLIB_REQUIRED
282       gobject-2.0
283       gconf-2.0 >= $GCONF_REQUIRED
284       libxml-2.0
285       libmissioncontrol >= $MISSION_CONTROL_REQUIRED
286       gtk+-2.0 >= $GTK_REQUIRED
287       gstreamer-0.10
288       gstreamer-interfaces-0.10
289       telepathy-farsight
290    ], have_python="yes", have_python="no")
291    if test "x$have_python" = "xyes" ; then
292       AM_CHECK_PYTHON_HEADERS(,have_python="no")
293       AC_CHECK_PROGS([PYGOBJECTCODEGEN], [pygobject-codegen-2.0 pygtk-codegen-2.0])
294    fi
295 else
296    have_python=no
297 fi
298
299 if test "x$enable_python" = "xyes" -a "x$have_python" != "xyes"; then
300    AC_MSG_ERROR([Couldn't find python.])
301 fi
302
303 AM_CONDITIONAL(HAVE_PYTHON, test "x$have_python" = "xyes")
304
305 # -----------------------------------------------------------
306 # Coding style checks
307 # -----------------------------------------------------------
308 AC_ARG_ENABLE(coding-style-checks,
309   AC_HELP_STRING([--disable-coding-style-checks],
310                  [don't check coding style using grep]),
311     [ENABLE_CODING_STYLE_CHECKS=$enableval], [ENABLE_CODING_STYLE_CHECKS=yes])
312
313 AC_SUBST([ENABLE_CODING_STYLE_CHECKS])
314 # -----------------------------------------------------------
315
316 SHAVE_INIT(.)
317
318 AC_OUTPUT([
319    Makefile
320    data/Makefile
321    data/empathy.desktop.in
322    data/icons/Makefile
323    extensions/Makefile
324    po/Makefile.in
325    libempathy/Makefile
326    libempathy/libempathy.pc
327    libempathy-gtk/Makefile
328    libempathy-gtk/libempathy-gtk.pc
329    src/Makefile
330    megaphone/Makefile
331    megaphone/src/Makefile
332    megaphone/data/Makefile
333    nothere/Makefile
334    nothere/src/Makefile
335    nothere/data/Makefile
336    docs/Makefile
337    docs/libempathy/Makefile
338    docs/libempathy/version.xml
339    docs/libempathy-gtk/Makefile
340    docs/libempathy-gtk/version.xml
341    help/Makefile
342    python/Makefile
343    python/pyempathy/Makefile
344    python/pyempathygtk/Makefile
345    tests/Makefile
346    tests/xml/Makefile
347    tools/Makefile
348    shave
349    shave-libtool
350 ])
351
352 echo "
353 Configure summary:
354
355         Compiler....................:  ${CC}
356         Compiler Flags..............:  ${CFLAGS}
357         Prefix......................:  ${prefix}
358         Shaved build................:  ${enable_shave}
359         Tests.......................:  ${have_check}
360         Coding style checks.........:  ${ENABLE_CODING_STYLE_CHECKS}
361
362         Documentation...............:  ${enable_gtk_doc}
363         Python bindings.............:  ${have_python}
364         Spell checking..............:  ${have_enchant}
365         Megaphone applet............:  ${have_megaphone}
366         Nothere applet..............:  ${have_nothere}
367 "