dnl -------------------------------------------------------------------------------- dnl Section 1: Setup dnl -------------------------------------------------------------------------------- AC_PREREG(2.50) AC_INIT(iiimf-client-gtk, 12.1.50, openi18n-im@openi18n.org) IM_INIT(..) AM_INIT_AUTOMAKE() AM_CONFIG_HEADER(config.h) AC_PROG_INTLTOOL AM_PROG_LIBTOOL GETTEXT_PACKAGE=iiimgcf AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define the gettext package to be used]) dnl -------------------------------------------------------------------------------- dnl Section 2: Autoheader dnl -------------------------------------------------------------------------------- AH_TOP( #ifndef IM_SDK_IIIMGCF_CONFIG_H_ #define IM_SDK_IIIMGCF_CONFIG_H_ ) IM_SYSTEM_AUTOHEADER AC_DEFINE_UNQUOTED([IIIMLIBDIR], "${IMDIR}", [IIIM library directory.]) AC_DEFINE_UNQUOTED([IIIMLEDIR], "${IM_LEIFDIR}", [IIIM Language Engine directory.]) if test "$enable_default_gtk_im_module" == yes; then AC_DEFINE([IIIM_DEFAULT_GTK_IM_MODULE], 1, [IIIM is default for all languages]) fi AH_BOTTOM( #include #endif /* IM_SDK_IIIMGCF_CONFIG_H_ */ ) dnl -------------------------------------------------------------------------------- dnl Section 3: configure options dnl -------------------------------------------------------------------------------- dnl #AC_ARG_WITH() AC_ARG_ENABLE(default-gtk-im-module, [ --enable-default-gtk-im-module IIIM is default for all languages], [ enable_default_gtk_im_module=$enableval; ], [ enable_default_gtk_im_module="no"; ]) AC_ARG_ENABLE(iiim-properties, [AS_HELP_STRING([--enable-iiim-properties], [enable iiim-properties, default is enabled])], [if test "x$enableval" = "xyes"; then AC_DEFINE([HAS_IIIM_PROPERTIES], [], [enable iiim-properties]) fi], [AC_DEFINE([HAS_IIIM_PROPERTIES], [], [enable iiim-properties])]) dnl -------------------------------------------------------------------------------- dnl Section 4: check the environment. dnl -------------------------------------------------------------------------------- IM_CHECK_SYSTEM IM_CHECK_X AM_PATH_GLIB_2_0(2.0.0, , AC_MSG_ERROR(glib2 cannot be found or it is older than 2.0.0.)) AM_PATH_GTK_2_0(2.0.0,, AC_MSG_ERROR(gtk2 cannot be found or it is older than 2.0.0.)) IM_CHECK_GTK2_VERSION if test "X$GTK2_VERSION" = "Xnone" ; then AC_MSG_ERROR("Fail to find GTk+-2.0 or later.") fi dnl -------------------------------------------------------------------------------- dnl Section 5: compilation options dnl -------------------------------------------------------------------------------- IM_CONSTRUCT_FLAGS IM_CONSTRUCT_THREAD_FLAGS COMMON_INCLUDE='-I$(IM_INCLUDEDIR) -I$(IM_INCLUDEDIR)/iiimp' CFLAGS="${COMMON_INCLUDE} ${COMMON_CXX_CFLAGS} ${COMMON_CFLAGS} \ ${DEBUG_CXX_CFLAGS} ${DEBUG_CFLAGS} \ ${THREAD_COMMON_CXX_CFLAGS} ${CFLAGS}" CXXFLAGS="${COMMON_INCLUDE} ${COMMON_CXX_CFLAGS} ${COMMON_CXXFLAGS} \ ${DEBUG_CXX_CFLAGS} ${DEBUG_CXXFLAGS} \ ${THREAD_COMMON_CXX_CFLAGS} ${CXXFLAGS}" LDFLAGS="${COMMON_LDFLAGS} ${LDFLAGS}" dnl -------------------------------------------------------------------------------- dnl Section 6: compilation test dnl -------------------------------------------------------------------------------- dnl -------------------------------------------------------------------------------- dnl Section 7: set up compilation environment dnl -------------------------------------------------------------------------------- IM_SUBST IM_SYSTEM_SUBST AC_SUBST(GTK2_VERSION) AC_SUBST(GTK2_BINARY_VERSION) AC_SUBST(GTK2_LIBDIR) dnl -------------------------------------------------------------------------------- dnl Section 8: set up for RPM dnl -------------------------------------------------------------------------------- GLIB_REQUIRED=2.2.2 ATK_REQUIRED=1.2.2 PANGO_REQUIRED=1.2.3 GTK_REQUIRED=2.2.2 AC_SUBST(GLIB_REQUIRED) AC_SUBST(ATK_REQUIRED) AC_SUBST(PANGO_REQUIRED) AC_SUBST(GTK_REQUIRED) ALL_LINGUAS="ja ko zh_CN zh_TW zh_HK" AM_GLIB_GNU_GETTEXT AC_OUTPUT([ Makefile po/Makefile.in ]) dnl configure.ac ends here.