Merge branch 'collectd-5.1' into collectd-5.2
authorFlorian Forster <octo@collectd.org>
Sat, 23 Mar 2013 09:01:19 +0000 (10:01 +0100)
committerFlorian Forster <octo@collectd.org>
Sat, 23 Mar 2013 09:01:19 +0000 (10:01 +0100)
1  2 
configure.in

diff --combined configure.in
@@@ -535,22 -535,6 +535,22 @@@ AC_CHECK_HEADERS(netinet/if_ether.h, []
  
  AC_CHECK_HEADERS(netinet/ip_compat.h)
  
 +have_net_pfvar_h="no"
 +AC_CHECK_HEADERS(net/pfvar.h,
 +               [have_net_pfvar_h="yes"],
 +               [have_net_pfvar_h="no"],
 +[
 +#if HAVE_SYS_IOCTL_H
 +# include <sys/ioctl.h>
 +#endif
 +#if HAVE_SYS_SOCKET_H
 +# include <sys/socket.h>
 +#endif
 +#if HAVE_NET_IF_H
 +# include <net/if.h>
 +#endif
 +])
 +
  # For the multimeter plugin
  have_termios_h="no"
  AC_CHECK_HEADERS(termios.h, [have_termios_h="yes"])
@@@ -769,18 -753,19 +769,19 @@@ AC_CHECK_FUNCS(swapctl, [have_swapctl="
  if test "x$have_swapctl" = "xyes"; then
          AC_CACHE_CHECK([whether swapctl takes two arguments],
                  [c_cv_have_swapctl_two_args],
-                 AC_COMPILE_IFELSE(
-                         AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
+                 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
  #if HAVE_SYS_SWAP_H && !defined(_LP64) && _FILE_OFFSET_BITS == 64
  #  undef _FILE_OFFSET_BITS
  #  undef _LARGEFILE64_SOURCE
  #endif
  #include <sys/stat.h>
- #include <sys/swap.h>]],
-                                 [[
-                                 int num = swapctl(0, NULL);
-                                 ]]
-                         ),
+ #include <sys/swap.h>
+ ]],
+ [[
+ int num = swapctl(0, NULL);
+ ]]
+                         )],
                          [c_cv_have_swapctl_two_args="yes"],
                          [c_cv_have_swapctl_two_args="no"]
                  )
          AC_CACHE_CHECK([whether swapctl takes three arguments],
                  [c_cv_have_swapctl_three_args],
                  AC_COMPILE_IFELSE(
-                         AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
+                         [AC_LANG_PROGRAM(
+ [[
  #if HAVE_SYS_SWAP_H && !defined(_LP64) && _FILE_OFFSET_BITS == 64
  #  undef _FILE_OFFSET_BITS
  #  undef _LARGEFILE64_SOURCE
  #endif
  #include <sys/stat.h>
- #include <sys/swap.h>]],
-                                 [[
-                                 int num = swapctl(0, NULL,0);
-                                 ]]
-                         ),
+ #include <sys/swap.h>
+ ]],
+ [[
+ int num = swapctl(0, NULL, 0);
+ ]]
+                         )],
                          [c_cv_have_swapctl_three_args="yes"],
                          [c_cv_have_swapctl_three_args="no"]
                  )
@@@ -1130,15 -1117,17 +1133,17 @@@ if test "x$have_getmntent" = "xc"; the
        AC_CACHE_CHECK([whether getmntent takes one argument],
                [c_cv_have_one_getmntent],
                AC_COMPILE_IFELSE(
-                       AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
- #include "$srcdir/src/utils_mount.h"]],
-                               [[
-                                FILE *fh;
-                                struct mntent *me;
-                                fh = setmntent ("/etc/mtab", "r");
-                                me = getmntent (fh);
-                               ]]
-                       ),
+                       [AC_LANG_PROGRAM(
+ [[
+ #include "$srcdir/src/utils_mount.h"
+ ]],
+ [[
+ FILE *fh;
+ struct mntent *me;
+ fh = setmntent ("/etc/mtab", "r");
+ me = getmntent (fh);
+ ]]
+                       )],
                        [c_cv_have_one_getmntent="yes"],
                        [c_cv_have_one_getmntent="no"]
                )
        AC_CACHE_CHECK([whether getmntent takes two arguments],
                [c_cv_have_two_getmntent],
                AC_COMPILE_IFELSE(
-                       AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
- #include "$srcdir/src/utils_mount.h"]],
-                               [[
+                       [AC_LANG_PROGRAM(
+ [[
+ #include "$srcdir/src/utils_mount.h"
+ ]],
+ [[
                                 FILE *fh;
                                 struct mnttab mt;
                                 int status;
                                 fh = fopen ("/etc/mnttab", "r");
                                 status = getmntent (fh, &mt);
                              ]]
-                       ),
+ ]]
+                       )],
                        [c_cv_have_two_getmntent="yes"],
                        [c_cv_have_two_getmntent="no"]
                )
