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
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: ""