Modifid IPanel and IEngine interfaces.
[ibus.git] / configure.ac
blobf8ccc9160c2470e741ac97333fb71a2f3590383c
1 # vim:set noet ts=4:
3 # ibus - The Input Bus
5 # Copyright (c) 2007-2008 Huang Peng <shawn.p.huang@gmail.com>
8 # This library is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU Lesser General Public
10 # License as published by the Free Software Foundation; either
11 # version 2 of the License, or (at your option) any later version.
13 # This library is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU Lesser General Public License for more details.
18 # You should have received a copy of the GNU Lesser General Public
19 # License along with this program; if not, write to the
20 # Free Software Foundation, Inc., 59 Temple Place, Suite 330,
21 # Boston, MA  02111-1307  USA
23 # $Id: $
25 AC_INIT([ibus],[0.0.1],[https://bugs.launchpad.net/ibus],[ibus])
26   
27 AM_INIT_AUTOMAKE([1.10])
28 AC_CONFIG_HEADERS([config.h])
29 AC_CONFIG_MACRO_DIR([m4])
30 AC_GNU_SOURCE
32 # define PACKAGE_VERSION_* variables
33 AS_VERSION
34 AS_NANO
35 AM_SANITY_CHECK
36 AM_MAINTAINER_MODE
37 AM_DISABLE_STATIC
38 AC_PROG_CC
39 AM_PROG_CC_C_O
40 AC_PROG_CXX
41 AC_ISC_POSIX
42 AC_HEADER_STDC
43 AM_PROG_LIBTOOL
47 # check glib2
48 AM_PATH_GLIB_2_0
49 PKG_CHECK_MODULES(GLIB2, [
50         glib-2.0
52 PKG_CHECK_MODULES(GOBJECT2, [
53         gobject-2.0
55 PKG_CHECK_MODULES(PYGOBJECT2, [
56         pygobject-2.0
60 # check gtk & pygtk
61 PKG_CHECK_MODULES(GTK2, [
62         gtk+-2.0
65 PKG_CHECK_MODULES(PYGTK2, [
66         pygtk-2.0
69 # check dbus-glib
70 PKG_CHECK_MODULES(DBUS, [
71         dbus-glib-1
75 AC_PATH_PROG(PYGTK_CODEGEN, pygtk-codegen-2.0, no)
77 # check python
78 AM_PATH_PYTHON([2.5])
79 PYTHON_CONFIG=`type -p python$PYTHON_VERSION-config`
80 if test "$PYTHON_CONFIG" != ""; then
81     PYTHON_CFLAGS=`$PYTHON_CONFIG --includes`
82     PYTHON_LIBS=`$PYTHON_CONFIG --libs`
83 else
84     PYTHON_CFLAGS=`$PYTHON $srcdir/python-config.py --includes`
85     PYTHON_LIBS=`$PYTHON $srcdir/python-config.py --libs`
87 AC_SUBST(PYTHON_CFLAGS)
88 AC_SUBST(PYTHON_LIBS)
90 # Checks for gtk-doc
91 GTK_DOC_CHECK([1.6])
93 AC_CHECK_PROG(DB2HTML, db2html, true, false)
94 AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
97 # define GETTEXT_* variables
98 GETTEXT_PACKAGE=ibus
99 AC_SUBST(GETTEXT_PACKAGE)
100 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Package name for gettext])
102 AM_GNU_GETTEXT([external])
103 AM_GNU_GETTEXT_VERSION(0.16.1)
105 # Args for make distcheck
106 DISTCHECK_CONFIGURE_FLAGS="--enable-gtk-doc"
107 AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
109 # OUTPUT files
110 AC_CONFIG_FILES([ po/Makefile.in
111 Makefile
112 gtk2/Makefile
113 m4/Makefile
116 AC_OUTPUT