]> git.0d.be Git - empathy.git/blob - configure.ac
Fix a leaked ref.
[empathy.git] / configure.ac
1 AC_INIT(Empathy, 0.9, http://bugzilla.gnome.org/browse.cgi?product=empathy)
2 AC_PREREQ(2.59)
3 AC_COPYRIGHT([Copyright (C) 2003-2007 Imendio AB])
4
5 AM_CONFIG_HEADER(config.h)
6 AM_INIT_AUTOMAKE(1.9 dist-bzip2 no-define)
7
8 AM_MAINTAINER_MODE
9
10 AC_ISC_POSIX
11 AC_PROG_CC
12 AC_HEADER_STDC
13
14 AM_PROG_LIBTOOL
15 AM_PATH_GLIB_2_0
16 AC_PATH_XTRA
17
18 AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
19 AC_PATH_PROG(GCONFTOOL, gconftool-2)
20 AM_GCONF_SOURCE_2
21
22 IT_PROG_INTLTOOL([0.35.0])
23
24 GLIB_REQUIRED=2.12.0
25 GTK_REQUIRED=2.10.0
26 GCONF_REQUIRED=1.2.0
27 LIBGLADE_REQUIRED=2.0.0
28 TELEPATHY_REQUIRED=0.0.51
29 MISSION_CONTROL_REQUIRED=4.22
30
31 IDT_COMPILE_WARNINGS
32
33 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
34 AC_SUBST(GLIB_GENMARSHAL)
35
36 pluginlibdir=`$PKG_CONFIG mission-control --variable=pluginlibdir`
37 AC_SUBST(pluginlibdir)
38
39 dnl -----------------------------------------------------------
40 dnl Language Support
41 dnl -----------------------------------------------------------
42
43 GETTEXT_PACKAGE=empathy
44 AC_SUBST(GETTEXT_PACKAGE)
45 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
46
47 AM_GLIB_GNU_GETTEXT
48
49 dnl -----------------------------------------------------------
50 dnl Pkg-Config dependency checks
51 dnl -----------------------------------------------------------
52
53 PKG_CHECK_MODULES(LIBEMPATHY,
54 [
55    glib-2.0 >= $GLIB_REQUIRED
56    gobject-2.0
57    gconf-2.0 >= $GCONF_REQUIRED
58    libxml-2.0
59    libtelepathy >= $TELEPATHY_REQUIRED
60    libmissioncontrol >= $MISSION_CONTROL_REQUIRED
61 ])
62
63 PKG_CHECK_MODULES(EMPATHY,
64 [
65    glib-2.0 >= $GLIB_REQUIRED
66    gobject-2.0
67    gconf-2.0 >= $GCONF_REQUIRED
68    libxml-2.0
69    gnome-vfs-2.0
70    libtelepathy >= $TELEPATHY_REQUIRED
71    libmissioncontrol >= $MISSION_CONTROL_REQUIRED
72    gtk+-2.0 >= $GTK_REQUIRED
73    libglade-2.0 >= $LIBGLADE_REQUIRED
74    libgnomeui-2.0
75 ])
76
77 dnl -----------------------------------------------------------
78 dnl ISO codes, used for aspell support
79 dnl -----------------------------------------------------------
80 AC_MSG_CHECKING([whether iso-codes exists and has iso-639 domain])
81 if $PKG_CONFIG --variable=domains iso-codes | grep -q 639 ; then
82    AC_MSG_RESULT([yes])
83    iso_codes_prefix=`$PKG_CONFIG --variable=prefix iso-codes`
84    iso_codes_pkgconfig=iso-codes
85    have_iso_codes=yes
86 else
87    AC_MSG_RESULT([no])
88    iso_codes_prefix=
89    iso_codes_pkgconfig=
90    have_iso_codes=no
91 fi
92
93 AC_DEFINE_UNQUOTED([ISO_CODES_PREFIX],["$iso_codes_prefix"],[ISO codes prefix])
94
95 dnl -----------------------------------------------------------
96 dnl ASpell
97 dnl -----------------------------------------------------------
98 AC_ARG_ENABLE(aspell,
99               AS_HELP_STRING([--enable-aspell=@<:@no/yes/auto@:>@],
100                              [compile with aspell support]), ,
101                              enable_aspell=auto)
102
103 if test "x$enable_aspell" = "xyes" -a "x$have_iso_codes" != "xyes"; then
104    AC_MSG_ERROR([You must have iso-codes with the iso-639 domain to use aspell.])
105 fi
106
107 if test "x$enable_aspell" != "xno" -a "x$have_iso_codes" = "xyes"; then
108    AC_CHECK_LIB(aspell, aspell_speller_check,have_aspell=yes,have_aspell=no,)
109
110    if test "x$have_aspell" = "xyes"; then
111       AC_DEFINE(HAVE_ASPELL, 1, [Define if we have aspell])
112       EMPATHY_LIBS="$EMPATHY_LIBS -laspell"
113    else
114       have_aspell=no
115    fi
116 else
117    have_aspell=no
118 fi
119
120 if test "x$enable_aspell" = "xyes" -a "x$have_aspell" != "xyes"; then
121    AC_MSG_ERROR([Couldn't find aspell.])
122 fi
123
124 dnl -----------------------------------------------------------
125 AC_OUTPUT([
126   Makefile
127   data/Makefile
128   data/empathy.desktop.in
129   data/16x16/Makefile
130   data/22x22/Makefile
131   data/32x32/Makefile
132   data/48x48/Makefile
133   data/scalable/Makefile
134   po/Makefile.in
135   libempathy/Makefile
136   libempathy/libempathy.pc
137   libempathy-gtk/Makefile
138   libempathy-gtk/libempathy-gtk.pc
139   src/Makefile
140 ])
141