2 # Process this file with autoconf to produce a configure script.
3 AC_INIT([sunpinyin],[0.0.1223], [mail@yongsun.me])
5 AC_CONFIG_SRCDIR([configure.ac])
6 AC_CONFIG_MACRO_DIR([m4])
7 AC_CONFIG_HEADERS([config.h])
11 GETTEXT_PACKAGE=sunpinyin
12 AC_SUBST(GETTEXT_PACKAGE)
13 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [The gettext domain])
16 ALL_LINGUAS="ko_KR en zh_CN zh_HK zh_TW de_DE nl_NL es_ES pt_PT el_GR it_IT fr_FR tr_TR ja_JP ru_RU"
17 AM_GNU_GETTEXT([external])
24 AC_SUBST(LIBTOOL_DEPS)
28 # Checks for programs.
34 #IT_PROG_INTLTOOL([0.33], [no-xml])
35 # Checks for libraries.
36 # Checks for header files.
38 # Checks for header files.
39 AC_CHECK_HEADERS([fcntl.h stddef.h stdlib.h string.h wchar.h iconv.h assert.h dlfcn.h fcntl.h getopt.h inttypes.h locale.h libintl.h limits.h locale.h memory.h sys/mman.h sys/param.h sys/stat.h sys/types.h unistd.h])
40 # Checks for library functions.
41 AC_CHECK_FUNCS([memset pow sqrt bind_textdomain_codeset dcgettext exp2 getopt_long getpagesize get_opt log2 mmap munmap setlocale strndup])
47 AM_CONDITIONAL(ARM, test x$TARGET = xARM)
51 PKG_CHECK_MODULES(ISF,[isf >= $ISF_VERSION])
52 PKG_CHECK_MODULES(SQLITE, [sqlite3 >= 0.0])
53 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.0])
54 PKG_CHECK_MODULES(ECORE, [ecore >= 0.0])
56 # Check if we should build setup module
57 PKG_CHECK_MODULES(ISF_GTKUTILS,[isf-gtkutils >= $ISF_VERSION],
58 [ISF_HAS_GTKUTILS=yes],
59 [ISF_HAS_GTKUTILS=no])
64 AM_CONDITIONAL(ISF_BUILD_SETUP, [test "$ISF_HAS_GTKUTILS" = "yes"])
66 if test "$ISF_HAS_GTKUTILS" = "yes"; then
72 AC_SUBST(ISF_BUILD_SETUP)
74 # Checks for library functions.
77 # libtool option to control which symbols are exported
78 # right now, symbols starting with _ are not exported
79 #LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^_]].*"'
80 #AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
84 [ --enable-debug Turn on debugging],
87 if test "$enable_debug" = "yes"; then
88 AC_DEFINE(ENABLE_DEBUG, 1 ,[Define this to enable the debug facility in libscim])
90 CXXFLAGS="$CXXFLAGS -g"
93 ISF_ICONDIR=`$PKG_CONFIG --variable=icondir scim`
94 ISF_MODULEDIR=`$PKG_CONFIG --variable=moduledir scim`
95 ISF_DATADIR=`$PKG_CONFIG --variable=scimdatadir scim`
96 ISF_LIBDIR=`$PKG_CONFIG --variable=libdir scim`
98 if test "x$ISF_ICONDIR" = "x"; then
99 ISF_ICONDIR=${datadir}/scim/icons
102 if test "x$ISF_MODULEDIR" = "x"; then
103 ISF_MODULEDIR=${libdir}/scim-1.0
106 if test "x$ISF_DATADIR" = "x"; then
107 ISF_DATADIR=${datadir}/scim
110 if test "x$ISF_LIBDIR" = "x"; then
114 SUNPINYIN_ICON_DIR=${ISF_ICONDIR}
115 SUNPINYIN_MODULE_DIR=${ISF_MODULEDIR}
116 SUNPINYIN_DATA_DIR=${ISF_DATADIR}/ise-engine-sunpinyin
117 SUNPINYIN_LIB_DIR=${ISF_LIBDIR}
119 AC_SUBST(SUNPINYIN_ICON_DIR)
120 AC_SUBST(SUNPINYIN_MODULE_DIR)
121 AC_SUBST(SUNPINYIN_DATA_DIR)
122 AC_SUBST(SUNPINYIN_LIBD_IR)
125 AC_CONFIG_FILES([Makefile
130 src/ime-core/Makefile
134 wrapper/scim/Makefile
135 wrapper/scim/data/Makefile
136 wrapper/scim/src/Makefile