From a18a5839163822bdfc8dde3cab1a930f854b5426 Mon Sep 17 00:00:00 2001 From: handa Date: Sun, 27 Jul 2008 02:26:12 +0000 Subject: [PATCH] Add check for building scim-m17n-setup. --- configure.ac | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 31b46fe..cbc12b5 100644 --- a/configure.ac +++ b/configure.ac @@ -50,11 +50,36 @@ AC_SUBST(M17NLIB_LDFLAGS) dnl Check for Gtk+ library. PKG_CHECK_MODULES(GTK2, [gtk+-2.0 >= 2.4.0]) +EXTRA_BUILD= + AC_ARG_ENABLE(program, AC_HELP_STRING([--enable-program], - [enable a standalone program m17n-im-config (default is YES)])) + [build a standalone program m17n-im-config (default is YES)])) AM_CONDITIONAL(ENABLE_PROG, test x$enable_program != xno) +if test "x$enable_program" != "xno"; then + EXTRA_BUILD="$EXTRA_BUILD m17n-im-config(standalone program)" +fi + +AC_ARG_ENABLE(SCIM_SETUP, + AC_HELP_STRING([--enable-scim-setup], + [build a module for scim-setup (default is YES)])) +if test "x$SCIM_SETUP" != "xno" ; then + PKG_CHECK_MODULES(SCIM,[scim >= 1.4.0], + [SCIM_SETUP=yes], [SCIM_SETUP=no]) + if test "x$SCIM_SETUP" = "xyes"; then + PKG_CHECK_MODULES(SCIM_GTKUTILS,[scim-gtkutils >= 1.4.0], + [SCIM_SETUP=yes], [SCIM_SETUP=no]) + if test "x$SCIM_SETUP" = "xyes"; then + SCIM_MODULEDIR=`$PKG_CONFIG --variable=moduledir scim` + EXTRA_BUILD="$EXTRA_BUILD scim-m17n-setup(scim-setup module)" + fi + fi +fi + +AM_CONDITIONAL(ENABLE_SCIM_SETUP, test "x$SCIM_SETUP" = "xyes") +AC_SUBST(SCIM_MODULEDIR) + AC_CONFIG_FILES([Makefile po/Makefile.in po/Makefile m17n-im-config.pc src/Makefile @@ -62,6 +87,11 @@ AC_CONFIG_FILES([Makefile po/Makefile.in po/Makefile AC_OUTPUT +if test -n "$EXTRA_BUILD"; then + echo "Configured to build these extra programs/modules:" + echo " $EXTRA_BUILD" +fi + dnl Local Variables: dnl comment-start: "dnl " dnl comment-end: "" -- 1.7.10.4