diff --git a/configure.ac b/configure.ac
index 831cfc986be7b13b69f537f4825410478edcd83b..068acdca9954b6493dfdec29beaa9bdd8f539c57 100644 (file)
--- a/configure.ac
+++ b/configure.ac
]
)
]
)
-AM_INIT_AUTOMAKE([tar-pax dist-bzip2])
+AM_INIT_AUTOMAKE([tar-pax dist-bzip2 foreign])
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_LANG(C)
AC_PREFIX_DEFAULT("/opt/collectd")
AC_LANG(C)
AC_PREFIX_DEFAULT("/opt/collectd")
ac_system="Solaris"
;;
*darwin*)
ac_system="Solaris"
;;
*darwin*)
+ AC_DEFINE([KERNEL_DARWIN], 1, [True if program is to be compiled for a Darwin kernel])
ac_system="Darwin"
;;
*openbsd*)
ac_system="Darwin"
;;
*openbsd*)
+ AC_DEFINE([KERNEL_OPENBSD], 1, [True if program is to be compiled for an OpenBSD kernel])
ac_system="OpenBSD"
;;
*aix*)
ac_system="OpenBSD"
;;
*aix*)
esac
AC_MSG_RESULT([$ac_system])
esac
AC_MSG_RESULT([$ac_system])
+AM_CONDITIONAL([BUILD_LINUX],[test "x$x$ac_system" = "xLinux"])
+AM_CONDITIONAL([BUILD_SOLARIS],[test "x$x$ac_system" = "xSolaris"])
+AM_CONDITIONAL([BUILD_DARWIN],[test "x$x$ac_system" = "xDarwin"])
+AM_CONDITIONAL([BUILD_OPENBSD],[test "x$x$ac_system" = "xOpenBSD"])
+AM_CONDITIONAL([BUILD_AIX],[test "x$x$ac_system" = "xAIX"])
+AM_CONDITIONAL([BUILD_FREEBSD],[test "x$x$ac_system" = "xFreeBSD"])
+
if test "x$ac_system" = "xLinux"
then
AC_ARG_VAR([KERNEL_DIR], [path to Linux kernel sources])
if test "x$ac_system" = "xLinux"
then
AC_ARG_VAR([KERNEL_DIR], [path to Linux kernel sources])
AC_MSG_ERROR([Didn't find out how doubles are stored in memory. Sorry.])
fi; fi; fi
AC_MSG_ERROR([Didn't find out how doubles are stored in memory. Sorry.])
fi; fi; fi
+# --with-useragent {{{
+AC_ARG_WITH(useragent, [AS_HELP_STRING([--with-useragent@<:@=AGENT@:>@], [User agent to use on http requests])],
+[
+ if test "x$withval" != "xno" && test "x$withval" != "xyes"
+ then
+ AC_DEFINE_UNQUOTED(COLLECTD_USERAGENT, ["$withval"], [User agent for http requests])
+ fi
+])
+
+# }}}
+
have_getfsstat="no"
AC_CHECK_FUNCS(getfsstat, [have_getfsstat="yes"])
have_getvfsstat="no"
have_getfsstat="no"
AC_CHECK_FUNCS(getfsstat, [have_getfsstat="yes"])
have_getvfsstat="no"
m4_divert_once([HELP_WITH], [
collectd additional packages:])
m4_divert_once([HELP_WITH], [
collectd additional packages:])
-AM_CONDITIONAL([BUILD_FREEBSD],[test "x$x$ac_system" = "xFreeBSD"])
-
-AM_CONDITIONAL([BUILD_AIX],[test "x$x$ac_system" = "xAIX"])
-
if test "x$ac_system" = "xAIX"
then
with_perfstat="yes"
if test "x$ac_system" = "xAIX"
then
with_perfstat="yes"
AM_CONDITIONAL(BUILD_WITH_LIBDEVINFO, test "x$with_devinfo" = "xyes")
with_libiokit="no"
AM_CONDITIONAL(BUILD_WITH_LIBDEVINFO, test "x$with_devinfo" = "xyes")
with_libiokit="no"
-AC_CHECK_LIB(IOKit, IOServiceGetMatchingServices,
-[
+if test "x$ac_system" = "xDarwin"
+then
with_libiokit="yes"
with_libiokit="yes"
-],
-[
+else
with_libiokit="no"
with_libiokit="no"
-])
+fi
AM_CONDITIONAL(BUILD_WITH_LIBIOKIT, test "x$with_libiokit" = "xyes")
with_libkvm="no"
AM_CONDITIONAL(BUILD_WITH_LIBIOKIT, test "x$with_libiokit" = "xyes")
with_libkvm="no"
[AC_DEFINE([HAVE_TCA_STATS], 1, [True if the enum-member TCA_STATS exists])])
fi
if test "x$with_libmnl" = "xyes"
[AC_DEFINE([HAVE_TCA_STATS], 1, [True if the enum-member TCA_STATS exists])])
fi
if test "x$with_libmnl" = "xyes"
+then
+ AC_CHECK_MEMBERS([struct rtnl_link_stats64.tx_window_errors],
+ [AC_DEFINE(HAVE_RTNL_LINK_STATS64, 1, [Define if struct rtnl_link_stats64 exists and is usable.])],
+ [],
+ [
+ #include <linux/if_link.h>
+ ])
+fi
+if test "x$with_libmnl" = "xyes"
then
AC_CHECK_LIB(mnl, mnl_nlmsg_get_payload,
[with_libmnl="yes"],
then
AC_CHECK_LIB(mnl, mnl_nlmsg_get_payload,
[with_libmnl="yes"],
AC_CHECK_HEADERS(pcap-bpf.h,,
[with_libpcap="no (pcap-bpf.h not found)"])
fi
AC_CHECK_HEADERS(pcap-bpf.h,,
[with_libpcap="no (pcap-bpf.h not found)"])
fi
+if test "x$with_libpcap" = "xyes"
+then
+ AC_CACHE_CHECK([whether libpcap has PCAP_ERROR_IFACE_NOT_UP],
+ [c_cv_libpcap_have_pcap_error_iface_not_up],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+[[[
+#include <pcap.h>
+]]],
+[[[
+ int val = PCAP_ERROR_IFACE_NOT_UP;
+]]]
+ )],
+ [c_cv_libpcap_have_pcap_error_iface_not_up="yes"],
+ [c_cv_libpcap_have_pcap_error_iface_not_up="no"]))
+fi
+if test "x$c_cv_libpcap_have_pcap_error_iface_not_up" != "xyes"
+then
+ with_libpcap="no (pcap.h misses PCAP_ERROR_IFACE_NOT_UP)"
+fi
AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes")
# }}}
AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes")
# }}}
plugin_vmem="yes"
plugin_vserver="yes"
plugin_wireless="yes"
plugin_vmem="yes"
plugin_vserver="yes"
plugin_wireless="yes"
+ plugin_zfs_arc="yes"
if test "x$have_linux_ip_vs_h" = "xyes" || test "x$have_net_ip_vs_h" = "xyes" || test "x$have_ip_vs_h" = "xyes"
then
if test "x$have_linux_ip_vs_h" = "xyes" || test "x$have_net_ip_vs_h" = "xyes" || test "x$have_ip_vs_h" = "xyes"
then