1 ACLOCAL_AMFLAGS = -I m4
6 cpkglibdir=$(libdir)/plugins
7 cpkglocalstatedir=${localstatedir}
9 cpkgdatadir=$(pkgdatadir)
10 cpkglibdir=$(pkglibdir)
11 cpkglocalstatedir=${localstatedir}/lib/${PACKAGE_NAME}
15 src/libcollectdclient/collectd/lcc_features.h \
16 src/liboconfig/parser.h \
21 .perl-directory-stamp \
22 bindings/buildperl/Collectd.pm \
23 bindings/buildperl/Collectd/Plugins/OpenVZ.pm \
24 bindings/buildperl/Collectd/Unixsock.pm \
25 bindings/buildperl/Makefile.PL \
32 org/collectd/api/*.class \
33 org/collectd/java/*.class \
43 bindings/perl/Makefile.PL \
44 bindings/perl/lib/Collectd.pm \
45 bindings/perl/lib/Collectd/Plugins/Monitorus.pm \
46 bindings/perl/lib/Collectd/Plugins/OpenVZ.pm \
47 bindings/perl/lib/Collectd/Unixsock.pm \
48 bindings/perl/uninstall_mod.pl \
50 proto/collectd.proto \
51 proto/prometheus.proto \
53 src/collectd-email.pod \
54 src/collectd-exec.pod \
55 src/collectd-java.pod \
56 src/collectd-lua.pod \
57 src/collectd-nagios.pod \
58 src/collectd-perl.pod \
59 src/collectd-python.pod \
60 src/collectd-snmp.pod \
62 src/collectd-threshold.pod \
63 src/collectd-unixsock.pod \
64 src/collectd.conf.pod \
69 src/postgresql_default.conf \
72 src/valgrind.FreeBSD.suppress \
73 src/valgrind.suppress \
81 src/collectd-email.5 \
87 src/collectd-nagios.1 \
89 src/collectd-python.5 \
92 src/collectd-threshold.5 \
93 src/collectd-unixsock.5 \
97 nodist_pkgconfig_DATA = \
98 src/libcollectdclient/libcollectdclient.pc
100 pkginclude_HEADERS = \
101 src/libcollectdclient/collectd/client.h \
102 src/libcollectdclient/collectd/lcc_features.h \
103 src/libcollectdclient/collectd/network_buffer.h \
104 src/libcollectdclient/collectd/network.h \
105 src/libcollectdclient/collectd/network_parse.h \
106 src/libcollectdclient/collectd/server.h \
107 src/libcollectdclient/collectd/types.h
109 lib_LTLIBRARIES = libcollectdclient.la
112 # TODO: Build all executables on Windows as well.
130 noinst_LTLIBRARIES = \
134 libformat_graphite.la \
145 check_LTLIBRARIES = \
151 test_format_graphite \
160 test_utils_vl_lookup \
161 test_libcollectd_network_parse \
162 test_utils_config_cores
165 TESTS = $(check_PROGRAMS)
167 LOG_COMPILER = env VALGRIND="@VALGRIND@" $(abs_srcdir)/testwrapper.sh
170 jardir = $(cpkgdatadir)/java
178 -export-symbols-regex '\<module_register\>'
180 PLUGIN_LDFLAGS += -shared -no-undefined -lcollectd -L.
185 -I$(top_srcdir)/src -I$(top_srcdir)/src/daemon \
186 -DPREFIX='"${prefix}"' \
187 -DCONFIGFILE='"${sysconfdir}/${PACKAGE_NAME}.conf"' \
188 -DLOCALSTATEDIR='"${localstatedir}"' \
189 -DPKGLOCALSTATEDIR='"${cpkglocalstatedir}"' \
190 -DPLUGINDIR='"${cpkglibdir}"' \
191 -DPKGDATADIR='"${cpkgdatadir}"'
193 AM_CPPFLAGS += -DNOGDI
198 COMMON_DEPS += collectd.exe
201 # Link to these libraries..
202 COMMON_LIBS = $(PTHREAD_LIBS)
204 COMMON_LIBS += -lws2_32
209 if BUILD_WITH_CAPABILITY
215 if BUILD_WITH_LIBPOSIX4
216 COMMON_LIBS += -lposix4
218 if BUILD_WITH_LIBSOCKET
219 COMMON_LIBS += -lsocket
221 if BUILD_WITH_LIBKSTAT
222 COMMON_LIBS += -lkstat
224 if BUILD_WITH_LIBDEVINFO
225 COMMON_LIBS += -ldevinfo
231 src/daemon/collectd.c \
232 src/daemon/collectd.h \
233 src/daemon/configfile.c \
234 src/daemon/configfile.h \
235 src/daemon/filter_chain.c \
236 src/daemon/filter_chain.h \
237 src/daemon/globals.c \
238 src/daemon/globals.h \
239 src/utils/metadata/meta_data.c \
240 src/utils/metadata/meta_data.h \
241 src/daemon/plugin.c \
242 src/daemon/plugin.h \
243 src/daemon/utils_cache.c \
244 src/daemon/utils_cache.h \
245 src/daemon/utils_complain.c \
246 src/daemon/utils_complain.h \
247 src/daemon/utils_llist.c \
248 src/daemon/utils_llist.h \
249 src/daemon/utils_random.c \
250 src/daemon/utils_random.h \
251 src/daemon/utils_subst.c \
252 src/daemon/utils_subst.h \
253 src/daemon/utils_time.c \
254 src/daemon/utils_time.h \
255 src/daemon/types_list.c \
256 src/daemon/types_list.h \
257 src/daemon/utils_threshold.c \
258 src/daemon/utils_threshold.h
261 collectd_CFLAGS = $(AM_CFLAGS)
262 collectd_CPPFLAGS = $(AM_CPPFLAGS)
263 collectd_LDFLAGS = -export-dynamic
274 collectd_SOURCES += src/daemon/cmd_windows.c
275 collectd_LDFLAGS += -ldl -Wl,--out-implib,libcollectd.a
277 collectd_SOURCES += src/daemon/cmd.c
280 if BUILD_FEATURE_DAEMON
281 collectd_CPPFLAGS += -DPIDFILE='"${localstatedir}/run/${PACKAGE_NAME}.pid"'
284 # The daemon needs to call sg_init, so we need to link it against libstatgrab,
286 if BUILD_WITH_LIBSTATGRAB
287 collectd_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
288 collectd_LDADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
292 collectd_LDFLAGS += -Wl,--out-implib,libcollectd.a
295 collectdmon_SOURCES = src/collectdmon.c
298 collectd_nagios_SOURCES = src/collectd-nagios.c
299 collectd_nagios_CPPFLAGS = $(AM_CPPFLAGS) \
300 -I$(srcdir)/src/libcollectdclient \
301 -I$(top_builddir)/src/libcollectdclient
302 collectd_nagios_LDADD = libcollectdclient.la
303 if BUILD_WITH_LIBSOCKET
304 collectd_nagios_LDADD += -lsocket
307 collectd_nagios_LDADD += -lm
311 collectdctl_SOURCES = src/collectdctl.c
312 collectdctl_CPPFLAGS = $(AM_CPPFLAGS) \
313 -I$(srcdir)/src/libcollectdclient \
314 -I$(top_builddir)/src/libcollectdclient
315 collectdctl_LDADD = libcollectdclient.la
316 if BUILD_WITH_LIBSOCKET
317 collectdctl_LDADD += -lsocket
320 collectdctl_LDADD += -lm
324 collectd_tg_SOURCES = src/collectd-tg.c
325 collectd_tg_CPPFLAGS = $(AM_CPPFLAGS) \
326 -I$(srcdir)/src/libcollectdclient \
327 -I$(top_builddir)/src/libcollectdclient
328 collectd_tg_LDADD = \
332 if BUILD_WITH_LIBSOCKET
333 collectd_tg_LDADD += -lsocket
336 collectd_tg_LDADD += -lrt
339 collectd_tg_LDADD += -lm
343 test_common_SOURCES = \
344 src/utils/common/common_test.c \
346 test_common_LDADD = libplugin_mock.la
348 test_meta_data_SOURCES = \
349 src/utils/metadata/meta_data_test.c \
351 test_meta_data_LDADD = libmetadata.la libplugin_mock.la
353 test_utils_avltree_SOURCES = \
354 src/utils/avltree/avltree_test.c \
356 test_utils_avltree_LDADD = libavltree.la $(COMMON_LIBS)
358 test_utils_heap_SOURCES = \
359 src/utils/heap/heap_test.c \
361 test_utils_heap_LDADD = libheap.la $(COMMON_LIBS)
363 test_utils_time_SOURCES = \
364 src/daemon/utils_time_test.c \
367 test_utils_subst_SOURCES = \
368 src/daemon/utils_subst_test.c \
370 src/daemon/utils_subst.c \
371 src/daemon/utils_subst.h
372 test_utils_subst_LDADD = libplugin_mock.la
374 test_utils_config_cores_SOURCES = \
375 src/utils/config_cores/config_cores_test.c \
377 test_utils_config_cores_LDADD = libplugin_mock.la
379 libavltree_la_SOURCES = \
380 src/utils/avltree/avltree.c \
381 src/utils/avltree/avltree.h
383 libcommon_la_SOURCES = \
384 src/utils/common/common.c \
385 src/utils/common/common.h
386 libcommon_la_LIBADD = $(COMMON_LIBS)
388 libheap_la_SOURCES = \
389 src/utils/heap/heap.c \
390 src/utils/heap/heap.h
392 libignorelist_la_SOURCES = \
393 src/utils/ignorelist/ignorelist.c \
394 src/utils/ignorelist/ignorelist.h
396 libmetadata_la_SOURCES = \
397 src/utils/metadata/meta_data.c \
398 src/utils/metadata/meta_data.h
400 libplugin_mock_la_SOURCES = \
401 src/daemon/plugin_mock.c \
402 src/daemon/utils_cache_mock.c \
403 src/daemon/utils_complain.c \
404 src/daemon/utils_complain.h \
405 src/daemon/utils_time.c \
406 src/daemon/utils_time.h
408 libplugin_mock_la_CPPFLAGS = $(AM_CPPFLAGS) -DMOCK_TIME
409 libplugin_mock_la_LIBADD = libcommon.la libignorelist.la $(COMMON_LIBS)
411 libformat_graphite_la_SOURCES = \
412 src/utils/format_graphite/format_graphite.c \
413 src/utils/format_graphite/format_graphite.h
415 test_format_graphite_SOURCES = \
416 src/utils/format_graphite/format_graphite_test.c \
418 test_format_graphite_LDADD = \
419 libformat_graphite.la \
424 libformat_json_la_SOURCES = \
425 src/utils/format_json/format_json.c \
426 src/utils/format_json/format_json.h
427 libformat_json_la_CPPFLAGS = $(AM_CPPFLAGS)
428 libformat_json_la_LDFLAGS = $(AM_LDFLAGS)
429 libformat_json_la_LIBADD =
430 if BUILD_WITH_LIBYAJL
431 libformat_json_la_CPPFLAGS += $(BUILD_WITH_LIBYAJL_CPPFLAGS)
432 libformat_json_la_LDFLAGS += $(BUILD_WITH_LIBYAJL_LDFLAGS)
433 libformat_json_la_LIBADD += $(BUILD_WITH_LIBYAJL_LIBS)
435 check_PROGRAMS += test_format_json
437 test_format_json_SOURCES = \
438 src/utils/format_json/format_json_test.c \
440 test_format_json_LDADD = \
448 test_plugin_ceph_SOURCES = src/ceph_test.c
449 test_plugin_ceph_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
450 test_plugin_ceph_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
451 test_plugin_ceph_LDADD = libplugin_mock.la $(BUILD_WITH_LIBYAJL_LIBS)
452 check_PROGRAMS += test_plugin_ceph
455 liblatency_la_SOURCES = \
456 src/utils/latency/latency.c \
457 src/utils/latency/latency.h \
458 src/utils/latency/latency_config.c \
459 src/utils/latency/latency_config.h
460 liblatency_la_LIBADD = \
464 test_utils_latency_SOURCES = \
465 src/utils/latency/latency_test.c \
467 test_utils_latency_LDADD = \
472 libcmds_la_SOURCES = \
473 src/utils/cmds/cmds.c \
474 src/utils/cmds/cmds.h \
475 src/utils/cmds/flush.c \
476 src/utils/cmds/flush.h \
477 src/utils/cmds/getthreshold.c \
478 src/utils/cmds/getthreshold.h \
479 src/utils/cmds/getval.c \
480 src/utils/cmds/getval.h \
481 src/utils/cmds/listval.c \
482 src/utils/cmds/listval.h \
483 src/utils/cmds/putnotif.c \
484 src/utils/cmds/putnotif.h \
485 src/utils/cmds/putval.c \
486 src/utils/cmds/putval.h \
487 src/utils/cmds/parse_option.c \
488 src/utils/cmds/parse_option.h
489 libcmds_la_LIBADD = \
494 test_utils_cmds_SOURCES = \
495 src/utils/cmds/cmds_test.c \
497 test_utils_cmds_LDADD = \
501 liblookup_la_SOURCES = \
502 src/utils/lookup/vl_lookup.c \
503 src/utils/lookup/vl_lookup.h
504 liblookup_la_LIBADD = libavltree.la
506 test_utils_vl_lookup_SOURCES = \
507 src/utils/lookup/vl_lookup_test.c \
509 test_utils_vl_lookup_LDADD = \
512 if BUILD_WITH_LIBKSTAT
513 test_utils_vl_lookup_LDADD += -lkstat
516 libmount_la_SOURCES = \
517 src/utils/mount/mount.c \
518 src/utils/mount/mount.h
520 test_utils_mount_SOURCES = \
521 src/utils/mount/mount_test.c \
523 test_utils_mount_LDADD = \
526 if BUILD_WITH_LIBKSTAT
527 test_utils_mount_LDADD += -lkstat
531 libcollectdclient_la_SOURCES = \
532 src/libcollectdclient/client.c \
533 src/libcollectdclient/network.c \
534 src/libcollectdclient/network_buffer.c \
535 src/libcollectdclient/network_parse.c \
536 src/libcollectdclient/server.c \
537 src/libcollectdclient/collectd/stdendian.h
538 libcollectdclient_la_CPPFLAGS = \
540 -I$(srcdir)/src/libcollectdclient \
541 -I$(top_builddir)/src/libcollectdclient \
542 -I$(srcdir)/src/daemon
543 libcollectdclient_la_LDFLAGS = -version-info 2:0:1
544 libcollectdclient_la_LIBADD = -lm
546 libcollectdclient_la_LDFLAGS += -shared -no-undefined
547 libcollectdclient_la_LIBADD += -lgnu -lws2_32 -liphlpapi
549 if BUILD_WITH_LIBGCRYPT
550 libcollectdclient_la_CPPFLAGS += $(GCRYPT_CPPFLAGS)
551 libcollectdclient_la_LDFLAGS += $(GCRYPT_LDFLAGS)
552 libcollectdclient_la_LIBADD += $(GCRYPT_LIBS)
555 # network_parse_test.c includes network_parse.c, so no need to link with
556 # libcollectdclient.so.
557 test_libcollectd_network_parse_SOURCES = src/libcollectdclient/network_parse_test.c
558 test_libcollectd_network_parse_CPPFLAGS = \
560 -I$(srcdir)/src/libcollectdclient \
561 -I$(top_builddir)/src/libcollectdclient
562 if BUILD_WITH_LIBGCRYPT
563 test_libcollectd_network_parse_CPPFLAGS += $(GCRYPT_CPPFLAGS)
564 test_libcollectd_network_parse_LDFLAGS = $(GCRYPT_LDFLAGS)
565 test_libcollectd_network_parse_LDADD = $(GCRYPT_LIBS)
568 liboconfig_la_SOURCES = \
569 src/liboconfig/oconfig.c \
570 src/liboconfig/oconfig.h \
571 src/liboconfig/aux_types.h \
572 src/liboconfig/scanner.l \
573 src/liboconfig/parser.y
574 liboconfig_la_CPPFLAGS = -I$(srcdir)/src/liboconfig $(AM_CPPFLAGS)
575 liboconfig_la_LDFLAGS = -avoid-version $(LEXLIB)
577 if BUILD_WITH_LIBCURL
579 if BUILD_WITH_LIBYAJL2
580 noinst_LTLIBRARIES += liboauth.la
581 liboauth_la_SOURCES = \
582 src/utils/oauth/oauth.c \
583 src/utils/oauth/oauth.h
584 liboauth_la_CPPFLAGS = \
586 $(BUILD_WITH_LIBCURL_CFLAGS) \
587 $(BUILD_WITH_LIBSSL_CFLAGS) \
588 $(BUILD_WITH_LIBYAJL_CPPFLAGS)
589 liboauth_la_LIBADD = \
590 $(BUILD_WITH_LIBCURL_LIBS) \
591 $(BUILD_WITH_LIBSSL_LIBS) \
592 $(BUILD_WITH_LIBYAJL_LIBS)
594 check_PROGRAMS += test_utils_oauth
595 TESTS += test_utils_oauth
596 test_utils_oauth_SOURCES = \
597 src/utils/oauth/oauth_test.c
598 test_utils_oauth_LDADD = \
603 noinst_LTLIBRARIES += libgce.la
604 libgce_la_SOURCES = \
605 src/utils/gce/gce.c \
607 libgce_la_CPPFLAGS = \
609 $(BUILD_WITH_LIBCURL_CFLAGS)
611 $(BUILD_WITH_LIBCURL_LIBS)
616 if BUILD_WITH_LIBYAJL2
617 noinst_LTLIBRARIES += libformat_stackdriver.la
618 libformat_stackdriver_la_SOURCES = \
619 src/utils/format_stackdriver/format_stackdriver.c \
620 src/utils/format_stackdriver/format_stackdriver.h
621 libformat_stackdriver_la_CPPFLAGS = \
623 $(BUILD_WITH_LIBYAJL_CPPFLAGS)
624 libformat_stackdriver_la_LIBADD = \
626 $(BUILD_WITH_LIBSSL_LIBS) \
627 $(BUILD_WITH_LIBYAJL_LIBS)
629 check_PROGRAMS += test_format_stackdriver
630 TESTS += test_format_stackdriver
631 test_format_stackdriver_SOURCES = \
632 src/utils/format_stackdriver/format_stackdriver_test.c \
634 test_format_stackdriver_LDADD = \
635 libformat_stackdriver.la \
640 if BUILD_PLUGIN_AGGREGATION
641 pkglib_LTLIBRARIES += aggregation.la
642 aggregation_la_SOURCES = \
644 src/utils/lookup/vl_lookup.c \
645 src/utils/lookup/vl_lookup.h
646 aggregation_la_LDFLAGS = $(PLUGIN_LDFLAGS)
647 aggregation_la_LIBADD = -lm
651 pkglib_LTLIBRARIES += amqp.la
652 amqp_la_SOURCES = src/amqp.c
653 amqp_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBRABBITMQ_CPPFLAGS)
654 amqp_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRABBITMQ_LDFLAGS)
656 $(BUILD_WITH_LIBRABBITMQ_LIBS) \
658 libformat_graphite.la \
662 if BUILD_PLUGIN_AMQP1
663 pkglib_LTLIBRARIES += amqp1.la
667 amqp1_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBQPIDPROTON_CPPFLAGS)
668 amqp1_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBQPIDPROTON_LDFLAGS)
670 $(BUILD_WITH_LIBQPIDPROTON_LIBS) \
672 libformat_graphite.la \
676 if BUILD_PLUGIN_APACHE
677 pkglib_LTLIBRARIES += apache.la
678 apache_la_SOURCES = src/apache.c
679 apache_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS)
680 apache_la_LDFLAGS = $(PLUGIN_LDFLAGS)
681 apache_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS)
685 if BUILD_PLUGIN_APCUPS
686 pkglib_LTLIBRARIES += apcups.la
687 apcups_la_SOURCES = src/apcups.c
688 apcups_la_LDFLAGS = $(PLUGIN_LDFLAGS)
690 if BUILD_WITH_LIBSOCKET
691 apcups_la_LIBADD += -lsocket
695 if BUILD_PLUGIN_APPLE_SENSORS
696 pkglib_LTLIBRARIES += apple_sensors.la
697 apple_sensors_la_SOURCES = src/apple_sensors.c
698 apple_sensors_la_LDFLAGS = $(PLUGIN_LDFLAGS) -framework IOKit
701 if BUILD_PLUGIN_AQUAERO
702 pkglib_LTLIBRARIES += aquaero.la
703 aquaero_la_SOURCES = src/aquaero.c
704 aquaero_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBAQUAERO5_CFLAGS)
705 aquaero_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBAQUAERO5_LDFLAGS)
706 aquaero_la_LIBADD = -laquaero5
709 if BUILD_PLUGIN_ASCENT
710 pkglib_LTLIBRARIES += ascent.la
711 ascent_la_SOURCES = src/ascent.c
714 $(BUILD_WITH_LIBCURL_CFLAGS) \
715 $(BUILD_WITH_LIBXML2_CFLAGS)
716 ascent_la_LDFLAGS = $(PLUGIN_LDFLAGS)
718 $(BUILD_WITH_LIBCURL_LIBS) \
719 $(BUILD_WITH_LIBXML2_LIBS)
722 if BUILD_PLUGIN_BAROMETER
723 pkglib_LTLIBRARIES += barometer.la
724 barometer_la_SOURCES = src/barometer.c
725 barometer_la_LDFLAGS = $(PLUGIN_LDFLAGS)
726 barometer_la_LIBADD = -lm $(BUILD_WITH_LIBI2C_LIBS)
729 if BUILD_PLUGIN_BATTERY
730 pkglib_LTLIBRARIES += battery.la
731 battery_la_SOURCES = \
733 src/battery_statefs.c
734 battery_la_LDFLAGS = $(PLUGIN_LDFLAGS)
735 if BUILD_WITH_LIBIOKIT
736 battery_la_LDFLAGS += -framework IOKit
741 pkglib_LTLIBRARIES += bind.la
742 bind_la_SOURCES = src/bind.c
743 bind_la_CFLAGS = $(AM_CFLAGS) \
744 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
745 bind_la_LDFLAGS = $(PLUGIN_LDFLAGS)
746 bind_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
750 pkglib_LTLIBRARIES += ceph.la
751 ceph_la_SOURCES = src/ceph.c
752 ceph_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
753 ceph_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
754 ceph_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
757 if BUILD_PLUGIN_CGROUPS
758 pkglib_LTLIBRARIES += cgroups.la
759 cgroups_la_SOURCES = src/cgroups.c
760 cgroups_la_LDFLAGS = $(PLUGIN_LDFLAGS)
761 cgroups_la_LIBADD = libignorelist.la libmount.la
764 if BUILD_PLUGIN_CHRONY
765 pkglib_LTLIBRARIES += chrony.la
766 chrony_la_SOURCES = src/chrony.c
767 chrony_la_LDFLAGS = $(PLUGIN_LDFLAGS)
768 chrony_la_LIBADD = -lm
771 if BUILD_PLUGIN_CHECK_UPTIME
772 pkglib_LTLIBRARIES += check_uptime.la
773 check_uptime_la_SOURCES = src/check_uptime.c
774 check_uptime_la_LDFLAGS = $(PLUGIN_LDFLAGS)
777 if BUILD_PLUGIN_CONNECTIVITY
778 pkglib_LTLIBRARIES += connectivity.la
779 connectivity_la_SOURCES = src/connectivity.c
780 connectivity_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMNL_CFLAGS)
781 connectivity_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
782 connectivity_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
783 connectivity_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS) $(BUILD_WITH_LIBMNL_LIBS) libignorelist.la
786 if BUILD_PLUGIN_CONNTRACK
787 pkglib_LTLIBRARIES += conntrack.la
788 conntrack_la_SOURCES = src/conntrack.c
789 conntrack_la_LDFLAGS = $(PLUGIN_LDFLAGS)
792 if BUILD_PLUGIN_CONTEXTSWITCH
793 pkglib_LTLIBRARIES += contextswitch.la
794 contextswitch_la_SOURCES = src/contextswitch.c
795 contextswitch_la_LDFLAGS = $(PLUGIN_LDFLAGS)
796 contextswitch_la_LIBADD =
797 if BUILD_WITH_PERFSTAT
798 contextswitch_la_LIBADD += -lperfstat
803 pkglib_LTLIBRARIES += cpu.la
804 cpu_la_SOURCES = src/cpu.c
805 cpu_la_CFLAGS = $(AM_CFLAGS)
806 cpu_la_LDFLAGS = $(PLUGIN_LDFLAGS)
808 if BUILD_WITH_LIBKSTAT
809 cpu_la_LIBADD += -lkstat
811 if BUILD_WITH_LIBDEVINFO
812 cpu_la_LIBADD += -ldevinfo
814 if BUILD_WITH_LIBSTATGRAB
815 cpu_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
816 cpu_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
818 if BUILD_WITH_PERFSTAT
819 cpu_la_LIBADD += -lperfstat
823 if BUILD_PLUGIN_CPUFREQ
824 pkglib_LTLIBRARIES += cpufreq.la
825 cpufreq_la_SOURCES = src/cpufreq.c
826 cpufreq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
829 if BUILD_PLUGIN_CPUSLEEP
830 pkglib_LTLIBRARIES += cpusleep.la
831 cpusleep_la_SOURCES = src/cpusleep.c
832 cpusleep_la_LDFLAGS = $(PLUGIN_LDFLAGS)
836 pkglib_LTLIBRARIES += csv.la
837 csv_la_SOURCES = src/csv.c
838 csv_la_LDFLAGS = $(PLUGIN_LDFLAGS)
842 pkglib_LTLIBRARIES += curl.la
845 src/utils/curl_stats/curl_stats.c \
846 src/utils/curl_stats/curl_stats.h \
847 src/utils/match/match.c \
848 src/utils/match/match.h
849 curl_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS)
850 curl_la_LDFLAGS = $(PLUGIN_LDFLAGS)
851 curl_la_LIBADD = liblatency.la $(BUILD_WITH_LIBCURL_LIBS)
854 if BUILD_PLUGIN_CURL_JSON
855 pkglib_LTLIBRARIES += curl_json.la
856 curl_json_la_SOURCES = \
858 src/utils/curl_stats/curl_stats.c \
859 src/utils/curl_stats/curl_stats.h
860 curl_json_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS)
861 curl_json_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
862 curl_json_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
863 curl_json_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBYAJL_LIBS)
865 test_plugin_curl_json_SOURCES = src/curl_json_test.c \
866 src/utils/curl_stats/curl_stats.c \
867 src/daemon/configfile.c \
868 src/daemon/types_list.c
869 test_plugin_curl_json_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
870 test_plugin_curl_json_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
871 test_plugin_curl_json_LDADD = libavltree.la liboconfig.la libplugin_mock.la $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBYAJL_LIBS)
872 check_PROGRAMS += test_plugin_curl_json
875 if BUILD_PLUGIN_CURL_XML
876 pkglib_LTLIBRARIES += curl_xml.la
877 curl_xml_la_SOURCES = \
879 src/utils/curl_stats/curl_stats.c \
880 src/utils/curl_stats/curl_stats.h
881 curl_xml_la_CFLAGS = $(AM_CFLAGS) \
882 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
883 curl_xml_la_LDFLAGS = $(PLUGIN_LDFLAGS)
884 curl_xml_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
888 pkglib_LTLIBRARIES += dbi.la
891 src/utils/db_query/db_query.c \
892 src/utils/db_query/db_query.h
893 dbi_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBDBI_CPPFLAGS)
894 dbi_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBDBI_LDFLAGS)
895 dbi_la_LIBADD = $(BUILD_WITH_LIBDBI_LIBS)
899 pkglib_LTLIBRARIES += df.la
900 df_la_SOURCES = src/df.c
901 df_la_LDFLAGS = $(PLUGIN_LDFLAGS)
902 df_la_LIBADD = libignorelist.la libmount.la
906 pkglib_LTLIBRARIES += disk.la
907 disk_la_SOURCES = src/disk.c
908 disk_la_CFLAGS = $(AM_CFLAGS)
909 disk_la_CPPFLAGS = $(AM_CPPFLAGS)
910 disk_la_LDFLAGS = $(PLUGIN_LDFLAGS)
911 disk_la_LIBADD = libignorelist.la
912 if BUILD_WITH_LIBKSTAT
913 disk_la_LIBADD += -lkstat
915 if BUILD_WITH_LIBDEVINFO
916 disk_la_LIBADD += -ldevinfo
918 if BUILD_WITH_LIBIOKIT
919 disk_la_LDFLAGS += -framework IOKit
921 if BUILD_WITH_LIBSTATGRAB
922 disk_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
923 disk_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
925 if BUILD_WITH_LIBUDEV
926 disk_la_CPPFLAGS += $(BUILD_WITH_LIBUDEV_CPPFLAGS)
927 disk_la_LDFLAGS += $(BUILD_WITH_LIBUDEV_LDFLAGS)
928 disk_la_LIBADD += $(BUILD_WITH_LIBUDEV_LIBS)
931 disk_la_LIBADD += -ldevstat -lgeom
933 if BUILD_WITH_PERFSTAT
934 disk_la_LIBADD += -lperfstat
939 pkglib_LTLIBRARIES += dns.la
942 src/utils/dns/dns.c \
944 dns_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPCAP_CPPFLAGS)
945 dns_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBPCAP_LDFLAGS)
946 dns_la_LIBADD = $(BUILD_WITH_LIBPCAP_LIBS)
949 if BUILD_PLUGIN_DPDKEVENTS
950 pkglib_LTLIBRARIES += dpdkevents.la
951 dpdkevents_la_SOURCES = src/dpdkevents.c src/utils/dpdk/dpdk.c src/utils/dpdk/dpdk.h
952 dpdkevents_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBDPDK_CPPFLAGS)
953 dpdkevents_la_CFLAGS = $(AM_CFLAGS) $(LIBDPDK_CFLAGS)
954 dpdkevents_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBDPDK_LDFLAGS)
955 dpdkevents_la_LIBADD = $(LIBDPDK_LIBS)
958 if BUILD_PLUGIN_DPDKSTAT
959 pkglib_LTLIBRARIES += dpdkstat.la
960 dpdkstat_la_SOURCES = src/dpdkstat.c src/utils/dpdk/dpdk.c src/utils/dpdk/dpdk.h
961 dpdkstat_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBDPDK_CPPFLAGS)
962 dpdkstat_la_CFLAGS = $(AM_CFLAGS) $(LIBDPDK_CFLAGS)
963 dpdkstat_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBDPDK_LDFLAGS)
964 dpdkstat_la_LIBADD = $(LIBDPDK_LIBS)
968 pkglib_LTLIBRARIES += drbd.la
969 drbd_la_SOURCES = src/drbd.c
970 drbd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
973 if BUILD_PLUGIN_EMAIL
974 pkglib_LTLIBRARIES += email.la
975 email_la_SOURCES = src/email.c
976 email_la_LDFLAGS = $(PLUGIN_LDFLAGS)
979 if BUILD_PLUGIN_ENTROPY
980 pkglib_LTLIBRARIES += entropy.la
981 entropy_la_SOURCES = src/entropy.c
982 entropy_la_LDFLAGS = $(PLUGIN_LDFLAGS)
986 pkglib_LTLIBRARIES += exec.la
987 exec_la_SOURCES = src/exec.c
988 exec_la_LDFLAGS = $(PLUGIN_LDFLAGS)
989 exec_la_LIBADD = libcmds.la
992 if BUILD_PLUGIN_ETHSTAT
993 pkglib_LTLIBRARIES += ethstat.la
994 ethstat_la_SOURCES = src/ethstat.c
995 ethstat_la_LDFLAGS = $(PLUGIN_LDFLAGS)
998 if BUILD_PLUGIN_FHCOUNT
999 pkglib_LTLIBRARIES += fhcount.la
1000 fhcount_la_SOURCES = src/fhcount.c
1001 fhcount_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1004 if BUILD_PLUGIN_FILECOUNT
1005 pkglib_LTLIBRARIES += filecount.la
1006 filecount_la_SOURCES = src/filecount.c
1007 filecount_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1010 if BUILD_PLUGIN_FSCACHE
1011 pkglib_LTLIBRARIES += fscache.la
1012 fscache_la_SOURCES = src/fscache.c
1013 fscache_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1016 if BUILD_PLUGIN_GMOND
1017 pkglib_LTLIBRARIES += gmond.la
1018 gmond_la_SOURCES = src/gmond.c
1019 gmond_la_CPPFLAGS = $(AM_CPPFLAGS) $(GANGLIA_CPPFLAGS)
1020 gmond_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(GANGLIA_LDFLAGS)
1021 gmond_la_LIBADD = $(GANGLIA_LIBS)
1025 pkglib_LTLIBRARIES += gps.la
1026 gps_la_SOURCES = src/gps.c
1027 gps_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBGPS_CFLAGS)
1028 gps_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBGPS_LDFLAGS)
1029 gps_la_LIBADD = -lpthread $(BUILD_WITH_LIBGPS_LIBS)
1032 if BUILD_PLUGIN_GPU_NVIDIA
1033 pkglib_LTLIBRARIES += gpu_nvidia.la
1034 gpu_nvidia_la_SOURCES = src/gpu_nvidia.c
1035 gpu_nvidia_la_CPPFLAGS = $(PLUGIN_CPPFLAGS) $(BUILD_WITH_GPU_CUDA_CPPFLAGS)
1036 gpu_nvidia_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_GPU_CUDA_LDFLAGS)
1037 gpu_nvidia_la_LIBADD = $(BUILD_WITH_CUDA_LIBS)
1040 if BUILD_PLUGIN_GRPC
1041 pkglib_LTLIBRARIES += grpc.la
1042 grpc_la_SOURCES = src/grpc.cc
1043 nodist_grpc_la_SOURCES = \
1044 collectd.grpc.pb.cc \
1047 grpc_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBGRPCPP_CPPFLAGS) $(BUILD_WITH_LIBPROTOBUF_CPPFLAGS)
1048 grpc_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBGRPCPP_LDFLAGS) $(BUILD_WITH_LIBPROTOBUF_LDFLAGS)
1049 grpc_la_LIBADD = $(BUILD_WITH_LIBGRPCPP_LIBS) $(BUILD_WITH_LIBPROTOBUF_LIBS)
1052 if BUILD_PLUGIN_HDDTEMP
1053 pkglib_LTLIBRARIES += hddtemp.la
1054 hddtemp_la_SOURCES = src/hddtemp.c
1055 hddtemp_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1057 if BUILD_WITH_LIBSOCKET
1058 hddtemp_la_LIBADD += -lsocket
1062 if BUILD_PLUGIN_HUGEPAGES
1063 pkglib_LTLIBRARIES += hugepages.la
1064 hugepages_la_SOURCES = src/hugepages.c
1065 hugepages_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1068 if BUILD_PLUGIN_INTEL_PMU
1069 pkglib_LTLIBRARIES += intel_pmu.la
1070 intel_pmu_la_SOURCES = \
1072 src/utils/config_cores/config_cores.h \
1073 src/utils/config_cores/config_cores.c
1074 intel_pmu_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBJEVENTS_CPPFLAGS)
1075 intel_pmu_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBJEVENTS_LDFLAGS)
1076 intel_pmu_la_LIBADD = $(BUILD_WITH_LIBJEVENTS_LIBS)
1079 if BUILD_PLUGIN_INTEL_RDT
1080 pkglib_LTLIBRARIES += intel_rdt.la
1081 intel_rdt_la_SOURCES = \
1083 src/utils/proc_pids/proc_pids.c \
1084 src/utils/proc_pids/proc_pids.h \
1085 src/utils/config_cores/config_cores.h \
1086 src/utils/config_cores/config_cores.c
1087 intel_rdt_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBPQOS_CPPFLAGS)
1088 intel_rdt_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBPQOS_LDFLAGS)
1089 intel_rdt_la_LIBADD = $(BUILD_WITH_LIBPQOS_LIBS)
1091 test_plugin_intel_rdt_SOURCES = \
1092 src/intel_rdt_test.c \
1093 src/utils/config_cores/config_cores.c \
1094 src/utils/proc_pids/proc_pids.c \
1095 src/daemon/configfile.c \
1096 src/daemon/types_list.c
1097 test_plugin_intel_rdt_CPPFLAGS = $(AM_CPPFLAGS)
1098 test_plugin_intel_rdt_LDFLAGS = $(PLUGIN_LDFLAGS)
1099 test_plugin_intel_rdt_LDADD = liboconfig.la libplugin_mock.la
1100 check_PROGRAMS += test_plugin_intel_rdt
1101 TESTS += test_plugin_intel_rdt
1103 test_utils_proc_pids_SOURCES = \
1104 src/utils/proc_pids/proc_pids_test.c \
1106 test_utils_proc_pids_LDADD = libplugin_mock.la
1107 check_PROGRAMS += test_utils_proc_pids
1108 TESTS += test_utils_proc_pids
1111 if BUILD_PLUGIN_INTERFACE
1112 pkglib_LTLIBRARIES += interface.la
1113 interface_la_SOURCES = src/interface.c
1114 interface_la_CFLAGS = $(AM_CFLAGS)
1115 interface_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1116 interface_la_LIBADD = libignorelist.la
1117 if BUILD_WITH_LIBSTATGRAB
1118 interface_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1119 interface_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1121 if BUILD_WITH_LIBKSTAT
1122 interface_la_LIBADD += -lkstat
1124 if BUILD_WITH_LIBDEVINFO
1125 interface_la_LIBADD += -ldevinfo
1126 endif # BUILD_WITH_LIBDEVINFO
1127 endif # !BUILD_WITH_LIBSTATGRAB
1128 if BUILD_WITH_PERFSTAT
1129 interface_la_LIBADD += -lperfstat
1131 endif # BUILD_PLUGIN_INTERFACE
1134 pkglib_LTLIBRARIES += ipc.la
1135 ipc_la_SOURCES = src/ipc.c
1136 ipc_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1139 if BUILD_PLUGIN_IPTABLES
1140 pkglib_LTLIBRARIES += iptables.la
1141 iptables_la_SOURCES = src/iptables.c
1142 iptables_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBIPTC_CPPFLAGS)
1143 iptables_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1144 iptables_la_LIBADD = $(BUILD_WITH_LIBIPTC_LDFLAGS)
1147 if BUILD_PLUGIN_IPMI
1148 pkglib_LTLIBRARIES += ipmi.la
1149 ipmi_la_SOURCES = src/ipmi.c
1150 ipmi_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_OPENIPMI_CFLAGS)
1151 ipmi_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1152 ipmi_la_LIBADD = libignorelist.la $(BUILD_WITH_OPENIPMI_LIBS)
1155 if BUILD_PLUGIN_IPVS
1156 pkglib_LTLIBRARIES += ipvs.la
1157 ipvs_la_SOURCES = src/ipvs.c
1158 ipvs_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1162 pkglib_LTLIBRARIES += irq.la
1163 irq_la_SOURCES = src/irq.c
1164 irq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1165 irq_la_LIBADD = libignorelist.la
1168 if BUILD_PLUGIN_JAVA
1169 pkglib_LTLIBRARIES += java.la
1170 java_la_SOURCES = src/java.c
1171 java_la_CPPFLAGS = $(AM_CPPFLAGS) $(JAVA_CPPFLAGS)
1172 java_la_CFLAGS = $(AM_CFLAGS) $(JAVA_CFLAGS)
1173 java_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(JAVA_LDFLAGS)
1174 java_la_LIBADD = $(JAVA_LIBS)
1177 if BUILD_PLUGIN_LOAD
1178 pkglib_LTLIBRARIES += load.la
1179 load_la_SOURCES = src/load.c
1180 load_la_CFLAGS = $(AM_CFLAGS)
1181 load_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1183 if BUILD_WITH_LIBSTATGRAB
1184 load_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1185 load_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1186 endif # BUILD_WITH_LIBSTATGRAB
1187 if BUILD_WITH_PERFSTAT
1188 load_la_LIBADD += -lperfstat
1190 endif # BUILD_PLUGIN_LOAD
1192 if BUILD_PLUGIN_LOGFILE
1193 pkglib_LTLIBRARIES += logfile.la
1194 logfile_la_SOURCES = src/logfile.c
1195 logfile_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1196 logfile_la_DEPENDENCIES = $(COMMON_DEPS)
1199 if BUILD_PLUGIN_LOG_LOGSTASH
1200 pkglib_LTLIBRARIES += log_logstash.la
1201 log_logstash_la_SOURCES = src/log_logstash.c
1202 log_logstash_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
1203 log_logstash_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
1204 log_logstash_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
1207 if BUILD_PLUGIN_LPAR
1208 pkglib_LTLIBRARIES += lpar.la
1209 lpar_la_SOURCES = src/lpar.c
1210 lpar_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1211 lpar_la_LIBADD = -lperfstat
1215 pkglib_LTLIBRARIES += lua.la
1220 lua_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBLUA_CFLAGS)
1221 lua_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1222 lua_la_LIBADD = $(BUILD_WITH_LIBLUA_LIBS)
1225 if BUILD_PLUGIN_MADWIFI
1226 pkglib_LTLIBRARIES += madwifi.la
1227 madwifi_la_SOURCES = \
1230 madwifi_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1231 madwifi_la_LIBADD = libignorelist.la
1234 if BUILD_PLUGIN_MATCH_EMPTY_COUNTER
1235 pkglib_LTLIBRARIES += match_empty_counter.la
1236 match_empty_counter_la_SOURCES = src/match_empty_counter.c
1237 match_empty_counter_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1240 if BUILD_PLUGIN_MATCH_HASHED
1241 pkglib_LTLIBRARIES += match_hashed.la
1242 match_hashed_la_SOURCES = src/match_hashed.c
1243 match_hashed_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1246 if BUILD_PLUGIN_MATCH_REGEX
1247 pkglib_LTLIBRARIES += match_regex.la
1248 match_regex_la_SOURCES = src/match_regex.c
1249 match_regex_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1252 if BUILD_PLUGIN_MATCH_TIMEDIFF
1253 pkglib_LTLIBRARIES += match_timediff.la
1254 match_timediff_la_SOURCES = src/match_timediff.c
1255 match_timediff_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1258 if BUILD_PLUGIN_MATCH_VALUE
1259 pkglib_LTLIBRARIES += match_value.la
1260 match_value_la_SOURCES = src/match_value.c
1261 match_value_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1264 if BUILD_PLUGIN_MBMON
1265 pkglib_LTLIBRARIES += mbmon.la
1266 mbmon_la_SOURCES = src/mbmon.c
1267 mbmon_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1269 if BUILD_WITH_LIBSOCKET
1270 mbmon_la_LIBADD += -lsocket
1274 if BUILD_PLUGIN_MCELOG
1275 pkglib_LTLIBRARIES += mcelog.la
1276 mcelog_la_SOURCES = src/mcelog.c
1277 mcelog_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1281 pkglib_LTLIBRARIES += md.la
1282 md_la_SOURCES = src/md.c
1283 md_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1284 md_la_LIBADD = libignorelist.la
1287 if BUILD_PLUGIN_MEMCACHEC
1288 pkglib_LTLIBRARIES += memcachec.la
1289 memcachec_la_SOURCES = \
1291 src/utils/match/match.c \
1292 src/utils/match/match.h
1293 memcachec_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMEMCACHED_CPPFLAGS)
1294 memcachec_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMEMCACHED_LDFLAGS)
1295 memcachec_la_LIBADD = liblatency.la $(BUILD_WITH_LIBMEMCACHED_LIBS)
1298 if BUILD_PLUGIN_MEMCACHED
1299 pkglib_LTLIBRARIES += memcached.la
1300 memcached_la_SOURCES = src/memcached.c
1301 memcached_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1302 memcached_la_LIBADD =
1303 if BUILD_WITH_LIBSOCKET
1304 memcached_la_LIBADD += -lsocket
1308 if BUILD_PLUGIN_MEMORY
1309 pkglib_LTLIBRARIES += memory.la
1310 memory_la_SOURCES = src/memory.c
1311 memory_la_CFLAGS = $(AM_CFLAGS)
1312 memory_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1314 if BUILD_WITH_LIBKSTAT
1315 memory_la_LIBADD += -lkstat
1317 if BUILD_WITH_LIBDEVINFO
1318 memory_la_LIBADD += -ldevinfo
1320 if BUILD_WITH_LIBSTATGRAB
1321 memory_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1322 memory_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1324 if BUILD_WITH_PERFSTAT
1325 memory_la_LIBADD += -lperfstat
1330 pkglib_LTLIBRARIES += mic.la
1331 mic_la_SOURCES = src/mic.c
1332 mic_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_MIC_CPPFLAGS)
1333 mic_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_MIC_LDFLAGS)
1334 mic_la_LIBADD = libignorelist.la $(BUILD_WITH_MIC_LIBS)
1337 if BUILD_PLUGIN_MODBUS
1338 pkglib_LTLIBRARIES += modbus.la
1339 modbus_la_SOURCES = src/modbus.c
1340 modbus_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMODBUS_CFLAGS)
1341 modbus_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1342 modbus_la_LIBADD = $(BUILD_WITH_LIBMODBUS_LIBS)
1345 if BUILD_PLUGIN_MQTT
1346 pkglib_LTLIBRARIES += mqtt.la
1347 mqtt_la_SOURCES = src/mqtt.c
1348 mqtt_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMOSQUITTO_CPPFLAGS)
1349 mqtt_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMOSQUITTO_LDFLAGS)
1350 mqtt_la_LIBADD = $(BUILD_WITH_LIBMOSQUITTO_LIBS)
1353 if BUILD_PLUGIN_MULTIMETER
1354 pkglib_LTLIBRARIES += multimeter.la
1355 multimeter_la_SOURCES = src/multimeter.c
1356 multimeter_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1359 if BUILD_PLUGIN_MYSQL
1360 pkglib_LTLIBRARIES += mysql.la
1361 mysql_la_SOURCES = src/mysql.c
1362 mysql_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMYSQL_CFLAGS)
1363 mysql_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1364 mysql_la_LIBADD = $(BUILD_WITH_LIBMYSQL_LIBS)
1367 if BUILD_PLUGIN_NETAPP
1368 pkglib_LTLIBRARIES += netapp.la
1369 netapp_la_SOURCES = src/netapp.c
1370 netapp_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBNETAPP_CPPFLAGS)
1371 netapp_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBNETAPP_LDFLAGS)
1372 netapp_la_LIBADD = libignorelist.la $(LIBNETAPP_LIBS)
1375 if BUILD_PLUGIN_NETLINK
1376 pkglib_LTLIBRARIES += netlink.la
1377 netlink_la_SOURCES = src/netlink.c
1378 netlink_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMNL_CFLAGS)
1379 netlink_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1380 netlink_la_LIBADD = $(BUILD_WITH_LIBMNL_LIBS)
1383 if BUILD_PLUGIN_NETWORK
1384 pkglib_LTLIBRARIES += network.la
1385 network_la_SOURCES = \
1388 src/utils_fbhash.c \
1390 network_la_CPPFLAGS = $(AM_CPPFLAGS)
1391 network_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1393 if BUILD_WITH_LIBSOCKET
1394 network_la_LIBADD += -lsocket
1396 if BUILD_WITH_LIBGCRYPT
1397 network_la_CPPFLAGS += $(GCRYPT_CPPFLAGS)
1398 network_la_LDFLAGS += $(GCRYPT_LDFLAGS)
1399 network_la_LIBADD += $(GCRYPT_LIBS)
1402 test_plugin_network_SOURCES = \
1403 src/network_test.c \
1404 src/utils_fbhash.c \
1405 src/daemon/configfile.c \
1406 src/daemon/types_list.c
1407 test_plugin_network_CPPFLAGS = $(AM_CPPFLAGS) $(GCRYPT_CPPFLAGS)
1408 test_plugin_network_LDFLAGS = $(PLUGIN_LDFLAGS) $(GCRYPT_LDFLAGS)
1409 test_plugin_network_LDADD = \
1415 if BUILD_WITH_LIBSOCKET
1416 test_plugin_network_LDADD += -lsocket
1418 if BUILD_WITH_LIBNSL
1419 test_plugin_network_LDADD += -lnsl
1421 check_PROGRAMS += test_plugin_network
1425 pkglib_LTLIBRARIES += nfs.la
1426 nfs_la_SOURCES = src/nfs.c
1427 nfs_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1430 if BUILD_PLUGIN_NGINX
1431 pkglib_LTLIBRARIES += nginx.la
1432 nginx_la_SOURCES = src/nginx.c
1433 nginx_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS)
1434 nginx_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1435 nginx_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS)
1438 if BUILD_PLUGIN_NOTIFY_DESKTOP
1439 pkglib_LTLIBRARIES += notify_desktop.la
1440 notify_desktop_la_SOURCES = src/notify_desktop.c
1441 notify_desktop_la_CFLAGS = $(AM_CFLAGS) $(LIBNOTIFY_CFLAGS)
1442 notify_desktop_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1443 notify_desktop_la_LIBADD = $(LIBNOTIFY_LIBS)
1446 if BUILD_PLUGIN_NOTIFY_EMAIL
1447 pkglib_LTLIBRARIES += notify_email.la
1448 notify_email_la_SOURCES = src/notify_email.c
1449 notify_email_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBESMTP_CPPFLAGS)
1450 notify_email_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBESMTP_LDFLAGS)
1451 notify_email_la_LIBADD = $(BUILD_WITH_LIBESMTP_LIBS)
1454 if BUILD_PLUGIN_NOTIFY_NAGIOS
1455 pkglib_LTLIBRARIES += notify_nagios.la
1456 notify_nagios_la_SOURCES = src/notify_nagios.c
1457 notify_nagios_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1460 if BUILD_PLUGIN_NTPD
1461 pkglib_LTLIBRARIES += ntpd.la
1462 ntpd_la_SOURCES = src/ntpd.c
1463 ntpd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1465 if BUILD_WITH_LIBSOCKET
1466 ntpd_la_LIBADD += -lsocket
1470 if BUILD_PLUGIN_NUMA
1471 pkglib_LTLIBRARIES += numa.la
1472 numa_la_SOURCES = src/numa.c
1473 numa_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1477 pkglib_LTLIBRARIES += nut.la
1478 nut_la_SOURCES = src/nut.c
1479 nut_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
1480 nut_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1481 nut_la_LIBADD = $(BUILD_WITH_LIBUPSCLIENT_LIBS)
1484 if BUILD_PLUGIN_OLSRD
1485 pkglib_LTLIBRARIES += olsrd.la
1486 olsrd_la_SOURCES = src/olsrd.c
1487 olsrd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1489 if BUILD_WITH_LIBSOCKET
1490 olsrd_la_LIBADD += -lsocket
1494 if BUILD_PLUGIN_ONEWIRE
1495 pkglib_LTLIBRARIES += onewire.la
1496 onewire_la_SOURCES = src/onewire.c
1497 onewire_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
1498 onewire_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBOWCAPI_LDFLAGS)
1499 onewire_la_LIBADD = libignorelist.la $(BUILD_WITH_LIBOWCAPI_LIBS)
1502 if BUILD_PLUGIN_OPENLDAP
1503 pkglib_LTLIBRARIES += openldap.la
1504 openldap_la_SOURCES = src/openldap.c
1505 openldap_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBLDAP_CPPFLAGS)
1506 openldap_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBLDAP_LDFLAGS)
1507 openldap_la_LIBADD = -lldap
1510 if BUILD_PLUGIN_OPENVPN
1511 pkglib_LTLIBRARIES += openvpn.la
1512 openvpn_la_SOURCES = src/openvpn.c
1513 openvpn_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1516 if BUILD_PLUGIN_ORACLE
1517 pkglib_LTLIBRARIES += oracle.la
1518 oracle_la_SOURCES = \
1520 src/utils/db_query/db_query.c \
1521 src/utils/db_query/db_query.h
1522 oracle_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_ORACLE_CPPFLAGS)
1523 oracle_la_LIBADD = $(BUILD_WITH_ORACLE_LIBS)
1524 oracle_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1527 if BUILD_PLUGIN_OVS_EVENTS
1528 pkglib_LTLIBRARIES += ovs_events.la
1529 ovs_events_la_SOURCES = \
1531 src/utils/ovs/ovs.c \
1533 ovs_events_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
1534 ovs_events_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
1535 ovs_events_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
1538 if BUILD_PLUGIN_OVS_STATS
1539 pkglib_LTLIBRARIES += ovs_stats.la
1540 ovs_stats_la_SOURCES = \
1542 src/utils/ovs/ovs.c \
1544 ovs_stats_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
1545 ovs_stats_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
1546 ovs_stats_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
1549 if BUILD_PLUGIN_PCIE_ERRORS
1550 pkglib_LTLIBRARIES += pcie_errors.la
1551 pcie_errors_la_SOURCES = src/pcie_errors.c
1552 pcie_errors_la_CPPFLAGS = $(AM_CPPFLAGS)
1553 pcie_errors_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1555 test_plugin_pcie_errors_SOURCES = \
1556 src/pcie_errors_test.c \
1557 src/daemon/utils_llist.c \
1558 src/daemon/configfile.c \
1559 src/daemon/types_list.c
1560 test_plugin_pcie_errors_CPPFLAGS = $(AM_CPPFLAGS)
1561 test_plugin_pcie_errors_LDFLAGS = $(PLUGIN_LDFLAGS)
1562 test_plugin_pcie_errors_LDADD = liboconfig.la libplugin_mock.la
1563 check_PROGRAMS += test_plugin_pcie_errors
1564 TESTS += test_plugin_pcie_errors
1567 if BUILD_PLUGIN_PERL
1568 pkglib_LTLIBRARIES += perl.la
1569 perl_la_SOURCES = src/perl.c
1570 # Despite C99 providing the "bool" type thru stdbool.h, Perl defines its own
1571 # version of that type if HAS_BOOL is not defined... *sigh*
1572 perl_la_CPPFLAGS = $(AM_CPPFLAGS) -DHAS_BOOL=1
1573 # Despite off_t being 64 bit wide on 64 bit platforms, Perl insist on using
1574 # off64_t which is only exposed when _LARGEFILE64_SOURCE is defined... *sigh*
1575 # On older platforms we also need _REENTRANT. _GNU_SOURCE sets both of these.
1576 perl_la_CPPFLAGS += -D_GNU_SOURCE
1577 perl_la_CFLAGS = $(AM_CFLAGS) \
1579 -DXS_VERSION=\"$(VERSION)\" -DVERSION=\"$(VERSION)\"
1580 perl_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(PERL_LDFLAGS)
1581 perl_la_LIBADD = $(PERL_LIBS)
1585 pkglib_LTLIBRARIES += pf.la
1586 pf_la_SOURCES = src/pf.c
1587 pf_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1590 if BUILD_PLUGIN_PINBA
1591 pkglib_LTLIBRARIES += pinba.la
1592 pinba_la_SOURCES = src/pinba.c
1593 nodist_pinba_la_SOURCES = \
1596 pinba_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPROTOBUF_C_CPPFLAGS)
1597 pinba_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBPROTOBUF_C_LDFLAGS)
1598 pinba_la_LIBADD = $(BUILD_WITH_LIBPROTOBUF_C_LIBS)
1601 if BUILD_PLUGIN_PING
1602 pkglib_LTLIBRARIES += ping.la
1603 ping_la_SOURCES = src/ping.c
1604 ping_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOPING_CPPFLAGS)
1605 ping_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBOPING_LDFLAGS)
1606 ping_la_LIBADD = -loping -lm
1609 if BUILD_PLUGIN_POSTGRESQL
1610 pkglib_LTLIBRARIES += postgresql.la
1611 postgresql_la_SOURCES = \
1613 src/utils/db_query/db_query.c \
1614 src/utils/db_query/db_query.h
1615 postgresql_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPQ_CPPFLAGS)
1616 postgresql_la_LDFLAGS = $(PLUGIN_LDFLAGS) \
1617 $(BUILD_WITH_LIBPQ_LDFLAGS)
1618 postgresql_la_LIBADD = $(BUILD_WITH_LIBPQ_LIBS)
1621 if BUILD_PLUGIN_POWERDNS
1622 pkglib_LTLIBRARIES += powerdns.la
1623 powerdns_la_SOURCES = src/powerdns.c
1624 powerdns_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1627 if BUILD_PLUGIN_PYTHON
1628 pkglib_LTLIBRARIES += python.la
1629 python_la_SOURCES = \
1634 python_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBPYTHON_CPPFLAGS)
1635 python_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBPYTHON_LDFLAGS)
1639 noinst_LTLIBRARIES += libtaskstats.la
1640 libtaskstats_la_SOURCES = \
1641 src/utils/taskstats/taskstats.c \
1642 src/utils/taskstats/taskstats.h
1643 libtaskstats_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMNL_CFLAGS)
1644 libtaskstats_la_LIBADD = $(BUILD_WITH_LIBMNL_LIBS)
1647 if BUILD_PLUGIN_PROCESSES
1648 pkglib_LTLIBRARIES += processes.la
1649 processes_la_SOURCES = src/processes.c
1650 processes_la_CPPFLAGS = $(AM_CPPFLAGS)
1651 processes_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1652 processes_la_LIBADD =
1653 if BUILD_WITH_LIBKVM_GETPROCS
1654 processes_la_LIBADD += -lkvm
1657 processes_la_CPPFLAGS += -DHAVE_LIBTASKSTATS=1
1658 processes_la_LIBADD += libtaskstats.la
1662 if BUILD_PLUGIN_PROCEVENT
1663 pkglib_LTLIBRARIES += procevent.la
1664 procevent_la_SOURCES = src/procevent.c
1665 procevent_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
1666 procevent_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
1667 procevent_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS) libignorelist.la
1670 if BUILD_PLUGIN_PROTOCOLS
1671 pkglib_LTLIBRARIES += protocols.la
1672 protocols_la_SOURCES = src/protocols.c
1673 protocols_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1674 protocols_la_LIBADD = libignorelist.la
1677 if BUILD_PLUGIN_REDIS
1678 pkglib_LTLIBRARIES += redis.la
1679 redis_la_SOURCES = src/redis.c
1680 redis_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBHIREDIS_CPPFLAGS)
1681 redis_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBHIREDIS_LDFLAGS)
1682 redis_la_LIBADD = -lhiredis
1685 if BUILD_PLUGIN_ROUTEROS
1686 pkglib_LTLIBRARIES += routeros.la
1687 routeros_la_SOURCES = src/routeros.c
1688 routeros_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBROUTEROS_CPPFLAGS)
1689 routeros_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBROUTEROS_LDFLAGS)
1690 routeros_la_LIBADD = -lrouteros
1693 if BUILD_PLUGIN_RRDCACHED
1694 pkglib_LTLIBRARIES += rrdcached.la
1695 rrdcached_la_SOURCES = \
1697 src/utils/rrdcreate/rrdcreate.c \
1698 src/utils/rrdcreate/rrdcreate.h
1699 rrdcached_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
1700 rrdcached_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRRD_LDFLAGS)
1701 rrdcached_la_LIBADD = $(BUILD_WITH_LIBRRD_LIBS)
1704 if BUILD_PLUGIN_RRDTOOL
1705 pkglib_LTLIBRARIES += rrdtool.la
1706 rrdtool_la_SOURCES = \
1708 src/utils/rrdcreate/rrdcreate.c \
1709 src/utils/rrdcreate/rrdcreate.h
1710 rrdtool_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
1711 rrdtool_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRRD_LDFLAGS)
1712 rrdtool_la_LIBADD = $(BUILD_WITH_LIBRRD_LIBS)
1715 if BUILD_PLUGIN_SENSORS
1716 pkglib_LTLIBRARIES += sensors.la
1717 sensors_la_SOURCES = src/sensors.c
1718 sensors_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBSENSORS_CPPFLAGS)
1719 sensors_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBSENSORS_LDFLAGS)
1720 sensors_la_LIBADD = libignorelist.la $(BUILD_WITH_LIBSENSORS_LIBS)
1723 if BUILD_PLUGIN_SERIAL
1724 pkglib_LTLIBRARIES += serial.la
1725 serial_la_SOURCES = src/serial.c
1726 serial_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1729 if BUILD_PLUGIN_SIGROK
1730 pkglib_LTLIBRARIES += sigrok.la
1731 sigrok_la_SOURCES = src/sigrok.c
1732 sigrok_la_CFLAGS = $(AM_CFLAGS) $(LIBSIGROK_CFLAGS)
1733 sigrok_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1734 sigrok_la_LIBADD = $(LIBSIGROK_LIBS)
1737 if BUILD_PLUGIN_SMART
1738 if BUILD_WITH_LIBUDEV
1739 pkglib_LTLIBRARIES += smart.la
1740 smart_la_SOURCES = src/smart.c
1741 smart_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBATASMART_CPPFLAGS) $(BUILD_WITH_LIBUDEV_CPPFLAGS)
1742 smart_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBATASMART_LDFLAGS) $(BUILD_WITH_LIBUDEV_LDFLAGS)
1743 smart_la_LIBADD = libignorelist.la $(BUILD_WITH_LIBATASMART_LIBS) $(BUILD_WITH_LIBUDEV_LIBS)
1747 if BUILD_PLUGIN_SNMP
1748 pkglib_LTLIBRARIES += snmp.la
1749 snmp_la_SOURCES = src/snmp.c
1750 snmp_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBNETSNMP_CPPFLAGS)
1751 snmp_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBNETSNMP_LDFLAGS)
1752 snmp_la_LIBADD = libignorelist.la $(BUILD_WITH_LIBNETSNMP_LIBS)
1755 if BUILD_PLUGIN_SNMP_AGENT
1756 pkglib_LTLIBRARIES += snmp_agent.la
1757 snmp_agent_la_SOURCES = src/snmp_agent.c
1758 snmp_agent_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBNETSNMPAGENT_CPPFLAGS)
1759 snmp_agent_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBNETSNMPAGENT_LDFLAGS)
1760 snmp_agent_la_LIBADD = $(BUILD_WITH_LIBNETSNMPAGENT_LIBS)
1762 test_plugin_snmp_agent_SOURCES = src/snmp_agent_test.c \
1763 src/utils/avltree/avltree.c \
1764 src/daemon/utils_llist.c \
1765 src/daemon/configfile.c \
1766 src/daemon/types_list.c
1767 test_plugin_snmp_agent_CPPFLAGS = $(AM_CPPFLAGS) \
1768 $(BUILD_WITH_LIBNETSNMPAGENT_CPPFLAGS)
1769 test_plugin_snmp_agent_LDFLAGS = $(PLUGIN_LDFLAGS) \
1770 $(BUILD_WITH_LIBNETSNMPAGENT_LDFLAGS)
1771 test_plugin_snmp_agent_LDADD = liboconfig.la libplugin_mock.la \
1772 $(BUILD_WITH_LIBNETSNMPAGENT_LIBS) $(BUILD_WITH_LIBNETSNMP_LIBS)
1774 check_PROGRAMS += test_plugin_snmp_agent
1775 TESTS += test_plugin_snmp_agent
1780 if BUILD_PLUGIN_STATSD
1781 pkglib_LTLIBRARIES += statsd.la
1782 statsd_la_SOURCES = src/statsd.c
1783 statsd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1784 statsd_la_LIBADD = liblatency.la
1787 if BUILD_PLUGIN_SWAP
1788 pkglib_LTLIBRARIES += swap.la
1789 swap_la_SOURCES = src/swap.c
1790 swap_la_CFLAGS = $(AM_CFLAGS)
1791 swap_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1793 if BUILD_WITH_LIBKSTAT
1794 swap_la_LIBADD += -lkstat
1796 if BUILD_WITH_LIBDEVINFO
1797 swap_la_LIBADD += -ldevinfo
1799 if BUILD_WITH_LIBKVM_GETSWAPINFO
1800 swap_la_LIBADD += -lkvm
1802 if BUILD_WITH_LIBSTATGRAB
1803 swap_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1804 swap_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1806 if BUILD_WITH_PERFSTAT
1807 swap_la_LIBADD += -lperfstat
1812 if BUILD_PLUGIN_SYNPROXY
1813 pkglib_LTLIBRARIES += synproxy.la
1814 synproxy_la_SOURCES = src/synproxy.c
1815 synproxy_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1818 if BUILD_PLUGIN_SYSEVENT
1819 pkglib_LTLIBRARIES += sysevent.la
1820 sysevent_la_SOURCES = src/sysevent.c
1821 sysevent_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
1822 sysevent_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
1823 sysevent_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS) libignorelist.la
1826 if BUILD_PLUGIN_SYSLOG
1827 pkglib_LTLIBRARIES += syslog.la
1828 syslog_la_SOURCES = src/syslog.c
1829 syslog_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1832 if BUILD_PLUGIN_TABLE
1833 pkglib_LTLIBRARIES += table.la
1834 table_la_SOURCES = src/table.c
1835 table_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1838 if BUILD_PLUGIN_TAIL
1839 pkglib_LTLIBRARIES += tail.la
1842 src/utils/match/match.c \
1843 src/utils/match/match.h \
1844 src/utils/tail/tail.c \
1845 src/utils/tail/tail.h \
1846 src/utils_tail_match.c \
1847 src/utils_tail_match.h
1848 tail_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1849 tail_la_LIBADD = liblatency.la
1852 if BUILD_PLUGIN_TAIL_CSV
1853 pkglib_LTLIBRARIES += tail_csv.la
1854 tail_csv_la_SOURCES = \
1856 src/utils/tail/tail.c \
1857 src/utils/tail/tail.h
1858 tail_csv_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1861 if BUILD_PLUGIN_TAPE
1862 pkglib_LTLIBRARIES += tape.la
1863 tape_la_SOURCES = src/tape.c
1864 tape_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1865 tape_la_LIBADD = -lkstat -ldevinfo
1868 if BUILD_PLUGIN_TARGET_NOTIFICATION
1869 pkglib_LTLIBRARIES += target_notification.la
1870 target_notification_la_SOURCES = src/target_notification.c
1871 target_notification_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1874 if BUILD_PLUGIN_TARGET_REPLACE
1875 pkglib_LTLIBRARIES += target_replace.la
1876 target_replace_la_SOURCES = src/target_replace.c
1877 target_replace_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1880 if BUILD_PLUGIN_TARGET_SCALE
1881 pkglib_LTLIBRARIES += target_scale.la
1882 target_scale_la_SOURCES = src/target_scale.c
1883 target_scale_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1886 if BUILD_PLUGIN_TARGET_SET
1887 pkglib_LTLIBRARIES += target_set.la
1888 target_set_la_SOURCES = src/target_set.c
1889 target_set_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1892 if BUILD_PLUGIN_TARGET_V5UPGRADE
1893 pkglib_LTLIBRARIES += target_v5upgrade.la
1894 target_v5upgrade_la_SOURCES = src/target_v5upgrade.c
1895 target_v5upgrade_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1898 if BUILD_PLUGIN_TCPCONNS
1899 pkglib_LTLIBRARIES += tcpconns.la
1900 tcpconns_la_SOURCES = src/tcpconns.c
1901 tcpconns_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1902 tcpconns_la_LIBADD =
1903 if BUILD_WITH_LIBKVM_NLIST
1904 tcpconns_la_LIBADD += -lkvm
1908 if BUILD_PLUGIN_TEAMSPEAK2
1909 pkglib_LTLIBRARIES += teamspeak2.la
1910 teamspeak2_la_SOURCES = src/teamspeak2.c
1911 teamspeak2_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1915 pkglib_LTLIBRARIES += ted.la
1916 ted_la_SOURCES = src/ted.c
1917 ted_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1920 if BUILD_PLUGIN_THERMAL
1921 pkglib_LTLIBRARIES += thermal.la
1922 thermal_la_SOURCES = src/thermal.c
1923 thermal_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1924 thermal_la_LIBADD = libignorelist.la
1927 if BUILD_PLUGIN_THRESHOLD
1928 pkglib_LTLIBRARIES += threshold.la
1929 threshold_la_SOURCES = src/threshold.c
1930 threshold_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1933 if BUILD_PLUGIN_TOKYOTYRANT
1934 pkglib_LTLIBRARIES += tokyotyrant.la
1935 tokyotyrant_la_SOURCES = src/tokyotyrant.c
1936 tokyotyrant_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS)
1937 tokyotyrant_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS)
1938 tokyotyrant_la_LIBADD = $(BUILD_WITH_LIBTOKYOTYRANT_LIBS)
1939 if BUILD_WITH_LIBSOCKET
1940 tokyotyrant_la_LIBADD += -lsocket
1944 if BUILD_PLUGIN_TURBOSTAT
1945 pkglib_LTLIBRARIES += turbostat.la
1946 turbostat_la_SOURCES = \
1949 turbostat_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1952 if BUILD_PLUGIN_UNIXSOCK
1953 pkglib_LTLIBRARIES += unixsock.la
1954 unixsock_la_SOURCES = src/unixsock.c
1955 unixsock_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1956 unixsock_la_LIBADD = libcmds.la
1959 if BUILD_PLUGIN_UPTIME
1960 pkglib_LTLIBRARIES += uptime.la
1961 uptime_la_SOURCES = src/uptime.c
1962 uptime_la_CFLAGS = $(AM_CFLAGS)
1963 uptime_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1965 if BUILD_WITH_LIBKSTAT
1966 uptime_la_LIBADD += -lkstat
1968 if BUILD_WITH_PERFSTAT
1969 uptime_la_LIBADD += -lperfstat
1973 if BUILD_PLUGIN_USERS
1974 pkglib_LTLIBRARIES += users.la
1975 users_la_SOURCES = src/users.c
1976 users_la_CFLAGS = $(AM_CFLAGS)
1977 users_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1979 if BUILD_WITH_LIBSTATGRAB
1980 users_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1981 users_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1985 if BUILD_PLUGIN_UUID
1986 pkglib_LTLIBRARIES += uuid.la
1987 uuid_la_SOURCES = src/uuid.c
1988 uuid_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1991 if BUILD_PLUGIN_VARNISH
1992 pkglib_LTLIBRARIES += varnish.la
1993 varnish_la_SOURCES = src/varnish.c
1994 varnish_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBVARNISH_CFLAGS)
1995 varnish_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1996 varnish_la_LIBADD = $(BUILD_WITH_LIBVARNISH_LIBS)
1999 if BUILD_PLUGIN_VIRT
2000 pkglib_LTLIBRARIES += virt.la
2001 virt_la_SOURCES = src/virt.c
2002 virt_la_CFLAGS = $(AM_CFLAGS) \
2003 $(BUILD_WITH_LIBVIRT_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
2004 virt_la_LDFLAGS = $(PLUGIN_LDFLAGS)
2005 virt_la_LIBADD = libignorelist.la $(BUILD_WITH_LIBVIRT_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
2007 test_plugin_virt_SOURCES = src/virt_test.c src/daemon/configfile.c \
2008 src/daemon/types_list.c
2009 test_plugin_virt_CPPFLAGS = $(AM_CPPFLAGS) \
2010 $(BUILD_WITH_LIBVIRT_CPPFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
2011 test_plugin_virt_LDFLAGS = $(PLUGIN_LDFLAGS) \
2012 $(BUILD_WITH_LIBVIRT_LDFLAGS) $(BUILD_WITH_LIBXML2_LDFLAGS)
2013 test_plugin_virt_LDADD = liboconfig.la libplugin_mock.la \
2014 $(BUILD_WITH_LIBVIRT_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
2015 check_PROGRAMS += test_plugin_virt
2016 TESTS += test_plugin_virt
2019 if BUILD_PLUGIN_VMEM
2020 pkglib_LTLIBRARIES += vmem.la
2021 vmem_la_SOURCES = src/vmem.c
2022 vmem_la_LDFLAGS = $(PLUGIN_LDFLAGS)
2025 if BUILD_PLUGIN_VSERVER
2026 pkglib_LTLIBRARIES += vserver.la
2027 vserver_la_SOURCES = src/vserver.c
2028 vserver_la_LDFLAGS = $(PLUGIN_LDFLAGS)
2031 if BUILD_PLUGIN_WIRELESS
2032 pkglib_LTLIBRARIES += wireless.la
2033 wireless_la_SOURCES = src/wireless.c
2034 wireless_la_LDFLAGS = $(PLUGIN_LDFLAGS)
2037 if BUILD_PLUGIN_WRITE_GRAPHITE
2038 pkglib_LTLIBRARIES += write_graphite.la
2039 write_graphite_la_SOURCES = src/write_graphite.c
2040 write_graphite_la_LDFLAGS = $(PLUGIN_LDFLAGS)
2041 write_graphite_la_LIBADD = libformat_graphite.la
2044 if BUILD_PLUGIN_WRITE_HTTP
2045 pkglib_LTLIBRARIES += write_http.la
2046 write_http_la_SOURCES = \
2048 src/utils/format_kairosdb/format_kairosdb.c \
2049 src/utils/format_kairosdb/format_kairosdb.h
2050 write_http_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS)
2051 write_http_la_LDFLAGS = $(PLUGIN_LDFLAGS)
2052 write_http_la_LIBADD = libformat_json.la $(BUILD_WITH_LIBCURL_LIBS)
2055 if BUILD_PLUGIN_WRITE_KAFKA
2056 pkglib_LTLIBRARIES += write_kafka.la
2057 write_kafka_la_SOURCES = src/write_kafka.c
2058 write_kafka_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBRDKAFKA_CPPFLAGS)
2059 write_kafka_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRDKAFKA_LDFLAGS)
2060 write_kafka_la_LIBADD = \
2062 libformat_graphite.la \
2064 $(BUILD_WITH_LIBRDKAFKA_LIBS)
2067 if BUILD_PLUGIN_WRITE_LOG
2068 pkglib_LTLIBRARIES += write_log.la
2069 write_log_la_SOURCES = src/write_log.c
2070 write_log_la_LDFLAGS = $(PLUGIN_LDFLAGS)
2071 write_log_la_LIBADD = libformat_graphite.la libformat_json.la
2074 if BUILD_PLUGIN_WRITE_MONGODB
2075 pkglib_LTLIBRARIES += write_mongodb.la
2076 write_mongodb_la_SOURCES = src/write_mongodb.c
2077 write_mongodb_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMONGOC_CFLAGS)
2078 write_mongodb_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMONGOC_LDFLAGS)
2079 write_mongodb_la_LIBADD = $(BUILD_WITH_LIBMONGOC_LIBS)
2082 if BUILD_PLUGIN_WRITE_PROMETHEUS
2083 pkglib_LTLIBRARIES += write_prometheus.la
2084 write_prometheus_la_SOURCES = src/write_prometheus.c
2085 nodist_write_prometheus_la_SOURCES = \
2088 write_prometheus_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPROTOBUF_C_CPPFLAGS) $(BUILD_WITH_LIBMICROHTTPD_CPPFLAGS)
2089 write_prometheus_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBPROTOBUF_C_LDFLAGS) $(BUILD_WITH_LIBMICROHTTPD_LDFLAGS)
2090 write_prometheus_la_LIBADD = $(BUILD_WITH_LIBPROTOBUF_C_LIBS) $(BUILD_WITH_LIBMICROHTTPD_LIBS)
2093 if BUILD_PLUGIN_WRITE_REDIS
2094 pkglib_LTLIBRARIES += write_redis.la
2095 write_redis_la_SOURCES = src/write_redis.c
2096 write_redis_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBHIREDIS_CPPFLAGS)
2097 write_redis_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBHIREDIS_LDFLAGS)
2098 write_redis_la_LIBADD = -lhiredis
2101 if BUILD_PLUGIN_WRITE_RIEMANN
2102 pkglib_LTLIBRARIES += write_riemann.la
2103 write_riemann_la_SOURCES = \
2104 src/write_riemann.c \
2105 src/write_riemann_threshold.c \
2106 src/write_riemann_threshold.h
2107 write_riemann_la_CFLAGS = $(AM_CFLAGS) $(LIBRIEMANN_CLIENT_CFLAGS)
2108 write_riemann_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBRIEMANN_CLIENT_LIBS)
2111 if BUILD_PLUGIN_WRITE_SENSU
2112 pkglib_LTLIBRARIES += write_sensu.la
2113 write_sensu_la_SOURCES = src/write_sensu.c
2114 write_sensu_la_LDFLAGS = $(PLUGIN_LDFLAGS)
2117 if BUILD_PLUGIN_WRITE_STACKDRIVER
2118 pkglib_LTLIBRARIES += write_stackdriver.la
2119 write_stackdriver_la_SOURCES = src/write_stackdriver.c
2120 write_stackdriver_la_LDFLAGS = $(PLUGIN_LDFLAGS)
2121 write_stackdriver_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS)
2122 write_stackdriver_la_LIBADD = libformat_stackdriver.la libgce.la liboauth.la \
2123 $(BUILD_WITH_LIBCURL_LIBS)
2126 if BUILD_PLUGIN_WRITE_SYSLOG
2127 pkglib_LTLIBRARIES += write_syslog.la
2128 write_syslog_la_SOURCES = src/write_syslog.c
2129 write_syslog_la_LDFLAGS = $(PLUGIN_LDFLAGS)
2132 if BUILD_PLUGIN_WRITE_TSDB
2133 pkglib_LTLIBRARIES += write_tsdb.la
2134 write_tsdb_la_SOURCES = src/write_tsdb.c
2135 write_tsdb_la_LDFLAGS = $(PLUGIN_LDFLAGS)
2138 if BUILD_PLUGIN_XENCPU
2139 pkglib_LTLIBRARIES += xencpu.la
2140 xencpu_la_SOURCES = src/xencpu.c
2141 xencpu_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBXENCTL_CPPFLAGS)
2142 xencpu_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBXENCTL_LDFLAGS)
2143 xencpu_la_LIBADD = -lxenctrl
2146 if BUILD_PLUGIN_XMMS
2147 pkglib_LTLIBRARIES += xmms.la
2148 xmms_la_SOURCES = src/xmms.c
2149 xmms_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBXMMS_CFLAGS)
2150 xmms_la_LDFLAGS = $(PLUGIN_LDFLAGS)
2151 xmms_la_LIBADD = $(BUILD_WITH_LIBXMMS_LIBS)
2154 if BUILD_PLUGIN_ZFS_ARC
2155 pkglib_LTLIBRARIES += zfs_arc.la
2156 zfs_arc_la_SOURCES = src/zfs_arc.c
2157 zfs_arc_la_LDFLAGS = $(PLUGIN_LDFLAGS)
2159 zfs_arc_la_LIBADD = -lm
2162 zfs_arc_la_LIBADD = -lkstat
2166 if BUILD_PLUGIN_ZOOKEEPER
2167 pkglib_LTLIBRARIES += zookeeper.la
2168 zookeeper_la_SOURCES = src/zookeeper.c
2169 zookeeper_la_LDFLAGS = $(PLUGIN_LDFLAGS)
2172 if BUILD_PLUGIN_ZONE
2173 pkglib_LTLIBRARIES += zone.la
2174 zone_la_SOURCES = src/zone.c
2175 zone_la_LDFLAGS = $(PLUGIN_LDFLAGS)
2178 AM_V_POD2MAN_C = $(am__v_POD2MAN_C_@AM_V@)
2179 am__v_POD2MAN_C_ = $(am__v_POD2MAN_C_@AM_DEFAULT_V@)
2180 am__v_POD2MAN_C_0 = @echo " POD2MAN " $@;
2184 $(AM_V_POD2MAN_C)pod2man --release=$(VERSION) --center=$(PACKAGE) $< $@
2187 $(AM_V_POD2MAN_C)pod2man --section=5 --release=$(VERSION) --center=$(PACKAGE) $< $@
2189 V_PROTOC = $(v_protoc_@AM_V@)
2190 v_protoc_ = $(v_protoc_@AM_DEFAULT_V@)
2191 v_protoc_0 = @echo " PROTOC " $@;
2193 AM_V_PROTOC_C = $(am__v_PROTOC_C_@AM_V@)
2194 am__v_PROTOC_C_ = $(am__v_PROTOC_C_@AM_DEFAULT_V@)
2195 am__v_PROTOC_C_0 = @echo " PROTOC-C" $@;
2198 # Protocol buffer for the "pinba" plugin.
2199 if BUILD_PLUGIN_PINBA
2200 BUILT_SOURCES += src/pinba.pb-c.c src/pinba.pb-c.h
2202 src/pinba.pb-c.c src/pinba.pb-c.h: $(srcdir)/src/pinba.proto
2203 $(AM_V_PROTOC_C)$(PROTOC_C) -I$(srcdir) --c_out . $(srcdir)/src/pinba.proto
2206 # Protocol buffer for the "write_prometheus" plugin.
2207 if BUILD_PLUGIN_WRITE_PROMETHEUS
2208 BUILT_SOURCES += prometheus.pb-c.c prometheus.pb-c.h
2210 prometheus.pb-c.c prometheus.pb-c.h: $(srcdir)/proto/prometheus.proto
2211 $(AM_V_PROTOC_C)$(PROTOC_C) -I$(srcdir)/proto --c_out=$(builddir) $(srcdir)/proto/prometheus.proto
2216 BUILT_SOURCES += collectd.grpc.pb.cc collectd.pb.cc types.pb.cc
2218 collectd.grpc.pb.cc: $(srcdir)/proto/collectd.proto $(srcdir)/proto/types.proto
2219 $(V_PROTOC)$(PROTOC) -I$(srcdir)/proto \
2220 --grpc_out=$(builddir) --plugin=protoc-gen-grpc=$(GRPC_CPP_PLUGIN) $<
2222 collectd.pb.cc: $(srcdir)/proto/collectd.proto $(srcdir)/proto/types.proto
2223 $(V_PROTOC)$(PROTOC) -I$(srcdir)/proto --cpp_out=$(builddir) $<
2225 types.pb.cc: $(srcdir)/proto/types.proto
2226 $(V_PROTOC)$(PROTOC) -I$(srcdir)/proto --cpp_out=$(builddir) $<
2231 $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run
2232 $(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/$(PACKAGE_NAME)
2233 $(mkinstalldirs) $(DESTDIR)$(localstatedir)/log
2234 $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
2235 if test -e $(DESTDIR)$(sysconfdir)/collectd.conf; \
2237 $(INSTALL) -m 0640 $(builddir)/src/collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf.pkg-orig; \
2239 $(INSTALL) -m 0640 $(builddir)/src/collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf; \
2241 $(mkinstalldirs) $(DESTDIR)$(cpkgdatadir)
2242 $(INSTALL) -m 0644 $(srcdir)/src/types.db $(DESTDIR)$(cpkgdatadir)/types.db;
2243 $(INSTALL) -m 0644 $(srcdir)/src/postgresql_default.conf \
2244 $(DESTDIR)$(cpkgdatadir)/postgresql_default.conf;
2247 rm -f $(DESTDIR)$(cpkgdatadir)/types.db;
2248 rm -f $(DESTDIR)$(sysconfdir)/collectd.conf
2249 rm -f $(DESTDIR)$(cpkgdatadir)/postgresql_default.conf;
2251 all-local: @PERL_BINDINGS@
2254 [ ! -f buildperl/Makefile ] || ( cd buildperl && $(MAKE) install )
2256 # Perl 'make uninstall' does not work as well as wanted.
2257 # So we do the work here.
2259 @PERL@ -I$(DESTDIR)$(prefix) $(srcdir)/bindings/perl/uninstall_mod.pl Collectd
2260 find $(DESTDIR)$(prefix) -name "perllocal.pod" -exec rm {} \;
2265 perl: buildperl/Makefile
2266 cd buildperl && $(MAKE)
2268 buildperl/Makefile: .perl-directory-stamp buildperl/Makefile.PL \
2269 $(top_builddir)/config.status
2270 @# beautify the output a bit
2271 @echo 'cd buildperl && @PERL@ Makefile.PL @PERL_BINDINGS_OPTIONS@'
2272 @cd buildperl && ( if ! @PERL@ Makefile.PL @PERL_BINDINGS_OPTIONS@; then \
2274 echo 'Check whether you have set $$PERL_MM_OPT in your environment and try using ./configure --with-perl-bindings=""'; \
2278 buildperl/Makefile.PL: .perl-directory-stamp $(top_builddir)/config.status
2280 .perl-directory-stamp:
2281 if test ! -d buildperl; then \
2282 mkdir -p buildperl/Collectd/Plugins; \
2283 cp $(srcdir)/bindings/perl/lib/Collectd.pm buildperl/; \
2284 cp $(srcdir)/bindings/perl/Makefile.PL buildperl/; \
2285 cp $(srcdir)/bindings/perl/lib/Collectd/Unixsock.pm buildperl/Collectd/; \
2286 cp $(srcdir)/bindings/perl/lib/Collectd/Plugins/OpenVZ.pm buildperl/Collectd/Plugins/; \
2294 dist_noinst_JAVA = \
2295 bindings/java/org/collectd/api/Collectd.java \
2296 bindings/java/org/collectd/api/CollectdConfigInterface.java \
2297 bindings/java/org/collectd/api/CollectdFlushInterface.java \
2298 bindings/java/org/collectd/api/CollectdInitInterface.java \
2299 bindings/java/org/collectd/api/CollectdLogInterface.java \
2300 bindings/java/org/collectd/api/CollectdMatchFactoryInterface.java \
2301 bindings/java/org/collectd/api/CollectdMatchInterface.java \
2302 bindings/java/org/collectd/api/CollectdNotificationInterface.java \
2303 bindings/java/org/collectd/api/CollectdReadInterface.java \
2304 bindings/java/org/collectd/api/CollectdShutdownInterface.java \
2305 bindings/java/org/collectd/api/CollectdTargetFactoryInterface.java \
2306 bindings/java/org/collectd/api/CollectdTargetInterface.java \
2307 bindings/java/org/collectd/api/CollectdWriteInterface.java \
2308 bindings/java/org/collectd/api/DataSet.java \
2309 bindings/java/org/collectd/api/DataSource.java \
2310 bindings/java/org/collectd/api/Notification.java \
2311 bindings/java/org/collectd/api/OConfigItem.java \
2312 bindings/java/org/collectd/api/OConfigValue.java \
2313 bindings/java/org/collectd/api/PluginData.java \
2314 bindings/java/org/collectd/api/ValueList.java \
2315 bindings/java/org/collectd/java/GenericJMX.java \
2316 bindings/java/org/collectd/java/GenericJMXConfConnection.java \
2317 bindings/java/org/collectd/java/GenericJMXConfMBean.java \
2318 bindings/java/org/collectd/java/GenericJMXConfValue.java \
2319 bindings/java/org/collectd/java/JMXMemory.java
2321 collectd-api.jar: $(JAVA_TIMESTAMP_FILE)
2322 $(JAR) cf $(JARFLAGS) $@ org/collectd/api/*.class
2324 generic-jmx.jar: $(JAVA_TIMESTAMP_FILE)
2325 $(JAR) cf $(JARFLAGS) $@ org/collectd/java/*.class
2327 jar_DATA = collectd-api.jar generic-jmx.jar