1 SUBDIRS = libcollectdclient
2 if BUILD_WITH_OWN_LIBOCONFIG
7 PLUGIN_LDFLAGS = -module -avoid-version -export-symbols-regex '\<module_register\>'
9 AM_CPPFLAGS = -I$(srcdir)/daemon
10 AM_CPPFLAGS += -DPREFIX='"${prefix}"'
11 AM_CPPFLAGS += -DCONFIGFILE='"${sysconfdir}/${PACKAGE_NAME}.conf"'
12 AM_CPPFLAGS += -DLOCALSTATEDIR='"${localstatedir}"'
13 AM_CPPFLAGS += -DPKGLOCALSTATEDIR='"${localstatedir}/lib/${PACKAGE_NAME}"'
14 if BUILD_FEATURE_DAEMON
15 AM_CPPFLAGS += -DPIDFILE='"${localstatedir}/run/${PACKAGE_NAME}.pid"'
17 AM_CPPFLAGS += -DPLUGINDIR='"${pkglibdir}"'
18 AM_CPPFLAGS += -DPKGDATADIR='"${pkgdatadir}"'
20 AUTOMAKE_OPTIONS = subdir-objects
26 noinst_LTLIBRARIES += liblatency.la
27 liblatency_la_SOURCES = utils_latency.c utils_latency.h
28 check_PROGRAMS += test_utils_latency
29 TESTS += test_utils_latency
30 test_utils_latency_SOURCES = utils_latency_test.c testing.h
31 test_utils_latency_LDADD = liblatency.la daemon/libplugin_mock.la -lm
33 noinst_LTLIBRARIES += liblookup.la
34 liblookup_la_SOURCES = utils_vl_lookup.c utils_vl_lookup.h
35 liblookup_la_LIBADD = daemon/libavltree.la
36 check_PROGRAMS += test_utils_vl_lookup
37 TESTS += test_utils_vl_lookup
38 test_utils_vl_lookup_SOURCES = utils_vl_lookup_test.c testing.h
39 test_utils_vl_lookup_LDADD = liblookup.la daemon/libplugin_mock.la
40 if BUILD_WITH_LIBKSTAT
41 test_utils_vl_lookup_LDADD += -lkstat
44 noinst_LTLIBRARIES += libmount.la
45 libmount_la_SOURCES = utils_mount.c utils_mount.h
46 check_PROGRAMS += test_utils_mount
47 TESTS += test_utils_mount
48 test_utils_mount_SOURCES = utils_mount_test.c testing.h
49 test_utils_mount_LDADD = libmount.la daemon/libplugin_mock.la
50 if BUILD_WITH_LIBKSTAT
51 test_utils_mount_LDADD += -lkstat
54 sbin_PROGRAMS = collectdmon
55 bin_PROGRAMS = collectd-nagios collectdctl collectd-tg
57 collectdmon_SOURCES = collectdmon.c
58 collectdmon_CPPFLAGS = $(AM_CPPFLAGS)
60 collectd_nagios_SOURCES = collectd-nagios.c
61 collectd_nagios_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/libcollectdclient/collectd -I$(top_builddir)/src/libcollectdclient/collectd
62 collectd_nagios_LDADD =
63 if BUILD_WITH_LIBSOCKET
64 collectd_nagios_LDADD += -lsocket
67 collectd_nagios_LDADD += -lm
70 collectd_nagios_LDADD += libcollectdclient/libcollectdclient.la
71 collectd_nagios_DEPENDENCIES = libcollectdclient/libcollectdclient.la
74 collectdctl_SOURCES = collectdctl.c
75 collectdctl_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/libcollectdclient/collectd -I$(top_builddir)/src/libcollectdclient/collectd
77 if BUILD_WITH_LIBSOCKET
78 collectdctl_LDADD += -lsocket
81 collectdctl_LDADD += -lm
83 collectdctl_LDADD += libcollectdclient/libcollectdclient.la
84 collectdctl_DEPENDENCIES = libcollectdclient/libcollectdclient.la
86 collectd_tg_SOURCES = collectd-tg.c
87 collectd_tg_CPPFLAGS = $(AM_CPPFLAGS) \
88 -I$(top_srcdir)/src/libcollectdclient/collectd -I$(top_builddir)/src/libcollectdclient/collectd
89 collectd_tg_LDADD = daemon/libheap.la
90 if BUILD_WITH_LIBSOCKET
91 collectd_tg_LDADD += -lsocket
94 collectd_tg_LDADD += -lrt
97 collectd_tg_LDADD += -lm
99 if BUILD_WITH_LIBPTHREAD
100 collectd_tg_LDADD += $(PTHREAD_LIBS)
102 collectd_tg_LDADD += libcollectdclient/libcollectdclient.la
103 collectd_tg_DEPENDENCIES = libcollectdclient/libcollectdclient.la
111 if BUILD_PLUGIN_AGGREGATION
112 pkglib_LTLIBRARIES += aggregation.la
113 aggregation_la_SOURCES = aggregation.c \
114 utils_vl_lookup.c utils_vl_lookup.h
115 aggregation_la_LDFLAGS = $(PLUGIN_LDFLAGS)
116 aggregation_la_LIBADD = -lm
120 pkglib_LTLIBRARIES += amqp.la
121 amqp_la_SOURCES = amqp.c \
122 utils_cmd_putval.c utils_cmd_putval.h \
123 utils_parse_option.c utils_parse_option.h \
124 utils_format_graphite.c utils_format_graphite.h \
125 utils_format_json.c utils_format_json.h
126 amqp_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRABBITMQ_LDFLAGS)
127 amqp_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBRABBITMQ_CPPFLAGS)
128 amqp_la_LIBADD = $(BUILD_WITH_LIBRABBITMQ_LIBS)
131 if BUILD_PLUGIN_APACHE
132 pkglib_LTLIBRARIES += apache.la
133 apache_la_SOURCES = apache.c
134 apache_la_LDFLAGS = $(PLUGIN_LDFLAGS)
135 apache_la_CFLAGS = $(AM_CFLAGS)
137 if BUILD_WITH_LIBCURL
138 apache_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
139 apache_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
143 if BUILD_PLUGIN_APCUPS
144 pkglib_LTLIBRARIES += apcups.la
145 apcups_la_SOURCES = apcups.c
146 apcups_la_LDFLAGS = $(PLUGIN_LDFLAGS)
148 if BUILD_WITH_LIBSOCKET
149 apcups_la_LIBADD += -lsocket
153 if BUILD_PLUGIN_APPLE_SENSORS
154 pkglib_LTLIBRARIES += apple_sensors.la
155 apple_sensors_la_SOURCES = apple_sensors.c
156 apple_sensors_la_LDFLAGS = $(PLUGIN_LDFLAGS)
157 apple_sensors_la_LDFLAGS += -framework IOKit
160 if BUILD_PLUGIN_AQUAERO
161 pkglib_LTLIBRARIES += aquaero.la
162 aquaero_la_SOURCES = aquaero.c
163 aquaero_la_LDFLAGS = $(PLUGIN_LDFLAGS)
164 aquaero_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBAQUAERO5_CFLAGS)
165 aquaero_la_LIBADD = $(BUILD_WITH_LIBAQUAERO5_LDFLAGS) -laquaero5
168 if BUILD_PLUGIN_ASCENT
169 pkglib_LTLIBRARIES += ascent.la
170 ascent_la_SOURCES = ascent.c
171 ascent_la_LDFLAGS = $(PLUGIN_LDFLAGS)
172 ascent_la_CFLAGS = $(AM_CFLAGS) \
173 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
174 ascent_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
177 if BUILD_PLUGIN_BAROMETER
178 pkglib_LTLIBRARIES += barometer.la
179 barometer_la_SOURCES = barometer.c
180 barometer_la_LDFLAGS = $(PLUGIN_LDFLAGS)
181 barometer_la_LIBADD = -lm
184 if BUILD_PLUGIN_BATTERY
185 pkglib_LTLIBRARIES += battery.la
186 battery_la_SOURCES = battery.c
187 battery_la_LDFLAGS = $(PLUGIN_LDFLAGS)
189 if BUILD_WITH_LIBIOKIT
190 battery_la_LDFLAGS += -framework IOKit
195 pkglib_LTLIBRARIES += bind.la
196 bind_la_SOURCES = bind.c
197 bind_la_LDFLAGS = $(PLUGIN_LDFLAGS)
198 bind_la_CFLAGS = $(AM_CFLAGS) \
199 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
200 bind_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
204 pkglib_LTLIBRARIES += ceph.la
205 ceph_la_SOURCES = ceph.c
206 ceph_la_CFLAGS = $(AM_CFLAGS)
207 ceph_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
208 ceph_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
209 ceph_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
212 if BUILD_PLUGIN_CGROUPS
213 pkglib_LTLIBRARIES += cgroups.la
214 cgroups_la_SOURCES = cgroups.c
215 cgroups_la_LDFLAGS = $(PLUGIN_LDFLAGS)
216 cgroups_la_LIBADD = libmount.la
219 if BUILD_PLUGIN_CONNTRACK
220 pkglib_LTLIBRARIES += conntrack.la
221 conntrack_la_SOURCES = conntrack.c
222 conntrack_la_LDFLAGS = $(PLUGIN_LDFLAGS)
225 if BUILD_PLUGIN_CONTEXTSWITCH
226 pkglib_LTLIBRARIES += contextswitch.la
227 contextswitch_la_SOURCES = contextswitch.c
228 contextswitch_la_LDFLAGS = $(PLUGIN_LDFLAGS)
229 contextswitch_la_LIBADD =
230 if BUILD_WITH_PERFSTAT
231 contextswitch_la_LIBADD += -lperfstat
236 pkglib_LTLIBRARIES += cpu.la
237 cpu_la_SOURCES = cpu.c
238 cpu_la_CFLAGS = $(AM_CFLAGS)
239 cpu_la_LDFLAGS = $(PLUGIN_LDFLAGS)
241 if BUILD_WITH_LIBKSTAT
242 cpu_la_LIBADD += -lkstat
244 if BUILD_WITH_LIBDEVINFO
245 cpu_la_LIBADD += -ldevinfo
247 if BUILD_WITH_LIBSTATGRAB
248 cpu_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
249 cpu_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
251 if BUILD_WITH_PERFSTAT
252 cpu_la_LIBADD += -lperfstat
256 if BUILD_PLUGIN_CPUFREQ
257 pkglib_LTLIBRARIES += cpufreq.la
258 cpufreq_la_SOURCES = cpufreq.c
259 cpufreq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
263 pkglib_LTLIBRARIES += csv.la
264 csv_la_SOURCES = csv.c
265 csv_la_LDFLAGS = $(PLUGIN_LDFLAGS)
269 pkglib_LTLIBRARIES += curl.la
270 curl_la_SOURCES = curl.c
271 curl_la_LDFLAGS = $(PLUGIN_LDFLAGS)
272 curl_la_CFLAGS = $(AM_CFLAGS)
274 if BUILD_WITH_LIBCURL
275 curl_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
276 curl_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
280 if BUILD_PLUGIN_CURL_JSON
281 pkglib_LTLIBRARIES += curl_json.la
282 curl_json_la_SOURCES = curl_json.c
283 curl_json_la_CFLAGS = $(AM_CFLAGS)
284 curl_json_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
285 curl_json_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
286 curl_json_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
287 if BUILD_WITH_LIBCURL
288 curl_json_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
289 curl_json_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
293 if BUILD_PLUGIN_CURL_XML
294 pkglib_LTLIBRARIES += curl_xml.la
295 curl_xml_la_SOURCES = curl_xml.c
296 curl_xml_la_LDFLAGS = $(PLUGIN_LDFLAGS)
297 curl_xml_la_CFLAGS = $(AM_CFLAGS) \
298 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
299 curl_xml_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
303 pkglib_LTLIBRARIES += dbi.la
304 dbi_la_SOURCES = dbi.c \
305 utils_db_query.c utils_db_query.h
306 dbi_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBDBI_CPPFLAGS)
307 dbi_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBDBI_LDFLAGS)
308 dbi_la_LIBADD = $(BUILD_WITH_LIBDBI_LIBS)
312 pkglib_LTLIBRARIES += df.la
314 df_la_LDFLAGS = $(PLUGIN_LDFLAGS)
315 df_la_LIBADD = libmount.la
319 pkglib_LTLIBRARIES += disk.la
320 disk_la_SOURCES = disk.c
321 disk_la_CFLAGS = $(AM_CFLAGS)
322 disk_la_LDFLAGS = $(PLUGIN_LDFLAGS)
324 if BUILD_WITH_LIBKSTAT
325 disk_la_LIBADD += -lkstat
327 if BUILD_WITH_LIBDEVINFO
328 disk_la_LIBADD += -ldevinfo
330 if BUILD_WITH_LIBIOKIT
331 disk_la_LDFLAGS += -framework IOKit
333 if BUILD_WITH_LIBSTATGRAB
334 disk_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
335 disk_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
337 if BUILD_WITH_LIBUDEV
338 disk_la_CFLAGS += $(BUILD_WITH_LIBUDEV_CFLAGS)
339 disk_la_LDFLAGS += $(BUILD_WITH_LIBUDEV_LDFLAGS)
340 disk_la_LIBADD += $(BULD_WITH_LIBUDEV_LIBS)
343 disk_la_LIBADD += -ldevstat -lgeom
345 if BUILD_WITH_PERFSTAT
346 disk_la_LIBADD += -lperfstat
351 pkglib_LTLIBRARIES += dns.la
352 dns_la_SOURCES = dns.c utils_dns.c utils_dns.h
353 dns_la_LDFLAGS = $(PLUGIN_LDFLAGS)
354 dns_la_LIBADD = $(PTHREAD_LIBS) -lpcap
358 pkglib_LTLIBRARIES += drbd.la
359 drbd_la_SOURCES = drbd.c
360 drbd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
363 if BUILD_PLUGIN_EMAIL
364 pkglib_LTLIBRARIES += email.la
365 email_la_SOURCES = email.c
366 email_la_LDFLAGS = $(PLUGIN_LDFLAGS)
367 email_la_LIBADD = $(PTHREAD_LIBS)
370 if BUILD_PLUGIN_ENTROPY
371 pkglib_LTLIBRARIES += entropy.la
372 entropy_la_SOURCES = entropy.c
373 entropy_la_LDFLAGS = $(PLUGIN_LDFLAGS)
377 pkglib_LTLIBRARIES += exec.la
378 exec_la_SOURCES = exec.c \
379 utils_cmd_putnotif.c utils_cmd_putnotif.h \
380 utils_cmd_putval.c utils_cmd_putval.h \
381 utils_parse_option.h utils_parse_option.c
382 exec_la_LDFLAGS = $(PLUGIN_LDFLAGS)
383 exec_la_LIBADD = $(PTHREAD_LIBS)
386 if BUILD_PLUGIN_ETHSTAT
387 pkglib_LTLIBRARIES += ethstat.la
388 ethstat_la_SOURCES = ethstat.c
389 ethstat_la_LDFLAGS = $(PLUGIN_LDFLAGS)
392 if BUILD_PLUGIN_FHCOUNT
393 pkglib_LTLIBRARIES += fhcount.la
394 fhcount_la_SOURCES = fhcount.c
395 fhcount_la_LDFLAGS = $(PLUGIN_LDFLAGS)
398 if BUILD_PLUGIN_FILECOUNT
399 pkglib_LTLIBRARIES += filecount.la
400 filecount_la_SOURCES = filecount.c
401 filecount_la_LDFLAGS = $(PLUGIN_LDFLAGS)
404 if BUILD_PLUGIN_GMOND
405 pkglib_LTLIBRARIES += gmond.la
406 gmond_la_SOURCES = gmond.c
407 gmond_la_CPPFLAGS = $(AM_CPPFLAGS) $(GANGLIA_CPPFLAGS)
408 gmond_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(GANGLIA_LDFLAGS)
409 gmond_la_LIBADD = $(GANGLIA_LIBS)
412 if BUILD_PLUGIN_HDDTEMP
413 pkglib_LTLIBRARIES += hddtemp.la
414 hddtemp_la_SOURCES = hddtemp.c
415 hddtemp_la_LDFLAGS = $(PLUGIN_LDFLAGS)
417 if BUILD_WITH_LIBSOCKET
418 hddtemp_la_LIBADD += -lsocket
422 if BUILD_PLUGIN_INTERFACE
423 pkglib_LTLIBRARIES += interface.la
424 interface_la_SOURCES = interface.c
425 interface_la_CFLAGS = $(AM_CFLAGS)
426 interface_la_LDFLAGS = $(PLUGIN_LDFLAGS)
427 interface_la_LIBADD =
428 if BUILD_WITH_LIBSTATGRAB
429 interface_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
430 interface_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
432 if BUILD_WITH_LIBKSTAT
433 interface_la_LIBADD += -lkstat
435 if BUILD_WITH_LIBDEVINFO
436 interface_la_LIBADD += -ldevinfo
437 endif # BUILD_WITH_LIBDEVINFO
438 endif # !BUILD_WITH_LIBSTATGRAB
439 if BUILD_WITH_PERFSTAT
440 interface_la_LIBADD += -lperfstat
442 endif # BUILD_PLUGIN_INTERFACE
445 pkglib_LTLIBRARIES += ipc.la
446 ipc_la_SOURCES = ipc.c
447 ipc_la_CFLAGS = $(AM_CFLAGS)
448 ipc_la_LDFLAGS = $(PLUGIN_LDFLAGS)
451 if BUILD_PLUGIN_IPTABLES
452 pkglib_LTLIBRARIES += iptables.la
453 iptables_la_SOURCES = iptables.c
454 iptables_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBIPTC_CPPFLAGS)
455 iptables_la_LDFLAGS = $(PLUGIN_LDFLAGS)
456 iptables_la_LIBADD = $(BUILD_WITH_LIBIPTC_LDFLAGS)
460 pkglib_LTLIBRARIES += ipmi.la
461 ipmi_la_SOURCES = ipmi.c
462 ipmi_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_OPENIPMI_CFLAGS)
463 ipmi_la_LDFLAGS = $(PLUGIN_LDFLAGS)
464 ipmi_la_LIBADD = $(BUILD_WITH_OPENIPMI_LIBS)
468 pkglib_LTLIBRARIES += ipvs.la
469 ipvs_la_SOURCES = ipvs.c
470 if IP_VS_H_NEEDS_KERNEL_CFLAGS
471 ipvs_la_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS)
473 ipvs_la_CFLAGS = $(AM_CFLAGS)
475 ipvs_la_LDFLAGS = $(PLUGIN_LDFLAGS)
479 pkglib_LTLIBRARIES += irq.la
480 irq_la_SOURCES = irq.c
481 irq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
485 pkglib_LTLIBRARIES += java.la
486 java_la_SOURCES = java.c
487 java_la_CPPFLAGS = $(AM_CPPFLAGS) $(JAVA_CPPFLAGS)
488 java_la_CFLAGS = $(AM_CFLAGS) $(JAVA_CFLAGS)
489 java_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(JAVA_LDFLAGS)
490 java_la_LIBADD = $(PTHREAD_LIBS) $(JAVA_LIBS)
494 pkglib_LTLIBRARIES += load.la
495 load_la_SOURCES = load.c
496 load_la_CFLAGS = $(AM_CFLAGS)
497 load_la_LDFLAGS = $(PLUGIN_LDFLAGS)
499 if BUILD_WITH_LIBSTATGRAB
500 load_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
501 load_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
502 endif # BUILD_WITH_LIBSTATGRAB
503 if BUILD_WITH_PERFSTAT
504 load_la_LIBADD += -lperfstat
506 endif # BUILD_PLUGIN_LOAD
508 if BUILD_PLUGIN_LOGFILE
509 pkglib_LTLIBRARIES += logfile.la
510 logfile_la_SOURCES = logfile.c
511 logfile_la_LDFLAGS = $(PLUGIN_LDFLAGS)
514 if BUILD_PLUGIN_LOG_LOGSTASH
515 pkglib_LTLIBRARIES += log_logstash.la
516 log_logstash_la_SOURCES = log_logstash.c
517 log_logstash_la_CFLAGS = $(AM_CFLAGS)
518 log_logstash_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
519 log_logstash_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
520 log_logstash_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
524 pkglib_LTLIBRARIES += lpar.la
525 lpar_la_SOURCES = lpar.c
526 lpar_la_LDFLAGS = $(PLUGIN_LDFLAGS)
527 lpar_la_LIBADD = -lperfstat
531 pkglib_LTLIBRARIES += lvm.la
532 lvm_la_SOURCES = lvm.c
533 lvm_la_LDFLAGS = $(PLUGIN_LDFLAGS)
534 lvm_la_LIBADD = $(BUILD_WITH_LIBLVM2APP_LIBS)
537 if BUILD_PLUGIN_MADWIFI
538 pkglib_LTLIBRARIES += madwifi.la
539 madwifi_la_SOURCES = madwifi.c madwifi.h
540 madwifi_la_LDFLAGS = $(PLUGIN_LDFLAGS)
543 if BUILD_PLUGIN_MATCH_EMPTY_COUNTER
544 pkglib_LTLIBRARIES += match_empty_counter.la
545 match_empty_counter_la_SOURCES = match_empty_counter.c
546 match_empty_counter_la_LDFLAGS = $(PLUGIN_LDFLAGS)
549 if BUILD_PLUGIN_MATCH_HASHED
550 pkglib_LTLIBRARIES += match_hashed.la
551 match_hashed_la_SOURCES = match_hashed.c
552 match_hashed_la_LDFLAGS = $(PLUGIN_LDFLAGS)
555 if BUILD_PLUGIN_MATCH_REGEX
556 pkglib_LTLIBRARIES += match_regex.la
557 match_regex_la_SOURCES = match_regex.c
558 match_regex_la_LDFLAGS = $(PLUGIN_LDFLAGS)
561 if BUILD_PLUGIN_MATCH_TIMEDIFF
562 pkglib_LTLIBRARIES += match_timediff.la
563 match_timediff_la_SOURCES = match_timediff.c
564 match_timediff_la_LDFLAGS = $(PLUGIN_LDFLAGS)
567 if BUILD_PLUGIN_MATCH_VALUE
568 pkglib_LTLIBRARIES += match_value.la
569 match_value_la_SOURCES = match_value.c
570 match_value_la_LDFLAGS = $(PLUGIN_LDFLAGS)
573 if BUILD_PLUGIN_MBMON
574 pkglib_LTLIBRARIES += mbmon.la
575 mbmon_la_SOURCES = mbmon.c
576 mbmon_la_LDFLAGS = $(PLUGIN_LDFLAGS)
578 if BUILD_WITH_LIBSOCKET
579 mbmon_la_LIBADD += -lsocket
584 pkglib_LTLIBRARIES += md.la
586 md_la_LDFLAGS = $(PLUGIN_LDFLAGS)
589 if BUILD_PLUGIN_MEMCACHEC
590 pkglib_LTLIBRARIES += memcachec.la
591 memcachec_la_SOURCES = memcachec.c
592 memcachec_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMEMCACHED_LDFLAGS)
593 memcachec_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMEMCACHED_CPPFLAGS)
594 memcachec_la_LIBADD = $(BUILD_WITH_LIBMEMCACHED_LIBS)
597 if BUILD_PLUGIN_MEMCACHED
598 pkglib_LTLIBRARIES += memcached.la
599 memcached_la_SOURCES = memcached.c
600 memcached_la_LDFLAGS = $(PLUGIN_LDFLAGS)
601 memcached_la_LIBADD =
602 if BUILD_WITH_LIBSOCKET
603 memcached_la_LIBADD += -lsocket
607 if BUILD_PLUGIN_MEMORY
608 pkglib_LTLIBRARIES += memory.la
609 memory_la_SOURCES = memory.c
610 memory_la_CFLAGS = $(AM_CFLAGS)
611 memory_la_LDFLAGS = $(PLUGIN_LDFLAGS)
613 if BUILD_WITH_LIBKSTAT
614 memory_la_LIBADD += -lkstat
616 if BUILD_WITH_LIBDEVINFO
617 memory_la_LIBADD += -ldevinfo
619 if BUILD_WITH_LIBSTATGRAB
620 memory_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
621 memory_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
623 if BUILD_WITH_PERFSTAT
624 memory_la_LIBADD += -lperfstat
629 pkglib_LTLIBRARIES += mic.la
630 mic_la_SOURCES = mic.c
631 mic_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_MIC_LIBPATH)
632 mic_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_MIC_CPPFLAGS)
633 mic_la_LIBADD = $(BUILD_WITH_MIC_LDADD)
636 if BUILD_PLUGIN_MODBUS
637 pkglib_LTLIBRARIES += modbus.la
638 modbus_la_SOURCES = modbus.c
639 modbus_la_LDFLAGS = $(PLUGIN_LDFLAGS)
640 modbus_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMODBUS_CFLAGS)
641 modbus_la_LIBADD = $(BUILD_WITH_LIBMODBUS_LIBS)
645 pkglib_LTLIBRARIES += mqtt.la
646 mqtt_la_SOURCES = mqtt.c
647 mqtt_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMOSQUITTO_CPPFLAGS)
648 mqtt_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMOSQUITTO_LDFLAGS)
649 mqtt_la_LIBADD = $(BUILD_WITH_LIBMOSQUITTO_LIBS)
652 if BUILD_PLUGIN_MULTIMETER
653 pkglib_LTLIBRARIES += multimeter.la
654 multimeter_la_SOURCES = multimeter.c
655 multimeter_la_LDFLAGS = $(PLUGIN_LDFLAGS)
658 if BUILD_PLUGIN_MYSQL
659 pkglib_LTLIBRARIES += mysql.la
660 mysql_la_SOURCES = mysql.c
661 mysql_la_LDFLAGS = $(PLUGIN_LDFLAGS)
662 mysql_la_CFLAGS = $(AM_CFLAGS)
664 if BUILD_WITH_LIBMYSQL
665 mysql_la_CFLAGS += $(BUILD_WITH_LIBMYSQL_CFLAGS)
666 mysql_la_LIBADD += $(BUILD_WITH_LIBMYSQL_LIBS)
670 if BUILD_PLUGIN_NETAPP
671 pkglib_LTLIBRARIES += netapp.la
672 netapp_la_SOURCES = netapp.c
673 netapp_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBNETAPP_CPPFLAGS)
674 netapp_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBNETAPP_LDFLAGS)
675 netapp_la_LIBADD = $(LIBNETAPP_LIBS)
678 if BUILD_PLUGIN_NETLINK
679 pkglib_LTLIBRARIES += netlink.la
680 netlink_la_SOURCES = netlink.c
681 netlink_la_LDFLAGS = $(PLUGIN_LDFLAGS)
682 netlink_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMNL_CFLAGS)
683 netlink_la_LIBADD = $(BUILD_WITH_LIBMNL_LIBS)
686 if BUILD_PLUGIN_NETWORK
687 pkglib_LTLIBRARIES += network.la
688 network_la_SOURCES = network.c network.h \
689 utils_fbhash.c utils_fbhash.h
690 network_la_CPPFLAGS = $(AM_CPPFLAGS)
691 network_la_LDFLAGS = $(PLUGIN_LDFLAGS)
692 network_la_LIBADD = $(PTHREAD_LIBS)
693 if BUILD_WITH_LIBSOCKET
694 network_la_LIBADD += -lsocket
696 if BUILD_WITH_LIBGCRYPT
697 network_la_CPPFLAGS += $(GCRYPT_CPPFLAGS)
698 network_la_LDFLAGS += $(GCRYPT_LDFLAGS)
699 network_la_LIBADD += $(GCRYPT_LIBS)
704 pkglib_LTLIBRARIES += nfs.la
705 nfs_la_SOURCES = nfs.c
706 nfs_la_LDFLAGS = $(PLUGIN_LDFLAGS)
709 if BUILD_PLUGIN_FSCACHE
710 pkglib_LTLIBRARIES += fscache.la
711 fscache_la_SOURCES = fscache.c
712 fscache_la_LDFLAGS = $(PLUGIN_LDFLAGS)
715 if BUILD_PLUGIN_NGINX
716 pkglib_LTLIBRARIES += nginx.la
717 nginx_la_SOURCES = nginx.c
718 nginx_la_CFLAGS = $(AM_CFLAGS)
720 nginx_la_LDFLAGS = $(PLUGIN_LDFLAGS)
721 if BUILD_WITH_LIBCURL
722 nginx_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
723 nginx_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
727 if BUILD_PLUGIN_NOTIFY_DESKTOP
728 pkglib_LTLIBRARIES += notify_desktop.la
729 notify_desktop_la_SOURCES = notify_desktop.c
730 notify_desktop_la_CFLAGS = $(AM_CFLAGS) $(LIBNOTIFY_CFLAGS)
731 notify_desktop_la_LDFLAGS = $(PLUGIN_LDFLAGS)
732 notify_desktop_la_LIBADD = $(LIBNOTIFY_LIBS)
735 if BUILD_PLUGIN_NOTIFY_EMAIL
736 pkglib_LTLIBRARIES += notify_email.la
737 notify_email_la_SOURCES = notify_email.c
738 notify_email_la_LDFLAGS = $(PLUGIN_LDFLAGS)
739 notify_email_la_LIBADD = $(PTHREAD_LIBS) -lesmtp -lssl -lcrypto
742 if BUILD_PLUGIN_NOTIFY_NAGIOS
743 pkglib_LTLIBRARIES += notify_nagios.la
744 notify_nagios_la_SOURCES = notify_nagios.c
745 notify_nagios_la_LDFLAGS = $(PLUGIN_LDFLAGS)
749 pkglib_LTLIBRARIES += ntpd.la
750 ntpd_la_SOURCES = ntpd.c
751 ntpd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
753 if BUILD_WITH_LIBSOCKET
754 ntpd_la_LIBADD += -lsocket
759 pkglib_LTLIBRARIES += numa.la
760 numa_la_SOURCES = numa.c
761 numa_la_LDFLAGS = $(PLUGIN_LDFLAGS)
765 pkglib_LTLIBRARIES += nut.la
766 nut_la_SOURCES = nut.c
767 nut_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
768 nut_la_LDFLAGS = $(PLUGIN_LDFLAGS)
769 nut_la_LIBADD = $(PTHREAD_LIBS) $(BUILD_WITH_LIBUPSCLIENT_LIBS)
772 if BUILD_PLUGIN_OLSRD
773 pkglib_LTLIBRARIES += olsrd.la
774 olsrd_la_SOURCES = olsrd.c
775 olsrd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
777 if BUILD_WITH_LIBSOCKET
778 olsrd_la_LIBADD += -lsocket
782 if BUILD_PLUGIN_ONEWIRE
783 pkglib_LTLIBRARIES += onewire.la
784 onewire_la_SOURCES = onewire.c
785 onewire_la_CFLAGS = $(AM_CFLAGS)
786 onewire_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
787 onewire_la_LIBADD = $(BUILD_WITH_LIBOWCAPI_LIBS)
788 onewire_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBOWCAPI_LDFLAGS)
791 if BUILD_PLUGIN_OPENLDAP
792 pkglib_LTLIBRARIES += openldap.la
793 openldap_la_SOURCES = openldap.c
794 openldap_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBLDAP_LDFLAGS)
795 openldap_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBLDAP_CPPFLAGS)
796 openldap_la_LIBADD = -lldap
799 if BUILD_PLUGIN_OPENVPN
800 pkglib_LTLIBRARIES += openvpn.la
801 openvpn_la_SOURCES = openvpn.c
802 openvpn_la_CFLAGS = $(AM_CFLAGS)
803 openvpn_la_LDFLAGS = $(PLUGIN_LDFLAGS)
806 if BUILD_PLUGIN_ORACLE
807 pkglib_LTLIBRARIES += oracle.la
808 oracle_la_SOURCES = oracle.c \
809 utils_db_query.c utils_db_query.h
810 oracle_la_CFLAGS = $(AM_CFLAGS)
811 oracle_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_ORACLE_CFLAGS)
812 oracle_la_LIBADD = $(BUILD_WITH_ORACLE_LIBS)
813 oracle_la_LDFLAGS = $(PLUGIN_LDFLAGS)
817 pkglib_LTLIBRARIES += perl.la
818 perl_la_SOURCES = perl.c
819 # Despite C99 providing the "bool" type thru stdbool.h, Perl defines its own
820 # version of that type if HAS_BOOL is not defined... *sigh*
821 perl_la_CPPFLAGS = $(AM_CPPFLAGS) -DHAS_BOOL=1
822 perl_la_CFLAGS = $(AM_CFLAGS) \
824 -DXS_VERSION=\"$(VERSION)\" -DVERSION=\"$(VERSION)\"
825 # Work-around for issues #41 and #42 - Perl 5.10 incorrectly introduced
826 # __attribute__nonnull__(3) for Perl_load_module().
827 if HAVE_BROKEN_PERL_LOAD_MODULE
828 perl_la_CFLAGS += -Wno-nonnull
830 perl_la_LDFLAGS = $(PLUGIN_LDFLAGS) \
832 perl_la_LIBADD = $(PERL_LIBS)
836 pkglib_LTLIBRARIES += pf.la
838 pf_la_LDFLAGS = $(PLUGIN_LDFLAGS)
841 if BUILD_PLUGIN_PINBA
842 pkglib_LTLIBRARIES += pinba.la
843 pinba_la_SOURCES = pinba.c
844 nodist_pinba_la_SOURCES = pinba.pb-c.c pinba.pb-c.h
845 pinba_la_LDFLAGS = $(PLUGIN_LDFLAGS)
846 pinba_la_LIBADD = -lprotobuf-c
850 pkglib_LTLIBRARIES += ping.la
851 ping_la_SOURCES = ping.c
852 ping_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOPING_CPPFLAGS)
853 ping_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBOPING_LDFLAGS)
854 ping_la_LIBADD = -loping -lm
857 if BUILD_PLUGIN_POSTGRESQL
858 pkglib_LTLIBRARIES += postgresql.la
859 postgresql_la_SOURCES = postgresql.c \
860 utils_db_query.c utils_db_query.h
861 postgresql_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPQ_CPPFLAGS)
862 postgresql_la_LDFLAGS = $(PLUGIN_LDFLAGS) \
863 $(BUILD_WITH_LIBPQ_LDFLAGS)
864 postgresql_la_LIBADD = -lpq
867 if BUILD_PLUGIN_POWERDNS
868 pkglib_LTLIBRARIES += powerdns.la
869 powerdns_la_SOURCES = powerdns.c
870 powerdns_la_LDFLAGS = $(PLUGIN_LDFLAGS)
873 if BUILD_PLUGIN_PYTHON
874 pkglib_LTLIBRARIES += python.la
875 python_la_SOURCES = python.c pyconfig.c pyvalues.c cpython.h
876 python_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_PYTHON_CPPFLAGS)
877 python_la_CFLAGS = $(AM_CFLAGS)
879 python_la_CFLAGS += -fno-strict-aliasing -Wno-strict-aliasing
881 python_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_PYTHON_LDFLAGS)
882 python_la_LIBADD = $(BUILD_WITH_PYTHON_LIBS)
885 if BUILD_PLUGIN_PROCESSES
886 pkglib_LTLIBRARIES += processes.la
887 processes_la_SOURCES = processes.c
888 processes_la_LDFLAGS = $(PLUGIN_LDFLAGS)
889 processes_la_LIBADD =
890 if BUILD_WITH_LIBKVM_GETPROCS
891 processes_la_LIBADD += -lkvm
895 if BUILD_PLUGIN_PROTOCOLS
896 pkglib_LTLIBRARIES += protocols.la
897 protocols_la_SOURCES = protocols.c
898 protocols_la_LDFLAGS = $(PLUGIN_LDFLAGS)
901 if BUILD_PLUGIN_REDIS
902 pkglib_LTLIBRARIES += redis.la
903 redis_la_SOURCES = redis.c
904 redis_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBHIREDIS_LDFLAGS)
905 redis_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBHIREDIS_CPPFLAGS)
906 redis_la_LIBADD = -lhiredis
909 if BUILD_PLUGIN_ROUTEROS
910 pkglib_LTLIBRARIES += routeros.la
911 routeros_la_SOURCES = routeros.c
912 routeros_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBROUTEROS_CPPFLAGS)
913 routeros_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBROUTEROS_LDFLAGS)
914 routeros_la_LIBADD = -lrouteros
917 if BUILD_PLUGIN_RRDCACHED
918 pkglib_LTLIBRARIES += rrdcached.la
919 rrdcached_la_SOURCES = rrdcached.c utils_rrdcreate.c utils_rrdcreate.h
920 rrdcached_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRRD_LDFLAGS)
921 rrdcached_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
922 rrdcached_la_LIBADD = $(BUILD_WITH_LIBRRD_LIBS)
925 if BUILD_PLUGIN_RRDTOOL
926 pkglib_LTLIBRARIES += rrdtool.la
927 rrdtool_la_SOURCES = rrdtool.c utils_rrdcreate.c utils_rrdcreate.h
928 rrdtool_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRRD_LDFLAGS)
929 rrdtool_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
930 rrdtool_la_LIBADD = $(BUILD_WITH_LIBRRD_LIBS)
933 if BUILD_PLUGIN_SENSORS
934 pkglib_LTLIBRARIES += sensors.la
935 sensors_la_SOURCES = sensors.c
936 sensors_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBSENSORS_CFLAGS)
937 sensors_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBSENSORS_LDFLAGS)
938 sensors_la_LIBADD = -lsensors
941 if BUILD_PLUGIN_SERIAL
942 pkglib_LTLIBRARIES += serial.la
943 serial_la_SOURCES = serial.c
944 serial_la_LDFLAGS = $(PLUGIN_LDFLAGS)
947 if BUILD_PLUGIN_SIGROK
948 pkglib_LTLIBRARIES += sigrok.la
949 sigrok_la_SOURCES = sigrok.c
950 sigrok_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBSIGROK_CFLAGS)
951 sigrok_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBSIGROK_LDFLAGS)
952 sigrok_la_LIBADD = -lsigrok
955 if BUILD_PLUGIN_SMART
956 if BUILD_WITH_LIBUDEV
957 pkglib_LTLIBRARIES += smart.la
958 smart_la_SOURCES = smart.c
959 smart_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBATASMART_CPPFLAGS) $(BUILD_WITH_LIBUDEV_CFLAGS)
960 smart_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBATASMART_LDFLAGS) $(BUILD_WITH_LIBUDEV_LDFLAGS)
961 smart_la_LIBADD = $(BUILD_WITH_LIBATASMART_LIBS) $(BUILD_WITH_LIBUDEV_LIBS)
966 pkglib_LTLIBRARIES += snmp.la
967 snmp_la_SOURCES = snmp.c
968 snmp_la_LDFLAGS = $(PLUGIN_LDFLAGS)
969 snmp_la_CFLAGS = $(AM_CFLAGS)
971 if BUILD_WITH_LIBNETSNMP
972 snmp_la_CFLAGS += $(BUILD_WITH_LIBSNMP_CFLAGS)
973 snmp_la_LIBADD += $(BUILD_WITH_LIBSNMP_LIBS)
975 if BUILD_WITH_LIBPTHREAD
976 snmp_la_LIBADD += $(PTHREAD_LIBS)
980 if BUILD_PLUGIN_STATSD
981 pkglib_LTLIBRARIES += statsd.la
982 statsd_la_SOURCES = statsd.c
983 statsd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
984 statsd_la_LIBADD = $(PTHREAD_LIBS) liblatency.la -lm
988 pkglib_LTLIBRARIES += swap.la
989 swap_la_SOURCES = swap.c
990 swap_la_CFLAGS = $(AM_CFLAGS)
991 swap_la_LDFLAGS = $(PLUGIN_LDFLAGS)
993 if BUILD_WITH_LIBKSTAT
994 swap_la_LIBADD += -lkstat
996 if BUILD_WITH_LIBDEVINFO
997 swap_la_LIBADD += -ldevinfo
999 if BUILD_WITH_LIBKVM_GETSWAPINFO
1000 swap_la_LIBADD += -lkvm
1002 if BUILD_WITH_LIBSTATGRAB
1003 swap_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1004 swap_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1006 if BUILD_WITH_PERFSTAT
1007 swap_la_LIBADD += -lperfstat
1012 if BUILD_PLUGIN_SYSLOG
1013 pkglib_LTLIBRARIES += syslog.la
1014 syslog_la_SOURCES = syslog.c
1015 syslog_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1018 if BUILD_PLUGIN_TABLE
1019 pkglib_LTLIBRARIES += table.la
1020 table_la_SOURCES = table.c
1021 table_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1024 if BUILD_PLUGIN_TAIL
1025 pkglib_LTLIBRARIES += tail.la
1026 tail_la_SOURCES = tail.c
1027 tail_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1030 if BUILD_PLUGIN_TAIL_CSV
1031 pkglib_LTLIBRARIES += tail_csv.la
1032 tail_csv_la_SOURCES = tail_csv.c
1033 tail_csv_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1036 if BUILD_PLUGIN_TAPE
1037 pkglib_LTLIBRARIES += tape.la
1038 tape_la_SOURCES = tape.c
1039 tape_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1040 tape_la_LIBADD = -lkstat -ldevinfo
1043 if BUILD_PLUGIN_TARGET_NOTIFICATION
1044 pkglib_LTLIBRARIES += target_notification.la
1045 target_notification_la_SOURCES = target_notification.c
1046 target_notification_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1049 if BUILD_PLUGIN_TARGET_REPLACE
1050 pkglib_LTLIBRARIES += target_replace.la
1051 target_replace_la_SOURCES = target_replace.c
1052 target_replace_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1055 if BUILD_PLUGIN_TARGET_SCALE
1056 pkglib_LTLIBRARIES += target_scale.la
1057 target_scale_la_SOURCES = target_scale.c
1058 target_scale_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1061 if BUILD_PLUGIN_TARGET_SET
1062 pkglib_LTLIBRARIES += target_set.la
1063 target_set_la_SOURCES = target_set.c
1064 target_set_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1067 if BUILD_PLUGIN_TARGET_V5UPGRADE
1068 pkglib_LTLIBRARIES += target_v5upgrade.la
1069 target_v5upgrade_la_SOURCES = target_v5upgrade.c
1070 target_v5upgrade_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1073 if BUILD_PLUGIN_TCPCONNS
1074 pkglib_LTLIBRARIES += tcpconns.la
1075 tcpconns_la_SOURCES = tcpconns.c
1076 tcpconns_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1077 tcpconns_la_LIBADD =
1078 if BUILD_WITH_LIBKVM_NLIST
1079 tcpconns_la_LIBADD += -lkvm
1083 if BUILD_PLUGIN_TEAMSPEAK2
1084 pkglib_LTLIBRARIES += teamspeak2.la
1085 teamspeak2_la_SOURCES = teamspeak2.c
1086 teamspeak2_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1090 pkglib_LTLIBRARIES += ted.la
1091 ted_la_SOURCES = ted.c
1092 ted_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1095 if BUILD_PLUGIN_THERMAL
1096 pkglib_LTLIBRARIES += thermal.la
1097 thermal_la_SOURCES = thermal.c
1098 thermal_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1101 if BUILD_PLUGIN_THRESHOLD
1102 pkglib_LTLIBRARIES += threshold.la
1103 threshold_la_SOURCES = threshold.c
1104 threshold_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1107 if BUILD_PLUGIN_TOKYOTYRANT
1108 pkglib_LTLIBRARIES += tokyotyrant.la
1109 tokyotyrant_la_SOURCES = tokyotyrant.c
1110 tokyotyrant_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS)
1111 tokyotyrant_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS)
1112 tokyotyrant_la_LIBADD = $(BUILD_WITH_LIBTOKYOTYRANT_LIBS)
1113 if BUILD_WITH_LIBSOCKET
1114 tokyotyrant_la_LIBADD += -lsocket
1118 if BUILD_PLUGIN_TURBOSTAT
1119 pkglib_LTLIBRARIES += turbostat.la
1120 turbostat_la_SOURCES = turbostat.c
1121 turbostat_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1124 if BUILD_PLUGIN_UNIXSOCK
1125 pkglib_LTLIBRARIES += unixsock.la
1126 unixsock_la_SOURCES = unixsock.c \
1127 utils_cmd_flush.h utils_cmd_flush.c \
1128 utils_cmd_getval.h utils_cmd_getval.c \
1129 utils_cmd_getthreshold.h utils_cmd_getthreshold.c \
1130 utils_cmd_listval.h utils_cmd_listval.c \
1131 utils_cmd_putval.h utils_cmd_putval.c \
1132 utils_cmd_putnotif.h utils_cmd_putnotif.c \
1133 utils_parse_option.h utils_parse_option.c
1134 unixsock_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1135 unixsock_la_LIBADD = $(PTHREAD_LIBS)
1138 if BUILD_PLUGIN_UPTIME
1139 pkglib_LTLIBRARIES += uptime.la
1140 uptime_la_SOURCES = uptime.c
1141 uptime_la_CFLAGS = $(AM_CFLAGS)
1142 uptime_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1144 if BUILD_WITH_LIBKSTAT
1145 uptime_la_LIBADD += -lkstat
1147 if BUILD_WITH_PERFSTAT
1148 uptime_la_LIBADD += -lperfstat
1152 if BUILD_PLUGIN_USERS
1153 pkglib_LTLIBRARIES += users.la
1154 users_la_SOURCES = users.c
1155 users_la_CFLAGS = $(AM_CFLAGS)
1156 users_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1158 if BUILD_WITH_LIBSTATGRAB
1159 users_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1160 users_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1164 if BUILD_PLUGIN_UUID
1165 pkglib_LTLIBRARIES += uuid.la
1166 uuid_la_SOURCES = uuid.c
1167 uuid_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBHAL_CFLAGS)
1168 uuid_la_LIBADD = $(BUILD_WITH_LIBHAL_LIBS)
1169 uuid_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1172 if BUILD_PLUGIN_VARNISH
1173 pkglib_LTLIBRARIES += varnish.la
1174 varnish_la_SOURCES = varnish.c
1175 varnish_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1176 varnish_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBVARNISH_CFLAGS)
1177 varnish_la_LIBADD = $(BUILD_WITH_LIBVARNISH_LIBS)
1180 if BUILD_PLUGIN_VIRT
1181 pkglib_LTLIBRARIES += virt.la
1182 virt_la_SOURCES = virt.c
1183 virt_la_CFLAGS = $(AM_CFLAGS) \
1184 $(BUILD_WITH_LIBVIRT_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
1185 virt_la_LIBADD = $(BUILD_WITH_LIBVIRT_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
1186 virt_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1189 if BUILD_PLUGIN_VMEM
1190 pkglib_LTLIBRARIES += vmem.la
1191 vmem_la_SOURCES = vmem.c
1192 vmem_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1195 if BUILD_PLUGIN_VSERVER
1196 pkglib_LTLIBRARIES += vserver.la
1197 vserver_la_SOURCES = vserver.c
1198 vserver_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1201 if BUILD_PLUGIN_WIRELESS
1202 pkglib_LTLIBRARIES += wireless.la
1203 wireless_la_SOURCES = wireless.c
1204 wireless_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1207 if BUILD_PLUGIN_WRITE_GRAPHITE
1208 pkglib_LTLIBRARIES += write_graphite.la
1209 write_graphite_la_SOURCES = write_graphite.c \
1210 utils_format_graphite.c utils_format_graphite.h \
1211 utils_format_json.c utils_format_json.h
1212 write_graphite_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1215 if BUILD_PLUGIN_WRITE_HTTP
1216 pkglib_LTLIBRARIES += write_http.la
1217 write_http_la_SOURCES = write_http.c \
1218 utils_format_json.c utils_format_json.h
1219 write_http_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1220 write_http_la_CFLAGS = $(AM_CFLAGS)
1221 write_http_la_LIBADD =
1222 if BUILD_WITH_LIBCURL
1223 write_http_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
1224 write_http_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
1228 if BUILD_PLUGIN_WRITE_KAFKA
1229 pkglib_LTLIBRARIES += write_kafka.la
1230 write_kafka_la_SOURCES = write_kafka.c \
1231 utils_format_graphite.c utils_format_graphite.h \
1232 utils_format_json.c utils_format_json.h \
1233 utils_cmd_putval.c utils_cmd_putval.h \
1234 utils_crc32.c utils_crc32.h
1235 write_kafka_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBRDKAFKA_CPPFLAGS)
1236 write_kafka_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRDKAFKA_LDFLAGS)
1237 write_kafka_la_LIBADD = $(BUILD_WITH_LIBRDKAFKA_LIBS)
1240 if BUILD_PLUGIN_WRITE_LOG
1241 pkglib_LTLIBRARIES += write_log.la
1242 write_log_la_SOURCES = write_log.c \
1243 utils_format_graphite.c utils_format_graphite.h
1244 write_log_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1247 if BUILD_PLUGIN_WRITE_MONGODB
1248 pkglib_LTLIBRARIES += write_mongodb.la
1249 write_mongodb_la_SOURCES = write_mongodb.c
1250 write_mongodb_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMONGOC_CPPFLAGS)
1251 write_mongodb_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMONGOC_LDFLAGS)
1252 write_mongodb_la_LIBADD = -lmongoc
1255 if BUILD_PLUGIN_WRITE_REDIS
1256 pkglib_LTLIBRARIES += write_redis.la
1257 write_redis_la_SOURCES = write_redis.c
1258 write_redis_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBHIREDIS_LDFLAGS)
1259 write_redis_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBHIREDIS_CPPFLAGS)
1260 write_redis_la_LIBADD = -lhiredis
1263 if BUILD_PLUGIN_WRITE_RIEMANN
1264 pkglib_LTLIBRARIES += write_riemann.la
1265 write_riemann_la_SOURCES = write_riemann.c write_riemann_threshold.c write_riemann_threshold.h
1266 write_riemann_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBRIEMANN_CLIENT_LIBS)
1267 write_riemann_la_CFLAGS = $(AM_CFLAGS) $(LIBRIEMANN_CLIENT_CFLAGS)
1270 if BUILD_PLUGIN_WRITE_SENSU
1271 pkglib_LTLIBRARIES += write_sensu.la
1272 write_sensu_la_SOURCES = write_sensu.c
1273 write_sensu_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1276 if BUILD_PLUGIN_WRITE_TSDB
1277 pkglib_LTLIBRARIES += write_tsdb.la
1278 write_tsdb_la_SOURCES = write_tsdb.c
1279 write_tsdb_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1282 if BUILD_PLUGIN_XENCPU
1283 pkglib_LTLIBRARIES += xencpu.la
1284 xencpu_la_SOURCES = xencpu.c
1285 xencpu_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1286 xencpu_la_LIBADD = -lxenctrl
1289 if BUILD_PLUGIN_XMMS
1290 pkglib_LTLIBRARIES += xmms.la
1291 xmms_la_SOURCES = xmms.c
1292 xmms_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBXMMS_CFLAGS)
1293 xmms_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1294 xmms_la_LIBADD = $(BUILD_WITH_LIBXMMS_LIBS)
1297 if BUILD_PLUGIN_ZFS_ARC
1298 pkglib_LTLIBRARIES += zfs_arc.la
1299 zfs_arc_la_SOURCES = zfs_arc.c
1300 zfs_arc_la_CFLAGS = $(AM_CFLAGS)
1301 zfs_arc_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1303 zfs_arc_la_LIBADD = -lm
1306 # zfs_arc requires no library on linux
1309 zfs_arc_la_LIBADD = -lkstat
1314 if BUILD_PLUGIN_ZOOKEEPER
1315 pkglib_LTLIBRARIES += zookeeper.la
1316 zookeeper_la_SOURCES = zookeeper.c
1317 zookeeper_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1320 BUILT_SOURCES += $(dist_man_MANS)
1322 if BUILD_PLUGIN_ZONE
1323 pkglib_LTLIBRARIES += zone.la
1324 zone_la_SOURCES = zone.c
1325 zone_la_CFLAGS = $(AM_CFLAGS)
1326 zone_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1329 dist_man_MANS = collectd.1 \
1341 collectd-threshold.5 \
1342 collectd-unixsock.5 \
1345 #collectd_1_SOURCES = collectd.pod
1347 EXTRA_DIST = types.db
1349 EXTRA_DIST += collectd.conf.pod \
1350 collectd-email.pod \
1355 collectd-nagios.pod \
1357 collectd-python.pod \
1361 collectd-threshold.pod \
1362 collectd-unixsock.pod \
1363 postgresql_default.conf \
1367 pod2man --release=$(VERSION) --center=$(PACKAGE) $< \
1368 >.pod2man.tmp.$$$$ 2>/dev/null && mv -f .pod2man.tmp.$$$$ $@ || true
1369 @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
1371 echo "$@ has some POD errors!"; false; \
1375 pod2man --section=5 --release=$(VERSION) --center=$(PACKAGE) $< \
1376 >.pod2man.tmp.$$$$ 2>/dev/null && mv -f .pod2man.tmp.$$$$ $@ || true
1377 @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
1379 echo "$@ has some POD errors!"; false; \
1382 AM_V_PROTOC_C = $(am__v_PROTOC_C_@AM_V@)
1383 am__v_PROTOC_C_ = $(am__v_PROTOC_C_@AM_DEFAULT_V@)
1384 am__v_PROTOC_C_0 = @echo " PROTOC-C " $@;
1387 # Protocol buffer for the "pinba" plugin.
1388 EXTRA_DIST += pinba.proto
1389 if BUILD_PLUGIN_PINBA
1390 CLEANFILES += pinba.pb-c.c pinba.pb-c.h
1391 BUILT_SOURCES += pinba.pb-c.c pinba.pb-c.h
1393 pinba.pb-c.c pinba.pb-c.h: pinba.proto
1394 $(AM_V_PROTOC_C)protoc-c -I$(srcdir) --c_out . $(srcdir)/pinba.proto
1398 $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
1399 if test -e $(DESTDIR)$(sysconfdir)/collectd.conf; \
1401 $(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf.pkg-orig; \
1403 $(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf; \
1405 $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
1406 $(INSTALL) -m 0644 $(srcdir)/types.db $(DESTDIR)$(pkgdatadir)/types.db;
1407 $(INSTALL) -m 0644 $(srcdir)/postgresql_default.conf \
1408 $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;
1411 rm -f $(DESTDIR)$(pkgdatadir)/types.db;
1412 rm -f $(DESTDIR)$(sysconfdir)/collectd.conf
1413 rm -f $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;
1415 if BUILD_PLUGIN_CEPH
1416 test_plugin_ceph_SOURCES = ceph_test.c
1417 test_plugin_ceph_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
1418 test_plugin_ceph_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
1419 test_plugin_ceph_LDADD = daemon/libcommon.la daemon/libplugin_mock.la $(BUILD_WITH_LIBYAJL_LIBS)
1420 check_PROGRAMS += test_plugin_ceph
1421 TESTS += test_plugin_ceph