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 \
146 check_LTLIBRARIES = \
152 test_format_graphite \
161 test_utils_vl_lookup \
162 test_libcollectd_network_parse \
163 test_utils_config_cores
166 TESTS = $(check_PROGRAMS)
168 LOG_COMPILER = env VALGRIND="@VALGRIND@" $(abs_srcdir)/testwrapper.sh
171 jardir = $(cpkgdatadir)/java
179 -export-symbols-regex '\<module_register\>'
181 PLUGIN_LDFLAGS += -shared -no-undefined -lcollectd -L.
186 -I$(top_srcdir)/src -I$(top_srcdir)/src/daemon \
187 -DPREFIX='"${prefix}"' \
188 -DCONFIGFILE='"${sysconfdir}/${PACKAGE_NAME}.conf"' \
189 -DLOCALSTATEDIR='"${localstatedir}"' \
190 -DPKGLOCALSTATEDIR='"${cpkglocalstatedir}"' \
191 -DPLUGINDIR='"${cpkglibdir}"' \
192 -DPKGDATADIR='"${cpkgdatadir}"'
194 AM_CPPFLAGS += -DNOGDI
199 COMMON_DEPS += collectd.exe
202 # Link to these libraries..
203 COMMON_LIBS = $(PTHREAD_LIBS)
205 COMMON_LIBS += -lws2_32
210 if BUILD_WITH_CAPABILITY
216 if BUILD_WITH_LIBPOSIX4
217 COMMON_LIBS += -lposix4
219 if BUILD_WITH_LIBSOCKET
220 COMMON_LIBS += -lsocket
222 if BUILD_WITH_LIBKSTAT
223 COMMON_LIBS += -lkstat
225 if BUILD_WITH_LIBDEVINFO
226 COMMON_LIBS += -ldevinfo
232 src/daemon/collectd.c \
233 src/daemon/collectd.h \
234 src/daemon/configfile.c \
235 src/daemon/configfile.h \
236 src/daemon/filter_chain.c \
237 src/daemon/filter_chain.h \
238 src/daemon/globals.c \
239 src/daemon/globals.h \
240 src/utils/metadata/meta_data.c \
241 src/utils/metadata/meta_data.h \
242 src/daemon/plugin.c \
243 src/daemon/plugin.h \
244 src/daemon/utils_cache.c \
245 src/daemon/utils_cache.h \
246 src/daemon/utils_complain.c \
247 src/daemon/utils_complain.h \
248 src/daemon/utils_random.c \
249 src/daemon/utils_random.h \
250 src/daemon/utils_subst.c \
251 src/daemon/utils_subst.h \
252 src/daemon/utils_time.c \
253 src/daemon/utils_time.h \
254 src/daemon/types_list.c \
255 src/daemon/types_list.h \
256 src/daemon/utils_threshold.c \
257 src/daemon/utils_threshold.h
260 collectd_CFLAGS = $(AM_CFLAGS)
261 collectd_CPPFLAGS = $(AM_CPPFLAGS)
262 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 libllist_la_SOURCES = \
397 src/daemon/utils_llist.c \
398 src/daemon/utils_llist.h
400 libmetadata_la_SOURCES = \
401 src/utils/metadata/meta_data.c \
402 src/utils/metadata/meta_data.h
404 libplugin_mock_la_SOURCES = \
405 src/daemon/plugin_mock.c \
406 src/daemon/utils_cache_mock.c \
407 src/daemon/utils_complain.c \
408 src/daemon/utils_complain.h \
409 src/daemon/utils_time.c \
410 src/daemon/utils_time.h
412 libplugin_mock_la_CPPFLAGS = $(AM_CPPFLAGS) -DMOCK_TIME
413 libplugin_mock_la_LIBADD = libcommon.la libignorelist.la $(COMMON_LIBS)
415 libformat_graphite_la_SOURCES = \
416 src/utils/format_graphite/format_graphite.c \
417 src/utils/format_graphite/format_graphite.h
419 test_format_graphite_SOURCES = \
420 src/utils/format_graphite/format_graphite_test.c \
422 test_format_graphite_LDADD = \
423 libformat_graphite.la \
428 libformat_json_la_SOURCES = \
429 src/utils/format_json/format_json.c \
430 src/utils/format_json/format_json.h
431 libformat_json_la_CPPFLAGS = $(AM_CPPFLAGS)
432 libformat_json_la_LDFLAGS = $(AM_LDFLAGS)
433 libformat_json_la_LIBADD =
434 if BUILD_WITH_LIBYAJL
435 libformat_json_la_CPPFLAGS += $(BUILD_WITH_LIBYAJL_CPPFLAGS)
436 libformat_json_la_LDFLAGS += $(BUILD_WITH_LIBYAJL_LDFLAGS)
437 libformat_json_la_LIBADD += $(BUILD_WITH_LIBYAJL_LIBS)
439 check_PROGRAMS += test_format_json
441 test_format_json_SOURCES = \
442 src/utils/format_json/format_json_test.c \
444 test_format_json_LDADD = \
452 test_plugin_ceph_SOURCES = src/ceph_test.c
453 test_plugin_ceph_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
454 test_plugin_ceph_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
455 test_plugin_ceph_LDADD = libplugin_mock.la $(BUILD_WITH_LIBYAJL_LIBS)
456 check_PROGRAMS += test_plugin_ceph
459 liblatency_la_SOURCES = \
460 src/utils/latency/latency.c \
461 src/utils/latency/latency.h \
462 src/utils/latency/latency_config.c \
463 src/utils/latency/latency_config.h
464 liblatency_la_LIBADD = \
468 test_utils_latency_SOURCES = \
469 src/utils/latency/latency_test.c \
471 test_utils_latency_LDADD = \
476 libcmds_la_SOURCES = \
477 src/utils/cmds/cmds.c \
478 src/utils/cmds/cmds.h \
479 src/utils/cmds/flush.c \
480 src/utils/cmds/flush.h \
481 src/utils/cmds/getthreshold.c \
482 src/utils/cmds/getthreshold.h \
483 src/utils/cmds/getval.c \
484 src/utils/cmds/getval.h \
485 src/utils/cmds/listval.c \
486 src/utils/cmds/listval.h \
487 src/utils/cmds/putnotif.c \
488 src/utils/cmds/putnotif.h \
489 src/utils/cmds/putval.c \
490 src/utils/cmds/putval.h \
491 src/utils/cmds/parse_option.c \
492 src/utils/cmds/parse_option.h
493 libcmds_la_LIBADD = \
498 test_utils_cmds_SOURCES = \
499 src/utils/cmds/cmds_test.c \
501 test_utils_cmds_LDADD = \
505 liblookup_la_SOURCES = \
506 src/utils/lookup/vl_lookup.c \
507 src/utils/lookup/vl_lookup.h
508 liblookup_la_LIBADD = libavltree.la
510 test_utils_vl_lookup_SOURCES = \
511 src/utils/lookup/vl_lookup_test.c \
513 test_utils_vl_lookup_LDADD = \
516 if BUILD_WITH_LIBKSTAT
517 test_utils_vl_lookup_LDADD += -lkstat
520 libmount_la_SOURCES = \
521 src/utils/mount/mount.c \
522 src/utils/mount/mount.h
524 test_utils_mount_SOURCES = \
525 src/utils/mount/mount_test.c \
527 test_utils_mount_LDADD = \
530 if BUILD_WITH_LIBKSTAT
531 test_utils_mount_LDADD += -lkstat
535 libcollectdclient_la_SOURCES = \
536 src/libcollectdclient/client.c \
537 src/libcollectdclient/network.c \
538 src/libcollectdclient/network_buffer.c \
539 src/libcollectdclient/network_parse.c \
540 src/libcollectdclient/server.c \
541 src/libcollectdclient/collectd/stdendian.h
542 libcollectdclient_la_CPPFLAGS = \
544 -I$(srcdir)/src/libcollectdclient \
545 -I$(top_builddir)/src/libcollectdclient \
546 -I$(srcdir)/src/daemon
547 libcollectdclient_la_LDFLAGS = -version-info 2:0:1
548 libcollectdclient_la_LIBADD = -lm
550 libcollectdclient_la_LDFLAGS += -shared -no-undefined
551 libcollectdclient_la_LIBADD += -lgnu -lws2_32 -liphlpapi
553 if BUILD_WITH_LIBGCRYPT
554 libcollectdclient_la_CPPFLAGS += $(GCRYPT_CPPFLAGS)
555 libcollectdclient_la_LDFLAGS += $(GCRYPT_LDFLAGS)
556 libcollectdclient_la_LIBADD += $(GCRYPT_LIBS)
559 # network_parse_test.c includes network_parse.c, so no need to link with
560 # libcollectdclient.so.
561 test_libcollectd_network_parse_SOURCES = src/libcollectdclient/network_parse_test.c
562 test_libcollectd_network_parse_CPPFLAGS = \
564 -I$(srcdir)/src/libcollectdclient \
565 -I$(top_builddir)/src/libcollectdclient
566 if BUILD_WITH_LIBGCRYPT
567 test_libcollectd_network_parse_CPPFLAGS += $(GCRYPT_CPPFLAGS)
568 test_libcollectd_network_parse_LDFLAGS = $(GCRYPT_LDFLAGS)
569 test_libcollectd_network_parse_LDADD = $(GCRYPT_LIBS)
572 liboconfig_la_SOURCES = \
573 src/liboconfig/oconfig.c \
574 src/liboconfig/oconfig.h \
575 src/liboconfig/aux_types.h \
576 src/liboconfig/scanner.l \
577 src/liboconfig/parser.y
578 liboconfig_la_CPPFLAGS = -I$(srcdir)/src/liboconfig $(AM_CPPFLAGS)
579 liboconfig_la_LDFLAGS = -avoid-version $(LEXLIB)
581 if BUILD_WITH_LIBCURL
583 if BUILD_WITH_LIBYAJL2
584 noinst_LTLIBRARIES += liboauth.la
585 liboauth_la_SOURCES = \
586 src/utils/oauth/oauth.c \
587 src/utils/oauth/oauth.h
588 liboauth_la_CPPFLAGS = \
590 $(BUILD_WITH_LIBCURL_CFLAGS) \
591 $(BUILD_WITH_LIBSSL_CFLAGS) \
592 $(BUILD_WITH_LIBYAJL_CPPFLAGS)
593 liboauth_la_LIBADD = \
594 $(BUILD_WITH_LIBCURL_LIBS) \
595 $(BUILD_WITH_LIBSSL_LIBS) \
596 $(BUILD_WITH_LIBYAJL_LIBS)
598 check_PROGRAMS += test_utils_oauth
599 TESTS += test_utils_oauth
600 test_utils_oauth_SOURCES = \
601 src/utils/oauth/oauth_test.c
602 test_utils_oauth_LDADD = \
607 noinst_LTLIBRARIES += libgce.la
608 libgce_la_SOURCES = \
609 src/utils/gce/gce.c \
611 libgce_la_CPPFLAGS = \
613 $(BUILD_WITH_LIBCURL_CFLAGS)
615 $(BUILD_WITH_LIBCURL_LIBS)
620 if BUILD_WITH_LIBYAJL2
621 noinst_LTLIBRARIES += libformat_stackdriver.la
622 libformat_stackdriver_la_SOURCES = \
623 src/utils/format_stackdriver/format_stackdriver.c \
624 src/utils/format_stackdriver/format_stackdriver.h
625 libformat_stackdriver_la_CPPFLAGS = \
627 $(BUILD_WITH_LIBYAJL_CPPFLAGS)
628 libformat_stackdriver_la_LIBADD = \
630 $(BUILD_WITH_LIBSSL_LIBS) \
631 $(BUILD_WITH_LIBYAJL_LIBS)
633 check_PROGRAMS += test_format_stackdriver
634 TESTS += test_format_stackdriver
635 test_format_stackdriver_SOURCES = \
636 src/utils/format_stackdriver/format_stackdriver_test.c \
638 test_format_stackdriver_LDADD = \
639 libformat_stackdriver.la \
644 if BUILD_PLUGIN_AGGREGATION
645 pkglib_LTLIBRARIES += aggregation.la
646 aggregation_la_SOURCES = \
648 src/utils/lookup/vl_lookup.c \
649 src/utils/lookup/vl_lookup.h
650 aggregation_la_LDFLAGS = $(PLUGIN_LDFLAGS)
651 aggregation_la_LIBADD = -lm
655 pkglib_LTLIBRARIES += amqp.la
656 amqp_la_SOURCES = src/amqp.c
657 amqp_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBRABBITMQ_CPPFLAGS)
658 amqp_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRABBITMQ_LDFLAGS)
660 $(BUILD_WITH_LIBRABBITMQ_LIBS) \
662 libformat_graphite.la \
666 if BUILD_PLUGIN_AMQP1
667 pkglib_LTLIBRARIES += amqp1.la
671 amqp1_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBQPIDPROTON_CPPFLAGS)
672 amqp1_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBQPIDPROTON_LDFLAGS)
674 $(BUILD_WITH_LIBQPIDPROTON_LIBS) \
676 libformat_graphite.la \
680 if BUILD_PLUGIN_APACHE
681 pkglib_LTLIBRARIES += apache.la
682 apache_la_SOURCES = src/apache.c
683 apache_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS)
684 apache_la_LDFLAGS = $(PLUGIN_LDFLAGS)
685 apache_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS)
689 if BUILD_PLUGIN_APCUPS
690 pkglib_LTLIBRARIES += apcups.la
691 apcups_la_SOURCES = src/apcups.c
692 apcups_la_LDFLAGS = $(PLUGIN_LDFLAGS)
694 if BUILD_WITH_LIBSOCKET
695 apcups_la_LIBADD += -lsocket
699 if BUILD_PLUGIN_APPLE_SENSORS
700 pkglib_LTLIBRARIES += apple_sensors.la
701 apple_sensors_la_SOURCES = src/apple_sensors.c
702 apple_sensors_la_LDFLAGS = $(PLUGIN_LDFLAGS) -framework IOKit
705 if BUILD_PLUGIN_AQUAERO
706 pkglib_LTLIBRARIES += aquaero.la
707 aquaero_la_SOURCES = src/aquaero.c
708 aquaero_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBAQUAERO5_CFLAGS)
709 aquaero_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBAQUAERO5_LDFLAGS)
710 aquaero_la_LIBADD = -laquaero5
713 if BUILD_PLUGIN_ASCENT
714 pkglib_LTLIBRARIES += ascent.la
715 ascent_la_SOURCES = src/ascent.c
718 $(BUILD_WITH_LIBCURL_CFLAGS) \
719 $(BUILD_WITH_LIBXML2_CFLAGS)
720 ascent_la_LDFLAGS = $(PLUGIN_LDFLAGS)
722 $(BUILD_WITH_LIBCURL_LIBS) \
723 $(BUILD_WITH_LIBXML2_LIBS)
726 if BUILD_PLUGIN_BAROMETER
727 pkglib_LTLIBRARIES += barometer.la
728 barometer_la_SOURCES = src/barometer.c
729 barometer_la_LDFLAGS = $(PLUGIN_LDFLAGS)
730 barometer_la_LIBADD = -lm $(BUILD_WITH_LIBI2C_LIBS)
733 if BUILD_PLUGIN_BATTERY
734 pkglib_LTLIBRARIES += battery.la
735 battery_la_SOURCES = \
737 src/battery_statefs.c
738 battery_la_LDFLAGS = $(PLUGIN_LDFLAGS)
739 if BUILD_WITH_LIBIOKIT
740 battery_la_LDFLAGS += -framework IOKit
745 pkglib_LTLIBRARIES += bind.la
746 bind_la_SOURCES = src/bind.c
747 bind_la_CFLAGS = $(AM_CFLAGS) \
748 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
749 bind_la_LDFLAGS = $(PLUGIN_LDFLAGS)
750 bind_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
754 pkglib_LTLIBRARIES += ceph.la
755 ceph_la_SOURCES = src/ceph.c
756 ceph_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
757 ceph_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
758 ceph_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
761 if BUILD_PLUGIN_CGROUPS
762 pkglib_LTLIBRARIES += cgroups.la
763 cgroups_la_SOURCES = src/cgroups.c
764 cgroups_la_LDFLAGS = $(PLUGIN_LDFLAGS)
765 cgroups_la_LIBADD = libignorelist.la libmount.la
768 if BUILD_PLUGIN_CHRONY
769 pkglib_LTLIBRARIES += chrony.la
770 chrony_la_SOURCES = src/chrony.c
771 chrony_la_LDFLAGS = $(PLUGIN_LDFLAGS)
772 chrony_la_LIBADD = -lm
775 if BUILD_PLUGIN_CHECK_UPTIME
776 pkglib_LTLIBRARIES += check_uptime.la
777 check_uptime_la_SOURCES = src/check_uptime.c
778 check_uptime_la_LDFLAGS = $(PLUGIN_LDFLAGS)
781 if BUILD_PLUGIN_CONNECTIVITY
782 pkglib_LTLIBRARIES += connectivity.la
783 connectivity_la_SOURCES = src/connectivity.c
784 connectivity_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMNL_CFLAGS)
785 connectivity_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
786 connectivity_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
787 connectivity_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS) $(BUILD_WITH_LIBMNL_LIBS) libignorelist.la
790 if BUILD_PLUGIN_CONNTRACK
791 pkglib_LTLIBRARIES += conntrack.la
792 conntrack_la_SOURCES = src/conntrack.c
793 conntrack_la_LDFLAGS = $(PLUGIN_LDFLAGS)
796 if BUILD_PLUGIN_CONTEXTSWITCH
797 pkglib_LTLIBRARIES += contextswitch.la
798 contextswitch_la_SOURCES = src/contextswitch.c
799 contextswitch_la_LDFLAGS = $(PLUGIN_LDFLAGS)
800 contextswitch_la_LIBADD =
801 if BUILD_WITH_PERFSTAT
802 contextswitch_la_LIBADD += -lperfstat
807 pkglib_LTLIBRARIES += cpu.la
808 cpu_la_SOURCES = src/cpu.c
809 cpu_la_CFLAGS = $(AM_CFLAGS)
810 cpu_la_LDFLAGS = $(PLUGIN_LDFLAGS)
812 if BUILD_WITH_LIBKSTAT
813 cpu_la_LIBADD += -lkstat
815 if BUILD_WITH_LIBDEVINFO
816 cpu_la_LIBADD += -ldevinfo
818 if BUILD_WITH_LIBSTATGRAB
819 cpu_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
820 cpu_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
822 if BUILD_WITH_PERFSTAT
823 cpu_la_LIBADD += -lperfstat
827 if BUILD_PLUGIN_CPUFREQ
828 pkglib_LTLIBRARIES += cpufreq.la
829 cpufreq_la_SOURCES = src/cpufreq.c
830 cpufreq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
833 if BUILD_PLUGIN_CPUSLEEP
834 pkglib_LTLIBRARIES += cpusleep.la
835 cpusleep_la_SOURCES = src/cpusleep.c
836 cpusleep_la_LDFLAGS = $(PLUGIN_LDFLAGS)
840 pkglib_LTLIBRARIES += csv.la
841 csv_la_SOURCES = src/csv.c
842 csv_la_LDFLAGS = $(PLUGIN_LDFLAGS)
846 pkglib_LTLIBRARIES += curl.la
849 src/utils/curl_stats/curl_stats.c \
850 src/utils/curl_stats/curl_stats.h \
851 src/utils/match/match.c \
852 src/utils/match/match.h
853 curl_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS)
854 curl_la_LDFLAGS = $(PLUGIN_LDFLAGS)
855 curl_la_LIBADD = liblatency.la $(BUILD_WITH_LIBCURL_LIBS)
858 if BUILD_PLUGIN_CURL_JSON
859 pkglib_LTLIBRARIES += curl_json.la
860 curl_json_la_SOURCES = \
862 src/utils/curl_stats/curl_stats.c \
863 src/utils/curl_stats/curl_stats.h
864 curl_json_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS)
865 curl_json_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
866 curl_json_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
867 curl_json_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBYAJL_LIBS)
869 test_plugin_curl_json_SOURCES = src/curl_json_test.c \
870 src/utils/curl_stats/curl_stats.c \
871 src/daemon/configfile.c \
872 src/daemon/types_list.c
873 test_plugin_curl_json_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
874 test_plugin_curl_json_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
875 test_plugin_curl_json_LDADD = libavltree.la liboconfig.la libplugin_mock.la $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBYAJL_LIBS)
876 check_PROGRAMS += test_plugin_curl_json
879 if BUILD_PLUGIN_CURL_XML
880 pkglib_LTLIBRARIES += curl_xml.la
881 curl_xml_la_SOURCES = \
883 src/utils/curl_stats/curl_stats.c \
884 src/utils/curl_stats/curl_stats.h
885 curl_xml_la_CFLAGS = $(AM_CFLAGS) \
886 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
887 curl_xml_la_LDFLAGS = $(PLUGIN_LDFLAGS)
888 curl_xml_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
892 pkglib_LTLIBRARIES += dbi.la
895 src/utils/db_query/db_query.c \
896 src/utils/db_query/db_query.h
897 dbi_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBDBI_CPPFLAGS)
898 dbi_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBDBI_LDFLAGS)
899 dbi_la_LIBADD = $(BUILD_WITH_LIBDBI_LIBS)
903 pkglib_LTLIBRARIES += df.la
904 df_la_SOURCES = src/df.c
905 df_la_LDFLAGS = $(PLUGIN_LDFLAGS)
906 df_la_LIBADD = libignorelist.la libmount.la
910 pkglib_LTLIBRARIES += disk.la
911 disk_la_SOURCES = src/disk.c
912 disk_la_CFLAGS = $(AM_CFLAGS)
913 disk_la_CPPFLAGS = $(AM_CPPFLAGS)
914 disk_la_LDFLAGS = $(PLUGIN_LDFLAGS)
915 disk_la_LIBADD = libignorelist.la
916 if BUILD_WITH_LIBKSTAT
917 disk_la_LIBADD += -lkstat
919 if BUILD_WITH_LIBDEVINFO
920 disk_la_LIBADD += -ldevinfo
922 if BUILD_WITH_LIBIOKIT
923 disk_la_LDFLAGS += -framework IOKit
925 if BUILD_WITH_LIBSTATGRAB
926 disk_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
927 disk_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
929 if BUILD_WITH_LIBUDEV
930 disk_la_CPPFLAGS += $(BUILD_WITH_LIBUDEV_CPPFLAGS)
931 disk_la_LDFLAGS += $(BUILD_WITH_LIBUDEV_LDFLAGS)
932 disk_la_LIBADD += $(BUILD_WITH_LIBUDEV_LIBS)
935 disk_la_LIBADD += -ldevstat -lgeom
937 if BUILD_WITH_PERFSTAT
938 disk_la_LIBADD += -lperfstat
943 pkglib_LTLIBRARIES += dns.la
946 src/utils/dns/dns.c \
948 dns_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPCAP_CPPFLAGS)
949 dns_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBPCAP_LDFLAGS)
950 dns_la_LIBADD = $(BUILD_WITH_LIBPCAP_LIBS)
953 if BUILD_PLUGIN_DPDKEVENTS
954 pkglib_LTLIBRARIES += dpdkevents.la
955 dpdkevents_la_SOURCES = src/dpdkevents.c src/utils/dpdk/dpdk.c src/utils/dpdk/dpdk.h
956 dpdkevents_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBDPDK_CPPFLAGS)
957 dpdkevents_la_CFLAGS = $(AM_CFLAGS) $(LIBDPDK_CFLAGS)
958 dpdkevents_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBDPDK_LDFLAGS)
959 dpdkevents_la_LIBADD = $(LIBDPDK_LIBS)
962 if BUILD_PLUGIN_DPDKSTAT
963 pkglib_LTLIBRARIES += dpdkstat.la
964 dpdkstat_la_SOURCES = src/dpdkstat.c src/utils/dpdk/dpdk.c src/utils/dpdk/dpdk.h
965 dpdkstat_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBDPDK_CPPFLAGS)
966 dpdkstat_la_CFLAGS = $(AM_CFLAGS) $(LIBDPDK_CFLAGS)
967 dpdkstat_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBDPDK_LDFLAGS)
968 dpdkstat_la_LIBADD = $(LIBDPDK_LIBS)
972 pkglib_LTLIBRARIES += drbd.la
973 drbd_la_SOURCES = src/drbd.c
974 drbd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
977 if BUILD_PLUGIN_EMAIL
978 pkglib_LTLIBRARIES += email.la
979 email_la_SOURCES = src/email.c
980 email_la_LDFLAGS = $(PLUGIN_LDFLAGS)
983 if BUILD_PLUGIN_ENTROPY
984 pkglib_LTLIBRARIES += entropy.la
985 entropy_la_SOURCES = src/entropy.c
986 entropy_la_LDFLAGS = $(PLUGIN_LDFLAGS)
990 pkglib_LTLIBRARIES += exec.la
991 exec_la_SOURCES = src/exec.c
992 exec_la_LDFLAGS = $(PLUGIN_LDFLAGS)
993 exec_la_LIBADD = libcmds.la
996 if BUILD_PLUGIN_ETHSTAT
997 pkglib_LTLIBRARIES += ethstat.la
998 ethstat_la_SOURCES = src/ethstat.c
999 ethstat_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1002 if BUILD_PLUGIN_FHCOUNT
1003 pkglib_LTLIBRARIES += fhcount.la
1004 fhcount_la_SOURCES = src/fhcount.c
1005 fhcount_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1008 if BUILD_PLUGIN_FILECOUNT
1009 pkglib_LTLIBRARIES += filecount.la
1010 filecount_la_SOURCES = src/filecount.c
1011 filecount_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1014 if BUILD_PLUGIN_FSCACHE
1015 pkglib_LTLIBRARIES += fscache.la
1016 fscache_la_SOURCES = src/fscache.c
1017 fscache_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1020 if BUILD_PLUGIN_GMOND
1021 pkglib_LTLIBRARIES += gmond.la
1022 gmond_la_SOURCES = src/gmond.c
1023 gmond_la_CPPFLAGS = $(AM_CPPFLAGS) $(GANGLIA_CPPFLAGS)
1024 gmond_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(GANGLIA_LDFLAGS)
1025 gmond_la_LIBADD = $(GANGLIA_LIBS)
1029 pkglib_LTLIBRARIES += gps.la
1030 gps_la_SOURCES = src/gps.c
1031 gps_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBGPS_CFLAGS)
1032 gps_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBGPS_LDFLAGS)
1033 gps_la_LIBADD = -lpthread $(BUILD_WITH_LIBGPS_LIBS)
1036 if BUILD_PLUGIN_GPU_NVIDIA
1037 pkglib_LTLIBRARIES += gpu_nvidia.la
1038 gpu_nvidia_la_SOURCES = src/gpu_nvidia.c
1039 gpu_nvidia_la_CPPFLAGS = $(PLUGIN_CPPFLAGS) $(BUILD_WITH_GPU_CUDA_CPPFLAGS)
1040 gpu_nvidia_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_GPU_CUDA_LDFLAGS)
1041 gpu_nvidia_la_LIBADD = $(BUILD_WITH_CUDA_LIBS)
1044 if BUILD_PLUGIN_GRPC
1045 pkglib_LTLIBRARIES += grpc.la
1046 grpc_la_SOURCES = src/grpc.cc
1047 nodist_grpc_la_SOURCES = \
1048 collectd.grpc.pb.cc \
1051 grpc_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBGRPCPP_CPPFLAGS) $(BUILD_WITH_LIBPROTOBUF_CPPFLAGS)
1052 grpc_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBGRPCPP_LDFLAGS) $(BUILD_WITH_LIBPROTOBUF_LDFLAGS)
1053 grpc_la_LIBADD = $(BUILD_WITH_LIBGRPCPP_LIBS) $(BUILD_WITH_LIBPROTOBUF_LIBS)
1056 if BUILD_PLUGIN_HDDTEMP
1057 pkglib_LTLIBRARIES += hddtemp.la
1058 hddtemp_la_SOURCES = src/hddtemp.c
1059 hddtemp_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1061 if BUILD_WITH_LIBSOCKET
1062 hddtemp_la_LIBADD += -lsocket
1066 if BUILD_PLUGIN_HUGEPAGES
1067 pkglib_LTLIBRARIES += hugepages.la
1068 hugepages_la_SOURCES = src/hugepages.c
1069 hugepages_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1072 if BUILD_PLUGIN_INTEL_PMU
1073 pkglib_LTLIBRARIES += intel_pmu.la
1074 intel_pmu_la_SOURCES = \
1076 src/utils/config_cores/config_cores.h \
1077 src/utils/config_cores/config_cores.c
1078 intel_pmu_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBJEVENTS_CPPFLAGS)
1079 intel_pmu_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBJEVENTS_LDFLAGS)
1080 intel_pmu_la_LIBADD = $(BUILD_WITH_LIBJEVENTS_LIBS)
1083 if BUILD_PLUGIN_INTEL_RDT
1084 pkglib_LTLIBRARIES += intel_rdt.la
1085 intel_rdt_la_SOURCES = \
1087 src/utils/proc_pids/proc_pids.c \
1088 src/utils/proc_pids/proc_pids.h \
1089 src/utils/config_cores/config_cores.h \
1090 src/utils/config_cores/config_cores.c
1091 intel_rdt_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBPQOS_CPPFLAGS)
1092 intel_rdt_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBPQOS_LDFLAGS)
1093 intel_rdt_la_LIBADD = $(BUILD_WITH_LIBPQOS_LIBS)
1095 test_plugin_intel_rdt_SOURCES = \
1096 src/intel_rdt_test.c \
1097 src/utils/config_cores/config_cores.c \
1098 src/utils/proc_pids/proc_pids.c \
1099 src/daemon/configfile.c \
1100 src/daemon/types_list.c
1101 test_plugin_intel_rdt_CPPFLAGS = $(AM_CPPFLAGS)
1102 test_plugin_intel_rdt_LDFLAGS = $(PLUGIN_LDFLAGS)
1103 test_plugin_intel_rdt_LDADD = liboconfig.la libplugin_mock.la
1104 check_PROGRAMS += test_plugin_intel_rdt
1105 TESTS += test_plugin_intel_rdt
1107 test_utils_proc_pids_SOURCES = \
1108 src/utils/proc_pids/proc_pids_test.c \
1110 test_utils_proc_pids_LDADD = libplugin_mock.la
1111 check_PROGRAMS += test_utils_proc_pids
1112 TESTS += test_utils_proc_pids
1115 if BUILD_PLUGIN_INTERFACE
1116 pkglib_LTLIBRARIES += interface.la
1117 interface_la_SOURCES = src/interface.c
1118 interface_la_CFLAGS = $(AM_CFLAGS)
1119 interface_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1120 interface_la_LIBADD = libignorelist.la
1121 if BUILD_WITH_LIBSTATGRAB
1122 interface_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1123 interface_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1125 if BUILD_WITH_LIBKSTAT
1126 interface_la_LIBADD += -lkstat
1128 if BUILD_WITH_LIBDEVINFO
1129 interface_la_LIBADD += -ldevinfo
1130 endif # BUILD_WITH_LIBDEVINFO
1131 endif # !BUILD_WITH_LIBSTATGRAB
1132 if BUILD_WITH_PERFSTAT
1133 interface_la_LIBADD += -lperfstat
1135 endif # BUILD_PLUGIN_INTERFACE
1138 pkglib_LTLIBRARIES += ipc.la
1139 ipc_la_SOURCES = src/ipc.c
1140 ipc_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1143 if BUILD_PLUGIN_IPTABLES
1144 pkglib_LTLIBRARIES += iptables.la
1145 iptables_la_SOURCES = src/iptables.c
1146 iptables_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBIPTC_CPPFLAGS)
1147 iptables_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1148 iptables_la_LIBADD = $(BUILD_WITH_LIBIPTC_LDFLAGS)
1151 if BUILD_PLUGIN_IPMI
1152 pkglib_LTLIBRARIES += ipmi.la
1153 ipmi_la_SOURCES = src/ipmi.c
1154 ipmi_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_OPENIPMI_CFLAGS)
1155 ipmi_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1156 ipmi_la_LIBADD = libignorelist.la $(BUILD_WITH_OPENIPMI_LIBS)
1159 if BUILD_PLUGIN_IPVS
1160 pkglib_LTLIBRARIES += ipvs.la
1161 ipvs_la_SOURCES = src/ipvs.c
1162 ipvs_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1166 pkglib_LTLIBRARIES += irq.la
1167 irq_la_SOURCES = src/irq.c
1168 irq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1169 irq_la_LIBADD = libignorelist.la
1172 if BUILD_PLUGIN_JAVA
1173 pkglib_LTLIBRARIES += java.la
1174 java_la_SOURCES = src/java.c
1175 java_la_CPPFLAGS = $(AM_CPPFLAGS) $(JAVA_CPPFLAGS)
1176 java_la_CFLAGS = $(AM_CFLAGS) $(JAVA_CFLAGS)
1177 java_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(JAVA_LDFLAGS)
1178 java_la_LIBADD = $(JAVA_LIBS)
1181 if BUILD_PLUGIN_LOAD
1182 pkglib_LTLIBRARIES += load.la
1183 load_la_SOURCES = src/load.c
1184 load_la_CFLAGS = $(AM_CFLAGS)
1185 load_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1187 if BUILD_WITH_LIBSTATGRAB
1188 load_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1189 load_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1190 endif # BUILD_WITH_LIBSTATGRAB
1191 if BUILD_WITH_PERFSTAT
1192 load_la_LIBADD += -lperfstat
1194 endif # BUILD_PLUGIN_LOAD
1196 if BUILD_PLUGIN_LOGFILE
1197 pkglib_LTLIBRARIES += logfile.la
1198 logfile_la_SOURCES = src/logfile.c
1199 logfile_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1200 logfile_la_DEPENDENCIES = $(COMMON_DEPS)
1203 if BUILD_PLUGIN_LOG_LOGSTASH
1204 pkglib_LTLIBRARIES += log_logstash.la
1205 log_logstash_la_SOURCES = src/log_logstash.c
1206 log_logstash_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
1207 log_logstash_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
1208 log_logstash_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
1211 if BUILD_PLUGIN_LPAR
1212 pkglib_LTLIBRARIES += lpar.la
1213 lpar_la_SOURCES = src/lpar.c
1214 lpar_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1215 lpar_la_LIBADD = -lperfstat
1219 pkglib_LTLIBRARIES += lua.la
1224 lua_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBLUA_CFLAGS)
1225 lua_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1226 lua_la_LIBADD = $(BUILD_WITH_LIBLUA_LIBS)
1229 if BUILD_PLUGIN_MADWIFI
1230 pkglib_LTLIBRARIES += madwifi.la
1231 madwifi_la_SOURCES = \
1234 madwifi_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1235 madwifi_la_LIBADD = libignorelist.la
1238 if BUILD_PLUGIN_MATCH_EMPTY_COUNTER
1239 pkglib_LTLIBRARIES += match_empty_counter.la
1240 match_empty_counter_la_SOURCES = src/match_empty_counter.c
1241 match_empty_counter_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1244 if BUILD_PLUGIN_MATCH_HASHED
1245 pkglib_LTLIBRARIES += match_hashed.la
1246 match_hashed_la_SOURCES = src/match_hashed.c
1247 match_hashed_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1250 if BUILD_PLUGIN_MATCH_REGEX
1251 pkglib_LTLIBRARIES += match_regex.la
1252 match_regex_la_SOURCES = src/match_regex.c
1253 match_regex_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1256 if BUILD_PLUGIN_MATCH_TIMEDIFF
1257 pkglib_LTLIBRARIES += match_timediff.la
1258 match_timediff_la_SOURCES = src/match_timediff.c
1259 match_timediff_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1262 if BUILD_PLUGIN_MATCH_VALUE
1263 pkglib_LTLIBRARIES += match_value.la
1264 match_value_la_SOURCES = src/match_value.c
1265 match_value_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1268 if BUILD_PLUGIN_MBMON
1269 pkglib_LTLIBRARIES += mbmon.la
1270 mbmon_la_SOURCES = src/mbmon.c
1271 mbmon_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1273 if BUILD_WITH_LIBSOCKET
1274 mbmon_la_LIBADD += -lsocket
1278 if BUILD_PLUGIN_MCELOG
1279 pkglib_LTLIBRARIES += mcelog.la
1280 mcelog_la_SOURCES = src/mcelog.c
1281 mcelog_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1285 pkglib_LTLIBRARIES += md.la
1286 md_la_SOURCES = src/md.c
1287 md_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1288 md_la_LIBADD = libignorelist.la
1291 if BUILD_PLUGIN_MEMCACHEC
1292 pkglib_LTLIBRARIES += memcachec.la
1293 memcachec_la_SOURCES = \
1295 src/utils/match/match.c \
1296 src/utils/match/match.h
1297 memcachec_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMEMCACHED_CPPFLAGS)
1298 memcachec_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMEMCACHED_LDFLAGS)
1299 memcachec_la_LIBADD = liblatency.la $(BUILD_WITH_LIBMEMCACHED_LIBS)
1302 if BUILD_PLUGIN_MEMCACHED
1303 pkglib_LTLIBRARIES += memcached.la
1304 memcached_la_SOURCES = src/memcached.c
1305 memcached_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1306 memcached_la_LIBADD =
1307 if BUILD_WITH_LIBSOCKET
1308 memcached_la_LIBADD += -lsocket
1312 if BUILD_PLUGIN_MEMORY
1313 pkglib_LTLIBRARIES += memory.la
1314 memory_la_SOURCES = src/memory.c
1315 memory_la_CFLAGS = $(AM_CFLAGS)
1316 memory_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1318 if BUILD_WITH_LIBKSTAT
1319 memory_la_LIBADD += -lkstat
1321 if BUILD_WITH_LIBDEVINFO
1322 memory_la_LIBADD += -ldevinfo
1324 if BUILD_WITH_LIBSTATGRAB
1325 memory_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1326 memory_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1328 if BUILD_WITH_PERFSTAT
1329 memory_la_LIBADD += -lperfstat
1334 pkglib_LTLIBRARIES += mic.la
1335 mic_la_SOURCES = src/mic.c
1336 mic_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_MIC_CPPFLAGS)
1337 mic_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_MIC_LDFLAGS)
1338 mic_la_LIBADD = libignorelist.la $(BUILD_WITH_MIC_LIBS)
1341 if BUILD_PLUGIN_MODBUS
1342 pkglib_LTLIBRARIES += modbus.la
1343 modbus_la_SOURCES = src/modbus.c
1344 modbus_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMODBUS_CFLAGS)
1345 modbus_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1346 modbus_la_LIBADD = $(BUILD_WITH_LIBMODBUS_LIBS)
1349 if BUILD_PLUGIN_MQTT
1350 pkglib_LTLIBRARIES += mqtt.la
1351 mqtt_la_SOURCES = src/mqtt.c
1352 mqtt_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMOSQUITTO_CPPFLAGS)
1353 mqtt_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMOSQUITTO_LDFLAGS)
1354 mqtt_la_LIBADD = $(BUILD_WITH_LIBMOSQUITTO_LIBS)
1357 if BUILD_PLUGIN_MULTIMETER
1358 pkglib_LTLIBRARIES += multimeter.la
1359 multimeter_la_SOURCES = src/multimeter.c
1360 multimeter_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1363 if BUILD_PLUGIN_MYSQL
1364 pkglib_LTLIBRARIES += mysql.la
1365 mysql_la_SOURCES = src/mysql.c
1366 mysql_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMYSQL_CFLAGS)
1367 mysql_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1368 mysql_la_LIBADD = $(BUILD_WITH_LIBMYSQL_LIBS)
1371 if BUILD_PLUGIN_NETAPP
1372 pkglib_LTLIBRARIES += netapp.la
1373 netapp_la_SOURCES = src/netapp.c
1374 netapp_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBNETAPP_CPPFLAGS)
1375 netapp_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBNETAPP_LDFLAGS)
1376 netapp_la_LIBADD = libignorelist.la $(LIBNETAPP_LIBS)
1379 if BUILD_PLUGIN_NETLINK
1380 pkglib_LTLIBRARIES += netlink.la
1381 netlink_la_SOURCES = src/netlink.c
1382 netlink_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMNL_CFLAGS)
1383 netlink_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1384 netlink_la_LIBADD = $(BUILD_WITH_LIBMNL_LIBS)
1387 if BUILD_PLUGIN_NETWORK
1388 pkglib_LTLIBRARIES += network.la
1389 network_la_SOURCES = \
1392 src/utils_fbhash.c \
1394 network_la_CPPFLAGS = $(AM_CPPFLAGS)
1395 network_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1397 if BUILD_WITH_LIBSOCKET
1398 network_la_LIBADD += -lsocket
1400 if BUILD_WITH_LIBGCRYPT
1401 network_la_CPPFLAGS += $(GCRYPT_CPPFLAGS)
1402 network_la_LDFLAGS += $(GCRYPT_LDFLAGS)
1403 network_la_LIBADD += $(GCRYPT_LIBS)
1406 test_plugin_network_SOURCES = \
1407 src/network_test.c \
1408 src/utils_fbhash.c \
1409 src/daemon/configfile.c \
1410 src/daemon/types_list.c
1411 test_plugin_network_CPPFLAGS = $(AM_CPPFLAGS) $(GCRYPT_CPPFLAGS)
1412 test_plugin_network_LDFLAGS = $(PLUGIN_LDFLAGS) $(GCRYPT_LDFLAGS)
1413 test_plugin_network_LDADD = \
1419 if BUILD_WITH_LIBSOCKET
1420 test_plugin_network_LDADD += -lsocket
1422 if BUILD_WITH_LIBNSL
1423 test_plugin_network_LDADD += -lnsl
1425 check_PROGRAMS += test_plugin_network
1429 pkglib_LTLIBRARIES += nfs.la
1430 nfs_la_SOURCES = src/nfs.c
1431 nfs_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1434 if BUILD_PLUGIN_NGINX
1435 pkglib_LTLIBRARIES += nginx.la
1436 nginx_la_SOURCES = src/nginx.c
1437 nginx_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS)
1438 nginx_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1439 nginx_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS)
1442 if BUILD_PLUGIN_NOTIFY_DESKTOP
1443 pkglib_LTLIBRARIES += notify_desktop.la
1444 notify_desktop_la_SOURCES = src/notify_desktop.c
1445 notify_desktop_la_CFLAGS = $(AM_CFLAGS) $(LIBNOTIFY_CFLAGS)
1446 notify_desktop_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1447 notify_desktop_la_LIBADD = $(LIBNOTIFY_LIBS)
1450 if BUILD_PLUGIN_NOTIFY_EMAIL
1451 pkglib_LTLIBRARIES += notify_email.la
1452 notify_email_la_SOURCES = src/notify_email.c
1453 notify_email_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBESMTP_CPPFLAGS)
1454 notify_email_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBESMTP_LDFLAGS)
1455 notify_email_la_LIBADD = $(BUILD_WITH_LIBESMTP_LIBS)
1458 if BUILD_PLUGIN_NOTIFY_NAGIOS
1459 pkglib_LTLIBRARIES += notify_nagios.la
1460 notify_nagios_la_SOURCES = src/notify_nagios.c
1461 notify_nagios_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1464 if BUILD_PLUGIN_NTPD
1465 pkglib_LTLIBRARIES += ntpd.la
1466 ntpd_la_SOURCES = src/ntpd.c
1467 ntpd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1469 if BUILD_WITH_LIBSOCKET
1470 ntpd_la_LIBADD += -lsocket
1474 if BUILD_PLUGIN_NUMA
1475 pkglib_LTLIBRARIES += numa.la
1476 numa_la_SOURCES = src/numa.c
1477 numa_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1481 pkglib_LTLIBRARIES += nut.la
1482 nut_la_SOURCES = src/nut.c
1483 nut_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
1484 nut_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1485 nut_la_LIBADD = $(BUILD_WITH_LIBUPSCLIENT_LIBS)
1488 if BUILD_PLUGIN_OLSRD
1489 pkglib_LTLIBRARIES += olsrd.la
1490 olsrd_la_SOURCES = src/olsrd.c
1491 olsrd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1493 if BUILD_WITH_LIBSOCKET
1494 olsrd_la_LIBADD += -lsocket
1498 if BUILD_PLUGIN_ONEWIRE
1499 pkglib_LTLIBRARIES += onewire.la
1500 onewire_la_SOURCES = src/onewire.c
1501 onewire_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
1502 onewire_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBOWCAPI_LDFLAGS)
1503 onewire_la_LIBADD = libignorelist.la $(BUILD_WITH_LIBOWCAPI_LIBS)
1506 if BUILD_PLUGIN_OPENLDAP
1507 pkglib_LTLIBRARIES += openldap.la
1508 openldap_la_SOURCES = src/openldap.c
1509 openldap_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBLDAP_CPPFLAGS)
1510 openldap_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBLDAP_LDFLAGS)
1511 openldap_la_LIBADD = -lldap
1514 if BUILD_PLUGIN_OPENVPN
1515 pkglib_LTLIBRARIES += openvpn.la
1516 openvpn_la_SOURCES = src/openvpn.c
1517 openvpn_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1520 if BUILD_PLUGIN_ORACLE
1521 pkglib_LTLIBRARIES += oracle.la
1522 oracle_la_SOURCES = \
1524 src/utils/db_query/db_query.c \
1525 src/utils/db_query/db_query.h
1526 oracle_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_ORACLE_CPPFLAGS)
1527 oracle_la_LIBADD = $(BUILD_WITH_ORACLE_LIBS)
1528 oracle_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1531 if BUILD_PLUGIN_OVS_EVENTS
1532 pkglib_LTLIBRARIES += ovs_events.la
1533 ovs_events_la_SOURCES = \
1535 src/utils/ovs/ovs.c \
1537 ovs_events_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
1538 ovs_events_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
1539 ovs_events_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
1542 if BUILD_PLUGIN_OVS_STATS
1543 pkglib_LTLIBRARIES += ovs_stats.la
1544 ovs_stats_la_SOURCES = \
1546 src/utils/ovs/ovs.c \
1548 ovs_stats_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
1549 ovs_stats_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
1550 ovs_stats_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
1553 if BUILD_PLUGIN_PCIE_ERRORS
1554 pkglib_LTLIBRARIES += pcie_errors.la
1555 pcie_errors_la_SOURCES = src/pcie_errors.c
1556 pcie_errors_la_CPPFLAGS = $(AM_CPPFLAGS)
1557 pcie_errors_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1559 test_plugin_pcie_errors_SOURCES = \
1560 src/pcie_errors_test.c \
1561 src/daemon/utils_llist.c \
1562 src/daemon/configfile.c \
1563 src/daemon/types_list.c
1564 test_plugin_pcie_errors_CPPFLAGS = $(AM_CPPFLAGS)
1565 test_plugin_pcie_errors_LDFLAGS = $(PLUGIN_LDFLAGS)
1566 test_plugin_pcie_errors_LDADD = liboconfig.la libplugin_mock.la
1567 check_PROGRAMS += test_plugin_pcie_errors
1568 TESTS += test_plugin_pcie_errors
1571 if BUILD_PLUGIN_PERL
1572 pkglib_LTLIBRARIES += perl.la
1573 perl_la_SOURCES = src/perl.c
1574 # Despite C99 providing the "bool" type thru stdbool.h, Perl defines its own
1575 # version of that type if HAS_BOOL is not defined... *sigh*
1576 perl_la_CPPFLAGS = $(AM_CPPFLAGS) -DHAS_BOOL=1
1577 # Despite off_t being 64 bit wide on 64 bit platforms, Perl insist on using
1578 # off64_t which is only exposed when _LARGEFILE64_SOURCE is defined... *sigh*
1579 # On older platforms we also need _REENTRANT. _GNU_SOURCE sets both of these.
1580 perl_la_CPPFLAGS += -D_GNU_SOURCE
1581 perl_la_CFLAGS = $(AM_CFLAGS) \
1583 -DXS_VERSION=\"$(VERSION)\" -DVERSION=\"$(VERSION)\"
1584 perl_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(PERL_LDFLAGS)
1585 perl_la_LIBADD = $(PERL_LIBS)
1589 pkglib_LTLIBRARIES += pf.la
1590 pf_la_SOURCES = src/pf.c
1591 pf_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1594 if BUILD_PLUGIN_PINBA
1595 pkglib_LTLIBRARIES += pinba.la
1596 pinba_la_SOURCES = src/pinba.c
1597 nodist_pinba_la_SOURCES = \
1600 pinba_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPROTOBUF_C_CPPFLAGS)
1601 pinba_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBPROTOBUF_C_LDFLAGS)
1602 pinba_la_LIBADD = $(BUILD_WITH_LIBPROTOBUF_C_LIBS)
1605 if BUILD_PLUGIN_PING
1606 pkglib_LTLIBRARIES += ping.la
1607 ping_la_SOURCES = src/ping.c
1608 ping_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOPING_CPPFLAGS)
1609 ping_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBOPING_LDFLAGS)
1610 ping_la_LIBADD = -loping -lm
1613 if BUILD_PLUGIN_POSTGRESQL
1614 pkglib_LTLIBRARIES += postgresql.la
1615 postgresql_la_SOURCES = \
1617 src/utils/db_query/db_query.c \
1618 src/utils/db_query/db_query.h
1619 postgresql_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPQ_CPPFLAGS)
1620 postgresql_la_LDFLAGS = $(PLUGIN_LDFLAGS) \
1621 $(BUILD_WITH_LIBPQ_LDFLAGS)
1622 postgresql_la_LIBADD = $(BUILD_WITH_LIBPQ_LIBS)
1625 if BUILD_PLUGIN_POWERDNS
1626 pkglib_LTLIBRARIES += powerdns.la
1627 powerdns_la_SOURCES = src/powerdns.c
1628 powerdns_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1631 if BUILD_PLUGIN_PYTHON
1632 pkglib_LTLIBRARIES += python.la
1633 python_la_SOURCES = \
1638 python_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBPYTHON_CPPFLAGS)
1639 python_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBPYTHON_LDFLAGS)
1643 noinst_LTLIBRARIES += libtaskstats.la
1644 libtaskstats_la_SOURCES = \
1645 src/utils/taskstats/taskstats.c \
1646 src/utils/taskstats/taskstats.h
1647 libtaskstats_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMNL_CFLAGS)
1648 libtaskstats_la_LIBADD = $(BUILD_WITH_LIBMNL_LIBS)
1651 if BUILD_PLUGIN_PROCESSES
1652 pkglib_LTLIBRARIES += processes.la
1653 processes_la_SOURCES = src/processes.c
1654 processes_la_CPPFLAGS = $(AM_CPPFLAGS)
1655 processes_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1656 processes_la_LIBADD =
1657 if BUILD_WITH_LIBKVM_GETPROCS
1658 processes_la_LIBADD += -lkvm
1661 processes_la_CPPFLAGS += -DHAVE_LIBTASKSTATS=1
1662 processes_la_LIBADD += libtaskstats.la
1666 if BUILD_PLUGIN_PROCEVENT
1667 pkglib_LTLIBRARIES += procevent.la
1668 procevent_la_SOURCES = src/procevent.c
1669 procevent_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
1670 procevent_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
1671 procevent_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS) libignorelist.la
1674 if BUILD_PLUGIN_PROTOCOLS
1675 pkglib_LTLIBRARIES += protocols.la
1676 protocols_la_SOURCES = src/protocols.c
1677 protocols_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1678 protocols_la_LIBADD = libignorelist.la
1681 if BUILD_PLUGIN_REDIS
1682 pkglib_LTLIBRARIES += redis.la
1683 redis_la_SOURCES = src/redis.c
1684 redis_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBHIREDIS_CPPFLAGS)
1685 redis_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBHIREDIS_LDFLAGS)
1686 redis_la_LIBADD = -lhiredis
1689 if BUILD_PLUGIN_ROUTEROS
1690 pkglib_LTLIBRARIES += routeros.la
1691 routeros_la_SOURCES = src/routeros.c
1692 routeros_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBROUTEROS_CPPFLAGS)
1693 routeros_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBROUTEROS_LDFLAGS)
1694 routeros_la_LIBADD = -lrouteros
1697 if BUILD_PLUGIN_RRDCACHED
1698 pkglib_LTLIBRARIES += rrdcached.la
1699 rrdcached_la_SOURCES = \
1701 src/utils/rrdcreate/rrdcreate.c \
1702 src/utils/rrdcreate/rrdcreate.h
1703 rrdcached_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
1704 rrdcached_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRRD_LDFLAGS)
1705 rrdcached_la_LIBADD = $(BUILD_WITH_LIBRRD_LIBS)
1708 if BUILD_PLUGIN_RRDTOOL
1709 pkglib_LTLIBRARIES += rrdtool.la
1710 rrdtool_la_SOURCES = \
1712 src/utils/rrdcreate/rrdcreate.c \
1713 src/utils/rrdcreate/rrdcreate.h
1714 rrdtool_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
1715 rrdtool_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRRD_LDFLAGS)
1716 rrdtool_la_LIBADD = $(BUILD_WITH_LIBRRD_LIBS)
1719 if BUILD_PLUGIN_SENSORS
1720 pkglib_LTLIBRARIES += sensors.la
1721 sensors_la_SOURCES = src/sensors.c
1722 sensors_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBSENSORS_CPPFLAGS)
1723 sensors_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBSENSORS_LDFLAGS)
1724 sensors_la_LIBADD = libignorelist.la $(BUILD_WITH_LIBSENSORS_LIBS)
1727 if BUILD_PLUGIN_SERIAL
1728 pkglib_LTLIBRARIES += serial.la
1729 serial_la_SOURCES = src/serial.c
1730 serial_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1733 if BUILD_PLUGIN_SIGROK
1734 pkglib_LTLIBRARIES += sigrok.la
1735 sigrok_la_SOURCES = src/sigrok.c
1736 sigrok_la_CFLAGS = $(AM_CFLAGS) $(LIBSIGROK_CFLAGS)
1737 sigrok_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1738 sigrok_la_LIBADD = $(LIBSIGROK_LIBS)
1741 if BUILD_PLUGIN_SMART
1742 if BUILD_WITH_LIBUDEV
1743 pkglib_LTLIBRARIES += smart.la
1744 smart_la_SOURCES = src/smart.c
1745 smart_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBATASMART_CPPFLAGS) $(BUILD_WITH_LIBUDEV_CPPFLAGS)
1746 smart_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBATASMART_LDFLAGS) $(BUILD_WITH_LIBUDEV_LDFLAGS)
1747 smart_la_LIBADD = libignorelist.la $(BUILD_WITH_LIBATASMART_LIBS) $(BUILD_WITH_LIBUDEV_LIBS)
1751 if BUILD_PLUGIN_SNMP
1752 pkglib_LTLIBRARIES += snmp.la
1753 snmp_la_SOURCES = src/snmp.c
1754 snmp_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBNETSNMP_CPPFLAGS)
1755 snmp_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBNETSNMP_LDFLAGS)
1756 snmp_la_LIBADD = libignorelist.la $(BUILD_WITH_LIBNETSNMP_LIBS)
1759 if BUILD_PLUGIN_SNMP_AGENT
1760 pkglib_LTLIBRARIES += snmp_agent.la
1761 snmp_agent_la_SOURCES = src/snmp_agent.c
1762 snmp_agent_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBNETSNMPAGENT_CPPFLAGS)
1763 snmp_agent_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBNETSNMPAGENT_LDFLAGS)
1764 snmp_agent_la_LIBADD = $(BUILD_WITH_LIBNETSNMPAGENT_LIBS)
1766 test_plugin_snmp_agent_SOURCES = src/snmp_agent_test.c \
1767 src/utils/avltree/avltree.c \
1768 src/daemon/utils_llist.c \
1769 src/daemon/configfile.c \
1770 src/daemon/types_list.c
1771 test_plugin_snmp_agent_CPPFLAGS = $(AM_CPPFLAGS) \
1772 $(BUILD_WITH_LIBNETSNMPAGENT_CPPFLAGS)
1773 test_plugin_snmp_agent_LDFLAGS = $(PLUGIN_LDFLAGS) \
1774 $(BUILD_WITH_LIBNETSNMPAGENT_LDFLAGS)
1775 test_plugin_snmp_agent_LDADD = liboconfig.la libplugin_mock.la \
1776 $(BUILD_WITH_LIBNETSNMPAGENT_LIBS) $(BUILD_WITH_LIBNETSNMP_LIBS)
1778 check_PROGRAMS += test_plugin_snmp_agent
1779 TESTS += test_plugin_snmp_agent
1784 if BUILD_PLUGIN_STATSD
1785 pkglib_LTLIBRARIES += statsd.la
1786 statsd_la_SOURCES = src/statsd.c
1787 statsd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1788 statsd_la_LIBADD = liblatency.la
1791 if BUILD_PLUGIN_SWAP
1792 pkglib_LTLIBRARIES += swap.la
1793 swap_la_SOURCES = src/swap.c
1794 swap_la_CFLAGS = $(AM_CFLAGS)
1795 swap_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1797 if BUILD_WITH_LIBKSTAT
1798 swap_la_LIBADD += -lkstat
1800 if BUILD_WITH_LIBDEVINFO
1801 swap_la_LIBADD += -ldevinfo
1803 if BUILD_WITH_LIBKVM_GETSWAPINFO
1804 swap_la_LIBADD += -lkvm
1806 if BUILD_WITH_LIBSTATGRAB
1807 swap_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1808 swap_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1810 if BUILD_WITH_PERFSTAT
1811 swap_la_LIBADD += -lperfstat
1816 if BUILD_PLUGIN_SYNPROXY
1817 pkglib_LTLIBRARIES += synproxy.la
1818 synproxy_la_SOURCES = src/synproxy.c
1819 synproxy_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1822 if BUILD_PLUGIN_SYSEVENT
1823 pkglib_LTLIBRARIES += sysevent.la
1824 sysevent_la_SOURCES = src/sysevent.c
1825 sysevent_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
1826 sysevent_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
1827 sysevent_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS) libignorelist.la
1830 if BUILD_PLUGIN_SYSLOG
1831 pkglib_LTLIBRARIES += syslog.la
1832 syslog_la_SOURCES = src/syslog.c
1833 syslog_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1836 if BUILD_PLUGIN_TABLE
1837 pkglib_LTLIBRARIES += table.la
1838 table_la_SOURCES = src/table.c
1839 table_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1842 if BUILD_PLUGIN_TAIL
1843 pkglib_LTLIBRARIES += tail.la
1846 src/utils/match/match.c \
1847 src/utils/match/match.h \
1848 src/utils/tail/tail.c \
1849 src/utils/tail/tail.h \
1850 src/utils_tail_match.c \
1851 src/utils_tail_match.h
1852 tail_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1853 tail_la_LIBADD = liblatency.la
1856 if BUILD_PLUGIN_TAIL_CSV
1857 pkglib_LTLIBRARIES += tail_csv.la
1858 tail_csv_la_SOURCES = \
1860 src/utils/tail/tail.c \
1861 src/utils/tail/tail.h
1862 tail_csv_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1865 if BUILD_PLUGIN_TAPE
1866 pkglib_LTLIBRARIES += tape.la
1867 tape_la_SOURCES = src/tape.c
1868 tape_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1869 tape_la_LIBADD = -lkstat -ldevinfo
1872 if BUILD_PLUGIN_TARGET_NOTIFICATION
1873 pkglib_LTLIBRARIES += target_notification.la
1874 target_notification_la_SOURCES = src/target_notification.c
1875 target_notification_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1878 if BUILD_PLUGIN_TARGET_REPLACE
1879 pkglib_LTLIBRARIES += target_replace.la
1880 target_replace_la_SOURCES = src/target_replace.c
1881 target_replace_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1884 if BUILD_PLUGIN_TARGET_SCALE
1885 pkglib_LTLIBRARIES += target_scale.la
1886 target_scale_la_SOURCES = src/target_scale.c
1887 target_scale_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1890 if BUILD_PLUGIN_TARGET_SET
1891 pkglib_LTLIBRARIES += target_set.la
1892 target_set_la_SOURCES = src/target_set.c
1893 target_set_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1896 if BUILD_PLUGIN_TARGET_V5UPGRADE
1897 pkglib_LTLIBRARIES += target_v5upgrade.la
1898 target_v5upgrade_la_SOURCES = src/target_v5upgrade.c
1899 target_v5upgrade_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1902 if BUILD_PLUGIN_TCPCONNS
1903 pkglib_LTLIBRARIES += tcpconns.la
1904 tcpconns_la_SOURCES = src/tcpconns.c
1905 tcpconns_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1906 tcpconns_la_LIBADD =
1907 if BUILD_WITH_LIBKVM_NLIST
1908 tcpconns_la_LIBADD += -lkvm
1912 if BUILD_PLUGIN_TEAMSPEAK2
1913 pkglib_LTLIBRARIES += teamspeak2.la
1914 teamspeak2_la_SOURCES = src/teamspeak2.c
1915 teamspeak2_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1919 pkglib_LTLIBRARIES += ted.la
1920 ted_la_SOURCES = src/ted.c
1921 ted_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1924 if BUILD_PLUGIN_THERMAL
1925 pkglib_LTLIBRARIES += thermal.la
1926 thermal_la_SOURCES = src/thermal.c
1927 thermal_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1928 thermal_la_LIBADD = libignorelist.la
1931 if BUILD_PLUGIN_THRESHOLD
1932 pkglib_LTLIBRARIES += threshold.la
1933 threshold_la_SOURCES = src/threshold.c
1934 threshold_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1937 if BUILD_PLUGIN_TOKYOTYRANT
1938 pkglib_LTLIBRARIES += tokyotyrant.la
1939 tokyotyrant_la_SOURCES = src/tokyotyrant.c
1940 tokyotyrant_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS)
1941 tokyotyrant_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS)
1942 tokyotyrant_la_LIBADD = $(BUILD_WITH_LIBTOKYOTYRANT_LIBS)
1943 if BUILD_WITH_LIBSOCKET
1944 tokyotyrant_la_LIBADD += -lsocket
1948 if BUILD_PLUGIN_TURBOSTAT
1949 pkglib_LTLIBRARIES += turbostat.la
1950 turbostat_la_SOURCES = \
1953 turbostat_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1956 if BUILD_PLUGIN_UNIXSOCK
1957 pkglib_LTLIBRARIES += unixsock.la
1958 unixsock_la_SOURCES = src/unixsock.c
1959 unixsock_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1960 unixsock_la_LIBADD = libcmds.la
1963 if BUILD_PLUGIN_UPTIME
1964 pkglib_LTLIBRARIES += uptime.la
1965 uptime_la_SOURCES = src/uptime.c
1966 uptime_la_CFLAGS = $(AM_CFLAGS)
1967 uptime_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1969 if BUILD_WITH_LIBKSTAT
1970 uptime_la_LIBADD += -lkstat
1972 if BUILD_WITH_PERFSTAT
1973 uptime_la_LIBADD += -lperfstat
1977 if BUILD_PLUGIN_USERS
1978 pkglib_LTLIBRARIES += users.la
1979 users_la_SOURCES = src/users.c
1980 users_la_CFLAGS = $(AM_CFLAGS)
1981 users_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1983 if BUILD_WITH_LIBSTATGRAB
1984 users_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1985 users_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1989 if BUILD_PLUGIN_UUID
1990 pkglib_LTLIBRARIES += uuid.la
1991 uuid_la_SOURCES = src/uuid.c
1992 uuid_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1995 if BUILD_PLUGIN_VARNISH
1996 pkglib_LTLIBRARIES += varnish.la
1997 varnish_la_SOURCES = src/varnish.c
1998 varnish_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBVARNISH_CFLAGS)
1999 varnish_la_LDFLAGS = $(PLUGIN_LDFLAGS)
2000 varnish_la_LIBADD = $(BUILD_WITH_LIBVARNISH_LIBS)
2003 if BUILD_PLUGIN_VIRT
2004 pkglib_LTLIBRARIES += virt.la
2005 virt_la_SOURCES = src/virt.c
2006 virt_la_CFLAGS = $(AM_CFLAGS) \
2007 $(BUILD_WITH_LIBVIRT_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
2008 virt_la_LDFLAGS = $(PLUGIN_LDFLAGS)
2009 virt_la_LIBADD = libignorelist.la $(BUILD_WITH_LIBVIRT_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
2011 test_plugin_virt_SOURCES = src/virt_test.c src/daemon/configfile.c \
2012 src/daemon/types_list.c
2013 test_plugin_virt_CPPFLAGS = $(AM_CPPFLAGS) \
2014 $(BUILD_WITH_LIBVIRT_CPPFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
2015 test_plugin_virt_LDFLAGS = $(PLUGIN_LDFLAGS) \
2016 $(BUILD_WITH_LIBVIRT_LDFLAGS) $(BUILD_WITH_LIBXML2_LDFLAGS)
2017 test_plugin_virt_LDADD = liboconfig.la libplugin_mock.la \
2018 $(BUILD_WITH_LIBVIRT_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
2019 check_PROGRAMS += test_plugin_virt
2020 TESTS += test_plugin_virt
2023 if BUILD_PLUGIN_VMEM
2024 pkglib_LTLIBRARIES += vmem.la
2025 vmem_la_SOURCES = src/vmem.c
2026 vmem_la_LDFLAGS = $(PLUGIN_LDFLAGS)
2029 if BUILD_PLUGIN_VSERVER
2030 pkglib_LTLIBRARIES += vserver.la
2031 vserver_la_SOURCES = src/vserver.c
2032 vserver_la_LDFLAGS = $(PLUGIN_LDFLAGS)
2035 if BUILD_PLUGIN_WIRELESS
2036 pkglib_LTLIBRARIES += wireless.la
2037 wireless_la_SOURCES = src/wireless.c
2038 wireless_la_LDFLAGS = $(PLUGIN_LDFLAGS)
2041 if BUILD_PLUGIN_WRITE_GRAPHITE
2042 pkglib_LTLIBRARIES += write_graphite.la
2043 write_graphite_la_SOURCES = src/write_graphite.c
2044 write_graphite_la_LDFLAGS = $(PLUGIN_LDFLAGS)
2045 write_graphite_la_LIBADD = libformat_graphite.la
2048 if BUILD_PLUGIN_WRITE_HTTP
2049 pkglib_LTLIBRARIES += write_http.la
2050 write_http_la_SOURCES = \
2052 src/utils/format_kairosdb/format_kairosdb.c \
2053 src/utils/format_kairosdb/format_kairosdb.h
2054 write_http_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS)
2055 write_http_la_LDFLAGS = $(PLUGIN_LDFLAGS)
2056 write_http_la_LIBADD = libformat_json.la $(BUILD_WITH_LIBCURL_LIBS)
2059 if BUILD_PLUGIN_WRITE_KAFKA
2060 pkglib_LTLIBRARIES += write_kafka.la
2061 write_kafka_la_SOURCES = src/write_kafka.c
2062 write_kafka_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBRDKAFKA_CPPFLAGS)
2063 write_kafka_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRDKAFKA_LDFLAGS)
2064 write_kafka_la_LIBADD = \
2066 libformat_graphite.la \
2068 $(BUILD_WITH_LIBRDKAFKA_LIBS)
2071 if BUILD_PLUGIN_WRITE_LOG
2072 pkglib_LTLIBRARIES += write_log.la
2073 write_log_la_SOURCES = src/write_log.c
2074 write_log_la_LDFLAGS = $(PLUGIN_LDFLAGS)
2075 write_log_la_LIBADD = libformat_graphite.la libformat_json.la
2078 if BUILD_PLUGIN_WRITE_MONGODB
2079 pkglib_LTLIBRARIES += write_mongodb.la
2080 write_mongodb_la_SOURCES = src/write_mongodb.c
2081 write_mongodb_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMONGOC_CFLAGS)
2082 write_mongodb_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMONGOC_LDFLAGS)
2083 write_mongodb_la_LIBADD = $(BUILD_WITH_LIBMONGOC_LIBS)
2086 if BUILD_PLUGIN_WRITE_PROMETHEUS
2087 pkglib_LTLIBRARIES += write_prometheus.la
2088 write_prometheus_la_SOURCES = src/write_prometheus.c
2089 nodist_write_prometheus_la_SOURCES = \
2092 write_prometheus_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPROTOBUF_C_CPPFLAGS) $(BUILD_WITH_LIBMICROHTTPD_CPPFLAGS)
2093 write_prometheus_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBPROTOBUF_C_LDFLAGS) $(BUILD_WITH_LIBMICROHTTPD_LDFLAGS)
2094 write_prometheus_la_LIBADD = $(BUILD_WITH_LIBPROTOBUF_C_LIBS) $(BUILD_WITH_LIBMICROHTTPD_LIBS)
2097 if BUILD_PLUGIN_WRITE_REDIS
2098 pkglib_LTLIBRARIES += write_redis.la
2099 write_redis_la_SOURCES = src/write_redis.c
2100 write_redis_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBHIREDIS_CPPFLAGS)
2101 write_redis_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBHIREDIS_LDFLAGS)
2102 write_redis_la_LIBADD = -lhiredis
2105 if BUILD_PLUGIN_WRITE_RIEMANN
2106 pkglib_LTLIBRARIES += write_riemann.la
2107 write_riemann_la_SOURCES = \
2108 src/write_riemann.c \
2109 src/write_riemann_threshold.c \
2110 src/write_riemann_threshold.h
2111 write_riemann_la_CFLAGS = $(AM_CFLAGS) $(LIBRIEMANN_CLIENT_CFLAGS)
2112 write_riemann_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBRIEMANN_CLIENT_LIBS)
2115 if BUILD_PLUGIN_WRITE_SENSU
2116 pkglib_LTLIBRARIES += write_sensu.la
2117 write_sensu_la_SOURCES = src/write_sensu.c
2118 write_sensu_la_LDFLAGS = $(PLUGIN_LDFLAGS)
2121 if BUILD_PLUGIN_WRITE_STACKDRIVER
2122 pkglib_LTLIBRARIES += write_stackdriver.la
2123 write_stackdriver_la_SOURCES = src/write_stackdriver.c
2124 write_stackdriver_la_LDFLAGS = $(PLUGIN_LDFLAGS)
2125 write_stackdriver_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS)
2126 write_stackdriver_la_LIBADD = libformat_stackdriver.la libgce.la liboauth.la \
2127 $(BUILD_WITH_LIBCURL_LIBS)
2130 if BUILD_PLUGIN_WRITE_SYSLOG
2131 pkglib_LTLIBRARIES += write_syslog.la
2132 write_syslog_la_SOURCES = src/write_syslog.c
2133 write_syslog_la_LDFLAGS = $(PLUGIN_LDFLAGS)
2136 if BUILD_PLUGIN_WRITE_TSDB
2137 pkglib_LTLIBRARIES += write_tsdb.la
2138 write_tsdb_la_SOURCES = src/write_tsdb.c
2139 write_tsdb_la_LDFLAGS = $(PLUGIN_LDFLAGS)
2142 if BUILD_PLUGIN_XENCPU
2143 pkglib_LTLIBRARIES += xencpu.la
2144 xencpu_la_SOURCES = src/xencpu.c
2145 xencpu_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBXENCTL_CPPFLAGS)
2146 xencpu_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBXENCTL_LDFLAGS)
2147 xencpu_la_LIBADD = -lxenctrl
2150 if BUILD_PLUGIN_XMMS
2151 pkglib_LTLIBRARIES += xmms.la
2152 xmms_la_SOURCES = src/xmms.c
2153 xmms_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBXMMS_CFLAGS)
2154 xmms_la_LDFLAGS = $(PLUGIN_LDFLAGS)
2155 xmms_la_LIBADD = $(BUILD_WITH_LIBXMMS_LIBS)
2158 if BUILD_PLUGIN_ZFS_ARC
2159 pkglib_LTLIBRARIES += zfs_arc.la
2160 zfs_arc_la_SOURCES = src/zfs_arc.c
2161 zfs_arc_la_LDFLAGS = $(PLUGIN_LDFLAGS)
2163 zfs_arc_la_LIBADD = -lm
2166 zfs_arc_la_LIBADD = -lkstat
2170 if BUILD_PLUGIN_ZOOKEEPER
2171 pkglib_LTLIBRARIES += zookeeper.la
2172 zookeeper_la_SOURCES = src/zookeeper.c
2173 zookeeper_la_LDFLAGS = $(PLUGIN_LDFLAGS)
2176 if BUILD_PLUGIN_ZONE
2177 pkglib_LTLIBRARIES += zone.la
2178 zone_la_SOURCES = src/zone.c
2179 zone_la_LDFLAGS = $(PLUGIN_LDFLAGS)
2182 AM_V_POD2MAN_C = $(am__v_POD2MAN_C_@AM_V@)
2183 am__v_POD2MAN_C_ = $(am__v_POD2MAN_C_@AM_DEFAULT_V@)
2184 am__v_POD2MAN_C_0 = @echo " POD2MAN " $@;
2188 $(AM_V_POD2MAN_C)pod2man --release=$(VERSION) --center=$(PACKAGE) $< $@
2191 $(AM_V_POD2MAN_C)pod2man --section=5 --release=$(VERSION) --center=$(PACKAGE) $< $@
2193 V_PROTOC = $(v_protoc_@AM_V@)
2194 v_protoc_ = $(v_protoc_@AM_DEFAULT_V@)
2195 v_protoc_0 = @echo " PROTOC " $@;
2197 AM_V_PROTOC_C = $(am__v_PROTOC_C_@AM_V@)
2198 am__v_PROTOC_C_ = $(am__v_PROTOC_C_@AM_DEFAULT_V@)
2199 am__v_PROTOC_C_0 = @echo " PROTOC-C" $@;
2202 # Protocol buffer for the "pinba" plugin.
2203 if BUILD_PLUGIN_PINBA
2204 BUILT_SOURCES += src/pinba.pb-c.c src/pinba.pb-c.h
2206 src/pinba.pb-c.c src/pinba.pb-c.h: $(srcdir)/src/pinba.proto
2207 $(AM_V_PROTOC_C)$(PROTOC_C) -I$(srcdir) --c_out . $(srcdir)/src/pinba.proto
2210 # Protocol buffer for the "write_prometheus" plugin.
2211 if BUILD_PLUGIN_WRITE_PROMETHEUS
2212 BUILT_SOURCES += prometheus.pb-c.c prometheus.pb-c.h
2214 prometheus.pb-c.c prometheus.pb-c.h: $(srcdir)/proto/prometheus.proto
2215 $(AM_V_PROTOC_C)$(PROTOC_C) -I$(srcdir)/proto --c_out=$(builddir) $(srcdir)/proto/prometheus.proto
2220 BUILT_SOURCES += collectd.grpc.pb.cc collectd.pb.cc types.pb.cc
2222 collectd.grpc.pb.cc: $(srcdir)/proto/collectd.proto $(srcdir)/proto/types.proto
2223 $(V_PROTOC)$(PROTOC) -I$(srcdir)/proto \
2224 --grpc_out=$(builddir) --plugin=protoc-gen-grpc=$(GRPC_CPP_PLUGIN) $<
2226 collectd.pb.cc: $(srcdir)/proto/collectd.proto $(srcdir)/proto/types.proto
2227 $(V_PROTOC)$(PROTOC) -I$(srcdir)/proto --cpp_out=$(builddir) $<
2229 types.pb.cc: $(srcdir)/proto/types.proto
2230 $(V_PROTOC)$(PROTOC) -I$(srcdir)/proto --cpp_out=$(builddir) $<
2235 $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run
2236 $(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/$(PACKAGE_NAME)
2237 $(mkinstalldirs) $(DESTDIR)$(localstatedir)/log
2238 $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
2239 if test -e $(DESTDIR)$(sysconfdir)/collectd.conf; \
2241 $(INSTALL) -m 0640 $(builddir)/src/collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf.pkg-orig; \
2243 $(INSTALL) -m 0640 $(builddir)/src/collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf; \
2245 $(mkinstalldirs) $(DESTDIR)$(cpkgdatadir)
2246 $(INSTALL) -m 0644 $(srcdir)/src/types.db $(DESTDIR)$(cpkgdatadir)/types.db;
2247 $(INSTALL) -m 0644 $(srcdir)/src/postgresql_default.conf \
2248 $(DESTDIR)$(cpkgdatadir)/postgresql_default.conf;
2251 rm -f $(DESTDIR)$(cpkgdatadir)/types.db;
2252 rm -f $(DESTDIR)$(sysconfdir)/collectd.conf
2253 rm -f $(DESTDIR)$(cpkgdatadir)/postgresql_default.conf;
2255 all-local: @PERL_BINDINGS@
2258 [ ! -f buildperl/Makefile ] || ( cd buildperl && $(MAKE) install )
2260 # Perl 'make uninstall' does not work as well as wanted.
2261 # So we do the work here.
2263 @PERL@ -I$(DESTDIR)$(prefix) $(srcdir)/bindings/perl/uninstall_mod.pl Collectd
2264 find $(DESTDIR)$(prefix) -name "perllocal.pod" -exec rm {} \;
2269 perl: buildperl/Makefile
2270 cd buildperl && $(MAKE)
2272 buildperl/Makefile: .perl-directory-stamp buildperl/Makefile.PL \
2273 $(top_builddir)/config.status
2274 @# beautify the output a bit
2275 @echo 'cd buildperl && @PERL@ Makefile.PL @PERL_BINDINGS_OPTIONS@'
2276 @cd buildperl && ( if ! @PERL@ Makefile.PL @PERL_BINDINGS_OPTIONS@; then \
2278 echo 'Check whether you have set $$PERL_MM_OPT in your environment and try using ./configure --with-perl-bindings=""'; \
2282 buildperl/Makefile.PL: .perl-directory-stamp $(top_builddir)/config.status
2284 .perl-directory-stamp:
2285 if test ! -d buildperl; then \
2286 mkdir -p buildperl/Collectd/Plugins; \
2287 cp $(srcdir)/bindings/perl/lib/Collectd.pm buildperl/; \
2288 cp $(srcdir)/bindings/perl/Makefile.PL buildperl/; \
2289 cp $(srcdir)/bindings/perl/lib/Collectd/Unixsock.pm buildperl/Collectd/; \
2290 cp $(srcdir)/bindings/perl/lib/Collectd/Plugins/OpenVZ.pm buildperl/Collectd/Plugins/; \
2298 dist_noinst_JAVA = \
2299 bindings/java/org/collectd/api/Collectd.java \
2300 bindings/java/org/collectd/api/CollectdConfigInterface.java \
2301 bindings/java/org/collectd/api/CollectdFlushInterface.java \
2302 bindings/java/org/collectd/api/CollectdInitInterface.java \
2303 bindings/java/org/collectd/api/CollectdLogInterface.java \
2304 bindings/java/org/collectd/api/CollectdMatchFactoryInterface.java \
2305 bindings/java/org/collectd/api/CollectdMatchInterface.java \
2306 bindings/java/org/collectd/api/CollectdNotificationInterface.java \
2307 bindings/java/org/collectd/api/CollectdReadInterface.java \
2308 bindings/java/org/collectd/api/CollectdShutdownInterface.java \
2309 bindings/java/org/collectd/api/CollectdTargetFactoryInterface.java \
2310 bindings/java/org/collectd/api/CollectdTargetInterface.java \
2311 bindings/java/org/collectd/api/CollectdWriteInterface.java \
2312 bindings/java/org/collectd/api/DataSet.java \
2313 bindings/java/org/collectd/api/DataSource.java \
2314 bindings/java/org/collectd/api/Notification.java \
2315 bindings/java/org/collectd/api/OConfigItem.java \
2316 bindings/java/org/collectd/api/OConfigValue.java \
2317 bindings/java/org/collectd/api/PluginData.java \
2318 bindings/java/org/collectd/api/ValueList.java \
2319 bindings/java/org/collectd/java/GenericJMX.java \
2320 bindings/java/org/collectd/java/GenericJMXConfConnection.java \
2321 bindings/java/org/collectd/java/GenericJMXConfMBean.java \
2322 bindings/java/org/collectd/java/GenericJMXConfValue.java \
2323 bindings/java/org/collectd/java/JMXMemory.java
2325 collectd-api.jar: $(JAVA_TIMESTAMP_FILE)
2326 $(JAR) cf $(JARFLAGS) $@ org/collectd/api/*.class
2328 generic-jmx.jar: $(JAVA_TIMESTAMP_FILE)
2329 $(JAR) cf $(JARFLAGS) $@ org/collectd/java/*.class
2331 jar_DATA = collectd-api.jar generic-jmx.jar