MEIM Code
Status: Pre-Alpha
Brought to you by:
zhangshunchang
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
AC_INIT(meim, 0.1,meim@gmail.com)
AC_CONFIG_SRCDIR([ime/ime.c])
AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE(meim,1.0)
# Checks for programs.
AC_PROG_CC
AC_PROG_LIBTOOL
LIBTOOL_EXPORT_OPTIONS=''
AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
# Checks for libraries.
dnl ****************************************************************************
dnl GTK+
dnl ****************************************************************************
PKG_CHECK_MODULES(GTK2, [gtk+-2.0 >= 2.0.0],
[gtk_has=yes],
[gtk_has=no])
if test "$gtk_has" = "no"; then
AC_MSG_ERROR([gtk+-2.0 not found.])
fi
GTK_LIBDIR=`$PKG_CONFIG --variable=libdir gtk+-2.0`
AC_SUBST(GTK_LIBDIR)
AC_SUBST(GTK2_LIBS)
AC_SUBST(GTK2_CFLAGS)
dnl ****************************************************************************
dnl DBUS
dnl ****************************************************************************
PKG_CHECK_MODULES([DBUS], [dbus-1 >= 1.0], [enable_dbus=yes],[enable_dbus=no])
if test "$enable_dbus" = "no"; then
AC_MSG_ERROR([dbus or dbus-1 bindings not found.])
fi
AC_SUBST([DBUS_CFLAGS])
AC_SUBST([DBUS_LIBS])
AC_ARG_WITH(dbus_service_dir, [ --with-dbus-service-dir=PATH choose directory for dbus service files, [default=PREFIX/share/dbus-1/services]], with_dbus_service_dir="$withval", with_dbus_service_dir=$datadir/dbus-1/services)
DBUS_SERVICE_DIR=$with_dbus_service_dir
AC_SUBST(DBUS_SERVICE_DIR)
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h string.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_MALLOC
AC_CHECK_FUNCS([atexit memset strchr])
#Output paths
#MEIM_DATADIR = "/usr/share/meim"
#AC_SUBST(MEIM_DATADIR)
#Output files
AC_OUTPUT([Makefile
ime/Makefile
libmeim/Makefile
data/Makefile
utils/Makefile
test/Makefile
dbus-server/Makefile
gtk-dbus-common/Makefile
gtk-dbus-client/Makefile
])