]> git.0d.be Git - empathy.git/blob - configure.ac
Fix ref count error for account objects.
[empathy.git] / configure.ac
1 AC_INIT(Empathy, 0.13, 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=2
22 LIBEMPATHY_AGE=0
23 LIBEMPATHY_REVISION=1
24
25 LIBEMPATHY_GTK_CURRENT=3
26 LIBEMPATHY_GTK_AGE=2
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.12.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    libgnomeui-2.0
97    libebook-1.2
98 ])
99
100 dnl -----------------------------------------------------------
101 dnl ISO codes, used for aspell support
102 dnl -----------------------------------------------------------
103 AC_MSG_CHECKING([whether iso-codes exists and has iso-639 domain])
104 if $PKG_CONFIG --variable=domains iso-codes | grep -q 639 ; then
105    AC_MSG_RESULT([yes])
106    iso_codes_prefix=`$PKG_CONFIG --variable=prefix iso-codes`
107    iso_codes_pkgconfig=iso-codes
108    have_iso_codes=yes
109 else
110    AC_MSG_RESULT([no])
111    iso_codes_prefix=
112    iso_codes_pkgconfig=
113    have_iso_codes=no
114 fi
115
116 AC_DEFINE_UNQUOTED([ISO_CODES_PREFIX],["$iso_codes_prefix"],[ISO codes prefix])
117
118 dnl -----------------------------------------------------------
119 dnl ASpell
120 dnl -----------------------------------------------------------
121 AC_ARG_ENABLE(aspell,
122               AS_HELP_STRING([--enable-aspell=@<:@no/yes/auto@:>@],
123                              [compile with aspell support]), ,
124                              enable_aspell=auto)
125
126 if test "x$enable_aspell" = "xyes" -a "x$have_iso_codes" != "xyes"; then
127    AC_MSG_ERROR([You must have iso-codes with the iso-639 domain to use aspell.])
128 fi
129
130 if test "x$enable_aspell" != "xno" -a "x$have_iso_codes" = "xyes"; then
131    AC_CHECK_LIB(aspell, aspell_speller_check,have_aspell=yes,have_aspell=no,)
132
133    if test "x$have_aspell" = "xyes"; then
134       AC_DEFINE(HAVE_ASPELL, 1, [Define if we have aspell])
135       EMPATHY_LIBS="$EMPATHY_LIBS -laspell"
136    else
137       have_aspell=no
138    fi
139 else
140    have_aspell=no
141 fi
142
143 if test "x$enable_aspell" = "xyes" -a "x$have_aspell" != "xyes"; then
144    AC_MSG_ERROR([Couldn't find aspell.])
145 fi
146
147
148 dnl -----------------------------------------------------------
149 dnl Megaphone
150 dnl -----------------------------------------------------------
151 AC_ARG_ENABLE(megaphone,
152               AS_HELP_STRING([--enable-megaphone=@<:@no/yes/auto@:>@],
153                              [build megaphone applet]), ,
154                              enable_megaphone=auto)
155
156 if test "x$enable_megaphone" != "xno"; then
157    PKG_CHECK_MODULES(MEGAPHONE, 
158    [
159       libpanelapplet-2.0 >= $LIBPANELAPPLET_REQUIRED
160       glib-2.0 >= $GLIB_REQUIRED
161       gtk+-2.0 >= $GTK_REQUIRED
162       gconf-2.0 >= $GCONF_REQUIRED
163       libglade-2.0 >= $LIBGLADE_REQUIRED 
164       gnome-vfs-2.0
165       libtelepathy >= $TELEPATHY_REQUIRED
166       libmissioncontrol >= $MISSION_CONTROL_REQUIRED
167    ], have_megaphone="yes", have_megaphone="no")
168 else
169    have_megaphone=no
170 fi
171
172 if test "x$enable_megaphone" = "xyes" -a "x$have_megaphone" != "xyes"; then
173    AC_MSG_ERROR([Couldn't find megaphone dependencies.])
174 fi
175
176 AM_CONDITIONAL(HAVE_MEGAPHONE, test "x$have_megaphone" = "xyes")
177
178 dnl -----------------------------------------------------------
179 dnl Nothere
180 dnl -----------------------------------------------------------
181 AC_ARG_ENABLE(nothere,
182               AS_HELP_STRING([--enable-nothere=@<:@no/yes/auto@:>@],
183                              [build nothere applet]), ,
184                              enable_nothere=no)
185
186 if test "x$enable_nothere" != "xno"; then
187    PKG_CHECK_MODULES(NOTHERE, 
188    [
189       libpanelapplet-2.0 >= $LIBPANELAPPLET_REQUIRED
190       glib-2.0 >= $GLIB_REQUIRED
191       gtk+-2.0 >= $GTK_REQUIRED
192       gconf-2.0 >= $GCONF_REQUIRED
193       libglade-2.0 >= $LIBGLADE_REQUIRED 
194       libtelepathy >= $TELEPATHY_REQUIRED
195       libmissioncontrol >= $MISSION_CONTROL_REQUIRED
196    ], have_nothere="yes", have_nothere="no")
197 else
198    have_nothere=no
199 fi
200
201 if test "x$enable_nothere" = "xyes" -a "x$have_nothere" != "xyes"; then
202    AC_MSG_ERROR([Couldn't find nothere dependencies.])
203 fi
204
205 AM_CONDITIONAL(HAVE_NOTHERE, test "x$have_nothere" = "xyes")
206
207 dnl -----------------------------------------------------------
208 dnl Python Bindings
209 dnl -----------------------------------------------------------
210 AC_ARG_ENABLE(python,
211               AS_HELP_STRING([--enable-python=@<:@no/yes/auto@:>@],
212                              [build python bindings to libempathy and libempathy-gtk]), ,
213                              enable_python=auto)
214
215 if test "x$enable_python" != "xno"; then
216    AM_PATH_PYTHON
217    if test -z "$PYTHON" ; then
218       have_python="no"
219    else
220       PKG_CHECK_MODULES(PYTHON_BINDING,
221       [
222          pygtk-2.0,
223          glib-2.0 >= $GLIB_REQUIRED
224          gobject-2.0
225          gconf-2.0 >= $GCONF_REQUIRED
226          libxml-2.0
227          gnome-vfs-2.0
228          libtelepathy >= $TELEPATHY_REQUIRED
229          libmissioncontrol >= $MISSION_CONTROL_REQUIRED
230          gtk+-2.0 >= $GTK_REQUIRED
231          libglade-2.0 >= $LIBGLADE_REQUIRED
232          libgnomeui-2.0
233       ], have_python="yes", have_python="no")
234    fi
235 else
236    have_python=no
237 fi
238
239 if test "x$enable_python" = "xyes" -a "x$have_python" != "xyes"; then
240    AC_MSG_ERROR([Couldn't find python.])
241 fi
242
243 AM_CONDITIONAL(HAVE_PYTHON, test "x$have_python" = "xyes")
244
245 dnl -----------------------------------------------------------
246
247 AC_OUTPUT([
248    Makefile
249    data/Makefile
250    data/empathy.desktop.in
251    data/16x16/Makefile
252    data/22x22/Makefile
253    data/24x24/Makefile
254    data/32x32/Makefile
255    data/48x48/Makefile
256    data/scalable/Makefile
257    po/Makefile.in
258    libempathy/Makefile
259    libempathy/libempathy.pc
260    libempathy-gtk/Makefile
261    libempathy-gtk/libempathy-gtk.pc
262    src/Makefile
263    megaphone/Makefile
264    megaphone/src/Makefile
265    megaphone/data/Makefile
266    nothere/Makefile
267    nothere/src/Makefile
268    nothere/data/Makefile   doc/Makefile
269    doc/libempathy/Makefile
270    doc/libempathy-gtk/Makefile
271    python/Makefile
272    python/pyempathy/Makefile
273    python/pyempathygtk/Makefile
274 ])