diff --git a/configure.in b/configure.in
index 07d71d8bd3b62340102267b9309f157bdf80f921..b4d1d94363b989a94e2002cac65b37a8d7c550c9 100644 (file)
--- a/configure.in
+++ b/configure.in
@@ -876,6 +876,37 @@ AC_CHECK_MEMBERS([struct net_device_stats.rx_bytes, struct net_device_stats.tx_p
#include <linux/netdevice.h>
])
+AC_CHECK_MEMBERS([struct kinfo_proc.ki_pid, struct kinfo_proc.ki_rssize, struct kinfo_proc.ki_rusage],
+ [
+ AC_DEFINE(HAVE_STRUCT_KINFO_PROC_FREEBSD, 1,
+ [Define if struct kinfo_proc exists in the FreeBSD variant.])
+ have_struct_kinfo_proc_freebsd="yes"
+ ],
+ [
+ have_struct_kinfo_proc_freebsd="no"
+ ],
+ [
+#include <kvm.h>
+#include <sys/param.h>
+#include <sys/sysctl.h>
+#include <sys/user.h>
+ ])
+
+AC_CHECK_MEMBERS([struct kinfo_proc.kp_proc, struct kinfo_proc.kp_eproc],
+ [
+ AC_DEFINE(HAVE_STRUCT_KINFO_PROC_OPENBSD, 1,
+ [Define if struct kinfo_proc exists in the OpenBSD variant.])
+ have_struct_kinfo_proc_openbsd="yes"
+ ],
+ [
+ have_struct_kinfo_proc_openbsd="no"
+ ],
+ [
+#include <sys/param.h>
+#include <sys/sysctl.h>
+#include <kvm.h>
+ ])
+
AC_CHECK_MEMBERS([struct udphdr.uh_dport, struct udphdr.uh_sport], [], [],
[#if HAVE_STDINT_H
# include <stdint.h>
then
SAVE_CFLAGS=$CFLAGS
SAVE_LDFLAGS=$LDFLAGS
- PERL_CFLAGS=`$perl_interpreter -MExtUtils::Embed -e ccopts`
- PERL_LDFLAGS=`$perl_interpreter -MExtUtils::Embed -e ldopts`
+dnl ARCHFLAGS="" -> disable multi -arch on OSX (see Config_heavy.pl:fetch_string)
+ PERL_CFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ccopts`
+ PERL_LDFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ldopts`
CFLAGS="$CFLAGS $PERL_CFLAGS"
LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
LDFLAGS=$SAVE_LDFLAGS
fi
-have_broken_perl_load_module="no"
+c_cv_have_broken_perl_load_module="no"
if test "x$with_libperl" = "xyes"
then
SAVE_CFLAGS=$CFLAGS
LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
AC_CACHE_CHECK([for broken Perl_load_module()],
- [have_broken_perl_load_module],
+ [c_cv_have_broken_perl_load_module],
AC_LINK_IFELSE(
AC_LANG_PROGRAM(
[[
newSVpv ("Collectd::Plugin::FooBar", 24),
Nullsv);
]]),
- [have_broken_perl_load_module="no"],
- [have_broken_perl_load_module="yes"]
+ [c_cv_have_broken_perl_load_module="no"],
+ [c_cv_have_broken_perl_load_module="yes"]
)
)
LDFLAGS=$SAVE_LDFLAGS
fi
AM_CONDITIONAL(HAVE_BROKEN_PERL_LOAD_MODULE,
- test "x$have_broken_perl_load_module" = "xyes")
+ test "x$c_cv_have_broken_perl_load_module" = "xyes")
if test "x$with_libperl" = "xyes"
then
plugin_processes="yes"
fi
-if test "x$with_kvm_getprocs" = "xyes"
+if test "x$with_kvm_getprocs" = "xyes" && test "x$have_struct_kinfo_proc_freebsd" = "xyes"
then
plugin_processes="yes"
fi