examples -> tests
[profile/ivi/message-port.git] / configure.ac
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ([2.60])
5 AC_INIT([message-port], [0.0.1], [], [], [])
6 AC_CONFIG_SRCDIR([daemon/main.c])
7 AC_CONFIG_HEADERS([config.h])
8 AC_CONFIG_AUX_DIR([build-aux])
9 AC_CONFIG_MACRO_DIR([m4])
10
11 AM_INIT_AUTOMAKE([1.11 nostdinc silent-rules subdir-objects tar-pax -Wno-portability])
12 LT_INIT([disable-static])
13
14 # Checks for programs.
15 AC_PROG_CC
16
17 # Checks for libraries.
18 PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.30])
19 AC_SUBST(GLIB_CFLAGS)
20 AC_SUBST(GLIB_LIBS)
21
22 PKG_CHECK_MODULES([GIO],[gio-2.0])
23 AC_SUBST(GIO_CFLAGS)
24 AC_SUBST(GIO_LIBS)
25
26 PKG_CHECK_MODULES([GIOUNIX],[gio-unix-2.0])
27 AC_SUBST(GIOUNIX_CFLAGS)
28 AC_SUBST(GIOUINX_LIBS)
29
30 PKG_CHECK_MODULES([AUL], [aul])
31 AC_SUBST(AUL_CFLAGS)
32 AC_SUBST(AUL_LIBS)
33
34 PKG_CHECK_MODULES([PKGMGRINFO], [pkgmgr-info])
35 AC_SUBST(PKGMGRINFO_CFLAGS)
36 AC_SUBST(PKGMGRINFO_LIBS)
37
38 PKG_CHECK_MODULES([BUNDLE], [bundle])
39 AC_SUBST(BUNDLE_CFLAGS)
40 AC_SUBST(BUNDLE_LIBS)
41
42 PKG_CHECK_MODULES([DLOG], [dlog], [AC_DEFINE([HAVE_DLOG], [1], [Use DLOG])])
43 AC_SUBST(DLOG_CFLAGS)
44 AC_SUBST(DLOG_LIBS)
45
46 AC_DEFINE(MESSAGEPORT_BUS_ADDRESS, 
47          ["unix:path=%s/.message-port", g_get_user_runtime_dir()],
48          [messageport daemon server socket address])
49
50 # Use Session bus for daemon activation
51 AC_ARG_ENABLE(sessionbus,
52              [  --enable-sessionbus     Use Session bus for activation],
53              [enable_sessionbus=$enableval], [enable_sessionbus=no])
54 AM_CONDITIONAL(USE_SESSION_BUS, [test "x$enable_sessionbus" = "xyes"])
55 if test "x$enable_sessionbus" = "xyes" ; then
56     AC_DEFINE(USE_SESSION_BUS, [1], [Use session bus])
57 fi
58
59 # Enable Debug
60 AC_ARG_ENABLE(debug, 
61               [  --enable-debug         Eenable debug features],
62               [enable_debug=$enableval], [enable_debug=no])
63 if test "x$enable_debug" = "xyes" ; then
64     AC_DEFINE(ENABLE_DEBUG, [1], [Enable debug features])
65 fi
66
67 # build tests
68 AC_ARG_ENABLE(tests,
69               [  --enable-tests      Build unit tests],
70               [enable_tests=$enable_tests], [enable_tests=no])
71 AM_CONDITIONAL(BUILD_TESTS, [test "x$enable_tests" = "xyes"])
72 AC_PROG_CXX
73
74 # Checks for header files.
75 AC_CHECK_HEADERS([string.h])
76
77 # Checks for typedefs, structures, and compiler characteristics.
78
79 # Checks for library functions.
80
81 AC_OUTPUT([
82 Makefile
83 common/Makefile
84 daemon/Makefile
85 lib/Makefile
86 lib/message-port.pc
87 ])
88
89 if test "x$enable_sessionbus" = "xyes"; then
90     AC_OUTPUT([
91     daemon/org.tizen.messageport.service
92     ])
93 fi
94
95 if test "x$enable_tests" = "xyes"; then
96     AC_OUTPUT([
97     tests/Makefile
98     ])
99 fi
100