Merge branch 'collectd-5.1'
authorFlorian Forster <octo@collectd.org>
Mon, 12 Nov 2012 07:28:16 +0000 (08:28 +0100)
committerFlorian Forster <octo@collectd.org>
Mon, 12 Nov 2012 07:28:16 +0000 (08:28 +0100)
1  2 
configure.in
src/Makefile.am

diff --combined configure.in
  #include <asm/types.h>
  #include <sys/socket.h>])
  
-       AC_COMPILE_IFELSE(
- [#include <stdio.h>
- #include <sys/types.h>
- #include <asm/types.h>
- #include <sys/socket.h>
- #include <linux/netlink.h>
- #include <linux/rtnetlink.h>
- int main (void)
- {
-       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_STATS2;
+                                 return (retval);
+                                 ]
+                             )],
+                             [AC_DEFINE([HAVE_TCA_STATS2], [1], [True if the enum-member TCA_STATS2 exists])])
  
        AC_COMPILE_IFELSE(
  [#include <stdio.h>
  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"
@@@ -4853,7 -4850,6 +4852,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])
@@@ -5186,7 -5182,6 +5185,7 @@@ Configuration
      perl  . . . . . . . . $with_perl_bindings
  
    Modules:
 +    aggregation . . . . . $enable_aggregation
      amqp    . . . . . . . $enable_amqp
      apache  . . . . . . . $enable_apache
      apcups  . . . . . . . $enable_apcups
diff --combined src/Makefile.am
@@@ -119,21 -119,10 +119,21 @@@ pkglib_LTLIBRARIES 
  BUILT_SOURCES = 
  CLEANFILES = 
  
 +if BUILD_PLUGIN_AGGREGATION
 +pkglib_LTLIBRARIES += aggregation.la
 +aggregation_la_SOURCES = aggregation.c \
 +                         utils_vl_lookup.c utils_vl_lookup.h
 +aggregation_la_LDFLAGS = -module -avoid-version
 +aggregation_la_LIBADD =
 +collectd_LDADD += "-dlopen" aggregation.la
 +collectd_DEPENDENCIES += aggregation.la
 +endif
 +
  if BUILD_PLUGIN_AMQP
  pkglib_LTLIBRARIES += amqp.la
  amqp_la_SOURCES = amqp.c \
                  utils_cmd_putval.c utils_cmd_putval.h \
 +                utils_format_graphite.c utils_format_graphite.h \
                  utils_format_json.c utils_format_json.h
  amqp_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBRABBITMQ_LDFLAGS)
  amqp_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBRABBITMQ_CPPFLAGS)
@@@ -223,10 -212,6 +223,10 @@@ if BUILD_PLUGIN_CONTEXTSWITC
  pkglib_LTLIBRARIES += contextswitch.la
  contextswitch_la_SOURCES = contextswitch.c
  contextswitch_la_LDFLAGS = -module -avoid-version
 +contextswitch_la_LIBADD =
 +if BUILD_WITH_PERFSTAT
 +contextswitch_la_LIBADD += -lperfstat
 +endif
  collectd_LDADD += "-dlopen" contextswitch.la
  collectd_DEPENDENCIES += contextswitch.la
  endif
@@@ -1206,9 -1191,6 +1206,9 @@@ uptime_la_LIBADD 
  if BUILD_WITH_LIBKSTAT
  uptime_la_LIBADD += -lkstat
  endif
 +if BUILD_WITH_PERFSTAT
 +uptime_la_LIBADD += -lperfstat
 +endif
  collectd_LDADD += "-dlopen" uptime.la
  collectd_DEPENDENCIES += uptime.la
  endif
@@@ -1274,8 -1256,7 +1274,8 @@@ endi
  if BUILD_PLUGIN_WRITE_GRAPHITE
  pkglib_LTLIBRARIES += write_graphite.la
  write_graphite_la_SOURCES = write_graphite.c \
 -                      utils_format_json.c utils_format_json.h
 +                        utils_format_graphite.c utils_format_graphite.h \
 +                        utils_format_json.c utils_format_json.h
  write_graphite_la_LDFLAGS = -module -avoid-version
  collectd_LDADD += "-dlopen" write_graphite.la
  collectd_DEPENDENCIES += write_graphite.la
@@@ -1336,6 -1317,8 +1336,8 @@@ collectd_LDADD += "-dlopen" zfs_arc.l
  collectd_DEPENDENCIES += zfs_arc.la
  endif
  
+ BUILT_SOURCES += $(dist_man_MANS)
  dist_man_MANS = collectd.1 \
                collectd.conf.5 \
                collectd-email.5 \
@@@ -1407,16 -1390,3 +1409,16 @@@ uninstall-hook
        rm -f $(DESTDIR)$(pkgdatadir)/types.db;
        rm -f $(DESTDIR)$(sysconfdir)/collectd.conf
        rm -f $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;
 +
 +if BUILD_FEATURE_DEBUG
 +bin_PROGRAMS += utils_vl_lookup_test
 +utils_vl_lookup_test_SOURCES = utils_vl_lookup_test.c \
 +                               utils_vl_lookup.h utils_vl_lookup.c \
 +                               utils_avltree.c utils_avltree.h \
 +                               common.h
 +
 +utils_vl_lookup_test_CPPFLAGS =  $(AM_CPPFLAGS) $(LTDLINCL) -DBUILD_TEST=1
 +utils_vl_lookup_test_CFLAGS = $(AM_CFLAGS)
 +utils_vl_lookup_test_LDFLAGS = -export-dynamic
 +utils_vl_lookup_test_LDADD =
 +endif