diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-04-09 12:46:57 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-04-09 12:46:57 +0200 |
commit | c565a7e847aeb58ddcd1bdbd006597953a4dea31 (patch) | |
tree | dc8a4bc89582ee4be48efff0291167cffa56fce4 | |
parent | d15985bc4065b4c65f491e6a829379687b2f52f1 (diff) | |
download | rsyslog-c565a7e847aeb58ddcd1bdbd006597953a4dea31.tar.gz rsyslog-c565a7e847aeb58ddcd1bdbd006597953a4dea31.tar.xz rsyslog-c565a7e847aeb58ddcd1bdbd006597953a4dea31.zip |
updated build system to detect correct klog driver
-rw-r--r-- | configure.ac | 7 | ||||
-rw-r--r-- | plugins/imklog/Makefile.am | 11 |
2 files changed, 15 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 586f03e3..d330ea82 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,8 @@ case "${host}" in *-*-linux*) ;; *-*-*darwin*|*-*-freebsd*|*-*-netbsd*|*-*-openbsd*) - AC_DEFINE([OS_BSD], [1], [Description]) + AC_DEFINE([OS_BSD], [1], [Indicator for a BSD OS]) + os_bsd = "yes" ;; esac @@ -202,7 +203,9 @@ AC_ARG_ENABLE(klog, esac], [enable_klog="yes"] ) -AM_CONDITIONAL(ENABLE_IMKLOGD, test x$enable_klog = xyes) +AM_CONDITIONAL(ENABLE_IMKLOGD, test x$enable_klog = xyes) +AM_CONDITIONAL(ENABLE_IMKLOG_BSD, test x$os_bsd = xyes) +AM_CONDITIONAL(ENABLE_IMKLOG_LINUX, test x$os_bsd = x) # # SYSLOG_UNIXAF diff --git a/plugins/imklog/Makefile.am b/plugins/imklog/Makefile.am index 49bbbc70..946576fe 100644 --- a/plugins/imklog/Makefile.am +++ b/plugins/imklog/Makefile.am @@ -1,6 +1,15 @@ pkglib_LTLIBRARIES = imklog.la -imklog_la_SOURCES = imklog.c linux.c imklog.h module.h ksym.c ksyms.h ksym_mod.c +imklog_la_SOURCES = imklog.c imklog.h module.h ksym.c ksyms.h ksym_mod.c + +# select klog "driver" +if ENABLE_IMKLOG_LINUX +imklog_la_SOURCES += linux.c +endif +if ENABLE_IMKLOG_BSD +imklog_la_SOURCES += bsd.c +endif + imklog_la_CPPFLAGS = -I$(top_srcdir) $(pthreads_cflags) imklog_la_LDFLAGS = -module -avoid-version imklog_la_LIBADD = |