diff --git a/configure.in b/configure.in
index e1d2e5757107ed1796e86dbd70d3fdd5ef51c563..9c54aba11145ea8743fabd5f05f1f9eb028d5494 100644 (file)
--- a/configure.in
+++ b/configure.in
*darwin*)
ac_system="Darwin"
;;
+ *openbsd*)
+ ac_system="OpenBSD"
+ ;;
*)
ac_system="unknown"
esac
AC_MSG_RESULT([$ac_system])
+if test "x$ac_system" = "xLinux"
+then
+ AC_ARG_VAR([KERNEL_DIR], [path to Linux kernel sources])
+ if test -z "$KERNEL_DIR"
+ then
+ KERNEL_DIR="/lib/modules/`uname -r`/source"
+ fi
+
+ KERNEL_CFLAGS="-I$KERNEL_DIR/include"
+ AC_SUBST(KERNEL_CFLAGS)
+fi
+
#
# Checks for header files.
#
have_ip_vs_h="no"
if test "x$ac_system" = "xLinux"
then
+ SAVE_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS $KERNEL_CFLAGS"
+
AC_CHECK_HEADERS(net/ip_vs.h, [have_net_ip_vs_h="yes"])
AC_CHECK_HEADERS(ip_vs.h, [have_ip_vs_h="yes"])
+
+ CFLAGS=$SAVE_CFLAGS
fi
# For quota module
AC_SUBST(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
fi
-AC_CHECK_LIB(kvm, kvm_getswapinfo, [with_libkvm="yes"], [with_libkvm="no"])
-if test "x$with_libkvm" = "xyes"
+with_libkvm="no"
+AC_CHECK_LIB(kvm, kvm_getprocs, [with_kvm_getprocs="yes"], [with_kvm_getprocs="no"])
+if test "x$with_kvm_getprocs" = "xyes"
+then
+ AC_DEFINE(HAVE_LIBKVM_GETPROCS, 1,
+ [Define to 1 if you have the 'kvm' library with the 'kvm_getprocs' symbol (-lkvm)])
+ with_libkvm="yes"
+fi
+AM_CONDITIONAL(BUILD_WITH_LIBKVM_GETPROCS, test "x$with_kvm_getprocs" = "xyes")
+
+AC_CHECK_LIB(kvm, kvm_getswapinfo, [with_kvm_getswapinfo="yes"], [with_kvm_getswapinfo="no"])
+if test "x$with_kvm_getswapinfo" = "xyes"
then
- AC_DEFINE(HAVE_LIBKVM, 1, [Define to 1 if you have the 'kvm' library (-lkvm)])
+ AC_DEFINE(HAVE_LIBKVM_GETSWAPINFO, 1,
+ [Define to 1 if you have the 'kvm' library with the 'kvm_getswapinfo' symbol (-lkvm)])
+ with_libkvm="yes"
fi
-AM_CONDITIONAL(BUILD_WITH_LIBKVM, test "x$with_libkvm" = "xyes")
+AM_CONDITIONAL(BUILD_WITH_LIBKVM_GETSWAPINFO, test "x$with_kvm_getswapinfo" = "xyes")
+
+AC_CHECK_LIB(kvm, kvm_nlist, [with_kvm_nlist="yes"], [with_kvm_nlist="no"])
+if test "x$with_kvm_nlist" = "xyes"
+then
+ AC_DEFINE(HAVE_LIBKVM_NLIST, 1,
+ [Define to 1 if you have the 'kvm' library with the 'kvm_nlist' symbol (-lkvm)])
+ with_libkvm="yes"
+fi
+AM_CONDITIONAL(BUILD_WITH_LIBKVM_NLIST, test "x$with_kvm_nlist" = "xyes")
with_sensors_cflags=""
with_sensors_ldflags=""
perl_interpreter="perl"
AC_ARG_WITH(libperl, [AS_HELP_STRING([--with-libperl@<:@=PREFIX@:>@], [Path to libperl.])],
[
- if test "x$withval" != "xno" && test "x$withval" != "xyes"
+ if test -x "$withval"
+ then
+ perl_interpreter="$withval"
+ with_libperl="yes"
+ else if test "x$withval" != "xno" && test "x$withval" != "xyes"
then
LDFLAGS="$LDFLAGS -L$withval/lib"
CPPFLAGS="$CPPFLAGS -I$withval/include"
@@ -1591,7 +1636,7 @@ AC_ARG_WITH(libperl, [AS_HELP_STRING([--with-libperl@<:@=PREFIX@:>@], [Path to l
with_libperl="yes"
else
with_libperl="$withval"
- fi
+ fi; fi
],
[
with_libperl="yes"
perl_interpreter=`which "$perl_interpreter" 2> /dev/null`
if test -x "$perl_interpreter"
then
- AC_MSG_RESULT([yes])
+ AC_MSG_RESULT([yes ($perl_interpreter)])
else
perl_interpreter=""
AC_MSG_RESULT([no])
AC_LINK_IFELSE(
AC_LANG_PROGRAM(
[[
+#define PERL_NO_GET_CONTEXT
#include <EXTERN.h>
#include <perl.h>
#include <XSUB.h>
]],
[[
- PerlInterpreter *perl = NULL;
- Perl_load_module (perl, PERL_LOADMOD_NOIMPORT,
+ dTHX;
+ load_module (PERL_LOADMOD_NOIMPORT,
newSVpv ("Collectd::Plugin::FooBar", 24),
Nullsv);
]]),
LDFLAGS=$SAVE_LDFLAGS
fi
-if test "x$ac_system" = "xLinux"
-then
- AC_ARG_VAR([KERNEL_DIR], [path to Linux kernel sources])
- if test -z "$KERNEL_DIR"
- then
- KERNEL_DIR="/lib/modules/`uname -r`/source"
- fi
-fi
-
with_own_libiptc="no"
AC_ARG_WITH(libiptc, [AS_HELP_STRING([--with-libiptc@<:@=PREFIX@:>@], [Path to libiptc.])],
[
if test "x$with_libiptc" = "xyes"
then
SAVE_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS -I$KERNEL_DIR/include"
+ CFLAGS="$CFLAGS $KERNEL_CFLAGS"
AC_CHECK_HEADERS(linux/netfilter_ipv4/ip_tables.h linux/netfilter_ipv6/ip6_tables.h, [],
[
fi
fi
+if test "x$ac_system" = "xOpenBSD"
+then
+ plugin_tcpconns="yes"
+fi
+
# Mac OS X devices
if test "x$with_libiokit" = "xyes"
then
plugin_processes="yes"
fi
-if test "x$with_libkvm" = "xyes"
+if test "x$with_kvm_getprocs" = "xyes"
then
plugin_processes="yes"
+fi
+
+if test "x$with_kvm_getswapinfo" = "xyes"
+then
plugin_swap="yes"
fi
+if test "x$with_kvm_nlist" = "xyes"
+then
+ plugin_tcpconns="yes"
+fi
+
if test "x$have_getutent" = "xyes"
then
plugin_users="yes"
AC_PLUGIN([email], [yes], [EMail statistics])
AC_PLUGIN([entropy], [$plugin_entropy], [Entropy statistics])
AC_PLUGIN([exec], [yes], [Execution of external programs])
+AC_PLUGIN([filecount], [yes], [Count files in directories])
AC_PLUGIN([hddtemp], [yes], [Query hddtempd])
AC_PLUGIN([interface], [$plugin_interface], [Interface traffic statistics])
AC_PLUGIN([iptables], [$with_libiptc], [IPTables rule counters])
AC_PLUGIN([postgresql], [$with_libpq], [PostgreSQL database statistics])
AC_PLUGIN([powerdns], [yes], [PowerDNS statistics])
AC_PLUGIN([processes], [$plugin_processes], [Process statistics])
-AC_PLUGIN([qmail], [yes], [QMail queue statistics])
AC_PLUGIN([rrdtool], [$with_rrdtool], [RRDTool output plugin])
AC_PLUGIN([rrdcached], [$librrd_rrdc_update], [RRDTool output plugin])
AC_PLUGIN([sensors], [$with_lm_sensors], [lm_sensors statistics])
email . . . . . . . . $enable_email
entropy . . . . . . . $enable_entropy
exec . . . . . . . . $enable_exec
+ filecount . . . . . . $enable_filecount
hddtemp . . . . . . . $enable_hddtemp
interface . . . . . . $enable_interface
iptables . . . . . . $enable_iptables
postgresql . . . . . $enable_postgresql
powerdns . . . . . . $enable_powerdns
processes . . . . . . $enable_processes
- qmail . . . . . . . . $enable_qmail
rrdtool . . . . . . . $enable_rrdtool
rrdcached . . . . . . $enable_rrdcached
sensors . . . . . . . $enable_sensors