Remove compile option about m4
[platform/core/system/dlog.git] / configure.ac
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ(2.61)
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])
8
9 # Init XO
10 PLATFORM_INIT
11
12 # Checks for programs.
13 dnl AC_PROG_CXX
14 AC_PROG_CC
15 AC_PROG_GCC_TRADITIONAL
16 AC_PROG_LIBTOOL
17
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])
29         fi
30 fi
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
35 fi
36 AC_SUBST(systemd_journal)
37
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]),
41                 [debug_mode=yes],
42                 debug_mode=no)
43 if test "x$debug_mode" = "xyes" ; then
44         DEBUG_CFLAGS+=" -DDLOG_DEBUG_ENABLE"
45 fi
46 AC_ARG_ENABLE([debug_enable],
47         AS_HELP_STRING([--enable-debug_enable Turn on debug_enable]),
48                 [debug_enable=yes],
49             debug_enable=no)
50 # check for fatal_on
51 AC_ARG_ENABLE([fatal_on],
52         AS_HELP_STRING([--enable-fatal_on Turn on fatal assertion]),
53                 [fatal_on=yes],
54             fatal_on=no)
55 if test "x$fatal_on" = "xyes" ; then
56         DEBUG_CFLAGS+=" -DFATAL_ON"
57 fi
58 AC_SUBST(DEBUG_CFLAGS)
59 # Checks for libraries.
60 # Checks for header files.
61 AC_HEADER_STDC
62 AC_CHECK_HEADERS([stdlib.h unistd.h ])
63
64 # Checks for typedefs, structures, and compiler characteristics.
65 AC_HEADER_STDBOOL
66 AC_C_CONST
67 AC_C_INLINE
68 AC_STRUCT_TM
69 AC_TYPE_PID_T
70 AC_TYPE_SIZE_T
71 AC_TYPE_SSIZE_T
72
73 # Checks for library functions.
74 AC_FUNC_MALLOC
75 AC_FUNC_STAT
76 AC_CHECK_FUNCS([memset])
77
78 PKG_PROG_PKG_CONFIG
79 PKG_CHECK_MODULES([CAPI_BASE_COMMON], [capi-base-common])
80
81 AC_SUBST(TZ_SYS_ETC)
82
83 # output files
84 AC_CONFIG_FILES([Makefile dlog.pc]
85                                 scripts/dlogctrl
86                                 )
87 AC_OUTPUT