summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 00f9279)
raw | patch | inline | side by side (parent: 00f9279)
author | Havard Eidnes <he@uninett.no> | |
Sat, 19 Dec 2015 16:06:44 +0000 (17:06 +0100) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 27 Feb 2016 18:13:40 +0000 (19:13 +0100) |
Absent guidance to the contrary, getting this applied is a
precondition for the individual plugin updates I'll subsequently
submit pull requests for.
precondition for the individual plugin updates I'll subsequently
submit pull requests for.
configure.ac | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index fc1e11c1e1e6eb1e2b4ac1b4a451bf3041d05f1b..72844dbfd2b1bdc67885018c11b97dd52a8f5ef4 100644 (file)
--- a/configure.ac
+++ b/configure.ac
AC_DEFINE([KERNEL_OPENBSD], 1, [True if program is to be compiled for an OpenBSD kernel])
ac_system="OpenBSD"
;;
+ *netbsd*)
+ AC_DEFINE([KERNEL_NETBSD], 1, [True if program is to be compiled for a NetBSD kernel])
+ ac_system="NetBSD"
+ ;;
*aix*)
AC_DEFINE([KERNEL_AIX], 1, [True if program is to be compiled for a AIX kernel])
ac_system="AIX"
AC_CHECK_HEADERS(stdio.h errno.h math.h stdarg.h syslog.h fcntl.h signal.h assert.h sys/types.h sys/socket.h sys/select.h poll.h netdb.h arpa/inet.h sys/resource.h sys/param.h kstat.h regex.h sys/ioctl.h endian.h sys/isa_defs.h fnmatch.h libgen.h)
+# For entropy plugin on newer NetBSD
+AC_CHECK_HEADERS(sys/rndio.h, [], [],
+[#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_IOCTL_H
+# include <sys/ioctl.h>
+#endif
+#if HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+])
+
# For ping library
AC_CHECK_HEADERS(netinet/in_systm.h, [], [],
[#if HAVE_STDINT_H
AC_MSG_RESULT([no])
fi
+AC_MSG_CHECKING([for sysctl kern.cp_time])
+if test -x /sbin/sysctl
+then
+ /sbin/sysctl kern.cp_time >/dev/null 2>&1
+ if test $? -eq 0
+ then
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE_SYSCTL_KERN_CP_TIME, 1,
+ [Define if sysctl supports kern.cp_time])
+ else
+ AC_MSG_RESULT([no])
+ fi
+else
+ AC_MSG_RESULT([no])
+fi
+
# For hddtemp module
AC_CHECK_HEADERS(linux/major.h)
#include <kvm.h>
])
+
+AC_CHECK_MEMBERS([struct kinfo_proc2.p_pid, struct kinfo_proc2.p_uru_maxrss],
+ [
+ AC_DEFINE(HAVE_STRUCT_KINFO_PROC2_NETBSD, 1,
+ [Define if struct kinfo_proc2 exists in the NetBSD variant.])
+ have_struct_kinfo_proc2_netbsd="yes"
+ ],
+ [
+ have_struct_kinfo_proc2_netbsd="no"
+ ],
+ [
+#include <sys/param.h>
+#include <sys/sysctl.h>
+#include <kvm.h>
+ ])
+
+
+
AC_CHECK_MEMBERS([struct udphdr.uh_dport, struct udphdr.uh_sport], [], [],
[#define _BSD_SOURCE
#define _DEFAULT_SOURCE
plugin_tcpconns="yes"
fi
+if test "x$ac_system" = "xNetBSD"
+then
+ plugin_entropy="yes"
+ plugin_irq="yes"
+ plugin_processes="yes"
+ plugin_disk="yes"
+fi
+
# Mac OS X devices
if test "x$with_libiokit" = "xyes"
then
plugin_swap="yes"
fi
+if test "x$have_swapctl" = "xyes" && test "x$c_cv_have_swapctl_three_args" = "xyes"
+then
+ plugin_swap="yes"
+fi
+
if test "x$with_kvm_openfiles$with_kvm_nlist" = "xyesyes"
then
plugin_tcpconns="yes"