@@@ -1244,7 -1235,6 +1251,6 @@@ AC_CHECK_MEMBERS([struct kinfo_proc.ki_
                have_struct_kinfo_proc_freebsd="no"
        ],
        [
- AC_INCLUDES_DEFAULT
  #include <kvm.h>
  #include <sys/param.h>
  #include <sys/sysctl.h>
@@@ -1261,7 -1251,6 +1267,6 @@@ AC_CHECK_MEMBERS([struct kinfo_proc.kp_
                have_struct_kinfo_proc_openbsd="no"
        ],
        [
- AC_INCLUDES_DEFAULT
  #include <sys/param.h>
  #include <sys/sysctl.h>
  #include <kvm.h>
@@@ -1993,7 -1982,7 +1998,7 @@@ the
        if test -d "$with_java_home"
        then
                AC_MSG_CHECKING([for jni.h])
 -              TMPDIR=`find "$with_java_home" -name jni.h -type f -exec 'dirname' '{}' ';' | head -n 1`
 +              TMPDIR=`find "$with_java_home" -name jni.h -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1`
                if test "x$TMPDIR" != "x"
                then
                        AC_MSG_RESULT([found in $TMPDIR])
                fi
  
                AC_MSG_CHECKING([for jni_md.h])
 -              TMPDIR=`find "$with_java_home" -name jni_md.h -type f -exec 'dirname' '{}' ';' | head -n 1`
 +              TMPDIR=`find "$with_java_home" -name jni_md.h -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1`
                if test "x$TMPDIR" != "x"
                then
                        AC_MSG_RESULT([found in $TMPDIR])
                fi
  
                AC_MSG_CHECKING([for libjvm.so])
 -              TMPDIR=`find "$with_java_home" -name libjvm.so -type f -exec 'dirname' '{}' ';' | head -n 1`
 +              TMPDIR=`find "$with_java_home" -name libjvm.so -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1`
                if test "x$TMPDIR" != "x"
                then
                        AC_MSG_RESULT([found in $TMPDIR])
                if test "x$JAVAC" = "x"
                then
                        AC_MSG_CHECKING([for javac])
 -                      TMPDIR=`find "$with_java_home" -name javac -type f | head -n 1`
 +                      TMPDIR=`find "$with_java_home" -name javac -type f 2>/dev/null | head -n 1`
                        if test "x$TMPDIR" != "x"
                        then
                                JAVAC="$TMPDIR"
                if test "x$JAR" = "x"
                then
                        AC_MSG_CHECKING([for jar])
 -                      TMPDIR=`find "$with_java_home" -name jar -type f | head -n 1`
 +                      TMPDIR=`find "$with_java_home" -name jar -type f 2>/dev/null | head -n 1`
                        if test "x$TMPDIR" != "x"
                        then
                                JAR="$TMPDIR"
  #include <sys/socket.h>])
  
          AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
-                            [
-                             #include <stdio.h>
-                             #include <sys/types.h>
-                             #include <asm/types.h>
-                             #include <sys/socket.h>
-                             #include <linux/netlink.h>
-                             #include <linux/rtnetlink.h>
-                             ], [
-                                 int retval = TCA_STATS2;
-                                 return (retval);
-                                 ]
-                             )],
-                             [AC_DEFINE([HAVE_TCA_STATS2], [1], [True if the enum-member TCA_STATS2 exists])])
-       AC_COMPILE_IFELSE(
- [#include <stdio.h>
+ [[
+ #include <stdio.h>
  #include <sys/types.h>
  #include <asm/types.h>
  #include <sys/socket.h>
  #include <linux/netlink.h>
  #include <linux/rtnetlink.h>
+ ]],
+ [[
+ int retval = TCA_STATS2;
+ return (retval);
+ ]]
+       )],
+       [AC_DEFINE([HAVE_TCA_STATS2], [1], [True if the enum-member TCA_STATS2 exists])])
  
- int main (void)
- {
-       int retval = TCA_STATS;
-       return (retval);
- }],
-       [AC_DEFINE([HAVE_TCA_STATS], 1, [True if the enum-member TCA_STATS exists])]
-       []);
+       AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <asm/types.h>
+ #include <sys/socket.h>
+ #include <linux/netlink.h>
+ #include <linux/rtnetlink.h>
+ ]],
+ [[
+ int retval = TCA_STATS;
+ return (retval);
+ ]]
+       )],
+       [AC_DEFINE([HAVE_TCA_STATS], 1, [True if the enum-member TCA_STATS exists])])
  
        CFLAGS="$SAVE_CFLAGS"
  fi
@@@ -2531,8 -2521,9 +2537,9 @@@ the
                [if function 'rtnl_dump_filter' expects five arguments],
                [c_cv_rtnl_dump_filter_five_args],
                AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
