Code

Merge branch 'collectd-4.10' into collectd-5.3
authorMarc Fournier <marc.fournier@camptocamp.com>
Tue, 14 Apr 2015 07:17:27 +0000 (09:17 +0200)
committerMarc Fournier <marc.fournier@camptocamp.com>
Tue, 14 Apr 2015 07:17:27 +0000 (09:17 +0200)
1  2 
src/Makefile.am

diff --combined src/Makefile.am
index 1eb5d70fd28863a9f25afaae06439897cdcfc8fb,47a9a08a30bf8c1f17b823c09dcadcc3c9febf45..c24e73802257fac2406926ec2ebc26a15e9ab0a9
@@@ -1,4 -1,7 +1,4 @@@
  SUBDIRS = libcollectdclient
 -if BUILD_WITH_OWN_LIBIPTC
 -SUBDIRS += owniptc
 -endif
  if BUILD_WITH_OWN_LIBOCONFIG
  SUBDIRS += liboconfig
  endif
@@@ -18,7 -21,7 +18,7 @@@ AM_CPPFLAGS += -DPLUGINDIR='"${pkglibdi
  AM_CPPFLAGS += -DPKGDATADIR='"${pkgdatadir}"'
  
  sbin_PROGRAMS = collectd collectdmon
 -bin_PROGRAMS = collectd-nagios
 +bin_PROGRAMS = collectd-nagios collectdctl collectd-tg
  
  collectd_SOURCES = collectd.c collectd.h \
                   common.c common.h \
                   utils_ignorelist.c utils_ignorelist.h \
                   utils_llist.c utils_llist.h \
                   utils_parse_option.c utils_parse_option.h \
 +                 utils_random.c utils_random.h \
                   utils_tail_match.c utils_tail_match.h \
                   utils_match.c utils_match.h \
                   utils_subst.c utils_subst.h \
                   utils_tail.c utils_tail.h \
 -                 utils_threshold.c utils_threshold.h \
 +                 utils_time.c utils_time.h \
                   types_list.c types_list.h
  
  collectd_CPPFLAGS =  $(AM_CPPFLAGS) $(LTDLINCL)
@@@ -91,7 -93,6 +91,7 @@@ collectdmon_SOURCES = collectdmon.
  collectdmon_CPPFLAGS = $(AM_CPPFLAGS)
  
  collectd_nagios_SOURCES = collectd-nagios.c
 +collectd_nagios_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/src/libcollectdclient/collectd
  collectd_nagios_LDADD =
  if BUILD_WITH_LIBSOCKET
  collectd_nagios_LDADD += -lsocket
@@@ -103,63 -104,10 +103,63 @@@ endi
  collectd_nagios_LDADD += libcollectdclient/libcollectdclient.la
  collectd_nagios_DEPENDENCIES = libcollectdclient/libcollectdclient.la
  
 +
 +collectdctl_SOURCES = collectdctl.c
 +collectdctl_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/src/libcollectdclient/collectd
 +collectdctl_LDADD =
 +if BUILD_WITH_LIBSOCKET
 +collectdctl_LDADD += -lsocket
 +endif
 +if BUILD_AIX
 +collectdctl_LDADD += -lm
 +endif
 +collectdctl_LDADD += libcollectdclient/libcollectdclient.la
 +collectdctl_DEPENDENCIES = libcollectdclient/libcollectdclient.la
 +
 +collectd_tg_SOURCES = collectd-tg.c \
 +                    utils_heap.c utils_heap.h
 +collectd_tg_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/src/libcollectdclient/collectd
 +collectd_tg_LDADD =
 +if BUILD_WITH_LIBSOCKET
 +collectd_tg_LDADD += -lsocket
 +endif
 +if BUILD_WITH_LIBRT
 +collectd_tg_LDADD += -lrt
 +endif
 +if BUILD_AIX
 +collectd_tg_LDADD += -lm
 +endif
 +collectd_tg_LDADD += libcollectdclient/libcollectdclient.la
 +collectd_tg_DEPENDENCIES = libcollectdclient/libcollectdclient.la
 +
 +
  pkglib_LTLIBRARIES = 
  
  BUILT_SOURCES = 
 -CLEANFILES = 
 +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 = -lm
 +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)
 +amqp_la_LIBADD = $(BUILD_WITH_LIBRABBITMQ_LIBS)
 +collectd_LDADD += "-dlopen" amqp.la
 +collectd_DEPENDENCIES += amqp.la
 +endif
  
  if BUILD_PLUGIN_APACHE
  pkglib_LTLIBRARIES += apache.la
