AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.11 nostdinc silent-rules subdir-objects tar-pax -Wno-portability])
+LT_INIT([disable-static])
# Checks for programs.
AC_PROG_CC
# Checks for libraries.
-PKG_CHECK_MODULES([MESSAGEPORT],
- [glib-2.0 >= 2.30
- gio-2.0
- gio-unix-2.0])
-AC_SUBST(MESSAGEPORT_CFLAGS)
-AC_SUBST(MESSAGEPORT_LIBS)
+PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.30])
+AC_SUBST(GLIB_CFLAGS)
+AC_SUBST(GLIB_LIBS)
+
+PKG_CHECK_MODULES([GIO],[gio-2.0])
+AC_SUBST(GIO_CFLAGS)
+AC_SUBST(GIO_LIBS)
+
+PKG_CHECK_MODULES([GIOUNIX],[gio-unix-2.0])
+AC_SUBST(GIOUNIX_CFLAGS)
+AC_SUBST(GIOUINX_LIBS)
+
+PKG_CHECK_MODULES([AUL], [aul])
+AC_SUBST(AUL_CFLAGS)
+AC_SUBST(AUL_LIBS)
+
+PKG_CHECK_MODULES([PKGMGRINFO], [pkgmgr-info])
+AC_SUBST(PKGMGRINFO_CFLAGS)
+AC_SUBST(PKGMGRINFO_LIBS)
+
+PKG_CHECK_MODULES([BUNDLE], [bundle])
+AC_SUBST(BUNDLE_CFLAGS)
+AC_SUBST(BUNDLE_LIBS)
+
+PKG_CHECK_MODULES([DLOG], [dlog], [AC_DEFINE([HAVE_DLOG], [1], [Use DLOG])])
+AC_SUBST(DLOG_CFLAGS)
+AC_SUBST(DLOG_LIBS)
+
+AC_DEFINE(MESSAGEPORT_BUS_ADDRESS,
+ ["unix:path=%s/.message-port", g_get_user_runtime_dir()],
+ [messageport daemon server socket address])
+
+# Enable Debug
+AC_ARG_ENABLE(debug,
+ [--enable-debug Eenable debug features],
+ [enable_debug=$enableval], [enable_debug=no])
+if test "x$enable_debug" = "xyes" ; then
+ AC_DEFINE(ENABLE_DEBUG, [1], [Enable debug features])
+fi
+
+# build example
+AC_ARG_ENABLE(examples,
+ [--enable-examples example applications],
+ [enable_examples=$enable_examples], [enable_examples=no])
+AM_CONDITIONAL(BUILD_EXAMPLES, [test "x$enable_examples" = "xyes"])
+if test "x$enable_examples" = "xyes"; then
+ AC_PROG_CXX
+fi
# Checks for header files.
AC_CHECK_HEADERS([string.h])
AC_OUTPUT([
Makefile
-daemon/Makefile])
+common/Makefile
+daemon/Makefile
+lib/Makefile
+lib/message-port.pc
+])
+
+if test "x$enable_examples" = "xyes"; then
+ AC_OUTPUT([
+ examples/Makefile
+ ])
+fi