# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) AC_INIT([dlog], [6.0], [hyotaek.shim@samsung.com, k.lewandowsk@samsung.com]) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) # Init XO PLATFORM_INIT # Checks for programs. AC_PROG_CXX AC_PROG_CC AC_PROG_GCC_TRADITIONAL AC_PROG_LIBTOOL AC_SUBST(DEBUG_CFLAGS) # Checks for libraries. # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([stdlib.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL AC_C_CONST AC_C_INLINE AC_STRUCT_TM AC_TYPE_PID_T AC_TYPE_SIZE_T AC_TYPE_SSIZE_T # Checks for library functions. AC_FUNC_MALLOC AC_FUNC_STAT AC_CHECK_FUNCS([memset]) PKG_PROG_PKG_CONFIG PKG_CHECK_MODULES([CAPI_BASE_COMMON], [capi-base-common]) AC_ARG_ENABLE([server-user], AS_HELP_STRING([--enable-server-user=USER], [user dlog_server should run with]), [dlog_server_user=$enableval], [dlog_server_user=log]) AC_DEFINE_UNQUOTED([DLOG_SERVER_USER], "$dlog_server_user") AC_SUBST([DLOG_SERVER_USER], "$dlog_server_user") AC_ARG_ENABLE([server-group], AS_HELP_STRING([--enable-server-group=GROUP], [group dlog_server should run with]), [dlog_server_group=$enableval], [dlog_server_group=log]) AC_DEFINE_UNQUOTED([DLOG_SERVER_GROUP], "$dlog_server_group") AC_SUBST([DLOG_SERVER_GROUP], "$dlog_server_group") critical_logfile_path_default=${localstatedir}/log/dlog/critical AC_ARG_ENABLE([critical-logfile], AS_HELP_STRING([--critical-log-path=PATH], [path of the critical log file (default: $critical_logfile_path_default)]), [critical_logfile=$enableval], [critical_logfile=$critical_logfile_path_default]) AC_DEFINE_UNQUOTED([DLOG_CRITICAL_LOGFILE_PATH], "$critical_logfile") AC_SUBST([DLOG_CRITICAL_LOGFILE_PATH], "$critical_logfile") critical_logfile_size_default=1048576 # 1 MB AC_ARG_ENABLE([critical-logsize], AS_HELP_STRING([--critical-log-size=SIZE], [size of the critical log file in bytes (default: $critical_logfile_size_default)]), [critical_logsize=$enableval], [critical_logsize=$critical_logfile_size_default]) AC_DEFINE_UNQUOTED([DLOG_CRITICAL_LOGFILE_SIZE], [$critical_logsize]) AC_SUBST([DLOG_CRITICAL_LOGFILE_SIZE], [$critical_logsize]) AC_ARG_ENABLE([android-monotonic], AS_HELP_STRING([--enable-android-monotonic], [use monotonic send timestamp with log message when using android backend (EXPERIMENTAL)]), [android_monotonic=true], [android_monotonic=false]) if test x$android_monotonic = xtrue; then AC_DEFINE_UNQUOTED([USE_ANDROID_MONOTONIC]) fi AC_ARG_ENABLE([dynamic-filters], AS_HELP_STRING([--disable-dynamic-filters], [remove dynamic frontend filters feature and dlogctl tool]), [dynamic-filters=false], [dynamic-filters=true]) if test "${enable_dynamic_filters}" = "yes"; then AC_SUBST(DYNAMIC_FILTERS, "true") else AC_SUBST(DYNAMIC_FILTERS, "false") fi # output files AC_SUBST([datadir]) AC_SUBST([libexecdir]) AC_CONFIG_FILES([Makefile dlog.pc dlogutil.pc dlog-redirect-stdout.pc] [dlog_test:tests/dlog_test.in] [dlog_test_header:tests/dlog_test_header.in] [dlog_cpu:tests/dlog_cpu.in] [README.testsuite:tests/README.testsuite.in] [units/dlog_logger.service] [units/dlog_cleanup.service]) AC_OUTPUT AC_MSG_RESULT([ $PACKAGE $VERSION ===== compiler: ${CC} cflags: ${CFLAGS} ldflags: ${LDFLAGS} server's user: ${dlog_server_user} server's group: ${dlog_server_group} ])