1 dnl This is the rtcom-messaging-ui configure script template
3 AC_INIT(mim-pinyin, 0.0.1)
4 AM_INIT_AUTOMAKE([foreign 1.9])
5 AM_CONFIG_HEADER(config.h)
12 AC_CHECK_PROGS([GTK_QUERY_IMMODULES], [gtk-query-immodules-2.0])
14 AC_CONFIG_MACRO_DIR(m4)
16 dnl Debugging options to enable debug macros and dmalloc
19 AC_ARG_ENABLE(debug, [ --enable-debug compile with DEBUG],,enable_debug=no)
20 AC_ARG_ENABLE(stdout, [ --enable-stdout compile with DEBUG to stdout],,enable_stdout=no)
21 AC_ARG_ENABLE(stderr, [ --enable-stderr compile with DEBUG to stderr],,enable_stderr=no)
22 AC_ARG_ENABLE(dmalloc, [ --enable-dmalloc compile with DMALLOC],,enable_dmalloc=no)
23 AC_ARG_ENABLE(profiling, [ --enable-profiling compile with profiling],,enable_profiling=no)
24 AC_ARG_ENABLE(coverage, [ --enable-coverage compile with coverage info],,enable_coverage=no)
25 AC_ARG_ENABLE(maemo_launcher, [ --enable-maemo-launcher compile with maemo-launcher],,enable_maemo_launcher=no)
26 AC_ARG_ENABLE(tests, [ --enable-tests compile with tests support],,enable_tests=no)
28 if test "x$enable_debug" = "xyes"; then
31 if test "x$enable_stdout" = "xyes"; then
32 DEBUG_FLAGS="-DDEBUG -DOSSOLOG_STDOUT"
34 if test "x$enable_stderr" = "xyes"; then
35 DEBUG_FLAGS="-DDEBUG -DOSSOLOG_STDERR"
37 if test "x$enable_dmalloc" = "xyes"; then
38 DEBUG_FLAGS="$DEBUG_FLAGS -DDMALLOC"
39 LD_DMALLOC_FLAGS="-ldmallocth"
41 if test "x$enable_profiling" = "xyes"; then
42 DEBUG_FLAGS="$DEBUG_FLAGS -pg"
43 PACKAGE_LDFLAGS="$PACKAGE_LDFLAGS -pg"
45 if test "x$enable_coverage" = "xyes"; then
46 DEBUG_FLAGS="$DEBUG_FLAGS -g -fprofile-arcs -ftest-coverage"
47 PACKAGE_LDFLAGS="$PACKAGE_LDFLAGS -fprofile-arcs -ftest-coverage"
50 dnl Check for debug flags
51 AC_MSG_CHECKING([for debug flags])
52 if test "x$DEBUG_FLAGS" = "x"; then
55 AC_MSG_RESULT($DEBUG_FLAGS)
58 dnl Check for dmalloc flags
59 AC_MSG_CHECKING([for dmalloc flags])
60 if test "x$LD_DMALLOC_FLAGS" = "x"; then
63 AC_MSG_RESULT($LD_DMALLOC_FLAGS)
65 dnl Turn off -Werror, prevent gtkimmodule global function missing warning to error
66 dnl CFLAGS="$CFLAGS -DGCONF_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -Wall -Werror -Wmissing-declarations -Wmissing-prototypes"
67 CFLAGS="$CFLAGS -DGCONF_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -Wall -Wno-error -Wmissing-declarations -Wmissing-prototypes"
72 AC_MSG_CHECKING([for tests])
73 if test "x$enable_tests" = "xyes"; then
75 PKG_CHECK_MODULES(CHECK, [check >= 0.9.4], [have_check=yes], [have_check=no])
76 AC_SUBST(CHECK_CFLAGS)
77 AC_SUBST(CHECK_LDFLAGS)
82 AM_CONDITIONAL(HAVE_CHECK, test x$have_check != xno && test x$enable_tests != xno)
84 dnl Localisation support
85 GETTEXT_PACKAGE=$PACKAGE
86 AC_SUBST(GETTEXT_PACKAGE)
87 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Define gettext package])
89 dnl Supported languages below
90 dnl ALL_LINGUAS="en_GB"
93 dnl Set PACKAGE_LOCALE_DIR in config.h
94 if test "x${prefix}" = "xNONE"; then
95 AC_DEFINE_UNQUOTED([PACKAGE_LOCALE_DIR], ["${ac_default_prefix}/${DATADIRNAME}/locale"],[Locale directory])
97 AC_DEFINE_UNQUOTED([PACKAGE_LOCALE_DIR], ["${prefix}/${DATADIRNAME}/locale"], [Locale directory])
100 dnl MIME-type registration check (2.6 / 2.8 version)
101 dnl AC_PATH_PROG(UPDATE_MIME_DATABASE, update-mime-database, no)
102 dnl AM_CONDITIONAL(HAVE_26_MIME, test x$UPDATE_MIME_DATABASE != xno)
104 AC_PATH_PROG(UPDATE_DESKTOP_DATABASE, update-desktop-database, no)
105 AM_CONDITIONAL(HAVE_28_MIME, test x$UPDATE_DESKTOP_DATABASE != xno)
107 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
108 AM_CONDITIONAL(GCONF_SCHEMAS_INSTALL, test x$GCONFTOOL != xno)
110 if test x"$GCONFTOOL" = xno; then
111 AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
115 if test "x${prefix}" = "xNONE"; then
116 PACKAGE_HTML_DIR="${ac_default_prefix}/${DATADIRNAME}/${PACKAGE}/html"
117 AC_DEFINE_UNQUOTED([PACKAGE_HTML_DIR], ["${PACKAGE_HTML_DIR}"],[HTML directory])
119 PACKAGE_HTML_DIR="${prefix}/${DATADIRNAME}/${PACKAGE}/html"
120 AC_DEFINE_UNQUOTED([PACKAGE_HTML_DIR], ["${PACKAGE_HTML_DIR}"], [HTML directory])
123 dnl Check that we have the libtime dev package installed
124 AC_CHECK_HEADERS([time.h clockd/libtime.h], [], [],
130 dnl Packages and versions to be checked
131 PKG_CHECK_MODULES(PACKAGE, [
136 PKG_CHECK_MODULES(GTK, [gtk+-2.0 pango])
139 PKG_CHECK_MODULES(HILDONMIME, [
144 AC_MSG_CHECKING([for maemo-launcher usage])
145 if test "x$enable_maemo_launcher" = "xyes"; then
146 PKG_CHECK_MODULES(MAEMO_LAUNCHER, [maemo-launcher-app])
147 AC_SUBST(MAEMO_LAUNCHER_CFLAGS)
148 AC_SUBST(MAEMO_LAUNCHER_LDFLAGS)
149 AC_SUBST(MAEMO_LAUNCHER_LIBS)
155 AC_SUBST(DEBUG_FLAGS)
156 AC_SUBST(LD_MALLOC_FLAGS)
158 dnl Export package wide parameters
159 AC_SUBST(PACKAGE_CFLAGS)
160 AC_SUBST(PACKAGE_LIBS)
161 AC_SUBST(PACKAGE_LDFLAGS)
162 AC_SUBST(PACKAGE_HTML_DIR)
173 data/org.ifanr.MiM.service