From b0a4df43e4434a1eeb3f23c2c5a4b0cdd2fbddda Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 9 Apr 2008 09:00:13 +0200 Subject: fixed build system for BSD It's a hack, but at least it works now - on BSD. Will check later if it is fine on Linux, too. Any better method of doing things is happily accepted ;) --- configure.ac | 4 +--- modules.c | 3 +++ plugins/imklog/Makefile.am | 8 ++++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index d330ea82..68158c46 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ case "${host}" in ;; *-*-*darwin*|*-*-freebsd*|*-*-netbsd*|*-*-openbsd*) AC_DEFINE([OS_BSD], [1], [Indicator for a BSD OS]) - os_bsd = "yes" + AM_CONDITIONAL(ENABLE_IMKLOG_BSD, test x = x) ;; esac @@ -204,8 +204,6 @@ AC_ARG_ENABLE(klog, [enable_klog="yes"] ) 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/modules.c b/modules.c index 623a2f10..7eb52575 100644 --- a/modules.c +++ b/modules.c @@ -39,6 +39,9 @@ #include #include #include +#ifdef OS_BSD +# include "libgen.h" +#endif #include /* TODO: replace this with the libtools equivalent! */ diff --git a/plugins/imklog/Makefile.am b/plugins/imklog/Makefile.am index 946576fe..511cd9be 100644 --- a/plugins/imklog/Makefile.am +++ b/plugins/imklog/Makefile.am @@ -1,13 +1,13 @@ pkglib_LTLIBRARIES = imklog.la -imklog_la_SOURCES = imklog.c imklog.h module.h ksym.c ksyms.h ksym_mod.c +imklog_la_SOURCES = imklog.c imklog.h # select klog "driver" -if ENABLE_IMKLOG_LINUX -imklog_la_SOURCES += linux.c -endif if ENABLE_IMKLOG_BSD imklog_la_SOURCES += bsd.c +else +# we assume this now is Linux (yes, some help with the build system is appreciated ;)) +imklog_la_SOURCES += linux.c module.h ksym.c ksyms.h ksym_mod.c endif imklog_la_CPPFLAGS = -I$(top_srcdir) $(pthreads_cflags) -- cgit