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)
13 AC_CONFIG_MACRO_DIR(m4)
15 dnl Debugging options to enable debug macros and dmalloc
18 AC_ARG_ENABLE(debug, [ --enable-debug compile with DEBUG],,enable_debug=no)
19 AC_ARG_ENABLE(stdout, [ --enable-stdout compile with DEBUG to stdout],,enable_stdout=no)
20 AC_ARG_ENABLE(stderr, [ --enable-stderr compile with DEBUG to stderr],,enable_stderr=no)
21 AC_ARG_ENABLE(dmalloc, [ --enable-dmalloc compile with DMALLOC],,enable_dmalloc=no)
22 AC_ARG_ENABLE(profiling, [ --enable-profiling compile with profiling],,enable_profiling=no)
23 AC_ARG_ENABLE(coverage, [ --enable-coverage compile with coverage info],,enable_coverage=no)
24 AC_ARG_ENABLE(maemo_launcher, [ --enable-maemo-launcher compile with maemo-launcher],,enable_maemo_launcher=no)
25 AC_ARG_ENABLE(tests, [ --enable-tests compile with tests support],,enable_tests=no)
27 if test "x$enable_debug" = "xyes"; then
30 if test "x$enable_stdout" = "xyes"; then
31 DEBUG_FLAGS="-DDEBUG -DOSSOLOG_STDOUT"
33 if test "x$enable_stderr" = "xyes"; then
34 DEBUG_FLAGS="-DDEBUG -DOSSOLOG_STDERR"
36 if test "x$enable_dmalloc" = "xyes"; then
37 DEBUG_FLAGS="$DEBUG_FLAGS -DDMALLOC"
38 LD_DMALLOC_FLAGS="-ldmallocth"
40 if test "x$enable_profiling" = "xyes"; then
41 DEBUG_FLAGS="$DEBUG_FLAGS -pg"
42 PACKAGE_LDFLAGS="$PACKAGE_LDFLAGS -pg"
44 if test "x$enable_coverage" = "xyes"; then
45 DEBUG_FLAGS="$DEBUG_FLAGS -g -fprofile-arcs -ftest-coverage"
46 PACKAGE_LDFLAGS="$PACKAGE_LDFLAGS -fprofile-arcs -ftest-coverage"
49 dnl Check for debug flags
50 AC_MSG_CHECKING([for debug flags])
51 if test "x$DEBUG_FLAGS" = "x"; then
54 AC_MSG_RESULT($DEBUG_FLAGS)
57 dnl Check for dmalloc flags
58 AC_MSG_CHECKING([for dmalloc flags])
59 if test "x$LD_DMALLOC_FLAGS" = "x"; then
62 AC_MSG_RESULT($LD_DMALLOC_FLAGS)
65 CFLAGS="$CFLAGS -DGCONF_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -Wall -Werror -Wmissing-declarations -Wmissing-prototypes"
70 AC_MSG_CHECKING([for tests])
71 if test "x$enable_tests" = "xyes"; then
73 PKG_CHECK_MODULES(CHECK, [check >= 0.9.4], [have_check=yes], [have_check=no])
74 AC_SUBST(CHECK_CFLAGS)
75 AC_SUBST(CHECK_LDFLAGS)
80 AM_CONDITIONAL(HAVE_CHECK, test x$have_check != xno && test x$enable_tests != xno)
82 dnl Localisation support
83 GETTEXT_PACKAGE=$PACKAGE
84 AC_SUBST(GETTEXT_PACKAGE)
85 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Define gettext package])
87 dnl Supported languages below
88 dnl ALL_LINGUAS="en_GB"
91 dnl Set PACKAGE_LOCALE_DIR in config.h
92 if test "x${prefix}" = "xNONE"; then
93 AC_DEFINE_UNQUOTED([PACKAGE_LOCALE_DIR], ["${ac_default_prefix}/${DATADIRNAME}/locale"],[Locale directory])
95 AC_DEFINE_UNQUOTED([PACKAGE_LOCALE_DIR], ["${prefix}/${DATADIRNAME}/locale"], [Locale directory])
98 dnl MIME-type registration check (2.6 / 2.8 version)
99 dnl AC_PATH_PROG(UPDATE_MIME_DATABASE, update-mime-database, no)
100 dnl AM_CONDITIONAL(HAVE_26_MIME, test x$UPDATE_MIME_DATABASE != xno)
102 AC_PATH_PROG(UPDATE_DESKTOP_DATABASE, update-desktop-database, no)
103 AM_CONDITIONAL(HAVE_28_MIME, test x$UPDATE_DESKTOP_DATABASE != xno)
105 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
106 AM_CONDITIONAL(GCONF_SCHEMAS_INSTALL, test x$GCONFTOOL != xno)
108 if test x"$GCONFTOOL" = xno; then
109 AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
113 if test "x${prefix}" = "xNONE"; then
114 PACKAGE_HTML_DIR="${ac_default_prefix}/${DATADIRNAME}/${PACKAGE}/html"
115 AC_DEFINE_UNQUOTED([PACKAGE_HTML_DIR], ["${PACKAGE_HTML_DIR}"],[HTML directory])
117 PACKAGE_HTML_DIR="${prefix}/${DATADIRNAME}/${PACKAGE}/html"
118 AC_DEFINE_UNQUOTED([PACKAGE_HTML_DIR], ["${PACKAGE_HTML_DIR}"], [HTML directory])
121 dnl Check that we have the libtime dev package installed
122 AC_CHECK_HEADERS([time.h clockd/libtime.h], [], [],
128 dnl Packages and versions to be checked
129 PKG_CHECK_MODULES(PACKAGE, [
135 dnl Messaging ui lib specific
136 PKG_CHECK_MODULES(RTCOM_MSG_UI, [
141 PKG_CHECK_MODULES(HILDONMIME, [
146 AC_MSG_CHECKING([for maemo-launcher usage])
147 if test "x$enable_maemo_launcher" = "xyes"; then
148 PKG_CHECK_MODULES(MAEMO_LAUNCHER, [maemo-launcher-app])
149 AC_SUBST(MAEMO_LAUNCHER_CFLAGS)
150 AC_SUBST(MAEMO_LAUNCHER_LDFLAGS)
151 AC_SUBST(MAEMO_LAUNCHER_LIBS)
157 AC_SUBST(DEBUG_FLAGS)
158 AC_SUBST(LD_MALLOC_FLAGS)
160 dnl Export package wide parameters
161 AC_SUBST(PACKAGE_CFLAGS)
162 AC_SUBST(PACKAGE_LIBS)
163 AC_SUBST(PACKAGE_LDFLAGS)
164 AC_SUBST(PACKAGE_HTML_DIR)
173 data/org.ifanr.MiM.service