@@@ -191,7 -139,7 +191,7 @@@ if BUILD_PLUGIN_APPLE_SENSOR
  pkglib_LTLIBRARIES += apple_sensors.la
  apple_sensors_la_SOURCES = apple_sensors.c
  apple_sensors_la_LDFLAGS = -module -avoid-version
 -apple_sensors_la_LIBADD = -lIOKit
 +apple_sensors_la_LDFLAGS += -framework IOKit
  collectd_LDADD += "-dlopen" apple_sensors.la
  collectd_DEPENDENCIES += apple_sensors.la
  endif
@@@ -213,7 -161,7 +213,7 @@@ battery_la_SOURCES = battery.
  battery_la_LDFLAGS = -module -avoid-version
  battery_la_LIBADD =
  if BUILD_WITH_LIBIOKIT
 -battery_la_LIBADD += -lIOKit
 +battery_la_LDFLAGS += -framework IOKit
  endif
  collectd_LDADD += "-dlopen" battery.la
  collectd_DEPENDENCIES += battery.la
@@@ -242,10 -190,6 +242,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
@@@ -361,7 -305,7 +361,7 @@@ if BUILD_WITH_LIBDEVINF
  disk_la_LIBADD += -ldevinfo
  endif
  if BUILD_WITH_LIBIOKIT
 -disk_la_LIBADD += -lIOKit
 +disk_la_LDFLAGS += -framework IOKit
  endif
  if BUILD_WITH_LIBSTATGRAB
  disk_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)  
@@@ -411,14 -355,6 +411,14 @@@ collectd_LDADD += "-dlopen" exec.l
  collectd_DEPENDENCIES += exec.la
  endif
  
 +if BUILD_PLUGIN_ETHSTAT
 +pkglib_LTLIBRARIES += ethstat.la
 +ethstat_la_SOURCES = ethstat.c
 +ethstat_la_LDFLAGS = -module -avoid-version
 +collectd_LDADD += "-dlopen" ethstat.la
 +collectd_DEPENDENCIES += ethstat.la
 +endif
 +
  if BUILD_PLUGIN_FILECOUNT
  pkglib_LTLIBRARIES += filecount.la
  filecount_la_SOURCES = filecount.c
@@@ -477,8 -413,13 +477,8 @@@ if BUILD_PLUGIN_IPTABLE
  pkglib_LTLIBRARIES += iptables.la
  iptables_la_SOURCES = iptables.c
  iptables_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBIPTC_CPPFLAGS)
 -iptables_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBIPTC_LDFLAGS)
 -if BUILD_WITH_OWN_LIBIPTC
 -iptables_la_LIBADD  = owniptc/libiptc.la
 -iptables_la_DEPENDENCIES = owniptc/libiptc.la
 -else
 -iptables_la_LIBADD = -liptc
 -endif
 +iptables_la_LDFLAGS = -module -avoid-version
 +iptables_la_LIBADD = $(BUILD_WITH_LIBIPTC_LDFLAGS)
  collectd_LDADD += "-dlopen" iptables.la
  collectd_DEPENDENCIES += iptables.la
  endif
@@@ -559,15 -500,6 +559,15 @@@ collectd_LDADD += "-dlopen" logfile.l
  collectd_DEPENDENCIES += logfile.la
  endif
  
 +if BUILD_PLUGIN_LPAR
 +pkglib_LTLIBRARIES += lpar.la
 +lpar_la_SOURCES = lpar.c
 +lpar_la_LDFLAGS = -module -avoid-version
 +collectd_LDADD += "-dlopen" lpar.la
 +collectd_DEPENDENCIES += lpar.la
 +lpar_la_LIBADD = -lperfstat
 +endif
 +
  if BUILD_PLUGIN_MADWIFI
  pkglib_LTLIBRARIES += madwifi.la
  madwifi_la_SOURCES = madwifi.c madwifi.h
