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}"'
24 noinst_LTLIBRARIES += liblatency.la
25 liblatency_la_SOURCES = utils_latency.c utils_latency.h
26 check_PROGRAMS += test_utils_latency
27 TESTS += test_utils_latency
28 test_utils_latency_SOURCES = utils_latency_test.c testing.h
29 test_utils_latency_LDADD = liblatency.la daemon/libplugin_mock.la -lm
31 noinst_LTLIBRARIES += liblookup.la
32 liblookup_la_SOURCES = utils_vl_lookup.c utils_vl_lookup.h
33 liblookup_la_LIBADD = daemon/libavltree.la
34 check_PROGRAMS += test_utils_vl_lookup
35 TESTS += test_utils_vl_lookup
36 test_utils_vl_lookup_SOURCES = utils_vl_lookup_test.c testing.h
37 test_utils_vl_lookup_LDADD = liblookup.la daemon/libplugin_mock.la
38 if BUILD_WITH_LIBKSTAT
39 test_utils_vl_lookup_LDADD += -lkstat
42 noinst_LTLIBRARIES += libmount.la
43 libmount_la_SOURCES = utils_mount.c utils_mount.h
44 check_PROGRAMS += test_utils_mount
45 TESTS += test_utils_mount
46 test_utils_mount_SOURCES = utils_mount_test.c testing.h
47 test_utils_mount_LDADD = libmount.la daemon/libplugin_mock.la
48 if BUILD_WITH_LIBKSTAT
49 test_utils_mount_LDADD += -lkstat
52 sbin_PROGRAMS = collectdmon
53 bin_PROGRAMS = collectd-nagios collectdctl collectd-tg
55 collectdmon_SOURCES = collectdmon.c
57 collectd_nagios_SOURCES = collectd-nagios.c
58 collectd_nagios_CPPFLAGS = $(AM_CPPFLAGS) \
59 -I$(top_srcdir)/src/libcollectdclient/collectd \
60 -I$(top_builddir)/src/libcollectdclient/collectd
61 collectd_nagios_LDADD = libcollectdclient/libcollectdclient.la
62 if BUILD_WITH_LIBSOCKET
63 collectd_nagios_LDADD += -lsocket
66 collectd_nagios_LDADD += -lm
70 collectdctl_SOURCES = collectdctl.c
71 collectdctl_CPPFLAGS = $(AM_CPPFLAGS) \
72 -I$(top_srcdir)/src/libcollectdclient/collectd \
73 -I$(top_builddir)/src/libcollectdclient/collectd
74 collectdctl_LDADD = libcollectdclient/libcollectdclient.la
75 if BUILD_WITH_LIBSOCKET
76 collectdctl_LDADD += -lsocket
79 collectdctl_LDADD += -lm
83 collectd_tg_SOURCES = collectd-tg.c
84 collectd_tg_CPPFLAGS = $(AM_CPPFLAGS) \
85 -I$(top_srcdir)/src/libcollectdclient/collectd \
86 -I$(top_builddir)/src/libcollectdclient/collectd
90 libcollectdclient/libcollectdclient.la
91 if BUILD_WITH_LIBSOCKET
92 collectd_tg_LDADD += -lsocket
95 collectd_tg_LDADD += -lrt
98 collectd_tg_LDADD += -lm
107 if BUILD_PLUGIN_AGGREGATION
108 pkglib_LTLIBRARIES += aggregation.la
109 aggregation_la_SOURCES = aggregation.c \
110 utils_vl_lookup.c utils_vl_lookup.h
111 aggregation_la_LDFLAGS = $(PLUGIN_LDFLAGS)
112 aggregation_la_LIBADD = -lm
116 pkglib_LTLIBRARIES += amqp.la
117 amqp_la_SOURCES = amqp.c \
118 utils_cmd_putval.c utils_cmd_putval.h \
119 utils_parse_option.c utils_parse_option.h \
120 utils_format_graphite.c utils_format_graphite.h \
121 utils_format_json.c utils_format_json.h
122 amqp_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRABBITMQ_LDFLAGS)
123 amqp_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBRABBITMQ_CPPFLAGS)
124 amqp_la_LIBADD = $(BUILD_WITH_LIBRABBITMQ_LIBS)
127 if BUILD_PLUGIN_APACHE
128 pkglib_LTLIBRARIES += apache.la
129 apache_la_SOURCES = apache.c
130 apache_la_LDFLAGS = $(PLUGIN_LDFLAGS)
131 apache_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS)
132 apache_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS)
135 if BUILD_PLUGIN_APCUPS
136 pkglib_LTLIBRARIES += apcups.la
137 apcups_la_SOURCES = apcups.c
138 apcups_la_LDFLAGS = $(PLUGIN_LDFLAGS)
140 if BUILD_WITH_LIBSOCKET
141 apcups_la_LIBADD += -lsocket
145 if BUILD_PLUGIN_APPLE_SENSORS
146 pkglib_LTLIBRARIES += apple_sensors.la
147 apple_sensors_la_SOURCES = apple_sensors.c
148 apple_sensors_la_LDFLAGS = $(PLUGIN_LDFLAGS) -framework IOKit
151 if BUILD_PLUGIN_AQUAERO
152 pkglib_LTLIBRARIES += aquaero.la
153 aquaero_la_SOURCES = aquaero.c
154 aquaero_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBAQUAERO5_CFLAGS)
155 aquaero_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBAQUAERO5_LDFLAGS)
156 aquaero_la_LIBADD = -laquaero5
159 if BUILD_PLUGIN_ASCENT
160 pkglib_LTLIBRARIES += ascent.la
161 ascent_la_SOURCES = ascent.c
162 ascent_la_LDFLAGS = $(PLUGIN_LDFLAGS)
163 ascent_la_CFLAGS = $(AM_CFLAGS) \
164 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
165 ascent_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
168 if BUILD_PLUGIN_BAROMETER
169 pkglib_LTLIBRARIES += barometer.la
170 barometer_la_SOURCES = barometer.c
171 barometer_la_LDFLAGS = $(PLUGIN_LDFLAGS)
172 barometer_la_LIBADD = -lm
175 if BUILD_PLUGIN_BATTERY
176 pkglib_LTLIBRARIES += battery.la
177 battery_la_SOURCES = battery.c
178 battery_la_LDFLAGS = $(PLUGIN_LDFLAGS)
179 if BUILD_WITH_LIBIOKIT
180 battery_la_LDFLAGS += -framework IOKit
185 pkglib_LTLIBRARIES += bind.la
186 bind_la_SOURCES = bind.c
187 bind_la_LDFLAGS = $(PLUGIN_LDFLAGS)
188 bind_la_CFLAGS = $(AM_CFLAGS) \
189 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
190 bind_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
194 pkglib_LTLIBRARIES += ceph.la
195 ceph_la_SOURCES = ceph.c
196 ceph_la_CFLAGS = $(AM_CFLAGS)
197 ceph_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
198 ceph_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
199 ceph_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
202 if BUILD_PLUGIN_CGROUPS
203 pkglib_LTLIBRARIES += cgroups.la
204 cgroups_la_SOURCES = cgroups.c
205 cgroups_la_LDFLAGS = $(PLUGIN_LDFLAGS)
206 cgroups_la_LIBADD = libmount.la
209 if BUILD_PLUGIN_CHRONY
210 pkglib_LTLIBRARIES += chrony.la
211 chrony_la_SOURCES = chrony.c
212 chrony_la_LDFLAGS = $(PLUGIN_LDFLAGS)
215 if BUILD_PLUGIN_CONNTRACK
216 pkglib_LTLIBRARIES += conntrack.la
217 conntrack_la_SOURCES = conntrack.c
218 conntrack_la_LDFLAGS = $(PLUGIN_LDFLAGS)
221 if BUILD_PLUGIN_CONTEXTSWITCH
222 pkglib_LTLIBRARIES += contextswitch.la
223 contextswitch_la_SOURCES = contextswitch.c
224 contextswitch_la_LDFLAGS = $(PLUGIN_LDFLAGS)
225 contextswitch_la_LIBADD =
226 if BUILD_WITH_PERFSTAT
227 contextswitch_la_LIBADD += -lperfstat
232 pkglib_LTLIBRARIES += cpu.la
233 cpu_la_SOURCES = cpu.c
234 cpu_la_CFLAGS = $(AM_CFLAGS)
235 cpu_la_LDFLAGS = $(PLUGIN_LDFLAGS)
237 if BUILD_WITH_LIBKSTAT
238 cpu_la_LIBADD += -lkstat
240 if BUILD_WITH_LIBDEVINFO
241 cpu_la_LIBADD += -ldevinfo
243 if BUILD_WITH_LIBSTATGRAB
244 cpu_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
245 cpu_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
247 if BUILD_WITH_PERFSTAT
248 cpu_la_LIBADD += -lperfstat
252 if BUILD_PLUGIN_CPUFREQ
253 pkglib_LTLIBRARIES += cpufreq.la
254 cpufreq_la_SOURCES = cpufreq.c
255 cpufreq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
259 pkglib_LTLIBRARIES += csv.la
260 csv_la_SOURCES = csv.c
261 csv_la_LDFLAGS = $(PLUGIN_LDFLAGS)
265 pkglib_LTLIBRARIES += curl.la
266 curl_la_SOURCES = curl.c
267 curl_la_LDFLAGS = $(PLUGIN_LDFLAGS)
268 curl_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS)
269 curl_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS)
272 if BUILD_PLUGIN_CURL_JSON
273 pkglib_LTLIBRARIES += curl_json.la
274 curl_json_la_SOURCES = curl_json.c
275 curl_json_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS)
276 curl_json_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
277 curl_json_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
278 curl_json_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBYAJL_LIBS)
281 if BUILD_PLUGIN_CURL_XML
282 pkglib_LTLIBRARIES += curl_xml.la
283 curl_xml_la_SOURCES = curl_xml.c
284 curl_xml_la_LDFLAGS = $(PLUGIN_LDFLAGS)
285 curl_xml_la_CFLAGS = $(AM_CFLAGS) \
286 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
287 curl_xml_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
291 pkglib_LTLIBRARIES += dbi.la
292 dbi_la_SOURCES = dbi.c \
293 utils_db_query.c utils_db_query.h
294 dbi_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBDBI_CPPFLAGS)
295 dbi_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBDBI_LDFLAGS)
296 dbi_la_LIBADD = $(BUILD_WITH_LIBDBI_LIBS)
300 pkglib_LTLIBRARIES += df.la
302 df_la_LDFLAGS = $(PLUGIN_LDFLAGS)
303 df_la_LIBADD = libmount.la
307 pkglib_LTLIBRARIES += disk.la
308 disk_la_SOURCES = disk.c
309 disk_la_CFLAGS = $(AM_CFLAGS)
310 disk_la_LDFLAGS = $(PLUGIN_LDFLAGS)
312 if BUILD_WITH_LIBKSTAT
313 disk_la_LIBADD += -lkstat
315 if BUILD_WITH_LIBDEVINFO
316 disk_la_LIBADD += -ldevinfo
318 if BUILD_WITH_LIBIOKIT
319 disk_la_LDFLAGS += -framework IOKit
321 if BUILD_WITH_LIBSTATGRAB
322 disk_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
323 disk_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
325 if BUILD_WITH_LIBUDEV
326 disk_la_CFLAGS += $(BUILD_WITH_LIBUDEV_CFLAGS)
327 disk_la_LDFLAGS += $(BUILD_WITH_LIBUDEV_LDFLAGS)
328 disk_la_LIBADD += $(BUILD_WITH_LIBUDEV_LIBS)
331 disk_la_LIBADD += -ldevstat -lgeom
333 if BUILD_WITH_PERFSTAT
334 disk_la_LIBADD += -lperfstat
339 pkglib_LTLIBRARIES += dns.la
340 dns_la_SOURCES = dns.c utils_dns.c utils_dns.h
341 dns_la_LDFLAGS = $(PLUGIN_LDFLAGS)
342 dns_la_LIBADD = -lpcap
346 pkglib_LTLIBRARIES += drbd.la
347 drbd_la_SOURCES = drbd.c
348 drbd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
351 if BUILD_PLUGIN_EMAIL
352 pkglib_LTLIBRARIES += email.la
353 email_la_SOURCES = email.c
354 email_la_LDFLAGS = $(PLUGIN_LDFLAGS)
357 if BUILD_PLUGIN_ENTROPY
358 pkglib_LTLIBRARIES += entropy.la
359 entropy_la_SOURCES = entropy.c
360 entropy_la_LDFLAGS = $(PLUGIN_LDFLAGS)
364 pkglib_LTLIBRARIES += exec.la
365 exec_la_SOURCES = exec.c \
366 utils_cmd_putnotif.c utils_cmd_putnotif.h \
367 utils_cmd_putval.c utils_cmd_putval.h \
368 utils_parse_option.h utils_parse_option.c
369 exec_la_LDFLAGS = $(PLUGIN_LDFLAGS)
372 if BUILD_PLUGIN_ETHSTAT
373 pkglib_LTLIBRARIES += ethstat.la
374 ethstat_la_SOURCES = ethstat.c
375 ethstat_la_LDFLAGS = $(PLUGIN_LDFLAGS)
378 if BUILD_PLUGIN_FHCOUNT
379 pkglib_LTLIBRARIES += fhcount.la
380 fhcount_la_SOURCES = fhcount.c
381 fhcount_la_LDFLAGS = $(PLUGIN_LDFLAGS)
384 if BUILD_PLUGIN_FILECOUNT
385 pkglib_LTLIBRARIES += filecount.la
386 filecount_la_SOURCES = filecount.c
387 filecount_la_LDFLAGS = $(PLUGIN_LDFLAGS)
390 if BUILD_PLUGIN_GMOND
391 pkglib_LTLIBRARIES += gmond.la
392 gmond_la_SOURCES = gmond.c
393 gmond_la_CPPFLAGS = $(AM_CPPFLAGS) $(GANGLIA_CPPFLAGS)
394 gmond_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(GANGLIA_LDFLAGS)
395 gmond_la_LIBADD = $(GANGLIA_LIBS)
398 if BUILD_PLUGIN_HDDTEMP
399 pkglib_LTLIBRARIES += hddtemp.la
400 hddtemp_la_SOURCES = hddtemp.c
401 hddtemp_la_LDFLAGS = $(PLUGIN_LDFLAGS)
403 if BUILD_WITH_LIBSOCKET
404 hddtemp_la_LIBADD += -lsocket
408 if BUILD_PLUGIN_INTERFACE
409 pkglib_LTLIBRARIES += interface.la
410 interface_la_SOURCES = interface.c
411 interface_la_CFLAGS = $(AM_CFLAGS)
412 interface_la_LDFLAGS = $(PLUGIN_LDFLAGS)
413 interface_la_LIBADD =
414 if BUILD_WITH_LIBSTATGRAB
415 interface_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
416 interface_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
418 if BUILD_WITH_LIBKSTAT
419 interface_la_LIBADD += -lkstat
421 if BUILD_WITH_LIBDEVINFO
422 interface_la_LIBADD += -ldevinfo
423 endif # BUILD_WITH_LIBDEVINFO
424 endif # !BUILD_WITH_LIBSTATGRAB
425 if BUILD_WITH_PERFSTAT
426 interface_la_LIBADD += -lperfstat
428 endif # BUILD_PLUGIN_INTERFACE
431 pkglib_LTLIBRARIES += ipc.la
432 ipc_la_SOURCES = ipc.c
433 ipc_la_LDFLAGS = $(PLUGIN_LDFLAGS)
436 if BUILD_PLUGIN_IPTABLES
437 pkglib_LTLIBRARIES += iptables.la
438 iptables_la_SOURCES = iptables.c
439 iptables_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBIPTC_CPPFLAGS)
440 iptables_la_LDFLAGS = $(PLUGIN_LDFLAGS)
441 iptables_la_LIBADD = $(BUILD_WITH_LIBIPTC_LDFLAGS)
445 pkglib_LTLIBRARIES += ipmi.la
446 ipmi_la_SOURCES = ipmi.c
447 ipmi_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_OPENIPMI_CFLAGS)
448 ipmi_la_LDFLAGS = $(PLUGIN_LDFLAGS)
449 ipmi_la_LIBADD = $(BUILD_WITH_OPENIPMI_LIBS)
453 pkglib_LTLIBRARIES += ipvs.la
454 ipvs_la_SOURCES = ipvs.c
455 ipvs_la_CFLAGS = $(AM_CFLAGS)
456 if IP_VS_H_NEEDS_KERNEL_CFLAGS
457 ipvs_la_CFLAGS += $(KERNEL_CFLAGS)
459 ipvs_la_LDFLAGS = $(PLUGIN_LDFLAGS)
463 pkglib_LTLIBRARIES += irq.la
464 irq_la_SOURCES = irq.c
465 irq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
469 pkglib_LTLIBRARIES += java.la
470 java_la_SOURCES = java.c
471 java_la_CPPFLAGS = $(AM_CPPFLAGS) $(JAVA_CPPFLAGS)
472 java_la_CFLAGS = $(AM_CFLAGS) $(JAVA_CFLAGS)
473 java_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(JAVA_LDFLAGS)
474 java_la_LIBADD = $(JAVA_LIBS)
478 pkglib_LTLIBRARIES += load.la
479 load_la_SOURCES = load.c
480 load_la_CFLAGS = $(AM_CFLAGS)
481 load_la_LDFLAGS = $(PLUGIN_LDFLAGS)
483 if BUILD_WITH_LIBSTATGRAB
484 load_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
485 load_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
486 endif # BUILD_WITH_LIBSTATGRAB
487 if BUILD_WITH_PERFSTAT
488 load_la_LIBADD += -lperfstat
490 endif # BUILD_PLUGIN_LOAD
492 if BUILD_PLUGIN_LOGFILE
493 pkglib_LTLIBRARIES += logfile.la
494 logfile_la_SOURCES = logfile.c
495 logfile_la_LDFLAGS = $(PLUGIN_LDFLAGS)
498 if BUILD_PLUGIN_LOG_LOGSTASH
499 pkglib_LTLIBRARIES += log_logstash.la
500 log_logstash_la_SOURCES = log_logstash.c
501 log_logstash_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
502 log_logstash_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
503 log_logstash_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
507 pkglib_LTLIBRARIES += lpar.la
508 lpar_la_SOURCES = lpar.c
509 lpar_la_LDFLAGS = $(PLUGIN_LDFLAGS)
510 lpar_la_LIBADD = -lperfstat
514 pkglib_LTLIBRARIES += lvm.la
515 lvm_la_SOURCES = lvm.c
516 lvm_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBLVM2APP_CPPFLAGS)
517 lvm_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBLVM2APP_LDFLAGS)
518 lvm_la_LIBADD = $(BUILD_WITH_LIBLVM2APP_LIBS)
521 if BUILD_PLUGIN_MADWIFI
522 pkglib_LTLIBRARIES += madwifi.la
523 madwifi_la_SOURCES = madwifi.c madwifi.h
524 madwifi_la_LDFLAGS = $(PLUGIN_LDFLAGS)
527 if BUILD_PLUGIN_MATCH_EMPTY_COUNTER
528 pkglib_LTLIBRARIES += match_empty_counter.la
529 match_empty_counter_la_SOURCES = match_empty_counter.c
530 match_empty_counter_la_LDFLAGS = $(PLUGIN_LDFLAGS)
533 if BUILD_PLUGIN_MATCH_HASHED
534 pkglib_LTLIBRARIES += match_hashed.la
535 match_hashed_la_SOURCES = match_hashed.c
536 match_hashed_la_LDFLAGS = $(PLUGIN_LDFLAGS)
539 if BUILD_PLUGIN_MATCH_REGEX
540 pkglib_LTLIBRARIES += match_regex.la
541 match_regex_la_SOURCES = match_regex.c
542 match_regex_la_LDFLAGS = $(PLUGIN_LDFLAGS)
545 if BUILD_PLUGIN_MATCH_TIMEDIFF
546 pkglib_LTLIBRARIES += match_timediff.la
547 match_timediff_la_SOURCES = match_timediff.c
548 match_timediff_la_LDFLAGS = $(PLUGIN_LDFLAGS)
551 if BUILD_PLUGIN_MATCH_VALUE
552 pkglib_LTLIBRARIES += match_value.la
553 match_value_la_SOURCES = match_value.c
554 match_value_la_LDFLAGS = $(PLUGIN_LDFLAGS)
557 if BUILD_PLUGIN_MBMON
558 pkglib_LTLIBRARIES += mbmon.la
559 mbmon_la_SOURCES = mbmon.c
560 mbmon_la_LDFLAGS = $(PLUGIN_LDFLAGS)
562 if BUILD_WITH_LIBSOCKET
563 mbmon_la_LIBADD += -lsocket
568 pkglib_LTLIBRARIES += md.la
570 md_la_LDFLAGS = $(PLUGIN_LDFLAGS)
573 if BUILD_PLUGIN_MEMCACHEC
574 pkglib_LTLIBRARIES += memcachec.la
575 memcachec_la_SOURCES = memcachec.c
576 memcachec_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMEMCACHED_LDFLAGS)
577 memcachec_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMEMCACHED_CPPFLAGS)
578 memcachec_la_LIBADD = $(BUILD_WITH_LIBMEMCACHED_LIBS)
581 if BUILD_PLUGIN_MEMCACHED
582 pkglib_LTLIBRARIES += memcached.la
583 memcached_la_SOURCES = memcached.c
584 memcached_la_LDFLAGS = $(PLUGIN_LDFLAGS)
585 memcached_la_LIBADD =
586 if BUILD_WITH_LIBSOCKET
587 memcached_la_LIBADD += -lsocket
591 if BUILD_PLUGIN_MEMORY
592 pkglib_LTLIBRARIES += memory.la
593 memory_la_SOURCES = memory.c
594 memory_la_CFLAGS = $(AM_CFLAGS)
595 memory_la_LDFLAGS = $(PLUGIN_LDFLAGS)
597 if BUILD_WITH_LIBKSTAT
598 memory_la_LIBADD += -lkstat
600 if BUILD_WITH_LIBDEVINFO
601 memory_la_LIBADD += -ldevinfo
603 if BUILD_WITH_LIBSTATGRAB
604 memory_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
605 memory_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
607 if BUILD_WITH_PERFSTAT
608 memory_la_LIBADD += -lperfstat
613 pkglib_LTLIBRARIES += mic.la
614 mic_la_SOURCES = mic.c
615 mic_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_MIC_LIBPATH)
616 mic_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_MIC_CPPFLAGS)
617 mic_la_LIBADD = $(BUILD_WITH_MIC_LDADD)
620 if BUILD_PLUGIN_MODBUS
621 pkglib_LTLIBRARIES += modbus.la
622 modbus_la_SOURCES = modbus.c
623 modbus_la_LDFLAGS = $(PLUGIN_LDFLAGS)
624 modbus_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMODBUS_CFLAGS)
625 modbus_la_LIBADD = $(BUILD_WITH_LIBMODBUS_LIBS)
629 pkglib_LTLIBRARIES += mqtt.la
630 mqtt_la_SOURCES = mqtt.c
631 mqtt_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMOSQUITTO_CPPFLAGS)
632 mqtt_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMOSQUITTO_LDFLAGS)
633 mqtt_la_LIBADD = $(BUILD_WITH_LIBMOSQUITTO_LIBS)
636 if BUILD_PLUGIN_MULTIMETER
637 pkglib_LTLIBRARIES += multimeter.la
638 multimeter_la_SOURCES = multimeter.c
639 multimeter_la_LDFLAGS = $(PLUGIN_LDFLAGS)
642 if BUILD_PLUGIN_MYSQL
643 pkglib_LTLIBRARIES += mysql.la
644 mysql_la_SOURCES = mysql.c
645 mysql_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMYSQL_CFLAGS)
646 mysql_la_LDFLAGS = $(PLUGIN_LDFLAGS)
647 mysql_la_LIBADD = $(BUILD_WITH_LIBMYSQL_LIBS)
650 if BUILD_PLUGIN_NETAPP
651 pkglib_LTLIBRARIES += netapp.la
652 netapp_la_SOURCES = netapp.c
653 netapp_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBNETAPP_CPPFLAGS)
654 netapp_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBNETAPP_LDFLAGS)
655 netapp_la_LIBADD = $(LIBNETAPP_LIBS)
658 if BUILD_PLUGIN_NETLINK
659 pkglib_LTLIBRARIES += netlink.la
660 netlink_la_SOURCES = netlink.c
661 netlink_la_LDFLAGS = $(PLUGIN_LDFLAGS)
662 netlink_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMNL_CFLAGS)
663 netlink_la_LIBADD = $(BUILD_WITH_LIBMNL_LIBS)
666 if BUILD_PLUGIN_NETWORK
667 pkglib_LTLIBRARIES += network.la
668 network_la_SOURCES = network.c network.h \
669 utils_fbhash.c utils_fbhash.h
670 network_la_CPPFLAGS = $(AM_CPPFLAGS)
671 network_la_LDFLAGS = $(PLUGIN_LDFLAGS)
673 if BUILD_WITH_LIBSOCKET
674 network_la_LIBADD += -lsocket
676 if BUILD_WITH_LIBGCRYPT
677 network_la_CPPFLAGS += $(GCRYPT_CPPFLAGS)
678 network_la_LDFLAGS += $(GCRYPT_LDFLAGS)
679 network_la_LIBADD += $(GCRYPT_LIBS)
684 pkglib_LTLIBRARIES += nfs.la
685 nfs_la_SOURCES = nfs.c
686 nfs_la_LDFLAGS = $(PLUGIN_LDFLAGS)
689 if BUILD_PLUGIN_FSCACHE
690 pkglib_LTLIBRARIES += fscache.la
691 fscache_la_SOURCES = fscache.c
692 fscache_la_LDFLAGS = $(PLUGIN_LDFLAGS)
695 if BUILD_PLUGIN_NGINX
696 pkglib_LTLIBRARIES += nginx.la
697 nginx_la_SOURCES = nginx.c
698 nginx_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS)
699 nginx_la_LDFLAGS = $(PLUGIN_LDFLAGS)
700 nginx_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS)
703 if BUILD_PLUGIN_NOTIFY_DESKTOP
704 pkglib_LTLIBRARIES += notify_desktop.la
705 notify_desktop_la_SOURCES = notify_desktop.c
706 notify_desktop_la_CFLAGS = $(AM_CFLAGS) $(LIBNOTIFY_CFLAGS)
707 notify_desktop_la_LDFLAGS = $(PLUGIN_LDFLAGS)
708 notify_desktop_la_LIBADD = $(LIBNOTIFY_LIBS)
711 if BUILD_PLUGIN_NOTIFY_EMAIL
712 pkglib_LTLIBRARIES += notify_email.la
713 notify_email_la_SOURCES = notify_email.c
714 notify_email_la_LDFLAGS = $(PLUGIN_LDFLAGS)
715 notify_email_la_LIBADD = -lesmtp -lssl -lcrypto
718 if BUILD_PLUGIN_NOTIFY_NAGIOS
719 pkglib_LTLIBRARIES += notify_nagios.la
720 notify_nagios_la_SOURCES = notify_nagios.c
721 notify_nagios_la_LDFLAGS = $(PLUGIN_LDFLAGS)
725 pkglib_LTLIBRARIES += ntpd.la
726 ntpd_la_SOURCES = ntpd.c
727 ntpd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
729 if BUILD_WITH_LIBSOCKET
730 ntpd_la_LIBADD += -lsocket
735 pkglib_LTLIBRARIES += numa.la
736 numa_la_SOURCES = numa.c
737 numa_la_LDFLAGS = $(PLUGIN_LDFLAGS)
741 pkglib_LTLIBRARIES += nut.la
742 nut_la_SOURCES = nut.c
743 nut_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
744 nut_la_LDFLAGS = $(PLUGIN_LDFLAGS)
745 nut_la_LIBADD = $(BUILD_WITH_LIBUPSCLIENT_LIBS)
748 if BUILD_PLUGIN_OLSRD
749 pkglib_LTLIBRARIES += olsrd.la
750 olsrd_la_SOURCES = olsrd.c
751 olsrd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
753 if BUILD_WITH_LIBSOCKET
754 olsrd_la_LIBADD += -lsocket
758 if BUILD_PLUGIN_ONEWIRE
759 pkglib_LTLIBRARIES += onewire.la
760 onewire_la_SOURCES = onewire.c
761 onewire_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
762 onewire_la_LIBADD = $(BUILD_WITH_LIBOWCAPI_LIBS)
763 onewire_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBOWCAPI_LDFLAGS)
766 if BUILD_PLUGIN_OPENLDAP
767 pkglib_LTLIBRARIES += openldap.la
768 openldap_la_SOURCES = openldap.c
769 openldap_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBLDAP_CPPFLAGS)
770 openldap_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBLDAP_LDFLAGS)
771 openldap_la_LIBADD = -lldap
774 if BUILD_PLUGIN_OPENVPN
775 pkglib_LTLIBRARIES += openvpn.la
776 openvpn_la_SOURCES = openvpn.c
777 openvpn_la_LDFLAGS = $(PLUGIN_LDFLAGS)
780 if BUILD_PLUGIN_ORACLE
781 pkglib_LTLIBRARIES += oracle.la
782 oracle_la_SOURCES = oracle.c \
783 utils_db_query.c utils_db_query.h
784 oracle_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_ORACLE_CPPFLAGS)
785 oracle_la_LIBADD = $(BUILD_WITH_ORACLE_LIBS)
786 oracle_la_LDFLAGS = $(PLUGIN_LDFLAGS)
790 pkglib_LTLIBRARIES += perl.la
791 perl_la_SOURCES = perl.c
792 # Despite C99 providing the "bool" type thru stdbool.h, Perl defines its own
793 # version of that type if HAS_BOOL is not defined... *sigh*
794 perl_la_CPPFLAGS = $(AM_CPPFLAGS) -DHAS_BOOL=1
795 perl_la_CFLAGS = $(AM_CFLAGS) \
797 -DXS_VERSION=\"$(VERSION)\" -DVERSION=\"$(VERSION)\"
798 # Work-around for issues #41 and #42 - Perl 5.10 incorrectly introduced
799 # __attribute__nonnull__(3) for Perl_load_module().
800 if HAVE_BROKEN_PERL_LOAD_MODULE
801 perl_la_CFLAGS += -Wno-nonnull
803 perl_la_LDFLAGS = $(PLUGIN_LDFLAGS) \
805 perl_la_LIBADD = $(PERL_LIBS)
809 pkglib_LTLIBRARIES += pf.la
811 pf_la_LDFLAGS = $(PLUGIN_LDFLAGS)
814 if BUILD_PLUGIN_PINBA
815 pkglib_LTLIBRARIES += pinba.la
816 pinba_la_SOURCES = pinba.c
817 nodist_pinba_la_SOURCES = pinba.pb-c.c pinba.pb-c.h
818 pinba_la_LDFLAGS = $(PLUGIN_LDFLAGS)
819 pinba_la_LIBADD = -lprotobuf-c
823 pkglib_LTLIBRARIES += ping.la
824 ping_la_SOURCES = ping.c
825 ping_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOPING_CPPFLAGS)
826 ping_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBOPING_LDFLAGS)
827 ping_la_LIBADD = -loping -lm
830 if BUILD_PLUGIN_POSTGRESQL
831 pkglib_LTLIBRARIES += postgresql.la
832 postgresql_la_SOURCES = postgresql.c \
833 utils_db_query.c utils_db_query.h
834 postgresql_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPQ_CPPFLAGS)
835 postgresql_la_LDFLAGS = $(PLUGIN_LDFLAGS) \
836 $(BUILD_WITH_LIBPQ_LDFLAGS)
837 postgresql_la_LIBADD = -lpq
840 if BUILD_PLUGIN_POWERDNS
841 pkglib_LTLIBRARIES += powerdns.la
842 powerdns_la_SOURCES = powerdns.c
843 powerdns_la_LDFLAGS = $(PLUGIN_LDFLAGS)
846 if BUILD_PLUGIN_PYTHON
847 pkglib_LTLIBRARIES += python.la
848 python_la_SOURCES = python.c pyconfig.c pyvalues.c cpython.h
849 python_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_PYTHON_CPPFLAGS)
850 python_la_CFLAGS = $(AM_CFLAGS)
852 python_la_CFLAGS += -fno-strict-aliasing -Wno-strict-aliasing
854 python_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_PYTHON_LDFLAGS)
855 python_la_LIBADD = $(BUILD_WITH_PYTHON_LIBS)
858 if BUILD_PLUGIN_PROCESSES
859 pkglib_LTLIBRARIES += processes.la
860 processes_la_SOURCES = processes.c
861 processes_la_LDFLAGS = $(PLUGIN_LDFLAGS)
862 processes_la_LIBADD =
863 if BUILD_WITH_LIBKVM_GETPROCS
864 processes_la_LIBADD += -lkvm
868 if BUILD_PLUGIN_PROTOCOLS
869 pkglib_LTLIBRARIES += protocols.la
870 protocols_la_SOURCES = protocols.c
871 protocols_la_LDFLAGS = $(PLUGIN_LDFLAGS)
874 if BUILD_PLUGIN_REDIS
875 pkglib_LTLIBRARIES += redis.la
876 redis_la_SOURCES = redis.c
877 redis_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBHIREDIS_LDFLAGS)
878 redis_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBHIREDIS_CPPFLAGS)
879 redis_la_LIBADD = -lhiredis
882 if BUILD_PLUGIN_ROUTEROS
883 pkglib_LTLIBRARIES += routeros.la
884 routeros_la_SOURCES = routeros.c
885 routeros_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBROUTEROS_CPPFLAGS)
886 routeros_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBROUTEROS_LDFLAGS)
887 routeros_la_LIBADD = -lrouteros
890 if BUILD_PLUGIN_RRDCACHED
891 pkglib_LTLIBRARIES += rrdcached.la
892 rrdcached_la_SOURCES = rrdcached.c utils_rrdcreate.c utils_rrdcreate.h
893 rrdcached_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRRD_LDFLAGS)
894 rrdcached_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
895 rrdcached_la_LIBADD = $(BUILD_WITH_LIBRRD_LIBS)
898 if BUILD_PLUGIN_RRDTOOL
899 pkglib_LTLIBRARIES += rrdtool.la
900 rrdtool_la_SOURCES = rrdtool.c utils_rrdcreate.c utils_rrdcreate.h
901 rrdtool_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRRD_LDFLAGS)
902 rrdtool_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
903 rrdtool_la_LIBADD = $(BUILD_WITH_LIBRRD_LIBS)
906 if BUILD_PLUGIN_SENSORS
907 pkglib_LTLIBRARIES += sensors.la
908 sensors_la_SOURCES = sensors.c
909 sensors_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBSENSORS_CFLAGS)
910 sensors_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBSENSORS_LDFLAGS)
911 sensors_la_LIBADD = -lsensors
914 if BUILD_PLUGIN_SERIAL
915 pkglib_LTLIBRARIES += serial.la
916 serial_la_SOURCES = serial.c
917 serial_la_LDFLAGS = $(PLUGIN_LDFLAGS)
920 if BUILD_PLUGIN_SIGROK
921 pkglib_LTLIBRARIES += sigrok.la
922 sigrok_la_SOURCES = sigrok.c
923 sigrok_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBSIGROK_CFLAGS)
924 sigrok_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBSIGROK_LDFLAGS)
925 sigrok_la_LIBADD = -lsigrok
928 if BUILD_PLUGIN_SMART
929 if BUILD_WITH_LIBUDEV
930 pkglib_LTLIBRARIES += smart.la
931 smart_la_SOURCES = smart.c
932 smart_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBATASMART_CPPFLAGS) $(BUILD_WITH_LIBUDEV_CFLAGS)
933 smart_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBATASMART_LDFLAGS) $(BUILD_WITH_LIBUDEV_LDFLAGS)
934 smart_la_LIBADD = $(BUILD_WITH_LIBATASMART_LIBS) $(BUILD_WITH_LIBUDEV_LIBS)
939 pkglib_LTLIBRARIES += snmp.la
940 snmp_la_SOURCES = snmp.c
941 snmp_la_LDFLAGS = $(PLUGIN_LDFLAGS)
942 snmp_la_CFLAGS = $(AM_CFLAGS)
944 if BUILD_WITH_LIBNETSNMP
945 snmp_la_CFLAGS += $(BUILD_WITH_LIBSNMP_CFLAGS)
946 snmp_la_LIBADD += $(BUILD_WITH_LIBSNMP_LIBS)
950 if BUILD_PLUGIN_STATSD
951 pkglib_LTLIBRARIES += statsd.la
952 statsd_la_SOURCES = statsd.c
953 statsd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
954 statsd_la_LIBADD = liblatency.la -lm
958 pkglib_LTLIBRARIES += swap.la
959 swap_la_SOURCES = swap.c
960 swap_la_CFLAGS = $(AM_CFLAGS)
961 swap_la_LDFLAGS = $(PLUGIN_LDFLAGS)
963 if BUILD_WITH_LIBKSTAT
964 swap_la_LIBADD += -lkstat
966 if BUILD_WITH_LIBDEVINFO
967 swap_la_LIBADD += -ldevinfo
969 if BUILD_WITH_LIBKVM_GETSWAPINFO
970 swap_la_LIBADD += -lkvm
972 if BUILD_WITH_LIBSTATGRAB
973 swap_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
974 swap_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
976 if BUILD_WITH_PERFSTAT
977 swap_la_LIBADD += -lperfstat
982 if BUILD_PLUGIN_SYSLOG
983 pkglib_LTLIBRARIES += syslog.la
984 syslog_la_SOURCES = syslog.c
985 syslog_la_LDFLAGS = $(PLUGIN_LDFLAGS)
988 if BUILD_PLUGIN_TABLE
989 pkglib_LTLIBRARIES += table.la
990 table_la_SOURCES = table.c
991 table_la_LDFLAGS = $(PLUGIN_LDFLAGS)
995 pkglib_LTLIBRARIES += tail.la
996 tail_la_SOURCES = tail.c
997 tail_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1000 if BUILD_PLUGIN_TAIL_CSV
1001 pkglib_LTLIBRARIES += tail_csv.la
1002 tail_csv_la_SOURCES = tail_csv.c
1003 tail_csv_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1006 if BUILD_PLUGIN_TAPE
1007 pkglib_LTLIBRARIES += tape.la
1008 tape_la_SOURCES = tape.c
1009 tape_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1010 tape_la_LIBADD = -lkstat -ldevinfo
1013 if BUILD_PLUGIN_TARGET_NOTIFICATION
1014 pkglib_LTLIBRARIES += target_notification.la
1015 target_notification_la_SOURCES = target_notification.c
1016 target_notification_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1019 if BUILD_PLUGIN_TARGET_REPLACE
1020 pkglib_LTLIBRARIES += target_replace.la
1021 target_replace_la_SOURCES = target_replace.c
1022 target_replace_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1025 if BUILD_PLUGIN_TARGET_SCALE
1026 pkglib_LTLIBRARIES += target_scale.la
1027 target_scale_la_SOURCES = target_scale.c
1028 target_scale_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1031 if BUILD_PLUGIN_TARGET_SET
1032 pkglib_LTLIBRARIES += target_set.la
1033 target_set_la_SOURCES = target_set.c
1034 target_set_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1037 if BUILD_PLUGIN_TARGET_V5UPGRADE
1038 pkglib_LTLIBRARIES += target_v5upgrade.la
1039 target_v5upgrade_la_SOURCES = target_v5upgrade.c
1040 target_v5upgrade_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1043 if BUILD_PLUGIN_TCPCONNS
1044 pkglib_LTLIBRARIES += tcpconns.la
1045 tcpconns_la_SOURCES = tcpconns.c
1046 tcpconns_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1047 tcpconns_la_LIBADD =
1048 if BUILD_WITH_LIBKVM_NLIST
1049 tcpconns_la_LIBADD += -lkvm
1053 if BUILD_PLUGIN_TEAMSPEAK2
1054 pkglib_LTLIBRARIES += teamspeak2.la
1055 teamspeak2_la_SOURCES = teamspeak2.c
1056 teamspeak2_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1060 pkglib_LTLIBRARIES += ted.la
1061 ted_la_SOURCES = ted.c
1062 ted_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1065 if BUILD_PLUGIN_THERMAL
1066 pkglib_LTLIBRARIES += thermal.la
1067 thermal_la_SOURCES = thermal.c
1068 thermal_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1071 if BUILD_PLUGIN_THRESHOLD
1072 pkglib_LTLIBRARIES += threshold.la
1073 threshold_la_SOURCES = threshold.c
1074 threshold_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1077 if BUILD_PLUGIN_TOKYOTYRANT
1078 pkglib_LTLIBRARIES += tokyotyrant.la
1079 tokyotyrant_la_SOURCES = tokyotyrant.c
1080 tokyotyrant_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS)
1081 tokyotyrant_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS)
1082 tokyotyrant_la_LIBADD = $(BUILD_WITH_LIBTOKYOTYRANT_LIBS)
1083 if BUILD_WITH_LIBSOCKET
1084 tokyotyrant_la_LIBADD += -lsocket
1088 if BUILD_PLUGIN_TURBOSTAT
1089 pkglib_LTLIBRARIES += turbostat.la
1090 turbostat_la_SOURCES = turbostat.c
1091 turbostat_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1094 if BUILD_PLUGIN_UNIXSOCK
1095 pkglib_LTLIBRARIES += unixsock.la
1096 unixsock_la_SOURCES = unixsock.c \
1097 utils_cmd_flush.h utils_cmd_flush.c \
1098 utils_cmd_getval.h utils_cmd_getval.c \
1099 utils_cmd_getthreshold.h utils_cmd_getthreshold.c \
1100 utils_cmd_listval.h utils_cmd_listval.c \
1101 utils_cmd_putval.h utils_cmd_putval.c \
1102 utils_cmd_putnotif.h utils_cmd_putnotif.c \
1103 utils_parse_option.h utils_parse_option.c
1104 unixsock_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1107 if BUILD_PLUGIN_UPTIME
1108 pkglib_LTLIBRARIES += uptime.la
1109 uptime_la_SOURCES = uptime.c
1110 uptime_la_CFLAGS = $(AM_CFLAGS)
1111 uptime_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1113 if BUILD_WITH_LIBKSTAT
1114 uptime_la_LIBADD += -lkstat
1116 if BUILD_WITH_PERFSTAT
1117 uptime_la_LIBADD += -lperfstat
1121 if BUILD_PLUGIN_USERS
1122 pkglib_LTLIBRARIES += users.la
1123 users_la_SOURCES = users.c
1124 users_la_CFLAGS = $(AM_CFLAGS)
1125 users_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1127 if BUILD_WITH_LIBSTATGRAB
1128 users_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1129 users_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1133 if BUILD_PLUGIN_UUID
1134 pkglib_LTLIBRARIES += uuid.la
1135 uuid_la_SOURCES = uuid.c
1136 uuid_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBHAL_CFLAGS)
1137 uuid_la_LIBADD = $(BUILD_WITH_LIBHAL_LIBS)
1138 uuid_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1141 if BUILD_PLUGIN_VARNISH
1142 pkglib_LTLIBRARIES += varnish.la
1143 varnish_la_SOURCES = varnish.c
1144 varnish_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1145 varnish_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBVARNISH_CFLAGS)
1146 varnish_la_LIBADD = $(BUILD_WITH_LIBVARNISH_LIBS)
1149 if BUILD_PLUGIN_VIRT
1150 pkglib_LTLIBRARIES += virt.la
1151 virt_la_SOURCES = virt.c
1152 virt_la_CFLAGS = $(AM_CFLAGS) \
1153 $(BUILD_WITH_LIBVIRT_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
1154 virt_la_LIBADD = $(BUILD_WITH_LIBVIRT_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
1155 virt_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1158 if BUILD_PLUGIN_VMEM
1159 pkglib_LTLIBRARIES += vmem.la
1160 vmem_la_SOURCES = vmem.c
1161 vmem_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1164 if BUILD_PLUGIN_VSERVER
1165 pkglib_LTLIBRARIES += vserver.la
1166 vserver_la_SOURCES = vserver.c
1167 vserver_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1170 if BUILD_PLUGIN_WIRELESS
1171 pkglib_LTLIBRARIES += wireless.la
1172 wireless_la_SOURCES = wireless.c
1173 wireless_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1176 if BUILD_PLUGIN_WRITE_GRAPHITE
1177 pkglib_LTLIBRARIES += write_graphite.la
1178 write_graphite_la_SOURCES = write_graphite.c \
1179 utils_format_graphite.c utils_format_graphite.h \
1180 utils_format_json.c utils_format_json.h
1181 write_graphite_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1184 if BUILD_PLUGIN_WRITE_HTTP
1185 pkglib_LTLIBRARIES += write_http.la
1186 write_http_la_SOURCES = write_http.c \
1187 utils_format_json.c utils_format_json.h
1188 write_http_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS)
1189 write_http_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1190 write_http_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS)
1193 if BUILD_PLUGIN_WRITE_KAFKA
1194 pkglib_LTLIBRARIES += write_kafka.la
1195 write_kafka_la_SOURCES = write_kafka.c \
1196 utils_format_graphite.c utils_format_graphite.h \
1197 utils_format_json.c utils_format_json.h \
1198 utils_cmd_putval.c utils_cmd_putval.h \
1199 utils_crc32.c utils_crc32.h
1200 write_kafka_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBRDKAFKA_CPPFLAGS)
1201 write_kafka_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRDKAFKA_LDFLAGS)
1202 write_kafka_la_LIBADD = $(BUILD_WITH_LIBRDKAFKA_LIBS)
1205 if BUILD_PLUGIN_WRITE_LOG
1206 pkglib_LTLIBRARIES += write_log.la
1207 write_log_la_SOURCES = write_log.c \
1208 utils_format_graphite.c utils_format_graphite.h
1209 write_log_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1212 if BUILD_PLUGIN_WRITE_MONGODB
1213 pkglib_LTLIBRARIES += write_mongodb.la
1214 write_mongodb_la_SOURCES = write_mongodb.c
1215 write_mongodb_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMONGOC_CPPFLAGS)
1216 write_mongodb_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMONGOC_LDFLAGS)
1217 write_mongodb_la_LIBADD = -lmongoc
1220 if BUILD_PLUGIN_WRITE_REDIS
1221 pkglib_LTLIBRARIES += write_redis.la
1222 write_redis_la_SOURCES = write_redis.c
1223 write_redis_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBHIREDIS_LDFLAGS)
1224 write_redis_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBHIREDIS_CPPFLAGS)
1225 write_redis_la_LIBADD = -lhiredis
1228 if BUILD_PLUGIN_WRITE_RIEMANN
1229 pkglib_LTLIBRARIES += write_riemann.la
1230 write_riemann_la_SOURCES = write_riemann.c write_riemann_threshold.c write_riemann_threshold.h
1231 write_riemann_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBRIEMANN_CLIENT_LIBS)
1232 write_riemann_la_CFLAGS = $(AM_CFLAGS) $(LIBRIEMANN_CLIENT_CFLAGS)
1235 if BUILD_PLUGIN_WRITE_SENSU
1236 pkglib_LTLIBRARIES += write_sensu.la
1237 write_sensu_la_SOURCES = write_sensu.c
1238 write_sensu_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1241 if BUILD_PLUGIN_WRITE_TSDB
1242 pkglib_LTLIBRARIES += write_tsdb.la
1243 write_tsdb_la_SOURCES = write_tsdb.c
1244 write_tsdb_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1247 if BUILD_PLUGIN_XENCPU
1248 pkglib_LTLIBRARIES += xencpu.la
1249 xencpu_la_SOURCES = xencpu.c
1250 xencpu_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBXENCTL_CPPFLAGS)
1251 xencpu_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBXENCTL_LDFLAGS)
1252 xencpu_la_LIBADD = -lxenctrl
1255 if BUILD_PLUGIN_XMMS
1256 pkglib_LTLIBRARIES += xmms.la
1257 xmms_la_SOURCES = xmms.c
1258 xmms_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBXMMS_CFLAGS)
1259 xmms_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1260 xmms_la_LIBADD = $(BUILD_WITH_LIBXMMS_LIBS)
1263 if BUILD_PLUGIN_ZFS_ARC
1264 pkglib_LTLIBRARIES += zfs_arc.la
1265 zfs_arc_la_SOURCES = zfs_arc.c
1266 zfs_arc_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1268 zfs_arc_la_LIBADD = -lm
1271 zfs_arc_la_LIBADD = -lkstat
1275 if BUILD_PLUGIN_ZOOKEEPER
1276 pkglib_LTLIBRARIES += zookeeper.la
1277 zookeeper_la_SOURCES = zookeeper.c
1278 zookeeper_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1281 BUILT_SOURCES += $(dist_man_MANS)
1283 if BUILD_PLUGIN_ZONE
1284 pkglib_LTLIBRARIES += zone.la
1285 zone_la_SOURCES = zone.c
1286 zone_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1289 dist_man_MANS = collectd.1 \
1301 collectd-threshold.5 \
1302 collectd-unixsock.5 \
1305 EXTRA_DIST = collectd.conf.pod \
1306 collectd-email.pod \
1311 collectd-nagios.pod \
1313 collectd-python.pod \
1317 collectd-threshold.pod \
1318 collectd-unixsock.pod \
1319 postgresql_default.conf \
1324 pod2man --release=$(VERSION) --center=$(PACKAGE) $< \
1325 >.pod2man.tmp.$$$$ 2>/dev/null && mv -f .pod2man.tmp.$$$$ $@ || true
1326 @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
1328 echo "$@ has some POD errors!"; false; \
1332 pod2man --section=5 --release=$(VERSION) --center=$(PACKAGE) $< \
1333 >.pod2man.tmp.$$$$ 2>/dev/null && mv -f .pod2man.tmp.$$$$ $@ || true
1334 @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
1336 echo "$@ has some POD errors!"; false; \
1339 AM_V_PROTOC_C = $(am__v_PROTOC_C_@AM_V@)
1340 am__v_PROTOC_C_ = $(am__v_PROTOC_C_@AM_DEFAULT_V@)
1341 am__v_PROTOC_C_0 = @echo " PROTOC-C " $@;
1344 # Protocol buffer for the "pinba" plugin.
1345 EXTRA_DIST += pinba.proto
1346 if BUILD_PLUGIN_PINBA
1347 CLEANFILES += pinba.pb-c.c pinba.pb-c.h
1348 BUILT_SOURCES += pinba.pb-c.c pinba.pb-c.h
1350 pinba.pb-c.c pinba.pb-c.h: pinba.proto
1351 $(AM_V_PROTOC_C)protoc-c -I$(srcdir) --c_out . $(srcdir)/pinba.proto
1355 $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
1356 if test -e $(DESTDIR)$(sysconfdir)/collectd.conf; \
1358 $(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf.pkg-orig; \
1360 $(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf; \
1362 $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
1363 $(INSTALL) -m 0644 $(srcdir)/types.db $(DESTDIR)$(pkgdatadir)/types.db;
1364 $(INSTALL) -m 0644 $(srcdir)/postgresql_default.conf \
1365 $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;
1368 rm -f $(DESTDIR)$(pkgdatadir)/types.db;
1369 rm -f $(DESTDIR)$(sysconfdir)/collectd.conf
1370 rm -f $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;
1372 if BUILD_PLUGIN_CEPH
1373 test_plugin_ceph_SOURCES = ceph_test.c
1374 test_plugin_ceph_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
1375 test_plugin_ceph_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
1376 test_plugin_ceph_LDADD = daemon/libplugin_mock.la $(BUILD_WITH_LIBYAJL_LIBS)
1377 check_PROGRAMS += test_plugin_ceph
1378 TESTS += test_plugin_ceph