From: Florian Forster Date: Tue, 28 Aug 2007 22:02:21 +0000 (+0200) Subject: Merge branch 'collectd-4.0' X-Git-Tag: collectd-4.1.0~27 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=12c1e32ec71ffd5d90af5df4b430fba04d91aed5;p=collectd.git Merge branch 'collectd-4.0' Conflicts: ChangeLog configure.in src/Makefile.am src/collectd-unixsock.pod src/mysql.c src/nut.c --- 12c1e32ec71ffd5d90af5df4b430fba04d91aed5 diff --cc ChangeLog index fcccbf8b,6c9358b6..4bbf5bc4 --- a/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 index 735ea749,14fcaa7f..01c6b952 --- a/configure.in +++ b/configure.in @@@ -1275,76 -1336,20 +1312,83 @@@ the 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 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 + #include + #include ]) + 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 src/Makefile.am index 234ad6d3,ab4d46a6..6f3db918 --- a/src/Makefile.am +++ b/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 diff --cc src/nut.c index 185d75cf,087604f1..f7f026a6 --- a/src/nut.c +++ b/src/nut.c @@@ -23,9 -23,27 +23,17 @@@ #include "common.h" #include "plugin.h" -#if HAVE_PTHREAD_H -# include -#endif - -#if HAVE_UPSCLIENT_H -# include -# define NUT_HAVE_READ 1 -#else -# define NUT_HAVE_READ 0 -#endif +#include +#include + #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 + - -#if NUT_HAVE_READ struct nut_ups_s; typedef struct nut_ups_s nut_ups_t; struct nut_ups_s