@@@ -628,14 -560,6 +628,14 @@@ collectd_LDADD += "-dlopen" mbmon.l
  collectd_DEPENDENCIES += mbmon.la
  endif
  
 +if BUILD_PLUGIN_MD
 +pkglib_LTLIBRARIES += md.la
 +md_la_SOURCES = md.c
 +md_la_LDFLAGS = -module -avoid-version
 +collectd_LDADD += "-dlopen" md.la
 +collectd_DEPENDENCIES += md.la
 +endif
 +
  if BUILD_PLUGIN_MEMCACHEC
  pkglib_LTLIBRARIES += memcachec.la
  memcachec_la_SOURCES = memcachec.c
@@@ -796,7 -720,7 +796,7 @@@ if BUILD_PLUGIN_NOTIFY_EMAI
  pkglib_LTLIBRARIES += notify_email.la
  notify_email_la_SOURCES = notify_email.c
  notify_email_la_LDFLAGS = -module -avoid-version
- notify_email_la_LIBADD = -lesmtp -lssl -lcrypto -lpthread -ldl
+ notify_email_la_LIBADD = -lesmtp -lssl -lcrypto -lpthread
  collectd_LDADD += "-dlopen" notify_email.la
  collectd_DEPENDENCIES += notify_email.la
  endif
@@@ -813,14 -737,6 +813,14 @@@ collectd_LDADD += "-dlopen" ntpd.l
  collectd_DEPENDENCIES += ntpd.la
  endif
  
 +if BUILD_PLUGIN_NUMA
 +pkglib_LTLIBRARIES += numa.la
 +numa_la_SOURCES = numa.c
 +numa_la_LDFLAGS = -module -avoid-version
 +collectd_LDADD += "-dlopen" numa.la
 +collectd_DEPENDENCIES += numa.la
 +endif
 +
  if BUILD_PLUGIN_NUT
  pkglib_LTLIBRARIES += nut.la
  nut_la_SOURCES = nut.c
@@@ -891,23 -807,15 +891,23 @@@ perl_la_CFLAGS += -Wno-nonnul
  endif
  perl_la_LDFLAGS = -module -avoid-version \
                $(PERL_LDFLAGS)
 +perl_la_LIBADD = $(PERL_LIBS)
  collectd_LDADD += "-dlopen" perl.la
  collectd_DEPENDENCIES += perl.la
  endif
  
 +if BUILD_PLUGIN_PF
 +pkglib_LTLIBRARIES += pf.la
 +pf_la_SOURCES = pf.c
 +pf_la_LDFLAGS = -module -avoid-version
 +collectd_LDADD += "-dlopen" pf.la
 +collectd_DEPENDENCIES += pf.la
 +endif
 +
  if BUILD_PLUGIN_PINBA
 -BUILT_SOURCES += pinba.pb-c.c pinba.pb-c.h
 -CLEANFILES += pinba.pb-c.c pinba.pb-c.h
  pkglib_LTLIBRARIES += pinba.la
  pinba_la_SOURCES = pinba.c
 +nodist_pinba_la_SOURCES = pinba.pb-c.c pinba.pb-c.h
  pinba_la_LDFLAGS = -module -avoid-version
  pinba_la_LIBADD = -lprotobuf-c
  collectd_LDADD += "-dlopen" pinba.la
@@@ -978,16 -886,6 +978,16 @@@ collectd_LDADD += "-dlopen" protocols.l
  collectd_DEPENDENCIES += protocols.la
  endif
  
 +if BUILD_PLUGIN_REDIS
 +pkglib_LTLIBRARIES += redis.la
 +redis_la_SOURCES = redis.c
 +redis_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBCREDIS_LDFLAGS)
 +redis_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCREDIS_CPPFLAGS)
 +redis_la_LIBADD = -lcredis
 +collectd_LDADD += "-dlopen" redis.la
 +collectd_DEPENDENCIES += redis.la
 +endif
 +
  if BUILD_PLUGIN_ROUTEROS
  pkglib_LTLIBRARIES += routeros.la
  routeros_la_SOURCES = routeros.c
