Merge branch 'collectd-4.0'
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Tue, 28 Aug 2007 22:02:21 +0000 (00:02 +0200)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Tue, 28 Aug 2007 22:02:21 +0000 (00:02 +0200)
Conflicts:

ChangeLog
configure.in
src/Makefile.am
src/collectd-unixsock.pod
src/mysql.c
src/nut.c

1  2 
ChangeLog
configure.in
contrib/README
src/Makefile.am
src/collectd-unixsock.pod
src/collectd.conf.pod
src/network.c
src/nut.c
src/processes.c

diff --cc ChangeLog
+++ b/ChangeLog
@@@ -1,19 -1,15 +1,31 @@@
 +2007-07-21, Version 4.1.0
 +      * Build system: The build system has been changed to automatically
 +        disable all plugins, which are missing dependencies. The dependency
 +        checking has been removed from the plugins themselves to remove
 +        redundancy.
 +      * Flexible interval: The interval of collected data is not sent along
 +        with the data itself over the network, so that the interval-settings
 +        of server and clients no longer needs to match.
 +      * snmp plugin: The new `snmp' plugin can read values from SNMP enabled
 +        network devices, such as switches, routers, thermometers, rack
 +        monitoring servers, etc. The collectd-snmp(5) manpage documents this
 +        plugin.
 +      * unixsock plugin: Added the `LISTVAL' command.
 +      * xmms plugin: The new `xmms' plugin graphs the bitrate and frequency
 +        of music played with xmms.
 +
+ 2007-08-26, Version 4.0.7
+       * documentation: Some typos have been fixed and some information has
+         been improved.
+       * build system: Many fixes for detecting libraries in unusual places,
+         such as on RedHat systems. The affected libraries are `libcurl',
+         `libmysql', and `libupsclient'.
+       * network plugin: Allow the `Port' option to be specified as a number
+         (i. e. without quotes).
+       * nut plugin: A fix allows linking the nut plugin against
+         libupsclient, version >= 2.2.0.
+       * processes plugin: Fix a potential segmentation fault.
  2007-07-30, Version 4.0.6
        * sensors plugin: Fix the ignorelist functionality: Only the `type
          instance' was used to match against the list, but the documentation
diff --cc configure.in
  fi
  if test "x$with_libupsclient" = "xyes"
  then
 -      AC_CHECK_HEADERS(upsclient.h,
 -      [
 -              AC_DEFINE(HAVE_UPSCLIENT_H, 1, [Define to 1 if you have the <upsclient.h> header file.])
 -      ], [with_libupsclient="no (upsclient.h not found)"])
 +      AC_DEFINE(HAVE_LIBUPSCLIENT, 1, [Define to 1 if you have the upsclient library (-lupsclient).])
  fi
