]> git.0d.be Git - empathy.git/blob - configure.ac
Remove the autogen.sh script and use gnome-autogen.sh instead.
[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 GTK_DOC_CHECK([1.3])
25
26 GLIB_REQUIRED=2.12.0
27 GTK_REQUIRED=2.10.0
28 GCONF_REQUIRED=1.2.0
29 LIBGLADE_REQUIRED=2.0.0
30 TELEPATHY_REQUIRED=0.0.51
31 MISSION_CONTROL_REQUIRED=4.27
32
33 IDT_COMPILE_WARNINGS
34
35 GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
36 AC_SUBST(GLIB_GENMARSHAL)
37
38 pluginlibdir=`$PKG_CONFIG mission-control --variable=pluginlibdir`
39 AC_SUBST(pluginlibdir)
40
41 dnl -----------------------------------------------------------
42 dnl Language Support
43 dnl -----------------------------------------------------------
44
45 GETTEXT_PACKAGE=empathy
46 AC_SUBST(GETTEXT_PACKAGE)
47 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
48
49 AM_GLIB_GNU_GETTEXT
50
51 dnl -----------------------------------------------------------
52 dnl Pkg-Config dependency checks
53 dnl -----------------------------------------------------------
54
55 PKG_CHECK_MODULES(LIBEMPATHY,
56 [
57    glib-2.0 >= $GLIB_REQUIRED
58    gobject-2.0
59    gconf-2.0 >= $GCONF_REQUIRED
60    libxml-2.0
61    libtelepathy >= $TELEPATHY_REQUIRED
62    libmissioncontrol >= $MISSION_CONTROL_REQUIRED
63 ])
64
65 PKG_CHECK_MODULES(EMPATHY,
66 [
67    glib-2.0 >= $GLIB_REQUIRED
68    gobject-2.0
69    gconf-2.0 >= $GCONF_REQUIRED
70    libxml-2.0
71    gnome-vfs-2.0
72    libtelepathy >= $TELEPATHY_REQUIRED
73    libmissioncontrol >= $MISSION_CONTROL_REQUIRED
74    gtk+-2.0 >= $GTK_REQUIRED
75    libglade-2.0 >= $LIBGLADE_REQUIRED
76    libgnomeui-2.0
77 ])
78
79 dnl -----------------------------------------------------------
80 dnl ISO codes, used for aspell support
81 dnl -----------------------------------------------------------
82 AC_MSG_CHECKING([whether iso-codes exists and has iso-639 domain])
83 if $PKG_CONFIG --variable=domains iso-codes | grep -q 639 ; then
84    AC_MSG_RESULT([yes])
85    iso_codes_prefix=`$PKG_CONFIG --variable=prefix iso-codes`
86    iso_codes_pkgconfig=iso-codes
87    have_iso_codes=yes
88 else
89    AC_MSG_RESULT([no])
90    iso_codes_prefix=
91    iso_codes_pkgconfig=
92    have_iso_codes=no
93 fi
94
95 AC_DEFINE_UNQUOTED([ISO_CODES_PREFIX],["$iso_codes_prefix"],[ISO codes prefix])
96
97 dnl -----------------------------------------------------------
98 dnl ASpell
99 dnl -----------------------------------------------------------
100 AC_ARG_ENABLE(aspell,
101               AS_HELP_STRING([--enable-aspell=@<:@no/yes/auto@:>@],
102                              [compile with aspell support]), ,
103                              enable_aspell=auto)
104
105 if test "x$enable_aspell" = "xyes" -a "x$have_iso_codes" != "xyes"; then
106    AC_MSG_ERROR([You must have iso-codes with the iso-639 domain to use aspell.])
107 fi
108
109 if test "x$enable_aspell" != "xno" -a "x$have_iso_codes" = "xyes"; then
110    AC_CHECK_LIB(aspell, aspell_speller_check,have_aspell=yes,have_aspell=no,)
111
112    if test "x$have_aspell" = "xyes"; then
113       AC_DEFINE(HAVE_ASPELL, 1, [Define if we have aspell])
114       EMPATHY_LIBS="$EMPATHY_LIBS -laspell"
115    else
116       have_aspell=no
117    fi
118 else
119    have_aspell=no
120 fi
121
122 if test "x$enable_aspell" = "xyes" -a "x$have_aspell" != "xyes"; then
123    AC_MSG_ERROR([Couldn't find aspell.])
124 fi
125
126 dnl -----------------------------------------------------------
127 AC_OUTPUT([
128   Makefile
129   data/Makefile
130   data/empathy.desktop.in
131   data/16x16/Makefile
132   data/22x22/Makefile
133   data/32x32/Makefile
134   data/48x48/Makefile
135   data/scalable/Makefile
136   po/Makefile.in
137   libempathy/Makefile
138   libempathy/libempathy.pc
139   libempathy-gtk/Makefile
140   libempathy-gtk/libempathy-gtk.pc
141   src/Makefile
142   doc/Makefile
143   doc/libempathy/Makefile
144   doc/libempathy-gtk/Makefile
145 ])
146