WIP.
[platform/upstream/ibus.git] / configure.ac
1 # vim:set noet ts=4:
2 #
3 # ibus - The Input Bus
4 #
5 # Copyright (c) 2007-2008 Huang Peng <shawn.p.huang@gmail.com>
6 #
7 #
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.
12 #
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.
17 #
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
22 #
23 # $Id: $
24 #
25 AC_INIT([ibus],[0.0.1],[https://bugs.launchpad.net/ibus],[ibus])
26 AM_INIT_AUTOMAKE([1.10])
27 AC_GNU_SOURCE
28
29 AC_CONFIG_HEADERS([config.h])
30 AC_CONFIG_MACRO_DIR([m4])
31
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
44
45 # check inotify
46 AC_CHECK_HEADERS([sys/inotify.h])
47
48 # check glib2
49 AM_PATH_GLIB_2_0
50 PKG_CHECK_MODULES(GLIB2, [
51         glib-2.0
52 ])
53 PKG_CHECK_MODULES(GOBJECT2, [
54         gobject-2.0
55 ])
56 PKG_CHECK_MODULES(PYGOBJECT2, [
57         pygobject-2.0
58 ])
59
60
61 # check gtk & pygtk
62 PKG_CHECK_MODULES(GTK2, [
63         gtk+-2.0
64 ])
65
66 PKG_CHECK_MODULES(PYGTK2, [
67         pygtk-2.0
68 ])
69
70 # check dbus-glib
71 PKG_CHECK_MODULES(DBUS, [
72         dbus-glib-1
73 ])
74
75
76 AC_PATH_PROG(PYGTK_CODEGEN, pygtk-codegen-2.0, no)
77 # check anthy
78 PKG_CHECK_MODULES(ANTHY, [
79         anthy
80 ])
81
82 # check python
83 AM_PATH_PYTHON([2.5])
84 PYTHON_CONFIG=`type -p python$PYTHON_VERSION-config`
85 if test "$PYTHON_CONFIG" != ""; then
86     PYTHON_CFLAGS=`$PYTHON_CONFIG --includes`
87     PYTHON_LIBS=`$PYTHON_CONFIG --libs`
88 else
89     PYTHON_CFLAGS=`$PYTHON $srcdir/python-config.py --includes`
90     PYTHON_LIBS=`$PYTHON $srcdir/python-config.py --libs`
91 fi
92 AC_SUBST(PYTHON_CFLAGS)
93 AC_SUBST(PYTHON_LIBS)
94
95 # Checks for gtk-doc
96 GTK_DOC_CHECK([1.6])
97
98 AC_CHECK_PROG(DB2HTML, db2html, true, false)
99 AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
100
101
102 # define GETTEXT_* variables
103 GETTEXT_PACKAGE=ibus
104 AC_SUBST(GETTEXT_PACKAGE)
105 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Package name for gettext])
106
107 AM_GNU_GETTEXT([external])
108 AM_GNU_GETTEXT_VERSION(0.16.1)
109
110 # Args for make distcheck
111 DISTCHECK_CONFIGURE_FLAGS="--enable-gtk-doc"
112 AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
113
114 # OUTPUT files
115 AC_CONFIG_FILES([ po/Makefile.in
116 Makefile
117 ibus/Makefile
118 ibus/interface/Makefile
119 ibusdaemon/Makefile
120 panel/Makefile
121 engine/Makefile
122 engine/anthy/Makefile
123 engine/enchant/Makefile
124 gtk2/Makefile
125 m4/Makefile
126 ])
127
128 AC_OUTPUT