@@@ -1104,14 -1002,6 +1104,14 @@@ collectd_LDADD += "-dlopen" tail.l
  collectd_DEPENDENCIES += tail.la
  endif
  
 +if BUILD_PLUGIN_TAIL_CSV
 +pkglib_LTLIBRARIES += tail_csv.la
 +tail_csv_la_SOURCES = tail_csv.c
 +tail_csv_la_LDFLAGS = -module -avoid-version
 +collectd_LDADD += "-dlopen" tail_csv.la
 +collectd_DEPENDENCIES += tail_csv.la
 +endif
 +
  if BUILD_PLUGIN_TAPE
  pkglib_LTLIBRARIES += tape.la
  tape_la_SOURCES = tape.c
@@@ -1153,14 -1043,6 +1153,14 @@@ collectd_LDADD += "-dlopen" target_set.
  collectd_DEPENDENCIES += target_set.la
  endif
  
 +if BUILD_PLUGIN_TARGET_V5UPGRADE
 +pkglib_LTLIBRARIES += target_v5upgrade.la
 +target_v5upgrade_la_SOURCES = target_v5upgrade.c
 +target_v5upgrade_la_LDFLAGS = -module -avoid-version
 +collectd_LDADD += "-dlopen" target_v5upgrade.la
 +collectd_DEPENDENCIES += target_v5upgrade.la
 +endif
 +
  if BUILD_PLUGIN_TCPCONNS
  pkglib_LTLIBRARIES += tcpconns.la
  tcpconns_la_SOURCES = tcpconns.c
@@@ -1197,14 -1079,6 +1197,14 @@@ collectd_LDADD += "-dlopen" thermal.l
  collectd_DEPENDENCIES += thermal.la
  endif
  
 +if BUILD_PLUGIN_THRESHOLD
 +pkglib_LTLIBRARIES += threshold.la
 +threshold_la_SOURCES = threshold.c
 +threshold_la_LDFLAGS = -module -avoid-version
 +collectd_LDADD += "-dlopen" threshold.la
 +collectd_DEPENDENCIES += threshold.la
 +endif
 +
  if BUILD_PLUGIN_TOKYOTYRANT
  pkglib_LTLIBRARIES += tokyotyrant.la
  tokyotyrant_la_SOURCES = tokyotyrant.c
@@@ -1223,6 -1097,7 +1223,6 @@@ pkglib_LTLIBRARIES += unixsock.l
  unixsock_la_SOURCES = unixsock.c \
                      utils_cmd_flush.h utils_cmd_flush.c \
                      utils_cmd_getval.h utils_cmd_getval.c \
 -                    utils_cmd_getthreshold.h utils_cmd_getthreshold.c \
                      utils_cmd_listval.h utils_cmd_listval.c \
                      utils_cmd_putval.h utils_cmd_putval.c \
                      utils_cmd_putnotif.h utils_cmd_putnotif.c
@@@ -1241,9 -1116,6 +1241,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
@@@ -1272,16 -1144,6 +1272,16 @@@ collectd_LDADD += "-dlopen" uuid.l
  collectd_DEPENDENCIES += uuid.la
  endif
  
 +if BUILD_PLUGIN_VARNISH
 +pkglib_LTLIBRARIES += varnish.la
 +varnish_la_SOURCES = varnish.c
 +varnish_la_LDFLAGS = -module -avoid-version
 +varnish_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBVARNISH_CFLAGS)
 +varnish_la_LIBADD = $(BUILD_WITH_LIBVARNISH_LIBS)
 +collectd_LDADD += "-dlopen" varnish.la
 +collectd_DEPENDENCIES += varnish.la
 +endif
 +
  if BUILD_PLUGIN_VMEM
  pkglib_LTLIBRARIES += vmem.la
  vmem_la_SOURCES = vmem.c
@@@ -1306,16 -1168,6 +1306,16 @@@ collectd_LDADD += "-dlopen" wireless.l
  collectd_DEPENDENCIES += wireless.la
  endif
  
 +if BUILD_PLUGIN_WRITE_GRAPHITE
 +pkglib_LTLIBRARIES += write_graphite.la
 +write_graphite_la_SOURCES = write_graphite.c \
 +                        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
 +endif
 +
  if BUILD_PLUGIN_WRITE_HTTP
  pkglib_LTLIBRARIES += write_http.la
  write_http_la_SOURCES = write_http.c \
