aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac8
-rw-r--r--src/libcharon/Makefile.am7
2 files changed, 11 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 633e611dc..ca5c63668 100644
--- a/configure.ac
+++ b/configure.ac
@@ -569,7 +569,13 @@ AC_CHECK_FUNC(
)
AC_CHECK_FUNCS(prctl mallinfo getpass closefrom getpwnam_r getgrnam_r getpwuid_r)
-AC_CHECK_FUNCS(fmemopen funopen mmap memrchr syslog setlinebuf)
+AC_CHECK_FUNCS(fmemopen funopen mmap memrchr setlinebuf)
+
+AC_CHECK_FUNC([syslog], [
+ AC_DEFINE([HAVE_SYSLOG], [], [have syslog(3) and friends])
+ syslog=true
+])
+AM_CONDITIONAL(USE_SYSLOG, [test "x$syslog" = xtrue])
AC_CHECK_HEADERS(sys/sockio.h glob.h net/if_tun.h linux/fib_rules.h)
AC_CHECK_HEADERS(net/pfkeyv2.h netipsec/ipsec.h netinet6/ipsec.h linux/udp.h)
diff --git a/src/libcharon/Makefile.am b/src/libcharon/Makefile.am
index a4f1ebbe3..8513af86b 100644
--- a/src/libcharon/Makefile.am
+++ b/src/libcharon/Makefile.am
@@ -124,6 +124,10 @@ processing/jobs/dpd_timeout_job.c processing/jobs/dpd_timeout_job.h \
processing/jobs/adopt_children_job.c processing/jobs/adopt_children_job.h
endif
+if USE_SYSLOG
+ libcharon_la_SOURCES += \
+ bus/listeners/sys_logger.c bus/listeners/sys_logger.h
+endif
daemon.lo : $(top_builddir)/config.status
@@ -145,9 +149,6 @@ libcharon_la_LIBADD = \
if USE_WINDOWS
libcharon_la_LIBADD += -lws2_32
-else
- libcharon_la_SOURCES += \
- bus/listeners/sys_logger.c bus/listeners/sys_logger.h
endif
EXTRA_DIST = Android.mk