1 ACLOCAL_AMFLAGS = -I m4
6 src/libcollectdclient/collectd/lcc_features.h \
7 src/liboconfig/parser.h \
12 .perl-directory-stamp \
13 bindings/buildperl/Collectd.pm \
14 bindings/buildperl/Collectd/Plugins/OpenVZ.pm \
15 bindings/buildperl/Collectd/Unixsock.pm \
16 bindings/buildperl/Makefile.PL \
23 org/collectd/api/*.class \
24 org/collectd/java/*.class \
34 bindings/perl/Makefile.PL \
35 bindings/perl/lib/Collectd.pm \
36 bindings/perl/lib/Collectd/Plugins/Monitorus.pm \
37 bindings/perl/lib/Collectd/Plugins/OpenVZ.pm \
38 bindings/perl/lib/Collectd/Unixsock.pm \
39 bindings/perl/uninstall_mod.pl \
41 proto/collectd.proto \
42 proto/prometheus.proto \
44 src/collectd-email.pod \
45 src/collectd-exec.pod \
46 src/collectd-java.pod \
47 src/collectd-lua.pod \
48 src/collectd-nagios.pod \
49 src/collectd-perl.pod \
50 src/collectd-python.pod \
51 src/collectd-snmp.pod \
53 src/collectd-threshold.pod \
54 src/collectd-unixsock.pod \
55 src/collectd.conf.pod \
60 src/postgresql_default.conf \
63 src/valgrind.FreeBSD.suppress \
71 src/collectd-email.5 \
77 src/collectd-nagios.1 \
79 src/collectd-python.5 \
82 src/collectd-threshold.5 \
83 src/collectd-unixsock.5 \
87 nodist_pkgconfig_DATA = \
88 src/libcollectdclient/libcollectdclient.pc
90 pkginclude_HEADERS = \
91 src/libcollectdclient/collectd/client.h \
92 src/libcollectdclient/collectd/network.h \
93 src/libcollectdclient/collectd/network_buffer.h \
94 src/libcollectdclient/collectd/lcc_features.h
96 lib_LTLIBRARIES = libcollectdclient.la
110 noinst_LTLIBRARIES = \
114 libformat_graphite.la \
127 test_format_graphite \
139 TESTS = $(check_PROGRAMS)
141 LOG_COMPILER = env VALGRIND="@VALGRIND@" $(abs_srcdir)/testwrapper.sh
144 jardir = $(pkgdatadir)/java
152 -export-symbols-regex '\<module_register\>'
156 -I$(top_srcdir)/src -I$(top_srcdir)/src/daemon \
157 -DPREFIX='"${prefix}"' \
158 -DCONFIGFILE='"${sysconfdir}/${PACKAGE_NAME}.conf"' \
159 -DLOCALSTATEDIR='"${localstatedir}"' \
160 -DPKGLOCALSTATEDIR='"${localstatedir}/lib/${PACKAGE_NAME}"' \
161 -DPLUGINDIR='"${pkglibdir}"' \
162 -DPKGDATADIR='"${pkgdatadir}"'
165 # Link to these libraries..
166 COMMON_LIBS = $(PTHREAD_LIBS)
167 if BUILD_WITH_CAPABILITY
173 if BUILD_WITH_LIBPOSIX4
174 COMMON_LIBS += -lposix4
176 if BUILD_WITH_LIBSOCKET
177 COMMON_LIBS += -lsocket
179 if BUILD_WITH_LIBKSTAT
180 COMMON_LIBS += -lkstat
182 if BUILD_WITH_LIBDEVINFO
183 COMMON_LIBS += -ldevinfo
188 src/daemon/collectd.c \
189 src/daemon/collectd.h \
190 src/daemon/configfile.c \
191 src/daemon/configfile.h \
192 src/daemon/filter_chain.c \
193 src/daemon/filter_chain.h \
194 src/daemon/meta_data.c \
195 src/daemon/meta_data.h \
196 src/daemon/plugin.c \
197 src/daemon/plugin.h \
198 src/daemon/utils_cache.c \
199 src/daemon/utils_cache.h \
200 src/daemon/utils_complain.c \
201 src/daemon/utils_complain.h \
202 src/daemon/utils_ignorelist.c \
203 src/daemon/utils_ignorelist.h \
204 src/daemon/utils_llist.c \
205 src/daemon/utils_llist.h \
206 src/daemon/utils_random.c \
207 src/daemon/utils_random.h \
208 src/daemon/utils_subst.c \
209 src/daemon/utils_subst.h \
210 src/daemon/utils_time.c \
211 src/daemon/utils_time.h \
212 src/daemon/types_list.c \
213 src/daemon/types_list.h \
214 src/daemon/utils_threshold.c \
215 src/daemon/utils_threshold.h
218 collectd_CFLAGS = $(AM_CFLAGS)
219 collectd_CPPFLAGS = $(AM_CPPFLAGS)
220 collectd_LDFLAGS = -export-dynamic
230 if BUILD_FEATURE_DAEMON
231 collectd_CPPFLAGS += -DPIDFILE='"${localstatedir}/run/${PACKAGE_NAME}.pid"'
234 # The daemon needs to call sg_init, so we need to link it against libstatgrab,
236 if BUILD_WITH_LIBSTATGRAB
237 collectd_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
238 collectd_LDADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
242 collectdmon_SOURCES = src/collectdmon.c
245 collectd_nagios_SOURCES = src/collectd-nagios.c
246 collectd_nagios_CPPFLAGS = $(AM_CPPFLAGS) \
247 -I$(srcdir)/src/libcollectdclient/collectd \
248 -I$(top_builddir)/src/libcollectdclient/collectd
249 collectd_nagios_LDADD = libcollectdclient.la
250 if BUILD_WITH_LIBSOCKET
251 collectd_nagios_LDADD += -lsocket
254 collectd_nagios_LDADD += -lm
258 collectdctl_SOURCES = src/collectdctl.c
259 collectdctl_CPPFLAGS = $(AM_CPPFLAGS) \
260 -I$(srcdir)/src/libcollectdclient/collectd \
261 -I$(top_builddir)/src/libcollectdclient/collectd
262 collectdctl_LDADD = libcollectdclient.la
263 if BUILD_WITH_LIBSOCKET
264 collectdctl_LDADD += -lsocket
267 collectdctl_LDADD += -lm
271 collectd_tg_SOURCES = src/collectd-tg.c
272 collectd_tg_CPPFLAGS = $(AM_CPPFLAGS) \
273 -I$(srcdir)/src/libcollectdclient/collectd \
274 -I$(top_builddir)/src/libcollectdclient/collectd
275 collectd_tg_LDADD = \
279 if BUILD_WITH_LIBSOCKET
280 collectd_tg_LDADD += -lsocket
283 collectd_tg_LDADD += -lrt
286 collectd_tg_LDADD += -lm
290 test_common_SOURCES = \
291 src/daemon/common_test.c \
293 test_common_LDADD = libplugin_mock.la
295 test_meta_data_SOURCES = \
296 src/daemon/meta_data_test.c \
298 test_meta_data_LDADD = libmetadata.la libplugin_mock.la
300 test_utils_avltree_SOURCES = \
301 src/daemon/utils_avltree_test.c \
303 test_utils_avltree_LDADD = libavltree.la $(COMMON_LIBS)
305 test_utils_heap_SOURCES = \
306 src/daemon/utils_heap_test.c \
308 test_utils_heap_LDADD = libheap.la $(COMMON_LIBS)
310 test_utils_time_SOURCES = \
311 src/daemon/utils_time_test.c \
314 test_utils_subst_SOURCES = \
315 src/daemon/utils_subst_test.c \
317 src/daemon/utils_subst.c \
318 src/daemon/utils_subst.h
319 test_utils_subst_LDADD = libplugin_mock.la
321 libavltree_la_SOURCES = \
322 src/daemon/utils_avltree.c \
323 src/daemon/utils_avltree.h
325 libcommon_la_SOURCES = \
326 src/daemon/common.c \
328 libcommon_la_LIBADD = $(COMMON_LIBS)
330 libheap_la_SOURCES = \
331 src/daemon/utils_heap.c \
332 src/daemon/utils_heap.h
334 libmetadata_la_SOURCES = \
335 src/daemon/meta_data.c \
336 src/daemon/meta_data.h
338 libplugin_mock_la_SOURCES = \
339 src/daemon/plugin_mock.c \
340 src/daemon/utils_cache_mock.c \
341 src/daemon/utils_complain.c \
342 src/daemon/utils_complain.h \
343 src/daemon/utils_ignorelist.c \
344 src/daemon/utils_ignorelist.h \
345 src/daemon/utils_time.c \
346 src/daemon/utils_time.h
348 libplugin_mock_la_CPPFLAGS = $(AM_CPPFLAGS) -DMOCK_TIME
349 libplugin_mock_la_LIBADD = libcommon.la $(COMMON_LIBS)
351 libformat_graphite_la_SOURCES = \
352 src/utils_format_graphite.c \
353 src/utils_format_graphite.h
355 test_format_graphite_SOURCES = \
356 src/utils_format_graphite_test.c \
358 test_format_graphite_LDADD = \
359 libformat_graphite.la \
364 libformat_json_la_SOURCES = \
365 src/utils_format_json.c \
366 src/utils_format_json.h
367 libformat_json_la_CPPFLAGS = $(AM_CPPFLAGS)
368 libformat_json_la_LDFLAGS = $(AM_LDFLAGS)
369 libformat_json_la_LIBADD =
370 if BUILD_WITH_LIBYAJL
371 libformat_json_la_CPPFLAGS += $(BUILD_WITH_LIBYAJL_CPPFLAGS)
372 libformat_json_la_LDFLAGS += $(BUILD_WITH_LIBYAJL_LDFLAGS)
373 libformat_json_la_LIBADD += $(BUILD_WITH_LIBYAJL_LIBS)
375 check_PROGRAMS += test_format_json
377 test_format_json_SOURCES = \
378 src/utils_format_json_test.c \
380 test_format_json_LDADD = \
388 test_plugin_ceph_SOURCES = src/ceph_test.c
389 test_plugin_ceph_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
390 test_plugin_ceph_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
391 test_plugin_ceph_LDADD = libplugin_mock.la $(BUILD_WITH_LIBYAJL_LIBS)
392 check_PROGRAMS += test_plugin_ceph
395 liblatency_la_SOURCES = \
396 src/utils_latency.c \
397 src/utils_latency.h \
398 src/utils_latency_config.c \
399 src/utils_latency_config.h
400 liblatency_la_LIBADD = \
404 test_utils_latency_SOURCES = \
405 src/utils_latency_test.c \
407 test_utils_latency_LDADD = \
412 libcmds_la_SOURCES = \
415 src/utils_cmd_flush.c \
416 src/utils_cmd_flush.h \
417 src/utils_cmd_getthreshold.c \
418 src/utils_cmd_getthreshold.h \
419 src/utils_cmd_getval.c \
420 src/utils_cmd_getval.h \
421 src/utils_cmd_listval.c \
422 src/utils_cmd_listval.h \
423 src/utils_cmd_putnotif.c \
424 src/utils_cmd_putnotif.h \
425 src/utils_cmd_putval.c \
426 src/utils_cmd_putval.h \
427 src/utils_parse_option.c \
428 src/utils_parse_option.h
429 libcmds_la_LIBADD = \
434 test_utils_cmds_SOURCES = \
435 src/utils_cmds_test.c \
437 test_utils_cmds_LDADD = \
441 liblookup_la_SOURCES = \
442 src/utils_vl_lookup.c \
443 src/utils_vl_lookup.h
444 liblookup_la_LIBADD = libavltree.la
446 test_utils_vl_lookup_SOURCES = \
447 src/utils_vl_lookup_test.c \
449 test_utils_vl_lookup_LDADD = \
452 if BUILD_WITH_LIBKSTAT
453 test_utils_vl_lookup_LDADD += -lkstat
456 libmount_la_SOURCES = \
460 test_utils_mount_SOURCES = \
461 src/utils_mount_test.c \
463 test_utils_mount_LDADD = \
466 if BUILD_WITH_LIBKSTAT
467 test_utils_mount_LDADD += -lkstat
471 libcollectdclient_la_SOURCES = \
472 src/libcollectdclient/client.c \
473 src/libcollectdclient/network.c \
474 src/libcollectdclient/network_buffer.c
475 libcollectdclient_la_CPPFLAGS = \
477 -I$(srcdir)/src/libcollectdclient/collectd \
478 -I$(top_builddir)/src/libcollectdclient/collectd \
479 -I$(srcdir)/src/daemon
480 libcollectdclient_la_LDFLAGS = -version-info 1:0:0
481 libcollectdclient_la_LIBADD =
482 if BUILD_WITH_LIBGCRYPT
483 libcollectdclient_la_CPPFLAGS += $(GCRYPT_CPPFLAGS)
484 libcollectdclient_la_LDFLAGS += $(GCRYPT_LDFLAGS)
485 libcollectdclient_la_LIBADD += $(GCRYPT_LIBS)
489 liboconfig_la_SOURCES = \
490 src/liboconfig/oconfig.c \
491 src/liboconfig/oconfig.h \
492 src/liboconfig/aux_types.h \
493 src/liboconfig/scanner.l \
494 src/liboconfig/parser.y
495 liboconfig_la_LDFLAGS = -avoid-version $(LEXLIB)
498 if BUILD_PLUGIN_AGGREGATION
499 pkglib_LTLIBRARIES += aggregation.la
500 aggregation_la_SOURCES = \
502 src/utils_vl_lookup.c \
503 src/utils_vl_lookup.h
504 aggregation_la_LDFLAGS = $(PLUGIN_LDFLAGS)
505 aggregation_la_LIBADD = -lm
509 pkglib_LTLIBRARIES += amqp.la
510 amqp_la_SOURCES = src/amqp.c
511 amqp_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBRABBITMQ_CPPFLAGS)
512 amqp_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRABBITMQ_LDFLAGS)
514 $(BUILD_WITH_LIBRABBITMQ_LIBS) \
516 libformat_graphite.la \
520 if BUILD_PLUGIN_APACHE
521 pkglib_LTLIBRARIES += apache.la
522 apache_la_SOURCES = src/apache.c
523 apache_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS)
524 apache_la_LDFLAGS = $(PLUGIN_LDFLAGS)
525 apache_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS)
529 if BUILD_PLUGIN_APCUPS
530 pkglib_LTLIBRARIES += apcups.la
531 apcups_la_SOURCES = src/apcups.c
532 apcups_la_LDFLAGS = $(PLUGIN_LDFLAGS)
534 if BUILD_WITH_LIBSOCKET
535 apcups_la_LIBADD += -lsocket
539 if BUILD_PLUGIN_APPLE_SENSORS
540 pkglib_LTLIBRARIES += apple_sensors.la
541 apple_sensors_la_SOURCES = src/apple_sensors.c
542 apple_sensors_la_LDFLAGS = $(PLUGIN_LDFLAGS) -framework IOKit
545 if BUILD_PLUGIN_AQUAERO
546 pkglib_LTLIBRARIES += aquaero.la
547 aquaero_la_SOURCES = src/aquaero.c
548 aquaero_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBAQUAERO5_CFLAGS)
549 aquaero_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBAQUAERO5_LDFLAGS)
550 aquaero_la_LIBADD = -laquaero5
553 if BUILD_PLUGIN_ASCENT
554 pkglib_LTLIBRARIES += ascent.la
555 ascent_la_SOURCES = src/ascent.c
558 $(BUILD_WITH_LIBCURL_CFLAGS) \
559 $(BUILD_WITH_LIBXML2_CFLAGS)
560 ascent_la_LDFLAGS = $(PLUGIN_LDFLAGS)
562 $(BUILD_WITH_LIBCURL_LIBS) \
563 $(BUILD_WITH_LIBXML2_LIBS)
566 if BUILD_PLUGIN_BAROMETER
567 pkglib_LTLIBRARIES += barometer.la
568 barometer_la_SOURCES = src/barometer.c
569 barometer_la_LDFLAGS = $(PLUGIN_LDFLAGS)
570 barometer_la_LIBADD = -lm
573 if BUILD_PLUGIN_BATTERY
574 pkglib_LTLIBRARIES += battery.la
575 battery_la_SOURCES = \
577 src/battery_statefs.c
578 battery_la_LDFLAGS = $(PLUGIN_LDFLAGS)
579 if BUILD_WITH_LIBIOKIT
580 battery_la_LDFLAGS += -framework IOKit
585 pkglib_LTLIBRARIES += bind.la
586 bind_la_SOURCES = src/bind.c
587 bind_la_CFLAGS = $(AM_CFLAGS) \
588 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
589 bind_la_LDFLAGS = $(PLUGIN_LDFLAGS)
590 bind_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
594 pkglib_LTLIBRARIES += ceph.la
595 ceph_la_SOURCES = src/ceph.c
596 ceph_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
597 ceph_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
598 ceph_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
601 if BUILD_PLUGIN_CGROUPS
602 pkglib_LTLIBRARIES += cgroups.la
603 cgroups_la_SOURCES = src/cgroups.c
604 cgroups_la_LDFLAGS = $(PLUGIN_LDFLAGS)
605 cgroups_la_LIBADD = libmount.la
608 if BUILD_PLUGIN_CHRONY
609 pkglib_LTLIBRARIES += chrony.la
610 chrony_la_SOURCES = src/chrony.c
611 chrony_la_LDFLAGS = $(PLUGIN_LDFLAGS)
612 chrony_la_LIBADD = -lm
615 if BUILD_PLUGIN_CONNTRACK
616 pkglib_LTLIBRARIES += conntrack.la
617 conntrack_la_SOURCES = src/conntrack.c
618 conntrack_la_LDFLAGS = $(PLUGIN_LDFLAGS)
621 if BUILD_PLUGIN_CONTEXTSWITCH
622 pkglib_LTLIBRARIES += contextswitch.la
623 contextswitch_la_SOURCES = src/contextswitch.c
624 contextswitch_la_LDFLAGS = $(PLUGIN_LDFLAGS)
625 contextswitch_la_LIBADD =
626 if BUILD_WITH_PERFSTAT
627 contextswitch_la_LIBADD += -lperfstat
632 pkglib_LTLIBRARIES += cpu.la
633 cpu_la_SOURCES = src/cpu.c
634 cpu_la_CFLAGS = $(AM_CFLAGS)
635 cpu_la_LDFLAGS = $(PLUGIN_LDFLAGS)
637 if BUILD_WITH_LIBKSTAT
638 cpu_la_LIBADD += -lkstat
640 if BUILD_WITH_LIBDEVINFO
641 cpu_la_LIBADD += -ldevinfo
643 if BUILD_WITH_LIBSTATGRAB
644 cpu_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
645 cpu_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
647 if BUILD_WITH_PERFSTAT
648 cpu_la_LIBADD += -lperfstat
652 if BUILD_PLUGIN_CPUFREQ
653 pkglib_LTLIBRARIES += cpufreq.la
654 cpufreq_la_SOURCES = src/cpufreq.c
655 cpufreq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
658 if BUILD_PLUGIN_CPUSLEEP
659 pkglib_LTLIBRARIES += cpusleep.la
660 cpusleep_la_SOURCES = src/cpusleep.c
661 cpusleep_la_LDFLAGS = $(PLUGIN_LDFLAGS)
665 pkglib_LTLIBRARIES += csv.la
666 csv_la_SOURCES = src/csv.c
667 csv_la_LDFLAGS = $(PLUGIN_LDFLAGS)
671 pkglib_LTLIBRARIES += curl.la
674 src/utils_curl_stats.c \
675 src/utils_curl_stats.h \
678 curl_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS)
679 curl_la_LDFLAGS = $(PLUGIN_LDFLAGS)
680 curl_la_LIBADD = liblatency.la $(BUILD_WITH_LIBCURL_LIBS)
683 if BUILD_PLUGIN_CURL_JSON
684 pkglib_LTLIBRARIES += curl_json.la
685 curl_json_la_SOURCES = \
687 src/utils_curl_stats.c \
688 src/utils_curl_stats.h
689 curl_json_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS)
690 curl_json_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
691 curl_json_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
692 curl_json_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBYAJL_LIBS)
695 if BUILD_PLUGIN_CURL_XML
696 pkglib_LTLIBRARIES += curl_xml.la
697 curl_xml_la_SOURCES = \
699 src/utils_curl_stats.c \
700 src/utils_curl_stats.h
701 curl_xml_la_CFLAGS = $(AM_CFLAGS) \
702 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
703 curl_xml_la_LDFLAGS = $(PLUGIN_LDFLAGS)
704 curl_xml_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
708 pkglib_LTLIBRARIES += dbi.la
711 src/utils_db_query.c \
713 dbi_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBDBI_CPPFLAGS)
714 dbi_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBDBI_LDFLAGS)
715 dbi_la_LIBADD = $(BUILD_WITH_LIBDBI_LIBS)
719 pkglib_LTLIBRARIES += df.la
720 df_la_SOURCES = src/df.c
721 df_la_LDFLAGS = $(PLUGIN_LDFLAGS)
722 df_la_LIBADD = libmount.la
726 pkglib_LTLIBRARIES += disk.la
727 disk_la_SOURCES = src/disk.c
728 disk_la_CFLAGS = $(AM_CFLAGS)
729 disk_la_CPPFLAGS = $(AM_CPPFLAGS)
730 disk_la_LDFLAGS = $(PLUGIN_LDFLAGS)
732 if BUILD_WITH_LIBKSTAT
733 disk_la_LIBADD += -lkstat
735 if BUILD_WITH_LIBDEVINFO
736 disk_la_LIBADD += -ldevinfo
738 if BUILD_WITH_LIBIOKIT
739 disk_la_LDFLAGS += -framework IOKit
741 if BUILD_WITH_LIBSTATGRAB
742 disk_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
743 disk_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
745 if BUILD_WITH_LIBUDEV
746 disk_la_CPPFLAGS += $(BUILD_WITH_LIBUDEV_CPPFLAGS)
747 disk_la_LDFLAGS += $(BUILD_WITH_LIBUDEV_LDFLAGS)
748 disk_la_LIBADD += $(BUILD_WITH_LIBUDEV_LIBS)
751 disk_la_LIBADD += -ldevstat -lgeom
753 if BUILD_WITH_PERFSTAT
754 disk_la_LIBADD += -lperfstat
759 pkglib_LTLIBRARIES += dns.la
764 dns_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPCAP_CPPFLAGS)
765 dns_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBPCAP_LDFLAGS)
766 dns_la_LIBADD = $(BUILD_WITH_LIBPCAP_LIBS)
769 if BUILD_PLUGIN_DPDKEVENTS
770 pkglib_LTLIBRARIES += dpdkevents.la
771 dpdkevents_la_SOURCES = src/dpdkevents.c src/utils_dpdk.c src/utils_dpdk.h
772 dpdkevents_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBDPDK_CPPFLAGS)
773 dpdkevents_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBDPDK_LDFLAGS)
774 dpdkevents_la_LIBADD = -ldpdk
777 if BUILD_PLUGIN_DPDKSTAT
778 pkglib_LTLIBRARIES += dpdkstat.la
779 dpdkstat_la_SOURCES = src/dpdkstat.c src/utils_dpdk.c src/utils_dpdk.h
780 dpdkstat_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBDPDK_CPPFLAGS)
781 dpdkstat_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBDPDK_LDFLAGS)
782 dpdkstat_la_LIBADD = -ldpdk
786 pkglib_LTLIBRARIES += drbd.la
787 drbd_la_SOURCES = src/drbd.c
788 drbd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
791 if BUILD_PLUGIN_EMAIL
792 pkglib_LTLIBRARIES += email.la
793 email_la_SOURCES = src/email.c
794 email_la_LDFLAGS = $(PLUGIN_LDFLAGS)
797 if BUILD_PLUGIN_ENTROPY
798 pkglib_LTLIBRARIES += entropy.la
799 entropy_la_SOURCES = src/entropy.c
800 entropy_la_LDFLAGS = $(PLUGIN_LDFLAGS)
804 pkglib_LTLIBRARIES += exec.la
805 exec_la_SOURCES = src/exec.c
806 exec_la_LDFLAGS = $(PLUGIN_LDFLAGS)
807 exec_la_LIBADD = libcmds.la
810 if BUILD_PLUGIN_ETHSTAT
811 pkglib_LTLIBRARIES += ethstat.la
812 ethstat_la_SOURCES = src/ethstat.c
813 ethstat_la_LDFLAGS = $(PLUGIN_LDFLAGS)
816 if BUILD_PLUGIN_FHCOUNT
817 pkglib_LTLIBRARIES += fhcount.la
818 fhcount_la_SOURCES = src/fhcount.c
819 fhcount_la_LDFLAGS = $(PLUGIN_LDFLAGS)
822 if BUILD_PLUGIN_FILECOUNT
823 pkglib_LTLIBRARIES += filecount.la
824 filecount_la_SOURCES = src/filecount.c
825 filecount_la_LDFLAGS = $(PLUGIN_LDFLAGS)
828 if BUILD_PLUGIN_FSCACHE
829 pkglib_LTLIBRARIES += fscache.la
830 fscache_la_SOURCES = src/fscache.c
831 fscache_la_LDFLAGS = $(PLUGIN_LDFLAGS)
834 if BUILD_PLUGIN_GMOND
835 pkglib_LTLIBRARIES += gmond.la
836 gmond_la_SOURCES = src/gmond.c
837 gmond_la_CPPFLAGS = $(AM_CPPFLAGS) $(GANGLIA_CPPFLAGS)
838 gmond_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(GANGLIA_LDFLAGS)
839 gmond_la_LIBADD = $(GANGLIA_LIBS)
843 pkglib_LTLIBRARIES += gps.la
844 gps_la_SOURCES = src/gps.c
845 gps_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBGPS_CFLAGS)
846 gps_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBGPS_LDFLAGS)
847 gps_la_LIBADD = -lpthread $(BUILD_WITH_LIBGPS_LIBS)
851 pkglib_LTLIBRARIES += grpc.la
852 grpc_la_SOURCES = src/grpc.cc
853 nodist_grpc_la_SOURCES = \
854 collectd.grpc.pb.cc \
857 grpc_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBGRPCPP_CPPFLAGS) $(BUILD_WITH_LIBPROTOBUF_CPPFLAGS)
858 grpc_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBGRPCPP_LDFLAGS) $(BUILD_WITH_LIBPROTOBUF_LDFLAGS)
859 grpc_la_LIBADD = $(BUILD_WITH_LIBGRPCPP_LIBS) $(BUILD_WITH_LIBPROTOBUF_LIBS)
862 if BUILD_PLUGIN_HDDTEMP
863 pkglib_LTLIBRARIES += hddtemp.la
864 hddtemp_la_SOURCES = src/hddtemp.c
865 hddtemp_la_LDFLAGS = $(PLUGIN_LDFLAGS)
867 if BUILD_WITH_LIBSOCKET
868 hddtemp_la_LIBADD += -lsocket
872 if BUILD_PLUGIN_HUGEPAGES
873 pkglib_LTLIBRARIES += hugepages.la
874 hugepages_la_SOURCES = src/hugepages.c
875 hugepages_la_LDFLAGS = $(PLUGIN_LDFLAGS)
878 if BUILD_PLUGIN_INTEL_RDT
879 pkglib_LTLIBRARIES += intel_rdt.la
880 intel_rdt_la_SOURCES = src/intel_rdt.c
881 intel_rdt_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBPQOS_CPPFLAGS)
882 intel_rdt_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBPQOS_LDFLAGS)
883 intel_rdt_la_LIBADD = $(BUILD_WITH_LIBPQOS_LIBS)
886 if BUILD_PLUGIN_INTERFACE
887 pkglib_LTLIBRARIES += interface.la
888 interface_la_SOURCES = src/interface.c
889 interface_la_CFLAGS = $(AM_CFLAGS)
890 interface_la_LDFLAGS = $(PLUGIN_LDFLAGS)
891 interface_la_LIBADD =
892 if BUILD_WITH_LIBSTATGRAB
893 interface_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
894 interface_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
896 if BUILD_WITH_LIBKSTAT
897 interface_la_LIBADD += -lkstat
899 if BUILD_WITH_LIBDEVINFO
900 interface_la_LIBADD += -ldevinfo
901 endif # BUILD_WITH_LIBDEVINFO
902 endif # !BUILD_WITH_LIBSTATGRAB
903 if BUILD_WITH_PERFSTAT
904 interface_la_LIBADD += -lperfstat
906 endif # BUILD_PLUGIN_INTERFACE
909 pkglib_LTLIBRARIES += ipc.la
910 ipc_la_SOURCES = src/ipc.c
911 ipc_la_LDFLAGS = $(PLUGIN_LDFLAGS)
914 if BUILD_PLUGIN_IPTABLES
915 pkglib_LTLIBRARIES += iptables.la
916 iptables_la_SOURCES = src/iptables.c
917 iptables_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBIPTC_CPPFLAGS)
918 iptables_la_LDFLAGS = $(PLUGIN_LDFLAGS)
919 iptables_la_LIBADD = $(BUILD_WITH_LIBIPTC_LDFLAGS)
923 pkglib_LTLIBRARIES += ipmi.la
924 ipmi_la_SOURCES = src/ipmi.c
925 ipmi_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_OPENIPMI_CFLAGS)
926 ipmi_la_LDFLAGS = $(PLUGIN_LDFLAGS)
927 ipmi_la_LIBADD = $(BUILD_WITH_OPENIPMI_LIBS)
931 pkglib_LTLIBRARIES += ipvs.la
932 ipvs_la_SOURCES = src/ipvs.c
933 ipvs_la_CFLAGS = $(AM_CFLAGS)
934 if IP_VS_H_NEEDS_KERNEL_CFLAGS
935 ipvs_la_CFLAGS += $(KERNEL_CFLAGS)
937 ipvs_la_LDFLAGS = $(PLUGIN_LDFLAGS)
941 pkglib_LTLIBRARIES += irq.la
942 irq_la_SOURCES = src/irq.c
943 irq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
947 pkglib_LTLIBRARIES += java.la
948 java_la_SOURCES = src/java.c
949 java_la_CPPFLAGS = $(AM_CPPFLAGS) $(JAVA_CPPFLAGS)
950 java_la_CFLAGS = $(AM_CFLAGS) $(JAVA_CFLAGS)
951 java_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(JAVA_LDFLAGS)
952 java_la_LIBADD = $(JAVA_LIBS)
956 pkglib_LTLIBRARIES += load.la
957 load_la_SOURCES = src/load.c
958 load_la_CFLAGS = $(AM_CFLAGS)
959 load_la_LDFLAGS = $(PLUGIN_LDFLAGS)
961 if BUILD_WITH_LIBSTATGRAB
962 load_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
963 load_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
964 endif # BUILD_WITH_LIBSTATGRAB
965 if BUILD_WITH_PERFSTAT
966 load_la_LIBADD += -lperfstat
968 endif # BUILD_PLUGIN_LOAD
970 if BUILD_PLUGIN_LOGFILE
971 pkglib_LTLIBRARIES += logfile.la
972 logfile_la_SOURCES = src/logfile.c
973 logfile_la_LDFLAGS = $(PLUGIN_LDFLAGS)
976 if BUILD_PLUGIN_LOG_LOGSTASH
977 pkglib_LTLIBRARIES += log_logstash.la
978 log_logstash_la_SOURCES = src/log_logstash.c
979 log_logstash_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
980 log_logstash_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
981 log_logstash_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
985 pkglib_LTLIBRARIES += lpar.la
986 lpar_la_SOURCES = src/lpar.c
987 lpar_la_LDFLAGS = $(PLUGIN_LDFLAGS)
988 lpar_la_LIBADD = -lperfstat
992 pkglib_LTLIBRARIES += lua.la
997 lua_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBLUA_CFLAGS)
998 lua_la_LDFLAGS = $(PLUGIN_LDFLAGS)
999 lua_la_LIBADD = $(BUILD_WITH_LIBLUA_LIBS)
1003 pkglib_LTLIBRARIES += lvm.la
1004 lvm_la_SOURCES = src/lvm.c
1005 lvm_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBLVM2APP_CPPFLAGS)
1006 lvm_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBLVM2APP_LDFLAGS)
1007 lvm_la_LIBADD = $(BUILD_WITH_LIBLVM2APP_LIBS)
1010 if BUILD_PLUGIN_MADWIFI
1011 pkglib_LTLIBRARIES += madwifi.la
1012 madwifi_la_SOURCES = \
1015 madwifi_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1018 if BUILD_PLUGIN_MATCH_EMPTY_COUNTER
1019 pkglib_LTLIBRARIES += match_empty_counter.la
1020 match_empty_counter_la_SOURCES = src/match_empty_counter.c
1021 match_empty_counter_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1024 if BUILD_PLUGIN_MATCH_HASHED
1025 pkglib_LTLIBRARIES += match_hashed.la
1026 match_hashed_la_SOURCES = src/match_hashed.c
1027 match_hashed_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1030 if BUILD_PLUGIN_MATCH_REGEX
1031 pkglib_LTLIBRARIES += match_regex.la
1032 match_regex_la_SOURCES = src/match_regex.c
1033 match_regex_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1036 if BUILD_PLUGIN_MATCH_TIMEDIFF
1037 pkglib_LTLIBRARIES += match_timediff.la
1038 match_timediff_la_SOURCES = src/match_timediff.c
1039 match_timediff_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1042 if BUILD_PLUGIN_MATCH_VALUE
1043 pkglib_LTLIBRARIES += match_value.la
1044 match_value_la_SOURCES = src/match_value.c
1045 match_value_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1048 if BUILD_PLUGIN_MBMON
1049 pkglib_LTLIBRARIES += mbmon.la
1050 mbmon_la_SOURCES = src/mbmon.c
1051 mbmon_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1053 if BUILD_WITH_LIBSOCKET
1054 mbmon_la_LIBADD += -lsocket
1058 if BUILD_PLUGIN_MCELOG
1059 pkglib_LTLIBRARIES += mcelog.la
1060 mcelog_la_SOURCES = src/mcelog.c
1061 mcelog_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1065 pkglib_LTLIBRARIES += md.la
1066 md_la_SOURCES = src/md.c
1067 md_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1070 if BUILD_PLUGIN_MEMCACHEC
1071 pkglib_LTLIBRARIES += memcachec.la
1072 memcachec_la_SOURCES = \
1076 memcachec_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMEMCACHED_CPPFLAGS)
1077 memcachec_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMEMCACHED_LDFLAGS)
1078 memcachec_la_LIBADD = liblatency.la $(BUILD_WITH_LIBMEMCACHED_LIBS)
1081 if BUILD_PLUGIN_MEMCACHED
1082 pkglib_LTLIBRARIES += memcached.la
1083 memcached_la_SOURCES = src/memcached.c
1084 memcached_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1085 memcached_la_LIBADD =
1086 if BUILD_WITH_LIBSOCKET
1087 memcached_la_LIBADD += -lsocket
1091 if BUILD_PLUGIN_MEMORY
1092 pkglib_LTLIBRARIES += memory.la
1093 memory_la_SOURCES = src/memory.c
1094 memory_la_CFLAGS = $(AM_CFLAGS)
1095 memory_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1097 if BUILD_WITH_LIBKSTAT
1098 memory_la_LIBADD += -lkstat
1100 if BUILD_WITH_LIBDEVINFO
1101 memory_la_LIBADD += -ldevinfo
1103 if BUILD_WITH_LIBSTATGRAB
1104 memory_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1105 memory_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1107 if BUILD_WITH_PERFSTAT
1108 memory_la_LIBADD += -lperfstat
1113 pkglib_LTLIBRARIES += mic.la
1114 mic_la_SOURCES = src/mic.c
1115 mic_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_MIC_CPPFLAGS)
1116 mic_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_MIC_LDFLAGS)
1117 mic_la_LIBADD = $(BUILD_WITH_MIC_LIBS)
1120 if BUILD_PLUGIN_MODBUS
1121 pkglib_LTLIBRARIES += modbus.la
1122 modbus_la_SOURCES = src/modbus.c
1123 modbus_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMODBUS_CFLAGS)
1124 modbus_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1125 modbus_la_LIBADD = $(BUILD_WITH_LIBMODBUS_LIBS)
1128 if BUILD_PLUGIN_MQTT
1129 pkglib_LTLIBRARIES += mqtt.la
1130 mqtt_la_SOURCES = src/mqtt.c
1131 mqtt_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMOSQUITTO_CPPFLAGS)
1132 mqtt_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMOSQUITTO_LDFLAGS)
1133 mqtt_la_LIBADD = $(BUILD_WITH_LIBMOSQUITTO_LIBS)
1136 if BUILD_PLUGIN_MULTIMETER
1137 pkglib_LTLIBRARIES += multimeter.la
1138 multimeter_la_SOURCES = src/multimeter.c
1139 multimeter_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1142 if BUILD_PLUGIN_MYSQL
1143 pkglib_LTLIBRARIES += mysql.la
1144 mysql_la_SOURCES = src/mysql.c
1145 mysql_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMYSQL_CFLAGS)
1146 mysql_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1147 mysql_la_LIBADD = $(BUILD_WITH_LIBMYSQL_LIBS)
1150 if BUILD_PLUGIN_NETAPP
1151 pkglib_LTLIBRARIES += netapp.la
1152 netapp_la_SOURCES = src/netapp.c
1153 netapp_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBNETAPP_CPPFLAGS)
1154 netapp_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBNETAPP_LDFLAGS)
1155 netapp_la_LIBADD = $(LIBNETAPP_LIBS)
1158 if BUILD_PLUGIN_NETLINK
1159 pkglib_LTLIBRARIES += netlink.la
1160 netlink_la_SOURCES = src/netlink.c
1161 netlink_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMNL_CFLAGS)
1162 netlink_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1163 netlink_la_LIBADD = $(BUILD_WITH_LIBMNL_LIBS)
1166 if BUILD_PLUGIN_NETWORK
1167 pkglib_LTLIBRARIES += network.la
1168 network_la_SOURCES = \
1171 src/utils_fbhash.c \
1173 network_la_CPPFLAGS = $(AM_CPPFLAGS)
1174 network_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1176 if BUILD_WITH_LIBSOCKET
1177 network_la_LIBADD += -lsocket
1179 if BUILD_WITH_LIBGCRYPT
1180 network_la_CPPFLAGS += $(GCRYPT_CPPFLAGS)
1181 network_la_LDFLAGS += $(GCRYPT_LDFLAGS)
1182 network_la_LIBADD += $(GCRYPT_LIBS)
1187 pkglib_LTLIBRARIES += nfs.la
1188 nfs_la_SOURCES = src/nfs.c
1189 nfs_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1192 if BUILD_PLUGIN_NGINX
1193 pkglib_LTLIBRARIES += nginx.la
1194 nginx_la_SOURCES = src/nginx.c
1195 nginx_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS)
1196 nginx_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1197 nginx_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS)
1200 if BUILD_PLUGIN_NOTIFY_DESKTOP
1201 pkglib_LTLIBRARIES += notify_desktop.la
1202 notify_desktop_la_SOURCES = src/notify_desktop.c
1203 notify_desktop_la_CFLAGS = $(AM_CFLAGS) $(LIBNOTIFY_CFLAGS)
1204 notify_desktop_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1205 notify_desktop_la_LIBADD = $(LIBNOTIFY_LIBS)
1208 if BUILD_PLUGIN_NOTIFY_EMAIL
1209 pkglib_LTLIBRARIES += notify_email.la
1210 notify_email_la_SOURCES = src/notify_email.c
1211 notify_email_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBESMTP_CPPFLAGS)
1212 notify_email_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBESMTP_LDFLAGS)
1213 notify_email_la_LIBADD = $(BUILD_WITH_LIBESMTP_LIBS)
1216 if BUILD_PLUGIN_NOTIFY_NAGIOS
1217 pkglib_LTLIBRARIES += notify_nagios.la
1218 notify_nagios_la_SOURCES = src/notify_nagios.c
1219 notify_nagios_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1222 if BUILD_PLUGIN_NTPD
1223 pkglib_LTLIBRARIES += ntpd.la
1224 ntpd_la_SOURCES = src/ntpd.c
1225 ntpd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1227 if BUILD_WITH_LIBSOCKET
1228 ntpd_la_LIBADD += -lsocket
1232 if BUILD_PLUGIN_NUMA
1233 pkglib_LTLIBRARIES += numa.la
1234 numa_la_SOURCES = src/numa.c
1235 numa_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1239 pkglib_LTLIBRARIES += nut.la
1240 nut_la_SOURCES = src/nut.c
1241 nut_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
1242 nut_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1243 nut_la_LIBADD = $(BUILD_WITH_LIBUPSCLIENT_LIBS)
1246 if BUILD_PLUGIN_OLSRD
1247 pkglib_LTLIBRARIES += olsrd.la
1248 olsrd_la_SOURCES = src/olsrd.c
1249 olsrd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1251 if BUILD_WITH_LIBSOCKET
1252 olsrd_la_LIBADD += -lsocket
1256 if BUILD_PLUGIN_ONEWIRE
1257 pkglib_LTLIBRARIES += onewire.la
1258 onewire_la_SOURCES = src/onewire.c
1259 onewire_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
1260 onewire_la_LIBADD = $(BUILD_WITH_LIBOWCAPI_LIBS)
1261 onewire_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBOWCAPI_LDFLAGS)
1264 if BUILD_PLUGIN_OPENLDAP
1265 pkglib_LTLIBRARIES += openldap.la
1266 openldap_la_SOURCES = src/openldap.c
1267 openldap_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBLDAP_CPPFLAGS)
1268 openldap_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBLDAP_LDFLAGS)
1269 openldap_la_LIBADD = -lldap
1272 if BUILD_PLUGIN_OPENVPN
1273 pkglib_LTLIBRARIES += openvpn.la
1274 openvpn_la_SOURCES = src/openvpn.c
1275 openvpn_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1278 if BUILD_PLUGIN_ORACLE
1279 pkglib_LTLIBRARIES += oracle.la
1280 oracle_la_SOURCES = \
1282 src/utils_db_query.c \
1283 src/utils_db_query.h
1284 oracle_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_ORACLE_CPPFLAGS)
1285 oracle_la_LIBADD = $(BUILD_WITH_ORACLE_LIBS)
1286 oracle_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1289 if BUILD_PLUGIN_OVS_EVENTS
1290 pkglib_LTLIBRARIES += ovs_events.la
1291 ovs_events_la_SOURCES = \
1295 ovs_events_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
1296 ovs_events_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
1297 ovs_events_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
1300 if BUILD_PLUGIN_OVS_STATS
1301 pkglib_LTLIBRARIES += ovs_stats.la
1302 ovs_stats_la_SOURCES = \
1306 ovs_stats_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
1307 ovs_stats_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
1308 ovs_stats_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
1311 if BUILD_PLUGIN_PERL
1312 pkglib_LTLIBRARIES += perl.la
1313 perl_la_SOURCES = src/perl.c
1314 # Despite C99 providing the "bool" type thru stdbool.h, Perl defines its own
1315 # version of that type if HAS_BOOL is not defined... *sigh*
1316 perl_la_CPPFLAGS = $(AM_CPPFLAGS) -DHAS_BOOL=1
1317 # Despite off_t being 64 bit wide on 64 bit platforms, Perl insist on using
1318 # off64_t which is only exposed when _LARGEFILE64_SOURCE is defined... *sigh*
1319 # On older platforms we also need _REENTRANT. _GNU_SOURCE sets both of these.
1320 perl_la_CPPFLAGS += -D_GNU_SOURCE
1321 perl_la_CFLAGS = $(AM_CFLAGS) \
1323 -DXS_VERSION=\"$(VERSION)\" -DVERSION=\"$(VERSION)\"
1324 perl_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(PERL_LDFLAGS)
1325 perl_la_LIBADD = $(PERL_LIBS)
1329 pkglib_LTLIBRARIES += pf.la
1330 pf_la_SOURCES = src/pf.c
1331 pf_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1334 if BUILD_PLUGIN_PINBA
1335 pkglib_LTLIBRARIES += pinba.la
1336 pinba_la_SOURCES = src/pinba.c
1337 nodist_pinba_la_SOURCES = \
1340 pinba_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPROTOBUF_C_CPPFLAGS)
1341 pinba_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBPROTOBUF_C_LDFLAGS)
1342 pinba_la_LIBADD = $(BUILD_WITH_LIBPROTOBUF_C_LIBS)
1345 if BUILD_PLUGIN_PING
1346 pkglib_LTLIBRARIES += ping.la
1347 ping_la_SOURCES = src/ping.c
1348 ping_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOPING_CPPFLAGS)
1349 ping_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBOPING_LDFLAGS)
1350 ping_la_LIBADD = -loping -lm
1353 if BUILD_PLUGIN_POSTGRESQL
1354 pkglib_LTLIBRARIES += postgresql.la
1355 postgresql_la_SOURCES = \
1357 src/utils_db_query.c \
1358 src/utils_db_query.h
1359 postgresql_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPQ_CPPFLAGS)
1360 postgresql_la_LDFLAGS = $(PLUGIN_LDFLAGS) \
1361 $(BUILD_WITH_LIBPQ_LDFLAGS)
1362 postgresql_la_LIBADD = $(BUILD_WITH_LIBPQ_LIBS)
1365 if BUILD_PLUGIN_POWERDNS
1366 pkglib_LTLIBRARIES += powerdns.la
1367 powerdns_la_SOURCES = src/powerdns.c
1368 powerdns_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1371 if BUILD_PLUGIN_PYTHON
1372 pkglib_LTLIBRARIES += python.la
1373 python_la_SOURCES = \
1378 python_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBPYTHON_CPPFLAGS)
1380 python_la_CPPFLAGS += -fno-strict-aliasing -Wno-strict-aliasing
1382 python_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBPYTHON_LDFLAGS)
1385 if BUILD_PLUGIN_PROCESSES
1386 pkglib_LTLIBRARIES += processes.la
1387 processes_la_SOURCES = src/processes.c
1388 processes_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1389 processes_la_LIBADD =
1390 if BUILD_WITH_LIBKVM_GETPROCS
1391 processes_la_LIBADD += -lkvm
1395 if BUILD_PLUGIN_PROTOCOLS
1396 pkglib_LTLIBRARIES += protocols.la
1397 protocols_la_SOURCES = src/protocols.c
1398 protocols_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1401 if BUILD_PLUGIN_REDIS
1402 pkglib_LTLIBRARIES += redis.la
1403 redis_la_SOURCES = src/redis.c
1404 redis_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBHIREDIS_CPPFLAGS)
1405 redis_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBHIREDIS_LDFLAGS)
1406 redis_la_LIBADD = -lhiredis
1409 if BUILD_PLUGIN_ROUTEROS
1410 pkglib_LTLIBRARIES += routeros.la
1411 routeros_la_SOURCES = src/routeros.c
1412 routeros_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBROUTEROS_CPPFLAGS)
1413 routeros_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBROUTEROS_LDFLAGS)
1414 routeros_la_LIBADD = -lrouteros
1417 if BUILD_PLUGIN_RRDCACHED
1418 pkglib_LTLIBRARIES += rrdcached.la
1419 rrdcached_la_SOURCES = \
1421 src/utils_rrdcreate.c \
1422 src/utils_rrdcreate.h
1423 rrdcached_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
1424 rrdcached_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRRD_LDFLAGS)
1425 rrdcached_la_LIBADD = $(BUILD_WITH_LIBRRD_LIBS)
1428 if BUILD_PLUGIN_RRDTOOL
1429 pkglib_LTLIBRARIES += rrdtool.la
1430 rrdtool_la_SOURCES = \
1432 src/utils_rrdcreate.c \
1433 src/utils_rrdcreate.h
1434 rrdtool_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
1435 rrdtool_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRRD_LDFLAGS)
1436 rrdtool_la_LIBADD = $(BUILD_WITH_LIBRRD_LIBS)
1439 if BUILD_PLUGIN_SENSORS
1440 pkglib_LTLIBRARIES += sensors.la
1441 sensors_la_SOURCES = src/sensors.c
1442 sensors_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBSENSORS_CPPFLAGS)
1443 sensors_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBSENSORS_LDFLAGS)
1444 sensors_la_LIBADD = $(BUILD_WITH_LIBSENSORS_LIBS)
1447 if BUILD_PLUGIN_SERIAL
1448 pkglib_LTLIBRARIES += serial.la
1449 serial_la_SOURCES = src/serial.c
1450 serial_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1453 if BUILD_PLUGIN_SIGROK
1454 pkglib_LTLIBRARIES += sigrok.la
1455 sigrok_la_SOURCES = src/sigrok.c
1456 sigrok_la_CFLAGS = $(AM_CFLAGS) $(LIBSIGROK_CFLAGS)
1457 sigrok_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1458 sigrok_la_LIBADD = $(LIBSIGROK_LIBS)
1461 if BUILD_PLUGIN_SMART
1462 if BUILD_WITH_LIBUDEV
1463 pkglib_LTLIBRARIES += smart.la
1464 smart_la_SOURCES = src/smart.c
1465 smart_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBATASMART_CPPFLAGS) $(BUILD_WITH_LIBUDEV_CPPFLAGS)
1466 smart_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBATASMART_LDFLAGS) $(BUILD_WITH_LIBUDEV_LDFLAGS)
1467 smart_la_LIBADD = $(BUILD_WITH_LIBATASMART_LIBS) $(BUILD_WITH_LIBUDEV_LIBS)
1471 if BUILD_PLUGIN_SNMP
1472 pkglib_LTLIBRARIES += snmp.la
1473 snmp_la_SOURCES = src/snmp.c
1474 snmp_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBNETSNMP_CPPFLAGS)
1475 snmp_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBNETSNMP_LDFLAGS)
1476 snmp_la_LIBADD = $(BUILD_WITH_LIBNETSNMP_LIBS)
1479 if BUILD_PLUGIN_STATSD
1480 pkglib_LTLIBRARIES += statsd.la
1481 statsd_la_SOURCES = src/statsd.c
1482 statsd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1483 statsd_la_LIBADD = liblatency.la
1486 if BUILD_PLUGIN_SWAP
1487 pkglib_LTLIBRARIES += swap.la
1488 swap_la_SOURCES = src/swap.c
1489 swap_la_CFLAGS = $(AM_CFLAGS)
1490 swap_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1492 if BUILD_WITH_LIBKSTAT
1493 swap_la_LIBADD += -lkstat
1495 if BUILD_WITH_LIBDEVINFO
1496 swap_la_LIBADD += -ldevinfo
1498 if BUILD_WITH_LIBKVM_GETSWAPINFO
1499 swap_la_LIBADD += -lkvm
1501 if BUILD_WITH_LIBSTATGRAB
1502 swap_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1503 swap_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1505 if BUILD_WITH_PERFSTAT
1506 swap_la_LIBADD += -lperfstat
1511 if BUILD_PLUGIN_SYSLOG
1512 pkglib_LTLIBRARIES += syslog.la
1513 syslog_la_SOURCES = src/syslog.c
1514 syslog_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1517 if BUILD_PLUGIN_TABLE
1518 pkglib_LTLIBRARIES += table.la
1519 table_la_SOURCES = src/table.c
1520 table_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1523 if BUILD_PLUGIN_TAIL
1524 pkglib_LTLIBRARIES += tail.la
1531 src/utils_tail_match.c \
1532 src/utils_tail_match.h
1533 tail_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1534 tail_la_LIBADD = liblatency.la
1537 if BUILD_PLUGIN_TAIL_CSV
1538 pkglib_LTLIBRARIES += tail_csv.la
1539 tail_csv_la_SOURCES = \
1543 tail_csv_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1546 if BUILD_PLUGIN_TAPE
1547 pkglib_LTLIBRARIES += tape.la
1548 tape_la_SOURCES = src/tape.c
1549 tape_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1550 tape_la_LIBADD = -lkstat -ldevinfo
1553 if BUILD_PLUGIN_TARGET_NOTIFICATION
1554 pkglib_LTLIBRARIES += target_notification.la
1555 target_notification_la_SOURCES = src/target_notification.c
1556 target_notification_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1559 if BUILD_PLUGIN_TARGET_REPLACE
1560 pkglib_LTLIBRARIES += target_replace.la
1561 target_replace_la_SOURCES = src/target_replace.c
1562 target_replace_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1565 if BUILD_PLUGIN_TARGET_SCALE
1566 pkglib_LTLIBRARIES += target_scale.la
1567 target_scale_la_SOURCES = src/target_scale.c
1568 target_scale_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1571 if BUILD_PLUGIN_TARGET_SET
1572 pkglib_LTLIBRARIES += target_set.la
1573 target_set_la_SOURCES = src/target_set.c
1574 target_set_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1577 if BUILD_PLUGIN_TARGET_V5UPGRADE
1578 pkglib_LTLIBRARIES += target_v5upgrade.la
1579 target_v5upgrade_la_SOURCES = src/target_v5upgrade.c
1580 target_v5upgrade_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1583 if BUILD_PLUGIN_TCPCONNS
1584 pkglib_LTLIBRARIES += tcpconns.la
1585 tcpconns_la_SOURCES = src/tcpconns.c
1586 tcpconns_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1587 tcpconns_la_LIBADD =
1588 if BUILD_WITH_LIBKVM_NLIST
1589 tcpconns_la_LIBADD += -lkvm
1593 if BUILD_PLUGIN_TEAMSPEAK2
1594 pkglib_LTLIBRARIES += teamspeak2.la
1595 teamspeak2_la_SOURCES = src/teamspeak2.c
1596 teamspeak2_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1600 pkglib_LTLIBRARIES += ted.la
1601 ted_la_SOURCES = src/ted.c
1602 ted_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1605 if BUILD_PLUGIN_THERMAL
1606 pkglib_LTLIBRARIES += thermal.la
1607 thermal_la_SOURCES = src/thermal.c
1608 thermal_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1611 if BUILD_PLUGIN_THRESHOLD
1612 pkglib_LTLIBRARIES += threshold.la
1613 threshold_la_SOURCES = src/threshold.c
1614 threshold_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1617 if BUILD_PLUGIN_TOKYOTYRANT
1618 pkglib_LTLIBRARIES += tokyotyrant.la
1619 tokyotyrant_la_SOURCES = src/tokyotyrant.c
1620 tokyotyrant_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS)
1621 tokyotyrant_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS)
1622 tokyotyrant_la_LIBADD = $(BUILD_WITH_LIBTOKYOTYRANT_LIBS)
1623 if BUILD_WITH_LIBSOCKET
1624 tokyotyrant_la_LIBADD += -lsocket
1628 if BUILD_PLUGIN_TURBOSTAT
1629 pkglib_LTLIBRARIES += turbostat.la
1630 turbostat_la_SOURCES = src/turbostat.c
1631 turbostat_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1634 if BUILD_PLUGIN_UNIXSOCK
1635 pkglib_LTLIBRARIES += unixsock.la
1636 unixsock_la_SOURCES = src/unixsock.c
1637 unixsock_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1638 unixsock_la_LIBADD = libcmds.la
1641 if BUILD_PLUGIN_UPTIME
1642 pkglib_LTLIBRARIES += uptime.la
1643 uptime_la_SOURCES = src/uptime.c
1644 uptime_la_CFLAGS = $(AM_CFLAGS)
1645 uptime_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1647 if BUILD_WITH_LIBKSTAT
1648 uptime_la_LIBADD += -lkstat
1650 if BUILD_WITH_PERFSTAT
1651 uptime_la_LIBADD += -lperfstat
1655 if BUILD_PLUGIN_USERS
1656 pkglib_LTLIBRARIES += users.la
1657 users_la_SOURCES = src/users.c
1658 users_la_CFLAGS = $(AM_CFLAGS)
1659 users_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1661 if BUILD_WITH_LIBSTATGRAB
1662 users_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1663 users_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1667 if BUILD_PLUGIN_UUID
1668 pkglib_LTLIBRARIES += uuid.la
1669 uuid_la_SOURCES = src/uuid.c
1670 uuid_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1673 if BUILD_PLUGIN_VARNISH
1674 pkglib_LTLIBRARIES += varnish.la
1675 varnish_la_SOURCES = src/varnish.c
1676 varnish_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBVARNISH_CFLAGS)
1677 varnish_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1678 varnish_la_LIBADD = $(BUILD_WITH_LIBVARNISH_LIBS)
1681 if BUILD_PLUGIN_VIRT
1682 pkglib_LTLIBRARIES += virt.la
1683 virt_la_SOURCES = src/virt.c
1684 virt_la_CFLAGS = $(AM_CFLAGS) \
1685 $(BUILD_WITH_LIBVIRT_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
1686 virt_la_LIBADD = $(BUILD_WITH_LIBVIRT_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
1687 virt_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1689 # TODO: enable once we support only modern libvirts which depends on libnl-3
1690 # the libvirt on wheezy is linked in libnl v1, and there is a small leak here,
1691 # triggered by the library initialization. There are no means to avoid it,
1692 # and libvirt switched to libnl3 anyway
1693 #test_plugin_virt_SOURCES = src/virt_test.c
1694 #test_plugin_virt_CPPFLAGS = $(AM_CPPFLAGS) \
1695 # $(BUILD_WITH_LIBVIRT_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
1696 #test_plugin_virt_LDFLAGS = $(PLUGIN_LDFLAGS)
1697 #test_plugin_virt_LDADD = libplugin_mock.la \
1698 # $(BUILD_WITH_LIBVIRT_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
1699 #check_PROGRAMS += test_plugin_virt
1700 #TESTS += test_plugin_virt
1703 if BUILD_PLUGIN_VMEM
1704 pkglib_LTLIBRARIES += vmem.la
1705 vmem_la_SOURCES = src/vmem.c
1706 vmem_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1709 if BUILD_PLUGIN_VSERVER
1710 pkglib_LTLIBRARIES += vserver.la
1711 vserver_la_SOURCES = src/vserver.c
1712 vserver_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1715 if BUILD_PLUGIN_WIRELESS
1716 pkglib_LTLIBRARIES += wireless.la
1717 wireless_la_SOURCES = src/wireless.c
1718 wireless_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1721 if BUILD_PLUGIN_WRITE_GRAPHITE
1722 pkglib_LTLIBRARIES += write_graphite.la
1723 write_graphite_la_SOURCES = src/write_graphite.c
1724 write_graphite_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1725 write_graphite_la_LIBADD = libformat_graphite.la
1728 if BUILD_PLUGIN_WRITE_HTTP
1729 pkglib_LTLIBRARIES += write_http.la
1730 write_http_la_SOURCES = \
1732 src/utils_format_kairosdb.c \
1733 src/utils_format_kairosdb.h
1734 write_http_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS)
1735 write_http_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1736 write_http_la_LIBADD = libformat_json.la $(BUILD_WITH_LIBCURL_LIBS)
1739 if BUILD_PLUGIN_WRITE_KAFKA
1740 pkglib_LTLIBRARIES += write_kafka.la
1741 write_kafka_la_SOURCES = src/write_kafka.c
1742 write_kafka_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBRDKAFKA_CPPFLAGS)
1743 write_kafka_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRDKAFKA_LDFLAGS)
1744 write_kafka_la_LIBADD = \
1746 libformat_graphite.la \
1748 $(BUILD_WITH_LIBRDKAFKA_LIBS)
1751 if BUILD_PLUGIN_WRITE_LOG
1752 pkglib_LTLIBRARIES += write_log.la
1753 write_log_la_SOURCES = src/write_log.c
1754 write_log_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1755 write_log_la_LIBADD = libformat_graphite.la libformat_json.la
1758 if BUILD_PLUGIN_WRITE_MONGODB
1759 pkglib_LTLIBRARIES += write_mongodb.la
1760 write_mongodb_la_SOURCES = src/write_mongodb.c
1761 write_mongodb_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMONGOC_CPPFLAGS)
1762 write_mongodb_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMONGOC_LDFLAGS)
1763 write_mongodb_la_LIBADD = -lmongoc
1766 if BUILD_PLUGIN_WRITE_PROMETHEUS
1767 pkglib_LTLIBRARIES += write_prometheus.la
1768 write_prometheus_la_SOURCES = src/write_prometheus.c
1769 nodist_write_prometheus_la_SOURCES = \
1772 write_prometheus_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPROTOBUF_C_CPPFLAGS) $(BUILD_WITH_LIBMICROHTTPD_CPPFLAGS)
1773 write_prometheus_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBPROTOBUF_C_LDFLAGS) $(BUILD_WITH_LIBMICROHTTPD_LDFLAGS)
1774 write_prometheus_la_LIBADD = $(BUILD_WITH_LIBPROTOBUF_C_LIBS) $(BUILD_WITH_LIBMICROHTTPD_LIBS)
1777 if BUILD_PLUGIN_WRITE_REDIS
1778 pkglib_LTLIBRARIES += write_redis.la
1779 write_redis_la_SOURCES = src/write_redis.c
1780 write_redis_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBHIREDIS_CPPFLAGS)
1781 write_redis_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBHIREDIS_LDFLAGS)
1782 write_redis_la_LIBADD = -lhiredis
1785 if BUILD_PLUGIN_WRITE_RIEMANN
1786 pkglib_LTLIBRARIES += write_riemann.la
1787 write_riemann_la_SOURCES = \
1788 src/write_riemann.c \
1789 src/write_riemann_threshold.c \
1790 src/write_riemann_threshold.h
1791 write_riemann_la_CFLAGS = $(AM_CFLAGS) $(LIBRIEMANN_CLIENT_CFLAGS)
1792 write_riemann_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBRIEMANN_CLIENT_LIBS)
1795 if BUILD_PLUGIN_WRITE_SENSU
1796 pkglib_LTLIBRARIES += write_sensu.la
1797 write_sensu_la_SOURCES = src/write_sensu.c
1798 write_sensu_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1801 if BUILD_PLUGIN_WRITE_TSDB
1802 pkglib_LTLIBRARIES += write_tsdb.la
1803 write_tsdb_la_SOURCES = src/write_tsdb.c
1804 write_tsdb_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1807 if BUILD_PLUGIN_XENCPU
1808 pkglib_LTLIBRARIES += xencpu.la
1809 xencpu_la_SOURCES = src/xencpu.c
1810 xencpu_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBXENCTL_CPPFLAGS)
1811 xencpu_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBXENCTL_LDFLAGS)
1812 xencpu_la_LIBADD = -lxenctrl
1815 if BUILD_PLUGIN_XMMS
1816 pkglib_LTLIBRARIES += xmms.la
1817 xmms_la_SOURCES = src/xmms.c
1818 xmms_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBXMMS_CFLAGS)
1819 xmms_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1820 xmms_la_LIBADD = $(BUILD_WITH_LIBXMMS_LIBS)
1823 if BUILD_PLUGIN_ZFS_ARC
1824 pkglib_LTLIBRARIES += zfs_arc.la
1825 zfs_arc_la_SOURCES = src/zfs_arc.c
1826 zfs_arc_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1828 zfs_arc_la_LIBADD = -lm
1831 zfs_arc_la_LIBADD = -lkstat
1835 if BUILD_PLUGIN_ZOOKEEPER
1836 pkglib_LTLIBRARIES += zookeeper.la
1837 zookeeper_la_SOURCES = src/zookeeper.c
1838 zookeeper_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1841 if BUILD_PLUGIN_ZONE
1842 pkglib_LTLIBRARIES += zone.la
1843 zone_la_SOURCES = src/zone.c
1844 zone_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1847 AM_V_POD2MAN_C = $(am__v_POD2MAN_C_@AM_V@)
1848 am__v_POD2MAN_C_ = $(am__v_POD2MAN_C_@AM_DEFAULT_V@)
1849 am__v_POD2MAN_C_0 = @echo " POD2MAN " $@;
1853 $(AM_V_POD2MAN_C)pod2man --release=$(VERSION) --center=$(PACKAGE) $< \
1854 >.pod2man.tmp.$$$$ 2>/dev/null && mv -f .pod2man.tmp.$$$$ $@ || true
1855 @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
1857 echo "$@ has some POD errors!"; false; \
1861 $(AM_V_POD2MAN_C)pod2man --section=5 --release=$(VERSION) --center=$(PACKAGE) $< \
1862 >.pod2man.tmp.$$$$ 2>/dev/null && mv -f .pod2man.tmp.$$$$ $@ || true
1863 @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
1865 echo "$@ has some POD errors!"; false; \
1868 V_PROTOC = $(v_protoc_@AM_V@)
1869 v_protoc_ = $(v_protoc_@AM_DEFAULT_V@)
1870 v_protoc_0 = @echo " PROTOC " $@;
1872 AM_V_PROTOC_C = $(am__v_PROTOC_C_@AM_V@)
1873 am__v_PROTOC_C_ = $(am__v_PROTOC_C_@AM_DEFAULT_V@)
1874 am__v_PROTOC_C_0 = @echo " PROTOC-C" $@;
1877 # Protocol buffer for the "pinba" plugin.
1878 if BUILD_PLUGIN_PINBA
1879 BUILT_SOURCES += src/pinba.pb-c.c src/pinba.pb-c.h
1881 src/pinba.pb-c.c src/pinba.pb-c.h: $(srcdir)/src/pinba.proto
1882 $(AM_V_PROTOC_C)$(PROTOC_C) -I$(srcdir) --c_out . $(srcdir)/src/pinba.proto
1885 # Protocol buffer for the "write_prometheus" plugin.
1886 if BUILD_PLUGIN_WRITE_PROMETHEUS
1887 BUILT_SOURCES += prometheus.pb-c.c prometheus.pb-c.h
1889 prometheus.pb-c.c prometheus.pb-c.h: $(srcdir)/proto/prometheus.proto
1890 $(AM_V_PROTOC_C)$(PROTOC_C) -I$(srcdir)/proto --c_out=$(builddir) $(srcdir)/proto/prometheus.proto
1895 BUILT_SOURCES += collectd.grpc.pb.cc collectd.pb.cc types.pb.cc
1897 collectd.grpc.pb.cc: $(srcdir)/proto/collectd.proto $(srcdir)/proto/types.proto
1898 $(V_PROTOC)$(PROTOC) -I$(srcdir)/proto \
1899 --grpc_out=$(builddir) --plugin=protoc-gen-grpc=$(GRPC_CPP_PLUGIN) $<
1901 collectd.pb.cc: $(srcdir)/proto/collectd.proto $(srcdir)/proto/types.proto
1902 $(V_PROTOC)$(PROTOC) -I$(srcdir)/proto --cpp_out=$(builddir) $<
1904 types.pb.cc: $(srcdir)/proto/types.proto
1905 $(V_PROTOC)$(PROTOC) -I$(srcdir)/proto --cpp_out=$(builddir) $<
1910 $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run
1911 $(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/$(PACKAGE_NAME)
1912 $(mkinstalldirs) $(DESTDIR)$(localstatedir)/log
1913 $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
1914 if test -e $(DESTDIR)$(sysconfdir)/collectd.conf; \
1916 $(INSTALL) -m 0640 $(srcdir)/src/collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf.pkg-orig; \
1918 $(INSTALL) -m 0640 $(srcdir)/src/collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf; \
1920 $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
1921 $(INSTALL) -m 0644 $(srcdir)/src/types.db $(DESTDIR)$(pkgdatadir)/types.db;
1922 $(INSTALL) -m 0644 $(srcdir)/src/postgresql_default.conf \
1923 $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;
1926 rm -f $(DESTDIR)$(pkgdatadir)/types.db;
1927 rm -f $(DESTDIR)$(sysconfdir)/collectd.conf
1928 rm -f $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;
1930 all-local: @PERL_BINDINGS@
1933 [ ! -f buildperl/Makefile ] || ( cd buildperl && $(MAKE) install )
1935 # Perl 'make uninstall' does not work as well as wanted.
1936 # So we do the work here.
1938 @PERL@ -I$(DESTDIR)$(prefix) $(srcdir)/bindings/perl/uninstall_mod.pl Collectd
1939 find $(DESTDIR)$(prefix) -name "perllocal.pod" -exec rm {} \;
1944 perl: buildperl/Makefile
1945 cd buildperl && $(MAKE)
1947 buildperl/Makefile: .perl-directory-stamp buildperl/Makefile.PL \
1948 $(top_builddir)/config.status
1949 @# beautify the output a bit
1950 @echo 'cd buildperl && @PERL@ Makefile.PL @PERL_BINDINGS_OPTIONS@'
1951 @cd buildperl && ( if ! @PERL@ Makefile.PL @PERL_BINDINGS_OPTIONS@; then \
1953 echo 'Check whether you have set $$PERL_MM_OPT in your environment and try using ./configure --with-perl-bindings=""'; \
1957 buildperl/Makefile.PL: .perl-directory-stamp $(top_builddir)/config.status
1959 .perl-directory-stamp:
1960 if test ! -d buildperl; then \
1961 mkdir -p buildperl/Collectd/Plugins; \
1962 cp $(srcdir)/bindings/perl/lib/Collectd.pm buildperl/; \
1963 cp $(srcdir)/bindings/perl/Makefile.PL buildperl/; \
1964 cp $(srcdir)/bindings/perl/lib/Collectd/Unixsock.pm buildperl/Collectd/; \
1965 cp $(srcdir)/bindings/perl/lib/Collectd/Plugins/OpenVZ.pm buildperl/Collectd/Plugins/; \
1973 dist_noinst_JAVA = \
1974 bindings/java/org/collectd/api/Collectd.java \
1975 bindings/java/org/collectd/api/CollectdConfigInterface.java \
1976 bindings/java/org/collectd/api/CollectdFlushInterface.java \
1977 bindings/java/org/collectd/api/CollectdInitInterface.java \
1978 bindings/java/org/collectd/api/CollectdLogInterface.java \
1979 bindings/java/org/collectd/api/CollectdMatchFactoryInterface.java \
1980 bindings/java/org/collectd/api/CollectdMatchInterface.java \
1981 bindings/java/org/collectd/api/CollectdNotificationInterface.java \
1982 bindings/java/org/collectd/api/CollectdReadInterface.java \
1983 bindings/java/org/collectd/api/CollectdShutdownInterface.java \
1984 bindings/java/org/collectd/api/CollectdTargetFactoryInterface.java \
1985 bindings/java/org/collectd/api/CollectdTargetInterface.java \
1986 bindings/java/org/collectd/api/CollectdWriteInterface.java \
1987 bindings/java/org/collectd/api/DataSet.java \
1988 bindings/java/org/collectd/api/DataSource.java \
1989 bindings/java/org/collectd/api/Notification.java \
1990 bindings/java/org/collectd/api/OConfigItem.java \
1991 bindings/java/org/collectd/api/OConfigValue.java \
1992 bindings/java/org/collectd/api/PluginData.java \
1993 bindings/java/org/collectd/api/ValueList.java \
1994 bindings/java/org/collectd/java/GenericJMX.java \
1995 bindings/java/org/collectd/java/GenericJMXConfConnection.java \
1996 bindings/java/org/collectd/java/GenericJMXConfMBean.java \
1997 bindings/java/org/collectd/java/GenericJMXConfValue.java \
1998 bindings/java/org/collectd/java/JMXMemory.java
2000 collectd-api.jar: classnoinst.stamp
2001 $(JAR) cf $(JARFLAGS) $@ org/collectd/api/*.class
2003 generic-jmx.jar: classnoinst.stamp
2004 $(JAR) cf $(JARFLAGS) $@ org/collectd/java/*.class
2006 jar_DATA = collectd-api.jar generic-jmx.jar