Updated Basque translation.
[empathy.git] / configure.ac
1 AC_INIT(Empathy, 0.11, 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=1
22 LIBEMPATHY_AGE=0
23 LIBEMPATHY_REVISION=0
24 AC_SUBST(LIBEMPATHY_CURRENT)
25 AC_SUBST(LIBEMPATHY_AGE)
26 AC_SUBST(LIBEMPATHY_REVISION)
27
28 LIBEMPATHY_GTK_CURRENT=1
29 LIBEMPATHY_GTK_AGE=0
30 LIBEMPATHY_GTK_REVISION=0
31 AC_SUBST(LIBEMPATHY_GTK_CURRENT)
32 AC_SUBST(LIBEMPATHY_GTK_AGE)
33 AC_SUBST(LIBEMPATHY_GTK_REVISION)
34
35 AM_PROG_LIBTOOL
36 AM_PATH_GLIB_2_0
37 AC_PATH_XTRA
38
39 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
40 AC_PATH_PROG(GCONFTOOL, gconftool-2)
41 AM_GCONF_SOURCE_2
42
43 IT_PROG_INTLTOOL([0.35.0])
44
45 GTK_DOC_CHECK([1.3])
46
47 GLIB_REQUIRED=2.12.0
48 GTK_REQUIRED=2.10.0
49 GCONF_REQUIRED=1.2.0
50 LIBGLADE_REQUIRED=2.0.0
51 TELEPATHY_REQUIRED=0.0.51
52 MISSION_CONTROL_REQUIRED=4.33
53
54 IDT_COMPILE_WARNINGS
55
56 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
57 AC_SUBST(GLIB_GENMARSHAL)
58
59 pluginlibdir=`$PKG_CONFIG mission-control --variable=pluginlibdir`
60 AC_SUBST(pluginlibdir)
61
62 dnl -----------------------------------------------------------
63 dnl Language Support
64 dnl -----------------------------------------------------------
65
66 GETTEXT_PACKAGE=empathy
67 AC_SUBST(GETTEXT_PACKAGE)
68 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
69
70 AM_GLIB_GNU_GETTEXT
71
72 dnl -----------------------------------------------------------
73 dnl Pkg-Config dependency checks
74 dnl -----------------------------------------------------------
75
76 PKG_CHECK_MODULES(LIBEMPATHY,
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    libmissioncontrol >= $MISSION_CONTROL_REQUIRED
84 ])
85
86 PKG_CHECK_MODULES(EMPATHY,
87 [
88    glib-2.0 >= $GLIB_REQUIRED
89    gobject-2.0
90    gconf-2.0 >= $GCONF_REQUIRED
91    libxml-2.0
92    gnome-vfs-2.0
93    libtelepathy >= $TELEPATHY_REQUIRED
94    libmissioncontrol >= $MISSION_CONTROL_REQUIRED
95    gtk+-2.0 >= $GTK_REQUIRED
96    libglade-2.0 >= $LIBGLADE_REQUIRED
97    libgnomeui-2.0
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 dnl -----------------------------------------------------------
148 AC_OUTPUT([
149   Makefile
150   data/Makefile
151   data/empathy.desktop.in
152   data/16x16/Makefile
153   data/22x22/Makefile
154   data/32x32/Makefile
155   data/48x48/Makefile
156   data/scalable/Makefile
157   po/Makefile.in
158   libempathy/Makefile
159   libempathy/libempathy.pc
160   libempathy-gtk/Makefile
161   libempathy-gtk/libempathy-gtk.pc
162   src/Makefile
163   doc/Makefile
164   doc/libempathy/Makefile
165   doc/libempathy-gtk/Makefile
166 ])
167