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])
9 AC_CONFIG_MACRO_DIR([m4])
13 # Checks for programs.
15 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
17 AC_PROG_GCC_TRADITIONAL
23 # check for libsystemd-journal
24 AC_ARG_WITH([systemd-journal],
25 AS_HELP_STRING([--with-systemd-journal], [check for systemd-journal]),
26 [], [with_systemd_journal=check])
27 have_systemd_journal=no
28 if test "x$with_systemd_journal" != "xno"; then
29 PKG_CHECK_MODULES(systemd_journal, [libsystemd-journal],
30 [AC_DEFINE(HAVE_SYSTEMD_JOURNAL, 1, [Define if systemd journal is available])
31 have_systemd_journal=yes],
32 have_systemd_journal=no)
33 if test "x$have_systemd_journal" = "xno" -a "x$with_systemd_journal" = "xyes"; then
34 AC_MSG_ERROR([systemd journal requested but libraries not found])
37 AM_CONDITIONAL(HAVE_SYSTEMD_JOURNAL, [test "x$have_systemd_journal" = "xyes"])
38 if test "x$have_systemd_journal" = "xyes" ; then
39 systemd_journal=systemd-journal
41 AC_SUBST(systemd_journal)
43 # check binary type for tizen engineer mode
44 AC_ARG_ENABLE([engineer_mode],
45 AS_HELP_STRING([--enable-engineer_mode Turn on engineer_mode]),
48 if test "x$engineer_mode" = "xyes" ; then
49 DEBUG_CFLAGS+=" -DTIZEN_ENGINEER_MODE"
50 M4_DEFINES="$M4_DEFINES -DTIZEN_ENGINEER_MODE"
52 AC_ARG_ENABLE([debug_enable],
53 AS_HELP_STRING([--enable-debug_enable Turn on debug_enable]),
56 if test "x$debug_enable" = "xyes" ; then
57 DEBUG_CFLAGS+=" -DTIZEN_DEBUG_ENABLE"
60 AC_ARG_ENABLE([fatal_on],
61 AS_HELP_STRING([--enable-fatal_on Turn on fatal assertion]),
64 if test "x$fatal_on" = "xyes" ; then
65 DEBUG_CFLAGS+=" -DFATAL_ON"
67 AC_SUBST(DEBUG_CFLAGS)
68 dnl AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
69 # Checks for libraries.
70 # Checks for header files.
72 AC_CHECK_HEADERS([stdlib.h unistd.h ])
74 # Checks for typedefs, structures, and compiler characteristics.
83 # Checks for library functions.
86 AC_CHECK_FUNCS([memset])
89 PKG_CHECK_MODULES([CAPI_BASE_COMMON], [capi-base-common])
92 AC_CONFIG_FILES([Makefile dlog.pc])