-                               [
- AC_INCLUDES_DEFAULT
+ [[
+ #include <stdio.h>
+ #include <sys/types.h>
  #include <asm/types.h>
  #include <sys/socket.h>
  #if HAVE_LIBNETLINK_H
  #elif HAVE_LINUX_LIBNETLINK_H
  # include <linux/libnetlink.h>
  #endif
                              ],
                              [
]],
[[
  if (rtnl_dump_filter(NULL, NULL, NULL, NULL, NULL))
        return 1;
  return 0;
-                               ]
-                       )],
-                       [c_cv_rtnl_dump_filter_five_args="yes"],
-                       [c_cv_rtnl_dump_filter_five_args="no"]
-               )
+ ]]
+       )],
+       [c_cv_rtnl_dump_filter_five_args="yes"],
+       [c_cv_rtnl_dump_filter_five_args="no"]
        )
+ )
  
        AC_CACHE_CHECK(
                [if function 'rtnl_dump_filter' expects three arguments],
                [c_cv_rtnl_dump_filter_three_args],
                AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
-                               [
- AC_INCLUDES_DEFAULT
+ [[
+ #include <stdio.h>
+ #include <sys/types.h>
  #include <asm/types.h>
  #include <sys/socket.h>
  #if HAVE_LIBNETLINK_H
  #elif HAVE_LINUX_LIBNETLINK_H
  # include <linux/libnetlink.h>
  #endif
                              ],
                              [
]],
[[
  if (rtnl_dump_filter(NULL, NULL, NULL))
        return 1;
  return 0;
-                               ]
-                       )],
-                       [c_cv_rtnl_dump_filter_three_args="yes"],
-                       [c_cv_rtnl_dump_filter_three_args="no"]
-               )
+ ]]
+       )],
+       [c_cv_rtnl_dump_filter_three_args="yes"],
+       [c_cv_rtnl_dump_filter_three_args="no"]
        )
+ )
  
        CFLAGS="$SAVE_CFLAGS"
  
  if test "x$with_perfstat" = "xyes"
  then
        plugin_cpu="yes"
 +      plugin_contextswitch="yes"
        plugin_disk="yes"
        plugin_memory="yes"
        plugin_swap="yes"
        plugin_interface="yes"
        plugin_load="yes"
 +      plugin_uptime="yes"
  fi
  
  if test "x$with_procinfo" = "xyes"
@@@ -4868,7 -4858,6 +4876,7 @@@ AC_ARG_ENABLE([all-plugins]
  
  m4_divert_once([HELP_ENABLE], [])
  
 +AC_PLUGIN([aggregation], [yes],                [Aggregation plugin])
  AC_PLUGIN([amqp],        [$with_librabbitmq],  [AMQP output plugin])
  AC_PLUGIN([apache],      [$with_libcurl],      [Apache httpd statistics])
  AC_PLUGIN([apcups],      [yes],                [Statistics of UPSes by APC])
@@@ -4935,7 -4924,6 +4943,7 @@@ AC_PLUGIN([onewire],     [$with_libowca
  AC_PLUGIN([openvpn],     [yes],                [OpenVPN client statistics])
  AC_PLUGIN([oracle],      [$with_oracle],       [Oracle plugin])
  AC_PLUGIN([perl],        [$plugin_perl],       [Embed a Perl interpreter])
 +AC_PLUGIN([pf],          [$have_net_pfvar_h],  [BSD packet filter (PF) statistics])
  # FIXME: Check for libevent, too.
  AC_PLUGIN([pinba],       [$have_protoc_c],     [Pinba statistics])
  AC_PLUGIN([ping],        [$with_liboping],     [Network latency statistics])
@@@ -5119,7 -5107,7 +5127,7 @@@ AC_SUBST(LCC_VERSION_PATCH
  AC_SUBST(LCC_VERSION_EXTRA)
  AC_SUBST(LCC_VERSION_STRING)
  
 -AC_CONFIG_FILES(src/libcollectdclient/lcc_features.h)
 +AC_CONFIG_FILES(src/libcollectdclient/collectd/lcc_features.h)
  
  AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/libcollectdclient/Makefile src/libcollectdclient/libcollectdclient.pc src/liboconfig/Makefile bindings/Makefile bindings/java/Makefile)
  
@@@ -5202,7 -5190,6 +5210,7 @@@ Configuration
      perl  . . . . . . . . $with_perl_bindings
  
    Modules:
 +    aggregation . . . . . $enable_aggregation
      amqp    . . . . . . . $enable_amqp
      apache  . . . . . . . $enable_apache
      apcups  . . . . . . . $enable_apcups
      openvpn . . . . . . . $enable_openvpn
      oracle  . . . . . . . $enable_oracle
      perl  . . . . . . . . $enable_perl
 +    pf  . . . . . . . . . $enable_pf
      pinba . . . . . . . . $enable_pinba
      ping  . . . . . . . . $enable_ping
      postgresql  . . . . . $enable_postgresql