*** empty log message ***
[m17n/m17n-im-config.git] / configure.ac
1 dnl configure.ac -- autoconf script for the m17n-im-config package.
2
3 dnl Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012
4 dnl   National Institute of Advanced Industrial Science and Technology (AIST)
5 dnl   Registration Number H15PRO112
6
7 dnl This file is part of the m17n-im-config package; a sub-part of the
8 dnl m17n library..
9
10 dnl The m17n library is free software; you can redistribute it and/or
11 dnl modify it under the terms of the GNU Lesser General Public License
12 dnl as published by the Free Software Foundation; either version 2.1 of
13 dnl the License, or (at your option) any later version.
14
15 dnl The m17n library is distributed in the hope that it will be useful,
16 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
17 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 dnl Lesser General Public License for more details.
19
20 dnl You should have received a copy of the GNU Lesser General Public
21 dnl License along with the m17n library; if not, write to the Free
22 dnl Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23 dnl Boston, MA 02110-1301, USA.
24
25 dnl Process this file with autoconf to produce a configure script.
26
27 AC_INIT(m17n-im-config, 0.9.2, m17n-lib-bug@m17n.org)
28 AM_INIT_AUTOMAKE
29 AM_CONFIG_HEADER(src/config.h)
30
31 AC_GNU_SOURCE
32 AM_GNU_GETTEXT([external], [need-ngettext])
33 AM_GNU_GETTEXT_VERSION(0.14.4)
34 GETTEXTDIR="$datadir/locale"
35 AC_SUBST(GETTEXTDIR)
36
37 dnl Checks for programs for compiling.
38 AC_PROG_CC
39 AC_PROG_CXX
40 AM_PROG_LIBTOOL
41
42 dnl Checks for standard header files.
43 AC_HEADER_STDC
44
45 dnl Checks for the M17N library.
46 PKG_CHECK_MODULES(M17NLIB, [m17n-shell >= 1.3.4])
47 PKG_CHECK_MODULES(M17NDB, [m17n-db >= 1.3.4])
48 AC_SUBST(M17NLIB_CFLAGS)
49 AC_SUBST(M17NLIB_LDFLAGS)
50
51 dnl Check for Gtk+ library.
52 PKG_CHECK_MODULES(GTK2, [gtk+-2.0 >= 2.4.0])
53
54 EXTRA_BUILD=
55
56 AC_ARG_ENABLE(program,
57               AC_HELP_STRING([--enable-program],
58                              [build a standalone program m17n-im-config (default is YES)]))
59 AM_CONDITIONAL(ENABLE_PROG, test x$enable_program != xno)
60
61 if test "x$enable_program" != "xno"; then
62   EXTRA_BUILD="$EXTRA_BUILD m17n-im-config(standalone program)"
63 fi
64
65 AC_ARG_ENABLE(SCIM_SETUP,
66               AC_HELP_STRING([--enable-scim-setup],
67                              [build a module for scim-setup (default is YES)]))
68 if test "x$SCIM_SETUP" != "xno" ; then
69   PKG_CHECK_MODULES(SCIM,[scim >= 1.4.0],
70                     [SCIM_SETUP=yes], [SCIM_SETUP=no])
71   if test "x$SCIM_SETUP" = "xyes"; then
72     PKG_CHECK_MODULES(SCIM_GTKUTILS,[scim-gtkutils >= 1.4.0],
73                       [SCIM_SETUP=yes], [SCIM_SETUP=no])
74     if test "x$SCIM_SETUP" = "xyes"; then
75       SCIM_MODULEDIR=`$PKG_CONFIG --variable=moduledir scim`
76       EXTRA_BUILD="$EXTRA_BUILD scim-m17n-setup(scim-setup module)"
77     fi
78   fi
79 fi
80
81 AM_CONDITIONAL(ENABLE_SCIM_SETUP, test "x$SCIM_SETUP" = "xyes")
82 AC_SUBST(SCIM_MODULEDIR)
83
84 AC_CONFIG_FILES([Makefile po/Makefile.in po/Makefile
85                  m17n-im-config.pc                        
86                  src/Makefile
87                  ])
88
89 AC_OUTPUT
90
91 if test -n "$EXTRA_BUILD"; then
92   echo "Configured to build these extra programs/modules:"
93   echo " $EXTRA_BUILD"
94 fi
95
96 dnl Local Variables:
97 dnl comment-start: "dnl "
98 dnl comment-end: ""
99 dnl comment-start-skip: "\\bdnl\\b\\s *"
100 dnl End: