2 # Process this file with autoconf to produce a configure script.
5 AC_INIT([dlog], [6.0], [hyotaek.shim@samsung.com, k.lewandowsk@samsung.com])
6 AM_INIT_AUTOMAKE([-Wall -Werror foreign])
12 AC_SUBST(DEBUG_CFLAGS)
13 AC_CHECK_HEADERS([stdlib.h unistd.h])
15 # Checks for typedefs, structures, and compiler characteristics.
24 # Checks for library functions.
27 AC_CHECK_FUNCS([memset])
30 PKG_CHECK_MODULES([CAPI_BASE_COMMON], [capi-base-common])
32 AC_ARG_ENABLE([server-user],
33 AS_HELP_STRING([--enable-server-user=USER], [user dlog_server should run with]),
34 [dlog_server_user=$enableval],
35 [dlog_server_user=log])
36 AC_DEFINE_UNQUOTED([DLOG_SERVER_USER], "$dlog_server_user")
37 AC_SUBST([DLOG_SERVER_USER], "$dlog_server_user")
39 AC_ARG_ENABLE([server-group],
40 AS_HELP_STRING([--enable-server-group=GROUP], [group dlog_server should run with]),
41 [dlog_server_group=$enableval],
42 [dlog_server_group=log])
43 AC_DEFINE_UNQUOTED([DLOG_SERVER_GROUP], "$dlog_server_group")
44 AC_SUBST([DLOG_SERVER_GROUP], "$dlog_server_group")
46 critical_logfile_path_default=${localstatedir}/log/dlog/critical
47 AC_ARG_ENABLE([critical-logfile],
48 AS_HELP_STRING([--critical-log-path=PATH], [path of the critical log file (default: $critical_logfile_path_default)]),
49 [critical_logfile=$enableval],
50 [critical_logfile=$critical_logfile_path_default])
51 AC_DEFINE_UNQUOTED([DLOG_CRITICAL_LOGFILE_PATH], "$critical_logfile")
52 AC_SUBST([DLOG_CRITICAL_LOGFILE_PATH], "$critical_logfile")
54 critical_logfile_size_default=1048576 # 1 MB
55 AC_ARG_ENABLE([critical-logsize],
56 AS_HELP_STRING([--critical-log-size=SIZE], [size of the critical log file in bytes (default: $critical_logfile_size_default)]),
57 [critical_logsize=$enableval],
58 [critical_logsize=$critical_logfile_size_default])
59 AC_DEFINE_UNQUOTED([DLOG_CRITICAL_LOGFILE_SIZE], [$critical_logsize])
60 AC_SUBST([DLOG_CRITICAL_LOGFILE_SIZE], [$critical_logsize])
62 AC_ARG_ENABLE([android-monotonic],
63 AS_HELP_STRING([--enable-android-monotonic], [use monotonic send timestamp with log message when using android backend (EXPERIMENTAL)]),
64 [android_monotonic=true],
65 [android_monotonic=false])
66 if test x$android_monotonic = xtrue; then
67 AC_DEFINE_UNQUOTED([USE_ANDROID_MONOTONIC])
70 AC_ARG_ENABLE([lowmem-notification],
71 AS_HELP_STRING([--enable-lowmem-notification], [enable low memory notification feature in dlog_logger]),
72 [lowmem_notification=true],
73 [lowmem_notification=false])
74 if test "${lowmem_notification}" = "true"; then
75 PKG_CHECK_MODULES([VCONF], [vconf])
76 PKG_CHECK_MODULES([GIO], [gio-2.0])
78 AC_SUBST(LOWMEM_NOTIFICATION, "true")
79 AC_DEFINE_UNQUOTED([LOWMEM_NOTIFICATION])
81 AC_SUBST(LOWMEM_NOTIFICATION, "false")
86 AC_SUBST([libexecdir])
87 AC_CONFIG_FILES([Makefile dlog.pc dlogutil.pc dlog-redirect-stdout.pc]
88 [dlog_test:tests/dlog_test.in]
89 [dlog_test_header:tests/dlog_test_header.in]
90 [dlog_cpu:tests/dlog_cpu.in]
91 [README.testsuite:tests/README.testsuite.in]
92 [units/dlog_logger.service]
93 [units/dlog_cleanup.service])
105 server's user: ${dlog_server_user}
106 server's group: ${dlog_server_group}