2 # Process this file with autoconf to produce a configure script.
5 AC_INIT([dlog], [1.0], yk.yun@samsung.com)
6 AM_INIT_AUTOMAKE([-Wall -Werror foreign])
7 AC_CONFIG_HEADERS([config.h:config.hin])
12 # Checks for programs.
15 AC_PROG_GCC_TRADITIONAL
18 # check for libsystemd-journal
19 AC_ARG_ENABLE(journal, AS_HELP_STRING([--enable-journal], [enable systemd journal]),
20 [with_systemd_journal=yes],
21 with_systemd_journal=no)
22 if test "x$with_systemd_journal" != "xno"; then
23 PKG_CHECK_MODULES(systemd_journal, [libsystemd-journal],
24 [AC_DEFINE(HAVE_SYSTEMD_JOURNAL, 1, [Define if systemd journal is available])
25 have_systemd_journal=yes],
26 have_systemd_journal=no)
27 if test "x$have_systemd_journal" = "xno" -a "x$with_systemd_journal" = "xyes"; then
28 AC_MSG_ERROR([systemd journal requested but libraries not found])
31 AM_CONDITIONAL(HAVE_SYSTEMD_JOURNAL, [test "x$have_systemd_journal" = "xyes"])
32 AM_CONDITIONAL(WITH_SYSTEMD_JOURNAL, [test "x$with_systemd_journal" = "xyes"])
33 if test "x$have_systemd_journal" = "xyes" ; then
34 systemd_journal=systemd-journal
36 AC_SUBST(systemd_journal)
38 # check binary type for dlog debug mode
39 AC_ARG_ENABLE([debug_mode],
40 AS_HELP_STRING([--enable-debug_mode Turn on debug_mode]),
43 if test "x$debug_mode" = "xyes" ; then
44 DEBUG_CFLAGS+=" -DDLOG_DEBUG_ENABLE"
46 AC_ARG_ENABLE([debug_enable],
47 AS_HELP_STRING([--enable-debug_enable Turn on debug_enable]),
51 AC_ARG_ENABLE([fatal_on],
52 AS_HELP_STRING([--enable-fatal_on Turn on fatal assertion]),
55 if test "x$fatal_on" = "xyes" ; then
56 DEBUG_CFLAGS+=" -DFATAL_ON"
58 AC_SUBST(DEBUG_CFLAGS)
59 # Checks for libraries.
60 # Checks for header files.
62 AC_CHECK_HEADERS([stdlib.h unistd.h ])
64 # Checks for typedefs, structures, and compiler characteristics.
73 # Checks for library functions.
76 AC_CHECK_FUNCS([memset])
79 PKG_CHECK_MODULES([CAPI_BASE_COMMON], [capi-base-common])
84 AC_CONFIG_FILES([Makefile dlog.pc]