Merge branch 'collectd-5.3'
authorFlorian Forster <octo@collectd.org>
Sun, 18 Aug 2013 10:14:39 +0000 (12:14 +0200)
committerFlorian Forster <octo@collectd.org>
Sun, 18 Aug 2013 10:14:39 +0000 (12:14 +0200)
Conflicts:
configure.in

1  2 
configure.in
src/memcached.c
src/rrdtool.c

diff --combined configure.in
@@@ -78,10 -78,6 +78,10 @@@ case $host_os i
        AC_DEFINE([KERNEL_AIX], 1, [True if program is to be compiled for a AIX kernel])
        ac_system="AIX"
        ;;
 +      *freebsd*)
 +      AC_DEFINE([KERNEL_FREEBSD], 1, [True if program is to be compiled for a FreeBSD kernel])
 +      ac_system="FreeBSD"
 +      ;;
        *)
        ac_system="unknown"
  esac
  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"
  fi
  AM_CONDITIONAL(BUILD_WITH_LIBKVM_OPENFILES, test "x$with_kvm_openfiles" = "xyes")
  
 +# --with-libaquaero5 {{{
 +AC_ARG_WITH(libaquaero5, [AS_HELP_STRING([--with-libaquaero5@<:@=PREFIX@:>@], [Path to aquatools-ng source code.])],
 +[
 + if test "x$withval" = "xyes"
 + then
 +       with_libaquaero5="yes"
 + else if test "x$withval" = "xno"
 + then
 +       with_libaquaero5="no"
 + else
 +       with_libaquaero5="yes"
 +       LIBAQUAERO5_CFLAGS="$LIBAQUAERO5_CFLAGS -I$withval/src"
 +       LIBAQUAERO5_LDFLAGS="$LIBAQUAERO5_LDFLAGS -L$withval/obj"
 + fi; fi
 +],
 +[with_libaquaero5="yes"])
 +
 +SAVE_CPPFLAGS="$CPPFLAGS"
 +SAVE_LDFLAGS="$LDFLAGS"
 +
 +CPPFLAGS="$CPPFLAGS $LIBAQUAERO5_CFLAGS"
 +LDFLAGS="$LDFLAGS $LIBAQUAERO5_LDFLAGS"
 +
 +if test "x$with_libaquaero5" = "xyes"
 +then
 +      if test "x$LIBAQUAERO5_CFLAGS" != "x"
 +      then
 +              AC_MSG_NOTICE([libaquaero5 CPPFLAGS: $LIBAQUAERO5_CFLAGS])
 +      fi
 +      AC_CHECK_HEADERS(libaquaero5.h,
 +      [with_libaquaero5="yes"],
 +      [with_libaquaero5="no (libaquaero5.h not found)"])
 +fi
 +if test "x$with_libaquaero5" = "xyes"
 +then
 +      if test "x$LIBAQUAERO5_LDFLAGS" != "x"
 +      then
 +              AC_MSG_NOTICE([libaquaero5 LDFLAGS: $LIBAQUAERO5_LDFLAGS])
 +      fi
 +      AC_CHECK_LIB(aquaero5, libaquaero5_poll,
 +      [with_libaquaero5="yes"],
 +      [with_libaquaero5="no (symbol 'libaquaero5_poll' not found)"])
 +fi
 +
 +CPPFLAGS="$SAVE_CPPFLAGS"
 +LDFLAGS="$SAVE_LDFLAGS"
 +
 +if test "x$with_libaquaero5" = "xyes"
 +then
 +      BUILD_WITH_LIBAQUAERO5_CFLAGS="$LIBAQUAERO5_CFLAGS"
 +      BUILD_WITH_LIBAQUAERO5_LDFLAGS="$LIBAQUAERO5_LDFLAGS"
 +      AC_SUBST(BUILD_WITH_LIBAQUAERO5_CFLAGS)
 +      AC_SUBST(BUILD_WITH_LIBAQUAERO5_LDFLAGS)
 +fi
 +AM_CONDITIONAL(BUILD_WITH_LIBAQUAERO5, test "x$with_libaquaero5" = "xyes")
 +# }}}
 +
  # --with-libcredis {{{
  AC_ARG_WITH(libcredis, [AS_HELP_STRING([--with-libcredis@<:@=PREFIX@:>@], [Path to libcredis.])],
  [
@@@ -2215,58 -2152,6 +2215,58 @@@ AC_SUBST(JAVA_LIBS
  AM_CONDITIONAL(BUILD_WITH_JAVA, test "x$with_java" = "xyes")
  # }}}
  
 +# --with-liblvm2app {{{
 +with_liblvm2app_cppflags=""
 +with_liblvm2app_ldflags=""
 +AC_ARG_WITH(liblvm2app, [AS_HELP_STRING([--with-liblvm2app@<:@=PREFIX@:>@], [Path to liblvm2app.])],
 +[
 +        if test "x$withval" != "xno" && test "x$withval" != "xyes"
 +        then
 +                with_liblvm2app_cppflags="-I$withval/include"
 +                with_liblvm2app_ldflags="-L$withval/lib"
 +                with_liblvm2app="yes"
 +        else
 +                with_liblvm2app="$withval"
 +        fi
 +],
 +[
 +        with_liblvm2app="yes"
 +])
 +if test "x$with_liblvm2app" = "xyes"
 +then
 +        SAVE_CPPFLAGS="$CPPFLAGS"
 +        CPPFLAGS="$CPPFLAGS $with_liblvm2app_cppflags"
 +
 +        AC_CHECK_HEADERS(lvm2app.h, [with_liblvm2app="yes"], [with_liblvm2app="no (lvm2app.h not found)"])
 +
 +        CPPFLAGS="$SAVE_CPPFLAGS"
 +fi
 +
 +if test "x$with_liblvm2app" = "xyes"
 +then
 +        SAVE_CPPFLAGS="$CPPFLAGS"
 +        SAVE_LDFLAGS="$LDFLAGS"
 +        CPPFLAGS="$CPPFLAGS $with_liblvm2app_cppflags"
 +        LDFLAGS="$LDFLAGS $with_liblvm2app_ldflags"
 +
 +        AC_CHECK_LIB(lvm2app, lvm_init, [with_liblvm2app="yes"], [with_liblvm2app="no (Symbol 'lvm_init' not found)"])
 +
 +        CPPFLAGS="$SAVE_CPPFLAGS"
 +        LDFLAGS="$SAVE_LDFLAGS"
 +fi
 +if test "x$with_liblvm2app" = "xyes"
 +then
 +        BUILD_WITH_LIBLVM2APP_CPPFLAGS="$with_liblvm2app_cppflags"
 +        BUILD_WITH_LIBLVM2APP_LDFLAGS="$with_liblvm2app_ldflags"
 +        BUILD_WITH_LIBLVM2APP_LIBS="-llvm2app"
 +        AC_SUBST(BUILD_WITH_LIBLVM2APP_CPPFLAGS)
 +        AC_SUBST(BUILD_WITH_LIBLVM2APP_LDFLAGS)
 +        AC_SUBST(BUILD_WITH_LIBLVM2APP_LIBS)
 +        AC_DEFINE(HAVE_LIBLVM2APP, 1, [Define if liblvm2app is present and usable.])
 +fi
 +AM_CONDITIONAL(BUILD_WITH_LIBLVM2APP, test "x$with_liblvm2app" = "xyes")
 +# }}}
 +
  # --with-libmemcached {{{
  with_libmemcached_cppflags=""
  with_libmemcached_ldflags=""
  AM_CONDITIONAL(BUILD_WITH_LIBMYSQL, test "x$with_libmysql" = "xyes")
  # }}}
  
 -# --with-libnetlink {{{
 -with_libnetlink_cflags=""
 -with_libnetlink_libs="-lnetlink"
 -AC_ARG_WITH(libnetlink, [AS_HELP_STRING([--with-libnetlink@<:@=PREFIX@:>@], [Path to libnetlink.])],
 +# --with-libmnl {{{
 +with_libmnl_cflags=""
 +with_libmnl_libs=""
 +AC_ARG_WITH(libmnl, [AS_HELP_STRING([--with-libmnl@<:@=PREFIX@:>@], [Path to libmnl.])],
  [
 - echo "libnetlink: withval = $withval"
 + echo "libmnl: withval = $withval"
   if test "x$withval" = "xyes"
   then
 -       with_libnetlink="yes"
 +       with_libmnl="yes"
   else if test "x$withval" = "xno"
   then
 -       with_libnetlink="no"
 +       with_libmnl="no"
   else
         if test -d "$withval/include"
         then
 -               with_libnetlink_cflags="-I$withval/include"
 -               with_libnetlink_libs="-L$withval/lib -lnetlink"
 -               with_libnetlink="yes"
 +               with_libmnl_cflags="-I$withval/include"
 +               with_libmnl_libs="-L$withval/lib -lmnl"
 +               with_libmnl="yes"
         else
                 AC_MSG_ERROR("no such directory: $withval/include")
         fi
  [
   if test "x$ac_system" = "xLinux"
   then
 -       with_libnetlink="yes"
 +       with_libmnl="yes"
   else
 -       with_libnetlink="no (Linux only library)"
 +       with_libmnl="no (Linux only library)"
   fi
  ])
 -if test "x$with_libnetlink" = "xyes"
 +if test "x$PKG_CONFIG" = "x"
  then
 -      SAVE_CFLAGS="$CFLAGS"
 -      CFLAGS="$CFLAGS $with_libnetlink_cflags"
 -
 -      with_libnetlink="no (libnetlink.h not found)"
 +      with_libmnl="no (Don't have pkg-config)"
 +fi
 +if test "x$with_libmnl" = "xyes"
 +then
 +      if $PKG_CONFIG --exists libmnl 2>/dev/null; then
 +        with_libmnl_cflags="$with_libmnl_ldflags `$PKG_CONFIG --cflags libmnl`"
 +        with_libmnl_libs="$with_libmnl_libs `$PKG_CONFIG --libs libmnl`"
 +      fi
  
 -      AC_CHECK_HEADERS(libnetlink.h iproute/libnetlink.h linux/libnetlink.h,
 +      AC_CHECK_HEADERS(libmnl.h libmnl/libmnl.h,
        [
 -       with_libnetlink="yes"
 +       with_libmnl="yes"
         break
        ], [],
  [#include <stdio.h>
  #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([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
 -if test "x$with_libnetlink" = "xyes"
 +if test "x$with_libmnl" = "xyes"
  then
 -      AC_CHECK_LIB(netlink, rtnl_open,
 -                   [with_libnetlink="yes"],
 -                   [with_libnetlink="no (symbol 'rtnl_open' not found)"],
 -                   [$with_libnetlink_libs])
 +      AC_CHECK_LIB(mnl, mnl_nlmsg_get_payload,
 +                   [with_libmnl="yes"],
 +                   [with_libmnl="no (symbol 'mnl_nlmsg_get_payload' not found)"],
 +                   [$with_libmnl_libs])
  fi
 -if test "x$with_libnetlink" = "xyes"
 +if test "x$with_libmnl" = "xyes"
  then
 -      SAVE_CFLAGS="$CFLAGS"
 -      CFLAGS="$CFLAGS $with_libnetlink_cflags"
 -
 -      AC_CACHE_CHECK(
 -              [if function 'rtnl_dump_filter' expects five arguments],
 -              [c_cv_rtnl_dump_filter_five_args],
 -              AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
 -[[[
 -#include <stdio.h>
 -#include <sys/types.h>
 -#include <asm/types.h>
 -#include <sys/socket.h>
 -#if HAVE_LIBNETLINK_H
 -# include <libnetlink.h>
 -#elif HAVE_IPROUTE_LIBNETLINK_H
 -# include <iproute/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"]
 -      )
 -)
 -
 -      AC_CACHE_CHECK(
 -              [if function 'rtnl_dump_filter' expects three arguments],
 -              [c_cv_rtnl_dump_filter_three_args],
 -              AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
 -[[[
 -#include <stdio.h>
 -#include <sys/types.h>
 -#include <asm/types.h>
 -#include <sys/socket.h>
 -#if HAVE_LIBNETLINK_H
 -# include <libnetlink.h>
 -#elif HAVE_IPROUTE_LIBNETLINK_H
 -# include <iproute/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"]
 -      )
 -)
 -
 -      CFLAGS="$SAVE_CFLAGS"
 -
 -      if test "x$c_cv_rtnl_dump_filter_five_args" = "xyes"
 -      then
 -              AC_DEFINE(RTNL_DUMP_FILTER_FIVE_ARGS, 1,
 -                              [Define to 1 if function 'rtnl_dump_filter' expects five arguments.])
 -      fi
 -      if test "x$c_cv_rtnl_dump_filter_three_args" = "xyes"
 -      then
 -              AC_DEFINE(RTNL_DUMP_FILTER_THREE_ARGS, 1,
 -                              [Define to 1 if function 'rtnl_dump_filter' expects three arguments.])
 -      fi
 -
 -      BUILD_WITH_LIBNETLINK_CFLAGS="$with_libnetlink_cflags"
 -      BUILD_WITH_LIBNETLINK_LIBS="$with_libnetlink_libs"
 -      AC_SUBST(BUILD_WITH_LIBNETLINK_CFLAGS)
 -      AC_SUBST(BUILD_WITH_LIBNETLINK_LIBS)
 +      AC_DEFINE(HAVE_LIBMNL, 1, [Define if libmnl is present and usable.])
 +      BUILD_WITH_LIBMNL_CFLAGS="$with_libmnl_cflags"
 +      BUILD_WITH_LIBMNL_LIBS="$with_libmnl_libs"
 +      AC_SUBST(BUILD_WITH_LIBMNL_CFLAGS)
 +      AC_SUBST(BUILD_WITH_LIBMNL_LIBS)
  fi
 -AM_CONDITIONAL(BUILD_WITH_LIBNETLINK, test "x$with_libnetlink" = "xyes")
 +AM_CONDITIONAL(BUILD_WITH_LIBMNL, test "x$with_libmnl" = "xyes")
  # }}}
  
  # --with-libnetapp {{{
  AM_CONDITIONAL(BUILD_WITH_LM_SENSORS, test "x$with_libsensors" = "xyes")
  # }}}
  
 +# --with-libsigrok {{{
 +with_libsigrok_cflags=""
 +with_libsigrok_ldflags=""
 +AC_ARG_WITH(libsigrok, [AS_HELP_STRING([--with-libsigrok@<:@=PREFIX@:>@], [Path to libsigrok.])],
 +[
 +      if test "x$withval" = "xno"
 +      then
 +              with_libsigrok="no"
 +      else
 +              with_libsigrok="yes"
 +              if test "x$withval" != "xyes"
 +              then
 +                      with_libsigrok_cflags="-I$withval/include"
 +                      with_libsigrok_ldflags="-L$withval/lib"
 +              fi
 +      fi
 +],[])
 +
 +# libsigrok has a glib dependency
 +if test "x$with_libsigrok" = "xyes"
 +then
 +      if test -z "m4_ifdef([AM_PATH_GLIB_2_0], [yes], [])"
 +      then
 +              with_libsigrok="no (glib not available)"
 +      else
 +              AM_PATH_GLIB_2_0([2.28.0],
 +                      [with_libsigrok_cflags="$with_libsigrok_cflags $GLIB_CFLAGS"; with_libsigrok_ldflags="$with_libsigrok_ldflags $GLIB_LIBS"])
 +      fi
 +fi
 +
 +# libsigrok headers
 +if test "x$with_libsigrok" = "xyes"
 +then
 +      SAVE_CPPFLAGS="$CPPFLAGS"
 +      CPPFLAGS="$CPPFLAGS $with_libsigrok_cflags"
 +
 +      AC_CHECK_HEADERS(libsigrok/libsigrok.h, [], [with_libsigrok="no (libsigrok/libsigrok.h not found)"])
 +
 +      CPPFLAGS="$SAVE_CPPFLAGS"
 +fi
 +
 +# libsigrok library
 +if test "x$with_libsigrok" = "xyes"
 +then
 +      SAVE_CPPFLAGS="$CPPFLAGS"
 +      SAVE_LDFLAGS="$LDFLAGS"
 +      CPPFLAGS="$CPPFLAGS $with_libsigrok_cflags"
 +      LDFLAGS="$LDFLAGS $with_libsigrok_ldflags"
 +
 +      AC_CHECK_LIB(sigrok, sr_init,
 +      [
 +              AC_DEFINE(HAVE_LIBSIGROK, 1, [Define to 1 if you have the sigrok library (-lsigrok).])
 +      ],
 +      [with_libsigrok="no (libsigrok not found)"])
 +
 +      CPPFLAGS="$SAVE_CPPFLAGS"
 +      LDFLAGS="$SAVE_LDFLAGS"
 +fi
 +if test "x$with_libsigrok" = "xyes"
 +then
 +      BUILD_WITH_LIBSIGROK_CFLAGS="$with_libsigrok_cflags"
 +      BUILD_WITH_LIBSIGROK_LDFLAGS="$with_libsigrok_ldflags"
 +      AC_SUBST(BUILD_WITH_LIBSIGROK_CFLAGS)
 +      AC_SUBST(BUILD_WITH_LIBSIGROK_LDFLAGS)
 +fi
 +AM_CONDITIONAL(BUILD_WITH_LIBSIGROK, test "x$with_libsigrok" = "xyes")
 +# }}}
 +
  # --with-libstatgrab {{{
  with_libstatgrab_cflags=""
  with_libstatgrab_ldflags=""
  AM_CONDITIONAL(BUILD_WITH_LIBYAJL, test "x$with_libyajl" = "xyes")
  # }}}
  
 +# --with-mic {{{
 +with_mic_cflags="-I/opt/intel/mic/sysmgmt/sdk/include"
 +with_mic_ldpath="-L/opt/intel/mic/sysmgmt/sdk/lib/Linux"
 +with_mic_libs=""
 +AC_ARG_WITH(mic,[AS_HELP_STRING([--with-mic@<:@=PREFIX@:>@], [Path to Intel MIC Access API.])],
 +[
 +      if test "x$withval" = "xno"
 +      then
 +              with_mic="no"
 +      else if test "x$withval" = "xyes"
 +      then
 +              with_mic="yes"
 +      else if test -d "$with_mic/lib"
 +      then
 +              AC_MSG_NOTICE([Not checking for Intel Mic: Manually configured])
 +              with_mic_cflags="-I$withval/include"
 +              with_mic_ldpath="-L$withval/lib/Linux"
 +              with_mic_libs="-lMicAccessSDK -lscif -lpthread"
 +              with_mic="yes"
 +      fi; fi; fi
 +],
 +[with_mic="yes"])
 +if test "x$with_mic" = "xyes"
 +then
 +      SAVE_CPPFLAGS="$CPPFLAGS"
 +      CPPFLAGS="$CPPFLAGS $with_mic_cflags"
 +      AC_CHECK_HEADERS(MicAccessApi.h,[],[with_mic="no (MicAccessApi not found)"])
 +      CPPFLAGS="$SAVE_CPPFLAGS"
 +fi
 +if test "x$with_mic" = "xyes"
 +then
 +      SAVE_CPPFLAGS="$CPPFLAGS"
 +      SAVE_LDFLAGS="$LDFLAGS"
 +
 +      CPPFLAGS="$CPPFLAGS $with_mic_cflags"
 +      LDFLAGS="$LDFLAGS $with_mic_ldpath"
 +
 +      AC_CHECK_LIB(MicAccessSDK, MicInitAPI,
 +                      [with_mic_ldpath="$with_mic_ldpath"
 +                      with_mic_libs="-lMicAccessSDK -lscif -lpthread"],
 +                      [with_mic="no (symbol MicInitAPI not found)"],[-lscif -lpthread])
 +
 +      CPPFLAGS="$SAVE_CPPFLAGS"
 +      LDFLAGS="$SAVE_LDFLAGS"
 +fi
 +
 +if test "x$with_mic" = "xyes"
 +then
 +      BUILD_WITH_MIC_CPPFLAGS="$with_mic_cflags"
 +      BUILD_WITH_MIC_LIBPATH="$with_mic_ldpath"
 +      BUILD_WITH_MIC_LDADD="$with_mic_libs"
 +      AC_SUBST(BUILD_WITH_MIC_CPPFLAGS)
 +      AC_SUBST(BUILD_WITH_MIC_LIBPATH)
 +      AC_SUBST(BUILD_WITH_MIC_LDADD)
 +fi
 +#}}}
 +
  # --with-libvarnish {{{
  with_libvarnish_cppflags=""
  with_libvarnish_cflags=""
@@@ -4749,7 -4578,6 +4749,7 @@@ dependency_error="no
  plugin_ascent="no"
  plugin_battery="no"
  plugin_bind="no"
 +plugin_cgroups="no"
  plugin_conntrack="no"
  plugin_contextswitch="no"
  plugin_cpu="no"
@@@ -4793,7 -4621,6 +4793,7 @@@ the
        plugin_battery="yes"
        plugin_conntrack="yes"
        plugin_contextswitch="yes"
 +      plugin_cgroups="yes"
        plugin_cpu="yes"
        plugin_cpufreq="yes"
        plugin_disk="yes"
        plugin_interface="yes"
        plugin_irq="yes"
        plugin_load="yes"
 +      plugin_lvm="yes"
        plugin_memory="yes"
        plugin_nfs="yes"
        plugin_numa="yes"
          plugin_tcpconns="yes"
  fi
  
 +# FreeBSD
 +
 +if test "x$ac_system" = "xFreeBSD"
 +then
 +        plugin_zfs_arc="yes"
 +fi
 +
 +
  if test "x$with_perfstat" = "xyes"
  then
        plugin_cpu="yes"
@@@ -5074,7 -4892,6 +5074,7 @@@ AC_PLUGIN([amqp],        [$with_librabb
  AC_PLUGIN([apache],      [$with_libcurl],      [Apache httpd statistics])
  AC_PLUGIN([apcups],      [yes],                [Statistics of UPSes by APC])
  AC_PLUGIN([apple_sensors], [$with_libiokit],   [Apple's hardware sensors])
 +AC_PLUGIN([aquaero],     [$with_libaquaero5],  [Aquaero's hardware sensors])
  AC_PLUGIN([ascent],      [$plugin_ascent],     [AscentEmu player statistics])
  AC_PLUGIN([battery],     [$plugin_battery],    [Battery statistics])
  AC_PLUGIN([bind],        [$plugin_bind],       [ISC Bind nameserver statistics])
@@@ -5086,7 -4903,6 +5086,7 @@@ AC_PLUGIN([csv],         [yes]
  AC_PLUGIN([curl],        [$with_libcurl],      [CURL generic web statistics])
  AC_PLUGIN([curl_json],   [$plugin_curl_json],    [CouchDB statistics])
  AC_PLUGIN([curl_xml],   [$plugin_curl_xml],    [CURL generic xml statistics])
 +AC_PLUGIN([cgroups],     [$plugin_cgroups],    [CGroups CPU usage accounting])
  AC_PLUGIN([dbi],         [$with_libdbi],       [General database statistics])
  AC_PLUGIN([df],          [$plugin_df],         [Filesystem usage statistics])
  AC_PLUGIN([disk],        [$plugin_disk],       [Disk usage statistics])
@@@ -5109,7 -4925,6 +5109,7 @@@ AC_PLUGIN([libvirt],     [$plugin_libvi
  AC_PLUGIN([load],        [$plugin_load],       [System load])
  AC_PLUGIN([logfile],     [yes],                [File logging plugin])
  AC_PLUGIN([lpar],        [$with_perfstat],     [AIX logical partitions statistics])
 +AC_PLUGIN([lvm],         [$with_liblvm2app],   [LVM statistics])
  AC_PLUGIN([madwifi],     [$have_linux_wireless_h], [Madwifi wireless statistics])
  AC_PLUGIN([match_empty_counter], [yes],        [The empty counter match])
  AC_PLUGIN([match_hashed], [yes],               [The hashed match])
@@@ -5121,12 -4936,11 +5121,12 @@@ AC_PLUGIN([md],          [$have_linux_r
  AC_PLUGIN([memcachec],   [$with_libmemcached], [memcachec statistics])
  AC_PLUGIN([memcached],   [yes],                [memcached statistics])
  AC_PLUGIN([memory],      [$plugin_memory],     [Memory usage])
 +AC_PLUGIN([mic],         [$with_mic],          [Intel Many Integrated Core stats])
  AC_PLUGIN([modbus],      [$with_libmodbus],    [Modbus plugin])
  AC_PLUGIN([multimeter],  [$plugin_multimeter], [Read multimeter values])
  AC_PLUGIN([mysql],       [$with_libmysql],     [MySQL statistics])
  AC_PLUGIN([netapp],      [$with_libnetapp],    [NetApp plugin])
 -AC_PLUGIN([netlink],     [$with_libnetlink],   [Enhanced Linux network statistics])
 +AC_PLUGIN([netlink],     [$with_libmnl],       [Enhanced Linux network statistics])
  AC_PLUGIN([network],     [yes],                [Network communication plugin])
  AC_PLUGIN([nfs],         [$plugin_nfs],        [NFS statistics])
  AC_PLUGIN([nginx],       [$with_libcurl],      [nginx statistics])
@@@ -5155,9 -4969,7 +5155,9 @@@ AC_PLUGIN([rrdcached],   [$librrd_rrdc_
  AC_PLUGIN([rrdtool],     [$with_librrd],       [RRDTool output plugin])
  AC_PLUGIN([sensors],     [$with_libsensors],   [lm_sensors statistics])
  AC_PLUGIN([serial],      [$plugin_serial],     [serial port traffic])
 +AC_PLUGIN([sigrok],      [$with_libsigrok],    [sigrok acquisition sources])
  AC_PLUGIN([snmp],        [$with_libnetsnmp],   [SNMP querying plugin])
 +AC_PLUGIN([statsd],      [yes],                [StatsD plugin])
  AC_PLUGIN([swap],        [$plugin_swap],       [Swap usage statistics])
  AC_PLUGIN([syslog],      [$have_syslog],       [Syslog logging plugin])
  AC_PLUGIN([table],       [yes],                [Parsing of tabular data])
@@@ -5359,8 -5171,6 +5359,8 @@@ cat <<EOF
  
  Configuration:
    Libraries:
 +    intel mic . . . . . . $with_mic
 +    libaquaero5 . . . . . $with_libaquaero5
      libcurl . . . . . . . $with_libcurl
      libdbi  . . . . . . . $with_libdbi
      libcredis . . . . . . $with_libcredis
      libkstat  . . . . . . $with_kstat
      libkvm  . . . . . . . $with_libkvm
      libmemcached  . . . . $with_libmemcached
 +    libmnl  . . . . . . . $with_libmnl
      libmodbus . . . . . . $with_libmodbus
      libmysql  . . . . . . $with_libmysql
      libnetapp . . . . . . $with_libnetapp
 -    libnetlink  . . . . . $with_libnetlink
      libnetsnmp  . . . . . $with_libnetsnmp
      libnotify . . . . . . $with_libnotify
      liboconfig  . . . . . $with_liboconfig
      librouteros . . . . . $with_librouteros
      librrd  . . . . . . . $with_librrd
      libsensors  . . . . . $with_libsensors
 +    libsigrok   . . . . . $with_libsigrok
      libstatgrab . . . . . $with_libstatgrab
      libtokyotyrant  . . . $with_libtokyotyrant
      libupsclient  . . . . $with_libupsclient
      amqp    . . . . . . . $enable_amqp
      apache  . . . . . . . $enable_apache
      apcups  . . . . . . . $enable_apcups
 +    aquaero . . . . . . . $enable_aquaero
      apple_sensors . . . . $enable_apple_sensors
      ascent  . . . . . . . $enable_ascent
      battery . . . . . . . $enable_battery
      bind  . . . . . . . . $enable_bind
      conntrack . . . . . . $enable_conntrack
      contextswitch . . . . $enable_contextswitch
 +    cgroups . . . . . . . $enable_cgroups
      cpu . . . . . . . . . $enable_cpu
      cpufreq . . . . . . . $enable_cpufreq
      csv . . . . . . . . . $enable_csv
      libvirt . . . . . . . $enable_libvirt
      load  . . . . . . . . $enable_load
      logfile . . . . . . . $enable_logfile
-     lpar... . . . . . . . $enable_lpar
+     lpar  . . . . . . . . $enable_lpar
 +    lvm . . . . . . . . . $enable_lvm
      madwifi . . . . . . . $enable_madwifi
      match_empty_counter . $enable_match_empty_counter
      match_hashed  . . . . $enable_match_hashed
      rrdtool . . . . . . . $enable_rrdtool
      sensors . . . . . . . $enable_sensors
      serial  . . . . . . . $enable_serial
 +    sigrok  . . . . . . . $enable_sigrok
      snmp  . . . . . . . . $enable_snmp
 +    statsd  . . . . . . . $enable_statsd
      swap  . . . . . . . . $enable_swap
      syslog  . . . . . . . $enable_syslog
      table . . . . . . . . $enable_table
diff --combined src/memcached.c
@@@ -84,6 -84,15 +84,15 @@@ static int memcached_connect_unix (memc
      return (-1);
    }
  
+   /* connect to the memcached daemon */
+   int status = connect (fd, (struct sockaddr *)&serv_addr, sizeof(serv_addr));
+   if (status != 0)
+   {
+       shutdown (fd, SHUT_RDWR);
+       close (fd);
+       fd = -1;
+   }
    return (fd);
  } /* int memcached_connect_unix */
  
@@@ -340,10 -349,6 +349,10 @@@ static int memcached_read (user_data_t 
    gauge_t bytes_total = NAN;
    gauge_t hits = NAN;
    gauge_t gets = NAN;
 +  gauge_t incr_hits = NAN;
 +  derive_t incr = 0;
 +  gauge_t decr_hits = NAN;
 +  derive_t decr = 0;
    derive_t rusage_user = 0;
    derive_t rusage_syst = 0;
    derive_t octets_rx = 0;
      }
  
      /*
 +     * Increment/Decrement
 +     */
 +    else if (FIELD_IS("incr_misses"))
 +    {
 +      derive_t incr_count = atoll (fields[2]);
 +      submit_derive ("memcached_ops", "incr_misses", incr_count, st);
 +      incr += incr_count;
 +    }
 +    else if (FIELD_IS ("incr_hits"))
 +    {
 +      derive_t incr_count = atoll (fields[2]);
 +      submit_derive ("memcached_ops", "incr_hits", incr_count, st);
 +      incr_hits = atof (fields[2]);
 +      incr += incr_count;
 +    }
 +    else if (FIELD_IS ("decr_misses"))
 +    {
 +      derive_t decr_count = atoll (fields[2]);
 +      submit_derive ("memcached_ops", "decr_misses", decr_count, st);
 +      decr += decr_count;
 +    }
 +    else if (FIELD_IS ("decr_hits"))
 +    {
 +      derive_t decr_count = atoll (fields[2]);
 +      submit_derive ("memcached_ops", "decr_hits", decr_count, st);
 +      decr_hits = atof (fields[2]);
 +      decr += decr_count;
 +    }
 +
 +    /*
       * Operations on the cache, i. e. cache hits, cache misses and evictions of items
       */
      else if (FIELD_IS ("get_hits"))
      submit_gauge ("percent", "hitratio", rate, st);
    }
  
 +  if (!isnan (incr_hits) && incr != 0)
 +  {
 +    gauge_t incr_rate = 100.0 * incr_hits / incr;
 +    submit_gauge ("percent", "incr_hitratio", incr_rate, st);
 +    submit_derive ("memcached_ops", "incr", incr, st);
 +  }
 +
 +  if (!isnan (decr_hits) && decr != 0)
 +  {
 +    gauge_t decr_rate = 100.0 * decr_hits / decr;
 +    submit_gauge ("percent", "decr_hitratio", decr_rate, st);
 +    submit_derive ("memcached_ops", "decr", decr, st);
 +  }
 +
    return 0;
  } /* int memcached_read */
  
diff --combined src/rrdtool.c
@@@ -198,7 -198,7 +198,7 @@@ static int srrd_update (char *filename
  } /* int srrd_update */
  #endif /* !HAVE_THREADSAFE_LIBRRD */
  
 -static int value_list_to_string (char *buffer, int buffer_len,
 +static int value_list_to_string_multiple (char *buffer, int buffer_len,
                const data_set_t *ds, const value_list_t *vl)
  {
        int offset;
        } /* for ds->ds_num */
  
        return (0);
 +} /* int value_list_to_string_multiple */
 +
 +static int value_list_to_string (char *buffer, int buffer_len,
 +              const data_set_t *ds, const value_list_t *vl)
 +{
 +      int status;
 +      time_t tt;
 +
 +      if (ds->ds_num != 1)
 +              return (value_list_to_string_multiple (buffer, buffer_len,
 +                                      ds, vl));
 +
 +      tt = CDTIME_T_TO_TIME_T (vl->time);
 +      switch (ds->ds[0].type)
 +      {
 +              case DS_TYPE_DERIVE:
 +                      status = ssnprintf (buffer, buffer_len, "%u:%"PRIi64,
 +                              (unsigned) tt, vl->values[0].derive);
 +                      break;
 +              case DS_TYPE_GAUGE:
 +                      status = ssnprintf (buffer, buffer_len, "%u:%lf",
 +                              (unsigned) tt, vl->values[0].gauge);
 +                      break;
 +              case DS_TYPE_COUNTER:
 +                      status = ssnprintf (buffer, buffer_len, "%u:%llu",
 +                              (unsigned) tt, vl->values[0].counter);
 +                      break;
 +              case DS_TYPE_ABSOLUTE:
 +                      status = ssnprintf (buffer, buffer_len, "%u:%"PRIu64,
 +                              (unsigned) tt, vl->values[0].absolute);
 +                      break;
 +              default:
 +                      return (EINVAL);
 +      }
 +
 +      if ((status < 1) || (status >= buffer_len))
 +              return (ENOMEM);
 +
 +      return (0);
  } /* int value_list_to_string */
  
  static int value_list_to_filename (char *buffer, size_t buffer_size,
        int status;
        size_t len;
  
+       if (datadir != NULL)
+       {
+               size_t datadir_len = strlen (datadir) + 1;
+               if (datadir_len >= buffer_size)
+                       return (ENOMEM);
+               sstrncpy (buffer, datadir, buffer_size);
+               buffer[datadir_len - 1] = '/';
+               buffer[datadir_len] = 0;
+               buffer += datadir_len;
+               buffer_size -= datadir_len;
+       }
        status = FORMAT_VL (buffer, buffer_size, vl);
        if (status != 0)
                return (status);