Delete TIZEN_ENGINEER_MODE
[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 AC_CONFIG_MACRO_DIR([m4])
10 # Init XO
11 PLATFORM_INIT
12
13 # Checks for programs.
14 dnl AC_PROG_CXX
15 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
16 AC_PROG_CC
17 AC_PROG_GCC_TRADITIONAL
18 AC_PROG_LIBTOOL
19
20 # check for libsystemd-journal
21 AC_ARG_ENABLE(journal, AS_HELP_STRING([--enable-journal], [enable systemd journal]),
22     [with_systemd_journal=yes],
23     with_systemd_journal=no)
24 if test "x$with_systemd_journal" != "xno"; then
25         PKG_CHECK_MODULES(systemd_journal, [libsystemd-journal],
26                 [AC_DEFINE(HAVE_SYSTEMD_JOURNAL, 1, [Define if systemd journal is available])
27                 have_systemd_journal=yes],
28             have_systemd_journal=no)
29         if test "x$have_systemd_journal" = "xno" -a "x$with_systemd_journal" = "xyes"; then
30                 AC_MSG_ERROR([systemd journal requested but libraries not found])
31         fi
32 fi
33 AM_CONDITIONAL(HAVE_SYSTEMD_JOURNAL, [test "x$have_systemd_journal" = "xyes"])
34 AM_CONDITIONAL(WITH_SYSTEMD_JOURNAL, [test "x$with_systemd_journal" = "xyes"])
35 if test "x$have_systemd_journal" = "xyes" ; then
36         systemd_journal=systemd-journal
37 fi
38 AC_SUBST(systemd_journal)
39
40 # check binary type for dlog debug mode
41 AC_ARG_ENABLE([dlog_debug_mode],
42         AS_HELP_STRING([--enable-debug_mode Turn on dlog_debug_mode]),
43                 [dlog_debug_mode=yes],
44                 dlog_debug_mode=no)
45 if test "x$dlog_debug_mode" = "xyes" ; then
46         DEBUG_CFLAGS+=" -DDLOG_DEBUG_ENABLE"
47 fi
48 AC_ARG_ENABLE([debug_enable],
49         AS_HELP_STRING([--enable-debug_enable Turn on debug_enable]),
50                 [debug_enable=yes],
51             debug_enable=no)
52 # check for fatal_on
53 AC_ARG_ENABLE([fatal_on],
54         AS_HELP_STRING([--enable-fatal_on Turn on fatal assertion]),
55                 [fatal_on=yes],
56             fatal_on=no)
57 if test "x$fatal_on" = "xyes" ; then
58         DEBUG_CFLAGS+=" -DFATAL_ON"
59 fi
60 AC_SUBST(DEBUG_CFLAGS)
61 dnl AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
62 # Checks for libraries.
63 # Checks for header files.
64 AC_HEADER_STDC
65 AC_CHECK_HEADERS([stdlib.h unistd.h ])
66
67 # Checks for typedefs, structures, and compiler characteristics.
68 AC_HEADER_STDBOOL
69 AC_C_CONST
70 AC_C_INLINE
71 AC_STRUCT_TM
72 AC_TYPE_PID_T
73 AC_TYPE_SIZE_T
74 AC_TYPE_SSIZE_T
75
76 # Checks for library functions.
77 AC_FUNC_MALLOC
78 AC_FUNC_STAT
79 AC_CHECK_FUNCS([memset])
80
81 PKG_PROG_PKG_CONFIG
82 PKG_CHECK_MODULES([CAPI_BASE_COMMON], [capi-base-common])
83
84 # output files
85 AC_CONFIG_FILES([Makefile dlog.pc])
86 AC_OUTPUT