@@@ -1331,36 -1183,6 +1331,36 @@@ endi
  collectd_DEPENDENCIES += write_http.la
  endif
  
 +if BUILD_PLUGIN_WRITE_MONGODB
 +pkglib_LTLIBRARIES += write_mongodb.la
 +write_mongodb_la_SOURCES = write_mongodb.c
 +write_mongodb_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMONGOC_CPPFLAGS)
 +write_mongodb_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBMONGOC_LDFLAGS)
 +write_mongodb_la_LIBADD = -lmongoc
 +collectd_LDADD += "-dlopen" write_mongodb.la
 +collectd_DEPENDENCIES += write_mongodb.la
 +endif
 +
 +if BUILD_PLUGIN_WRITE_REDIS
 +pkglib_LTLIBRARIES += write_redis.la
 +write_redis_la_SOURCES = write_redis.c
 +write_redis_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBCREDIS_LDFLAGS)
 +write_redis_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCREDIS_CPPFLAGS)
 +write_redis_la_LIBADD = -lcredis
 +collectd_LDADD += "-dlopen" write_redis.la
 +collectd_DEPENDENCIES += write_redis.la
 +endif
 +
 +if BUILD_PLUGIN_WRITE_RIEMANN
 +pkglib_LTLIBRARIES += write_riemann.la
 +write_riemann_la_SOURCES = write_riemann.c
 +nodist_write_riemann_la_SOURCES = riemann.pb-c.c riemann.pb-c.h
 +write_riemann_la_LDFLAGS = -module -avoid-version
 +write_riemann_la_LIBADD = -lprotobuf-c
 +collectd_LDADD += "-dlopen" write_riemann.la
 +collectd_DEPENDENCIES += write_riemann.la
 +endif
 +
  if BUILD_PLUGIN_XMMS
  pkglib_LTLIBRARIES += xmms.la
  xmms_la_SOURCES = xmms.c
@@@ -1387,26 -1209,22 +1387,26 @@@ dist_man_MANS = collectd.1 
                collectd.conf.5 \
                collectd-email.5 \
                collectd-exec.5 \
 +              collectdctl.1 \
                collectd-java.5 \
                collectdmon.1 \
                collectd-nagios.1 \
                collectd-perl.5 \
                collectd-python.5 \
                collectd-snmp.5 \
 +              collectd-tg.1 \
 +              collectd-threshold.5 \
                collectd-unixsock.5 \
                types.db.5
  
  #collectd_1_SOURCES = collectd.pod
  
 -EXTRA_DIST = types.db pinba.proto
 +EXTRA_DIST = types.db
  
  EXTRA_DIST +=   collectd.conf.pod \
                collectd-email.pod \
                collectd-exec.pod \
 +              collectdctl.pod \
                collectd-java.pod \
                collectdmon.pod \
                collectd-nagios.pod \
                collectd-python.pod \
                collectd.pod \
                collectd-snmp.pod \
 +              collectd-tg.pod \
 +              collectd-threshold.pod \
                collectd-unixsock.pod \
                postgresql_default.conf \
                types.db.pod
                echo "$@ has some POD errors!"; false; \
        fi
  
 +# Protocol buffer for the "pinba" plugin.
 +EXTRA_DIST += pinba.proto
 +if HAVE_PROTOC_C
 +CLEANFILES += pinba.pb-c.c pinba.pb-c.h
 +BUILT_SOURCES += pinba.pb-c.c pinba.pb-c.h
 +
  pinba.pb-c.c pinba.pb-c.h: pinba.proto
 -      protoc-c --c_out $(builddir) pinba.proto
 +      protoc-c -I$(srcdir) --c_out . $(srcdir)/pinba.proto
 +endif
 +
 +# Protocol buffer for the "write_riemann" plugin.
 +EXTRA_DIST += riemann.proto
 +if HAVE_PROTOC_C
 +CLEANFILES += riemann.pb-c.c riemann.pb-c.h
 +
 +BUILT_SOURCES += riemann.pb-c.c riemann.pb-c.h
 +
 +riemann.pb-c.c riemann.pb-c.h: riemann.proto
 +      protoc-c -I$(srcdir) --c_out . $(srcdir)/riemann.proto
 +endif
  
  install-exec-hook:
        $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
@@@ -1474,16 -1272,3 +1474,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