+ if test "x$with_libupsclient" = "xyes"
+ then
+       AC_CHECK_TYPES([UPSCONN_t, UPSCONN], [], [], 
+ [#include <stdlib.h>
+ #include <stdio.h>
+ #include <upsclient.h>])
+ fi
  AM_CONDITIONAL(BUILD_WITH_LIBUPSCLIENT, test "x$with_libupsclient" = "xyes")
  
 +### BEGIN of check for libxmms ###
 +with_xmms_config="xmms-config"
 +with_xmms_cflags=""
 +with_xmms_libs=""
 +AC_ARG_WITH(libxmms, [AS_HELP_STRING([--with-libxmms@<:@=PREFIX@:>@], [Path to libxmms.])],
 +[
 +      if test "x$withval" != "xno" -a "x$withval" != "xyes"
 +      then
 +              if test -x "$withval/bin/xmms-config"
 +              then
 +                      with_xmms_config="$withval/bin/xmms-config"
 +              fi
 +      fi
 +      if test "x$withval" = "xno"
 +      then
 +              with_libxmms="no"
 +      else
 +              with_libxmms="yes"
 +      fi
 +],
 +[
 +      with_libxmms="yes"
 +])
 +if test "x$with_libxmms" = "xyes"
 +then
 +      with_xmms_cflags=`$with_xmms_config --cflags 2>/dev/null`
 +      xmms_config_status=$?
 +
 +      if test $xmms_config_status -ne 0
 +      then
 +              with_libxmms="no"
 +      fi
 +fi
 +if test "x$with_libxmms" = "xyes"
 +then
 +      with_xmms_libs=`$with_xmms_config --libs 2>/dev/null`
 +      xmms_config_status=$?
 +
 +      if test $xmms_config_status -ne 0
 +      then
 +              with_libxmms="no"
 +      fi
 +fi
 +if test "x$with_libxmms" = "xyes"
 +then
 +      AC_CHECK_LIB(xmms, xmms_remote_get_info,
 +      [
 +              BUILD_WITH_LIBXMMS_CFLAGS="$with_xmms_cflags"
 +              BUILD_WITH_LIBXMMS_LIBS="$with_xmms_libs"
 +              AC_SUBST(BUILD_WITH_LIBXMMS_CFLAGS)
 +              AC_SUBST(BUILD_WITH_LIBXMMS_LIBS)
 +      ],
 +      [
 +              with_libxmms="no"
 +      ],
 +      [$with_xmms_libs])
 +fi
 +with_libxmms_numeric=0
 +if test "x$with_libxmms" = "xyes"
 +then
 +      with_libxmms_numeric=1
 +fi
 +AC_DEFINE_UNQUOTED(HAVE_LIBXMMS, [$with_libxmms_numeric], [Define to 1 if you have the 'xmms' library (-lxmms).])
 +AM_CONDITIONAL(BUILD_WITH_LIBXMMS, test "x$with_libxmms" = "xyes")
 +### END of check for libxmms ###
 +
  # Check for enabled/disabled features
  #
  
diff --cc contrib/README
Simple merge
diff --cc src/Makefile.am
@@@ -81,11 -80,17 +81,17 @@@ endi
  
  pkglib_LTLIBRARIES = 
  
 -if BUILD_MODULE_APACHE
 +if BUILD_PLUGIN_APACHE
  pkglib_LTLIBRARIES += apache.la
  apache_la_SOURCES = apache.c
- apache_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBCURL_LIBS)
+ apache_la_LDFLAGS = -module -avoid-version
+ apache_la_CFLAGS =
+ apache_la_LIBADD =
  collectd_LDADD += "-dlopen" apache.la
+ if BUILD_WITH_LIBCURL
+ apache_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
+ apache_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
+ endif
  collectd_DEPENDENCIES += apache.la
  endif
  
@@@ -329,11 -351,17 +335,17 @@@ collectd_LDADD += "-dlopen" multimeter.
  collectd_DEPENDENCIES += multimeter.la
  endif
  
 -if BUILD_MODULE_MYSQL
 +if BUILD_PLUGIN_MYSQL
  pkglib_LTLIBRARIES += mysql.la
  mysql_la_SOURCES = mysql.c
- mysql_la_LDFLAGS = -module -avoid-version -lmysqlclient
+ mysql_la_LDFLAGS = -module -avoid-version
+ mysql_la_CFLAGS =
+ mysql_la_LIBADD =
  collectd_LDADD += "-dlopen" mysql.la
+ if BUILD_WITH_LIBMYSQL
+ mysql_la_CFLAGS += $(BUILD_WITH_LIBMYSQL_CFLAGS)
+ mysql_la_LIBADD += $(BUILD_WITH_LIBMYSQL_LIBS)
+ endif
  collectd_DEPENDENCIES += mysql.la
  endif
  
Simple merge
Simple merge
diff --cc src/network.c
Simple merge
diff --cc src/nut.c
+++ b/src/nut.c
  #include "common.h"
  #include "plugin.h"
  
 -#if HAVE_PTHREAD_H
 -# include <pthread.h>
 -#endif
 -
 -#if HAVE_UPSCLIENT_H
 -# include <upsclient.h>
 -# define NUT_HAVE_READ 1
 -#else
 -# define NUT_HAVE_READ 0
 -#endif
 +#include <pthread.h>
 +#include <upsclient.h>
  
 -
 -#if NUT_HAVE_READ
+ #if HAVE_UPSCONN_T
+ typedef UPSCONN_t collectd_upsconn_t;
+ #elif HAVE_UPSCONN
+ typedef UPSCONN collectd_upsconn_t;
+ #else
+ # error "Unable to determine the UPS connection type."
+ #endif
  struct nut_ups_s;
  typedef struct nut_ups_s nut_ups_t;
  struct nut_ups_s
diff --cc src/processes.c
Simple merge