]> git.0d.be Git - empathy.git/blob - configure.ac
Change jabber icon. Fixes bug #466377 (Björn Martensen).
[empathy.git] / configure.ac
1 AC_INIT(Empathy, 0.12, 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=0
24
25 LIBEMPATHY_GTK_CURRENT=2
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.12.0
49 GTK_REQUIRED=2.10.0
50 GCONF_REQUIRED=1.2.0
51 LIBGLADE_REQUIRED=2.0.0
52 TELEPATHY_REQUIRED=0.0.51
53 MISSION_CONTROL_REQUIRED=4.33
54
55 IDT_COMPILE_WARNINGS
56
57 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
58 AC_SUBST(GLIB_GENMARSHAL)
59
60 pluginlibdir=`$PKG_CONFIG mission-control --variable=pluginlibdir`
61 AC_SUBST(pluginlibdir)
62
63 dnl -----------------------------------------------------------
64 dnl Language Support
65 dnl -----------------------------------------------------------
66
67 GETTEXT_PACKAGE=empathy
68 AC_SUBST(GETTEXT_PACKAGE)
69 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
70
71 AM_GLIB_GNU_GETTEXT
72
73 dnl -----------------------------------------------------------
74 dnl Pkg-Config dependency checks
75 dnl -----------------------------------------------------------
76
77 PKG_CHECK_MODULES(LIBEMPATHY,
78 [
79    glib-2.0 >= $GLIB_REQUIRED
80    gobject-2.0
81    gconf-2.0 >= $GCONF_REQUIRED
82    libxml-2.0
83    libtelepathy >= $TELEPATHY_REQUIRED
84    libmissioncontrol >= $MISSION_CONTROL_REQUIRED
85 ])
86
87 PKG_CHECK_MODULES(EMPATHY,
88 [
89    glib-2.0 >= $GLIB_REQUIRED
90    gobject-2.0
91    gconf-2.0 >= $GCONF_REQUIRED
92    libxml-2.0
93    gnome-vfs-2.0
94    libtelepathy >= $TELEPATHY_REQUIRED
95    libmissioncontrol >= $MISSION_CONTROL_REQUIRED
96    gtk+-2.0 >= $GTK_REQUIRED
97    libglade-2.0 >= $LIBGLADE_REQUIRED
98    libgnomeui-2.0
99    libebook-1.2
100 ])
101
102 dnl -----------------------------------------------------------
103 dnl ISO codes, used for aspell support
104 dnl -----------------------------------------------------------
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 dnl -----------------------------------------------------------
121 dnl ASpell
122 dnl -----------------------------------------------------------
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 dnl -----------------------------------------------------------
151 dnl Python Bindings
152 dnl -----------------------------------------------------------
153 AC_ARG_ENABLE(python,
154               AS_HELP_STRING([--enable-python=@<:@no/yes/auto@:>@],
155                              [build python bindings to libempathy and libempathy-gtk]), ,
156                              enable_python=auto)
157
158 PKG_CHECK_MODULES(PYTHON_BINDING,
159 [
160    pygtk-2.0,
161    glib-2.0 >= $GLIB_REQUIRED
162    gobject-2.0
163    gconf-2.0 >= $GCONF_REQUIRED
164    libxml-2.0
165    gnome-vfs-2.0
166    libtelepathy >= $TELEPATHY_REQUIRED
167    libmissioncontrol >= $MISSION_CONTROL_REQUIRED
168    gtk+-2.0 >= $GTK_REQUIRED
169    libglade-2.0 >= $LIBGLADE_REQUIRED
170    libgnomeui-2.0
171 ], have_python="yes", have_python="no")
172
173 if test "x$have_python" = "xno"; then
174         if test "x$enable_python" = "xyes"; then
175                 AC_MSG_ERROR([Could not find python dependencies])
176         fi
177         enable_python="no (missing dependencies)"
178 else
179         if test "x$enable_python" != "xno"; then
180                 enable_python="yes"
181         else
182                 enable_python="no (disabled)"
183         fi
184 fi
185 AM_CONDITIONAL(HAVE_PYTHON, test x$enable_python = xyes)
186
187 dnl -----------------------------------------------------------
188
189 AC_OUTPUT([
190   Makefile
191   data/Makefile
192   data/empathy.desktop.in
193   data/16x16/Makefile
194   data/22x22/Makefile
195   data/24x24/Makefile
196   data/32x32/Makefile
197   data/48x48/Makefile
198   data/scalable/Makefile
199   po/Makefile.in
200   libempathy/Makefile
201   libempathy/libempathy.pc
202   libempathy-gtk/Makefile
203   libempathy-gtk/libempathy-gtk.pc
204   src/Makefile
205   doc/Makefile
206   doc/libempathy/Makefile
207   doc/libempathy-gtk/Makefile
208   python/Makefile
209   python/pyempathy/Makefile
210   python/pyempathygtk/Makefile
211 ])