1 SUBDIRS = libcollectdclient
2 if BUILD_WITH_OWN_LIBOCONFIG
7 PLUGIN_LDFLAGS = -module -avoid-version -export-symbols-regex '\<module_register\>'
10 AM_CFLAGS = -Wall -Werror
13 AM_CPPFLAGS = -I$(srcdir)/daemon
14 AM_CPPFLAGS += -DPREFIX='"${prefix}"'
15 AM_CPPFLAGS += -DCONFIGFILE='"${sysconfdir}/${PACKAGE_NAME}.conf"'
16 AM_CPPFLAGS += -DLOCALSTATEDIR='"${localstatedir}"'
17 AM_CPPFLAGS += -DPKGLOCALSTATEDIR='"${localstatedir}/lib/${PACKAGE_NAME}"'
18 if BUILD_FEATURE_DAEMON
19 AM_CPPFLAGS += -DPIDFILE='"${localstatedir}/run/${PACKAGE_NAME}.pid"'
21 AM_CPPFLAGS += -DPLUGINDIR='"${pkglibdir}"'
22 AM_CPPFLAGS += -DPKGDATADIR='"${pkgdatadir}"'
24 AUTOMAKE_OPTIONS = subdir-objects
26 noinst_LTLIBRARIES = libmount.la liblookup.la
28 libmount_la_SOURCES = utils_mount.c utils_mount.h
29 libmount_la_LIBADD = daemon/libcommon.la
31 liblookup_la_SOURCES = utils_vl_lookup.c utils_vl_lookup.h
32 liblookup_la_LIBADD = daemon/libavltree.la daemon/libcommon.la
34 sbin_PROGRAMS = collectdmon
35 bin_PROGRAMS = collectd-nagios collectdctl collectd-tg
37 collectdmon_SOURCES = collectdmon.c
38 collectdmon_CPPFLAGS = $(AM_CPPFLAGS)
40 collectd_nagios_SOURCES = collectd-nagios.c
41 collectd_nagios_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/libcollectdclient/collectd -I$(top_builddir)/src/libcollectdclient/collectd
42 collectd_nagios_LDADD =
43 if BUILD_WITH_LIBSOCKET
44 collectd_nagios_LDADD += -lsocket
47 collectd_nagios_LDADD += -lm
50 collectd_nagios_LDADD += libcollectdclient/libcollectdclient.la
51 collectd_nagios_DEPENDENCIES = libcollectdclient/libcollectdclient.la
54 collectdctl_SOURCES = collectdctl.c
55 collectdctl_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/libcollectdclient/collectd -I$(top_builddir)/src/libcollectdclient/collectd
57 if BUILD_WITH_LIBSOCKET
58 collectdctl_LDADD += -lsocket
61 collectdctl_LDADD += -lm
63 collectdctl_LDADD += libcollectdclient/libcollectdclient.la
64 collectdctl_DEPENDENCIES = libcollectdclient/libcollectdclient.la
66 collectd_tg_SOURCES = collectd-tg.c
67 collectd_tg_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/libcollectdclient/collectd -I$(top_builddir)/src/libcollectdclient/collectd
68 collectd_tg_LDADD = daemon/libheap.la
69 if BUILD_WITH_LIBSOCKET
70 collectd_tg_LDADD += -lsocket
73 collectd_tg_LDADD += -lrt
76 collectd_tg_LDADD += -lm
78 if BUILD_WITH_LIBPTHREAD
79 collectd_tg_LDADD += -lpthread
81 collectd_tg_LDADD += libcollectdclient/libcollectdclient.la
82 collectd_tg_DEPENDENCIES = libcollectdclient/libcollectdclient.la
90 if BUILD_PLUGIN_AGGREGATION
91 pkglib_LTLIBRARIES += aggregation.la
92 aggregation_la_SOURCES = aggregation.c \
93 utils_vl_lookup.c utils_vl_lookup.h
94 aggregation_la_LDFLAGS = $(PLUGIN_LDFLAGS)
95 aggregation_la_LIBADD = -lm
99 pkglib_LTLIBRARIES += amqp.la
100 amqp_la_SOURCES = amqp.c \
101 utils_cmd_putval.c utils_cmd_putval.h \
102 utils_format_graphite.c utils_format_graphite.h \
103 utils_format_json.c utils_format_json.h
104 amqp_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRABBITMQ_LDFLAGS)
105 amqp_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBRABBITMQ_CPPFLAGS)
106 amqp_la_LIBADD = $(BUILD_WITH_LIBRABBITMQ_LIBS)
109 if BUILD_PLUGIN_APACHE
110 pkglib_LTLIBRARIES += apache.la
111 apache_la_SOURCES = apache.c
112 apache_la_LDFLAGS = $(PLUGIN_LDFLAGS)
113 apache_la_CFLAGS = $(AM_CFLAGS)
115 if BUILD_WITH_LIBCURL
116 apache_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
117 apache_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
121 if BUILD_PLUGIN_APCUPS
122 pkglib_LTLIBRARIES += apcups.la
123 apcups_la_SOURCES = apcups.c
124 apcups_la_LDFLAGS = $(PLUGIN_LDFLAGS)
126 if BUILD_WITH_LIBSOCKET
127 apcups_la_LIBADD += -lsocket
131 if BUILD_PLUGIN_APPLE_SENSORS
132 pkglib_LTLIBRARIES += apple_sensors.la
133 apple_sensors_la_SOURCES = apple_sensors.c
134 apple_sensors_la_LDFLAGS = $(PLUGIN_LDFLAGS)
135 apple_sensors_la_LDFLAGS += -framework IOKit
138 if BUILD_PLUGIN_AQUAERO
139 pkglib_LTLIBRARIES += aquaero.la
140 aquaero_la_SOURCES = aquaero.c
141 aquaero_la_LDFLAGS = $(PLUGIN_LDFLAGS)
142 aquaero_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBAQUAERO5_CFLAGS)
143 aquaero_la_LIBADD = $(BUILD_WITH_LIBAQUAERO5_LDFLAGS) -laquaero5
146 if BUILD_PLUGIN_ASCENT
147 pkglib_LTLIBRARIES += ascent.la
148 ascent_la_SOURCES = ascent.c
149 ascent_la_LDFLAGS = $(PLUGIN_LDFLAGS)
150 ascent_la_CFLAGS = $(AM_CFLAGS) \
151 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
152 ascent_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
155 if BUILD_PLUGIN_BAROMETER
156 pkglib_LTLIBRARIES += barometer.la
157 barometer_la_SOURCES = barometer.c
158 barometer_la_LDFLAGS = $(PLUGIN_LDFLAGS)
159 barometer_la_LIBADD = -lm
162 if BUILD_PLUGIN_BATTERY
163 pkglib_LTLIBRARIES += battery.la
164 battery_la_SOURCES = battery.c
165 battery_la_LDFLAGS = $(PLUGIN_LDFLAGS)
167 if BUILD_WITH_LIBIOKIT
168 battery_la_LDFLAGS += -framework IOKit
173 pkglib_LTLIBRARIES += bind.la
174 bind_la_SOURCES = bind.c
175 bind_la_LDFLAGS = $(PLUGIN_LDFLAGS)
176 bind_la_CFLAGS = $(AM_CFLAGS) \
177 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
178 bind_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
182 pkglib_LTLIBRARIES += ceph.la
183 ceph_la_SOURCES = ceph.c
184 ceph_la_CFLAGS = $(AM_CFLAGS)
185 ceph_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
186 ceph_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
187 ceph_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
190 if BUILD_PLUGIN_CGROUPS
191 pkglib_LTLIBRARIES += cgroups.la
192 cgroups_la_SOURCES = cgroups.c \
193 utils_ignorelist.c utils_ignorelist.h
194 cgroups_la_LDFLAGS = $(PLUGIN_LDFLAGS)
195 cgroups_la_LIBADD = libmount.la
198 if BUILD_PLUGIN_CONNTRACK
199 pkglib_LTLIBRARIES += conntrack.la
200 conntrack_la_SOURCES = conntrack.c
201 conntrack_la_LDFLAGS = $(PLUGIN_LDFLAGS)
204 if BUILD_PLUGIN_CONTEXTSWITCH
205 pkglib_LTLIBRARIES += contextswitch.la
206 contextswitch_la_SOURCES = contextswitch.c
207 contextswitch_la_LDFLAGS = $(PLUGIN_LDFLAGS)
208 contextswitch_la_LIBADD =
209 if BUILD_WITH_PERFSTAT
210 contextswitch_la_LIBADD += -lperfstat
215 pkglib_LTLIBRARIES += cpu.la
216 cpu_la_SOURCES = cpu.c
217 cpu_la_CFLAGS = $(AM_CFLAGS)
218 cpu_la_LDFLAGS = $(PLUGIN_LDFLAGS)
220 if BUILD_WITH_LIBKSTAT
221 cpu_la_LIBADD += -lkstat
223 if BUILD_WITH_LIBDEVINFO
224 cpu_la_LIBADD += -ldevinfo
226 if BUILD_WITH_LIBSTATGRAB
227 cpu_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
228 cpu_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
230 if BUILD_WITH_PERFSTAT
231 cpu_la_LIBADD += -lperfstat
235 if BUILD_PLUGIN_CPUFREQ
236 pkglib_LTLIBRARIES += cpufreq.la
237 cpufreq_la_SOURCES = cpufreq.c
238 cpufreq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
242 pkglib_LTLIBRARIES += csv.la
243 csv_la_SOURCES = csv.c
244 csv_la_LDFLAGS = $(PLUGIN_LDFLAGS)
248 pkglib_LTLIBRARIES += curl.la
249 curl_la_SOURCES = curl.c
250 curl_la_LDFLAGS = $(PLUGIN_LDFLAGS)
251 curl_la_CFLAGS = $(AM_CFLAGS)
253 if BUILD_WITH_LIBCURL
254 curl_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
255 curl_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
259 if BUILD_PLUGIN_CURL_JSON
260 pkglib_LTLIBRARIES += curl_json.la
261 curl_json_la_SOURCES = curl_json.c
262 curl_json_la_CFLAGS = $(AM_CFLAGS)
263 curl_json_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
264 curl_json_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
265 curl_json_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
266 if BUILD_WITH_LIBCURL
267 curl_json_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
268 curl_json_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
272 if BUILD_PLUGIN_CURL_XML
273 pkglib_LTLIBRARIES += curl_xml.la
274 curl_xml_la_SOURCES = curl_xml.c
275 curl_xml_la_LDFLAGS = $(PLUGIN_LDFLAGS)
276 curl_xml_la_CFLAGS = $(AM_CFLAGS) \
277 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
278 curl_xml_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
282 pkglib_LTLIBRARIES += dbi.la
283 dbi_la_SOURCES = dbi.c \
284 utils_db_query.c utils_db_query.h
285 dbi_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBDBI_CPPFLAGS)
286 dbi_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBDBI_LDFLAGS)
287 dbi_la_LIBADD = $(BUILD_WITH_LIBDBI_LIBS)
291 pkglib_LTLIBRARIES += df.la
292 df_la_SOURCES = df.c \
293 utils_ignorelist.c utils_ignorelist.h
294 df_la_LDFLAGS = $(PLUGIN_LDFLAGS)
295 df_la_LIBADD = libmount.la
299 pkglib_LTLIBRARIES += disk.la
300 disk_la_SOURCES = disk.c \
301 utils_ignorelist.c utils_ignorelist.h
302 disk_la_CFLAGS = $(AM_CFLAGS)
303 disk_la_LDFLAGS = $(PLUGIN_LDFLAGS)
305 if BUILD_WITH_LIBKSTAT
306 disk_la_LIBADD += -lkstat
308 if BUILD_WITH_LIBDEVINFO
309 disk_la_LIBADD += -ldevinfo
311 if BUILD_WITH_LIBIOKIT
312 disk_la_LDFLAGS += -framework IOKit
314 if BUILD_WITH_LIBSTATGRAB
315 disk_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
316 disk_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
318 if BUILD_WITH_LIBUDEV
319 disk_la_LIBADD += -ludev
321 if BUILD_WITH_PERFSTAT
322 disk_la_LIBADD += -lperfstat
327 pkglib_LTLIBRARIES += dns.la
328 dns_la_SOURCES = dns.c utils_dns.c utils_dns.h
329 dns_la_LDFLAGS = $(PLUGIN_LDFLAGS)
330 dns_la_LIBADD = -lpcap -lpthread
334 pkglib_LTLIBRARIES += drbd.la
335 drbd_la_SOURCES = drbd.c
336 drbd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
337 drbd_la_LIBADD = -lpthread
340 if BUILD_PLUGIN_EMAIL
341 pkglib_LTLIBRARIES += email.la
342 email_la_SOURCES = email.c
343 email_la_LDFLAGS = $(PLUGIN_LDFLAGS)
344 email_la_LIBADD = -lpthread
347 if BUILD_PLUGIN_ENTROPY
348 pkglib_LTLIBRARIES += entropy.la
349 entropy_la_SOURCES = entropy.c
350 entropy_la_LDFLAGS = $(PLUGIN_LDFLAGS)
354 pkglib_LTLIBRARIES += exec.la
355 exec_la_SOURCES = exec.c \
356 utils_cmd_putnotif.c utils_cmd_putnotif.h \
357 utils_cmd_putval.c utils_cmd_putval.h \
358 utils_parse_option.h utils_parse_option.c
359 exec_la_LDFLAGS = $(PLUGIN_LDFLAGS)
360 exec_la_LIBADD = -lpthread
363 if BUILD_PLUGIN_ETHSTAT
364 pkglib_LTLIBRARIES += ethstat.la
365 ethstat_la_SOURCES = ethstat.c
366 ethstat_la_LDFLAGS = $(PLUGIN_LDFLAGS)
369 if BUILD_PLUGIN_FHCOUNT
370 pkglib_LTLIBRARIES += fhcount.la
371 fhcount_la_SOURCES = fhcount.c
372 fhcount_la_LDFLAGS = $(PLUGIN_LDFLAGS)
375 if BUILD_PLUGIN_FILECOUNT
376 pkglib_LTLIBRARIES += filecount.la
377 filecount_la_SOURCES = filecount.c
378 filecount_la_LDFLAGS = $(PLUGIN_LDFLAGS)
381 if BUILD_PLUGIN_GMOND
382 pkglib_LTLIBRARIES += gmond.la
383 gmond_la_SOURCES = gmond.c
384 gmond_la_CPPFLAGS = $(AM_CPPFLAGS) $(GANGLIA_CPPFLAGS)
385 gmond_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(GANGLIA_LDFLAGS)
386 gmond_la_LIBADD = $(GANGLIA_LIBS)
389 if BUILD_PLUGIN_HDDTEMP
390 pkglib_LTLIBRARIES += hddtemp.la
391 hddtemp_la_SOURCES = hddtemp.c
392 hddtemp_la_LDFLAGS = $(PLUGIN_LDFLAGS)
394 if BUILD_WITH_LIBSOCKET
395 hddtemp_la_LIBADD += -lsocket
399 if BUILD_PLUGIN_INTERFACE
400 pkglib_LTLIBRARIES += interface.la
401 interface_la_SOURCES = interface.c \
402 utils_ignorelist.c utils_ignorelist.h
403 interface_la_CFLAGS = $(AM_CFLAGS)
404 interface_la_LDFLAGS = $(PLUGIN_LDFLAGS)
405 interface_la_LIBADD =
406 if BUILD_WITH_LIBSTATGRAB
407 interface_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
408 interface_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
410 if BUILD_WITH_LIBKSTAT
411 interface_la_LIBADD += -lkstat
413 if BUILD_WITH_LIBDEVINFO
414 interface_la_LIBADD += -ldevinfo
415 endif # BUILD_WITH_LIBDEVINFO
416 endif # !BUILD_WITH_LIBSTATGRAB
417 if BUILD_WITH_PERFSTAT
418 interface_la_LIBADD += -lperfstat
420 endif # BUILD_PLUGIN_INTERFACE
423 pkglib_LTLIBRARIES += ipc.la
424 ipc_la_SOURCES = ipc.c
425 ipc_la_CFLAGS = $(AM_CFLAGS)
426 ipc_la_LDFLAGS = $(PLUGIN_LDFLAGS)
429 if BUILD_PLUGIN_IPTABLES
430 pkglib_LTLIBRARIES += iptables.la
431 iptables_la_SOURCES = iptables.c
432 iptables_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBIPTC_CPPFLAGS)
433 iptables_la_LDFLAGS = $(PLUGIN_LDFLAGS)
434 iptables_la_LIBADD = $(BUILD_WITH_LIBIPTC_LDFLAGS)
438 pkglib_LTLIBRARIES += ipmi.la
439 ipmi_la_SOURCES = ipmi.c \
440 utils_ignorelist.c utils_ignorelist.h
441 ipmi_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_OPENIPMI_CFLAGS)
442 ipmi_la_LDFLAGS = $(PLUGIN_LDFLAGS)
443 ipmi_la_LIBADD = $(BUILD_WITH_OPENIPMI_LIBS)
447 pkglib_LTLIBRARIES += ipvs.la
448 ipvs_la_SOURCES = ipvs.c
449 if IP_VS_H_NEEDS_KERNEL_CFLAGS
450 ipvs_la_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS)
452 ipvs_la_LDFLAGS = $(PLUGIN_LDFLAGS)
456 pkglib_LTLIBRARIES += irq.la
457 irq_la_SOURCES = irq.c \
458 utils_ignorelist.c utils_ignorelist.h
459 irq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
463 pkglib_LTLIBRARIES += java.la
464 java_la_SOURCES = java.c
465 java_la_CPPFLAGS = $(AM_CPPFLAGS) $(JAVA_CPPFLAGS)
466 java_la_CFLAGS = $(AM_CFLAGS) $(JAVA_CFLAGS)
467 java_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(JAVA_LDFLAGS)
468 java_la_LIBADD = $(JAVA_LIBS)
472 pkglib_LTLIBRARIES += load.la
473 load_la_SOURCES = load.c
474 load_la_CFLAGS = $(AM_CFLAGS)
475 load_la_LDFLAGS = $(PLUGIN_LDFLAGS)
477 if BUILD_WITH_LIBSTATGRAB
478 load_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
479 load_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
480 endif # BUILD_WITH_LIBSTATGRAB
481 if BUILD_WITH_PERFSTAT
482 load_la_LIBADD += -lperfstat
484 endif # BUILD_PLUGIN_LOAD
486 if BUILD_PLUGIN_LOGFILE
487 pkglib_LTLIBRARIES += logfile.la
488 logfile_la_SOURCES = logfile.c
489 logfile_la_LDFLAGS = $(PLUGIN_LDFLAGS)
492 if BUILD_PLUGIN_LOG_LOGSTASH
493 pkglib_LTLIBRARIES += log_logstash.la
494 log_logstash_la_SOURCES = log_logstash.c
495 log_logstash_la_CFLAGS = $(AM_CFLAGS)
496 log_logstash_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
497 log_logstash_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
498 log_logstash_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
502 pkglib_LTLIBRARIES += lpar.la
503 lpar_la_SOURCES = lpar.c
504 lpar_la_LDFLAGS = $(PLUGIN_LDFLAGS)
505 lpar_la_LIBADD = -lperfstat
509 pkglib_LTLIBRARIES += lvm.la
510 lvm_la_SOURCES = lvm.c
511 lvm_la_LDFLAGS = $(PLUGIN_LDFLAGS)
512 lvm_la_LIBADD = $(BUILD_WITH_LIBLVM2APP_LIBS)
515 if BUILD_PLUGIN_MADWIFI
516 pkglib_LTLIBRARIES += madwifi.la
517 madwifi_la_SOURCES = madwifi.c madwifi.h \
518 utils_ignorelist.c utils_ignorelist.h
519 madwifi_la_LDFLAGS = $(PLUGIN_LDFLAGS)
522 if BUILD_PLUGIN_MATCH_EMPTY_COUNTER
523 pkglib_LTLIBRARIES += match_empty_counter.la
524 match_empty_counter_la_SOURCES = match_empty_counter.c
525 match_empty_counter_la_LDFLAGS = $(PLUGIN_LDFLAGS)
528 if BUILD_PLUGIN_MATCH_HASHED
529 pkglib_LTLIBRARIES += match_hashed.la
530 match_hashed_la_SOURCES = match_hashed.c
531 match_hashed_la_LDFLAGS = $(PLUGIN_LDFLAGS)
534 if BUILD_PLUGIN_MATCH_REGEX
535 pkglib_LTLIBRARIES += match_regex.la
536 match_regex_la_SOURCES = match_regex.c
537 match_regex_la_LDFLAGS = $(PLUGIN_LDFLAGS)
540 if BUILD_PLUGIN_MATCH_TIMEDIFF
541 pkglib_LTLIBRARIES += match_timediff.la
542 match_timediff_la_SOURCES = match_timediff.c
543 match_timediff_la_LDFLAGS = $(PLUGIN_LDFLAGS)
546 if BUILD_PLUGIN_MATCH_VALUE
547 pkglib_LTLIBRARIES += match_value.la
548 match_value_la_SOURCES = match_value.c
549 match_value_la_LDFLAGS = $(PLUGIN_LDFLAGS)
552 if BUILD_PLUGIN_MBMON
553 pkglib_LTLIBRARIES += mbmon.la
554 mbmon_la_SOURCES = mbmon.c
555 mbmon_la_LDFLAGS = $(PLUGIN_LDFLAGS)
557 if BUILD_WITH_LIBSOCKET
558 mbmon_la_LIBADD += -lsocket
563 pkglib_LTLIBRARIES += md.la
564 md_la_SOURCES = md.c \
565 utils_ignorelist.c utils_ignorelist.h
566 md_la_LDFLAGS = $(PLUGIN_LDFLAGS)
569 if BUILD_PLUGIN_MEMCACHEC
570 pkglib_LTLIBRARIES += memcachec.la
571 memcachec_la_SOURCES = memcachec.c
572 memcachec_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMEMCACHED_LDFLAGS)
573 memcachec_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMEMCACHED_CPPFLAGS)
574 memcachec_la_LIBADD = $(BUILD_WITH_LIBMEMCACHED_LIBS)
577 if BUILD_PLUGIN_MEMCACHED
578 pkglib_LTLIBRARIES += memcached.la
579 memcached_la_SOURCES = memcached.c
580 memcached_la_LDFLAGS = $(PLUGIN_LDFLAGS)
581 memcached_la_LIBADD =
582 if BUILD_WITH_LIBSOCKET
583 memcached_la_LIBADD += -lsocket
587 if BUILD_PLUGIN_MEMORY
588 pkglib_LTLIBRARIES += memory.la
589 memory_la_SOURCES = memory.c
590 memory_la_CFLAGS = $(AM_CFLAGS)
591 memory_la_LDFLAGS = $(PLUGIN_LDFLAGS)
593 if BUILD_WITH_LIBKSTAT
594 memory_la_LIBADD += -lkstat
596 if BUILD_WITH_LIBDEVINFO
597 memory_la_LIBADD += -ldevinfo
599 if BUILD_WITH_LIBSTATGRAB
600 memory_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
601 memory_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
603 if BUILD_WITH_PERFSTAT
604 memory_la_LIBADD += -lperfstat
609 pkglib_LTLIBRARIES += mic.la
610 mic_la_SOURCES = mic.c \
611 utils_ignorelist.c utils_ignorelist.h
612 mic_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_MIC_LIBPATH)
613 mic_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_MIC_CPPFLAGS)
614 mic_la_LIBADD = $(BUILD_WITH_MIC_LDADD)
617 if BUILD_PLUGIN_MODBUS
618 pkglib_LTLIBRARIES += modbus.la
619 modbus_la_SOURCES = modbus.c
620 modbus_la_LDFLAGS = $(PLUGIN_LDFLAGS)
621 modbus_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMODBUS_CFLAGS)
622 modbus_la_LIBADD = $(BUILD_WITH_LIBMODBUS_LIBS)
625 if BUILD_PLUGIN_MULTIMETER
626 pkglib_LTLIBRARIES += multimeter.la
627 multimeter_la_SOURCES = multimeter.c
628 multimeter_la_LDFLAGS = $(PLUGIN_LDFLAGS)
631 if BUILD_PLUGIN_MYSQL
632 pkglib_LTLIBRARIES += mysql.la
633 mysql_la_SOURCES = mysql.c
634 mysql_la_LDFLAGS = $(PLUGIN_LDFLAGS)
635 mysql_la_CFLAGS = $(AM_CFLAGS)
637 if BUILD_WITH_LIBMYSQL
638 mysql_la_CFLAGS += $(BUILD_WITH_LIBMYSQL_CFLAGS)
639 mysql_la_LIBADD += $(BUILD_WITH_LIBMYSQL_LIBS)
643 if BUILD_PLUGIN_NETAPP
644 pkglib_LTLIBRARIES += netapp.la
645 netapp_la_SOURCES = netapp.c \
646 utils_ignorelist.c utils_ignorelist.h
647 netapp_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBNETAPP_CPPFLAGS)
648 netapp_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBNETAPP_LDFLAGS)
649 netapp_la_LIBADD = $(LIBNETAPP_LIBS)
652 if BUILD_PLUGIN_NETLINK
653 pkglib_LTLIBRARIES += netlink.la
654 netlink_la_SOURCES = netlink.c
655 netlink_la_LDFLAGS = $(PLUGIN_LDFLAGS)
656 netlink_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMNL_CFLAGS)
657 netlink_la_LIBADD = $(BUILD_WITH_LIBMNL_LIBS)
660 if BUILD_PLUGIN_NETWORK
661 pkglib_LTLIBRARIES += network.la
662 network_la_SOURCES = network.c network.h \
663 utils_fbhash.c utils_fbhash.h
664 network_la_CPPFLAGS = $(AM_CPPFLAGS)
665 network_la_LDFLAGS = $(PLUGIN_LDFLAGS)
666 network_la_LIBADD = -lpthread
667 if BUILD_WITH_LIBSOCKET
668 network_la_LIBADD += -lsocket
670 if BUILD_WITH_LIBGCRYPT
671 network_la_CPPFLAGS += $(GCRYPT_CPPFLAGS)
672 network_la_LDFLAGS += $(GCRYPT_LDFLAGS)
673 network_la_LIBADD += $(GCRYPT_LIBS)
678 pkglib_LTLIBRARIES += nfs.la
679 nfs_la_SOURCES = nfs.c
680 nfs_la_LDFLAGS = $(PLUGIN_LDFLAGS)
683 if BUILD_PLUGIN_FSCACHE
684 pkglib_LTLIBRARIES += fscache.la
685 fscache_la_SOURCES = fscache.c
686 fscache_la_LDFLAGS = $(PLUGIN_LDFLAGS)
689 if BUILD_PLUGIN_NGINX
690 pkglib_LTLIBRARIES += nginx.la
691 nginx_la_SOURCES = nginx.c
692 nginx_la_CFLAGS = $(AM_CFLAGS)
694 nginx_la_LDFLAGS = $(PLUGIN_LDFLAGS)
695 if BUILD_WITH_LIBCURL
696 nginx_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
697 nginx_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
701 if BUILD_PLUGIN_NOTIFY_DESKTOP
702 pkglib_LTLIBRARIES += notify_desktop.la
703 notify_desktop_la_SOURCES = notify_desktop.c
704 notify_desktop_la_CFLAGS = $(AM_CFLAGS) $(LIBNOTIFY_CFLAGS)
705 notify_desktop_la_LDFLAGS = $(PLUGIN_LDFLAGS)
706 notify_desktop_la_LIBADD = $(LIBNOTIFY_LIBS)
709 if BUILD_PLUGIN_NOTIFY_EMAIL
710 pkglib_LTLIBRARIES += notify_email.la
711 notify_email_la_SOURCES = notify_email.c
712 notify_email_la_LDFLAGS = $(PLUGIN_LDFLAGS)
713 notify_email_la_LIBADD = -lesmtp -lssl -lcrypto -lpthread
717 pkglib_LTLIBRARIES += ntpd.la
718 ntpd_la_SOURCES = ntpd.c
719 ntpd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
721 if BUILD_WITH_LIBSOCKET
722 ntpd_la_LIBADD += -lsocket
727 pkglib_LTLIBRARIES += numa.la
728 numa_la_SOURCES = numa.c
729 numa_la_LDFLAGS = $(PLUGIN_LDFLAGS)
733 pkglib_LTLIBRARIES += nut.la
734 nut_la_SOURCES = nut.c
735 nut_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
736 nut_la_LDFLAGS = $(PLUGIN_LDFLAGS)
737 nut_la_LIBADD = -lpthread $(BUILD_WITH_LIBUPSCLIENT_LIBS)
740 if BUILD_PLUGIN_OLSRD
741 pkglib_LTLIBRARIES += olsrd.la
742 olsrd_la_SOURCES = olsrd.c
743 olsrd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
745 if BUILD_WITH_LIBSOCKET
746 olsrd_la_LIBADD += -lsocket
750 if BUILD_PLUGIN_ONEWIRE
751 pkglib_LTLIBRARIES += onewire.la
752 onewire_la_SOURCES = onewire.c \
753 utils_ignorelist.c utils_ignorelist.h
754 onewire_la_CFLAGS = $(AM_CFLAGS)
755 onewire_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
756 onewire_la_LIBADD = $(BUILD_WITH_LIBOWCAPI_LIBS)
757 onewire_la_LDFLAGS = $(PLUGIN_LDFLAGS)
760 if BUILD_PLUGIN_OPENLDAP
761 pkglib_LTLIBRARIES += openldap.la
762 openldap_la_SOURCES = openldap.c
763 openldap_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBLDAP_LDFLAGS)
764 openldap_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBLDAP_CPPFLAGS)
765 openldap_la_LIBADD = -lldap
768 if BUILD_PLUGIN_OPENVPN
769 pkglib_LTLIBRARIES += openvpn.la
770 openvpn_la_SOURCES = openvpn.c
771 openvpn_la_CFLAGS = $(AM_CFLAGS)
772 openvpn_la_LDFLAGS = $(PLUGIN_LDFLAGS)
775 if BUILD_PLUGIN_ORACLE
776 pkglib_LTLIBRARIES += oracle.la
777 oracle_la_SOURCES = oracle.c \
778 utils_db_query.c utils_db_query.h
779 oracle_la_CFLAGS = $(AM_CFLAGS)
780 oracle_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_ORACLE_CFLAGS)
781 oracle_la_LIBADD = $(BUILD_WITH_ORACLE_LIBS)
782 oracle_la_LDFLAGS = $(PLUGIN_LDFLAGS)
786 pkglib_LTLIBRARIES += perl.la
787 perl_la_SOURCES = perl.c
788 # Despite C99 providing the "bool" type thru stdbool.h, Perl defines its own
789 # version of that type if HAS_BOOL is not defined... *sigh*
790 perl_la_CPPFLAGS = $(AM_CPPFLAGS) -DHAS_BOOL=1
791 perl_la_CFLAGS = $(AM_CFLAGS) \
793 -DXS_VERSION=\"$(VERSION)\" -DVERSION=\"$(VERSION)\"
794 # Work-around for issues #41 and #42 - Perl 5.10 incorrectly introduced
795 # __attribute__nonnull__(3) for Perl_load_module().
796 if HAVE_BROKEN_PERL_LOAD_MODULE
797 perl_la_CFLAGS += -Wno-nonnull
799 perl_la_LDFLAGS = $(PLUGIN_LDFLAGS) \
801 perl_la_LIBADD = $(PERL_LIBS)
805 pkglib_LTLIBRARIES += pf.la
807 pf_la_LDFLAGS = $(PLUGIN_LDFLAGS)
810 if BUILD_PLUGIN_PINBA
811 pkglib_LTLIBRARIES += pinba.la
812 pinba_la_SOURCES = pinba.c
813 nodist_pinba_la_SOURCES = pinba.pb-c.c pinba.pb-c.h
814 pinba_la_LDFLAGS = $(PLUGIN_LDFLAGS)
815 pinba_la_LIBADD = -lprotobuf-c
819 pkglib_LTLIBRARIES += ping.la
820 ping_la_SOURCES = ping.c
821 ping_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOPING_CPPFLAGS)
822 ping_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBOPING_LDFLAGS)
823 ping_la_LIBADD = -loping -lm
826 if BUILD_PLUGIN_POSTGRESQL
827 pkglib_LTLIBRARIES += postgresql.la
828 postgresql_la_SOURCES = postgresql.c \
829 utils_db_query.c utils_db_query.h
830 postgresql_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPQ_CPPFLAGS)
831 postgresql_la_LDFLAGS = $(PLUGIN_LDFLAGS) \
832 $(BUILD_WITH_LIBPQ_LDFLAGS)
833 postgresql_la_LIBADD = -lpq
836 if BUILD_PLUGIN_POWERDNS
837 pkglib_LTLIBRARIES += powerdns.la
838 powerdns_la_SOURCES = powerdns.c
839 powerdns_la_LDFLAGS = $(PLUGIN_LDFLAGS)
842 if BUILD_PLUGIN_PYTHON
843 pkglib_LTLIBRARIES += python.la
844 python_la_SOURCES = python.c pyconfig.c pyvalues.c cpython.h
845 python_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_PYTHON_CPPFLAGS)
846 python_la_CFLAGS = $(AM_CFLAGS)
848 python_la_CFLAGS += -fno-strict-aliasing -Wno-strict-aliasing
850 python_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_PYTHON_LDFLAGS)
851 python_la_LIBADD = $(BUILD_WITH_PYTHON_LIBS)
854 if BUILD_PLUGIN_PROCESSES
855 pkglib_LTLIBRARIES += processes.la
856 processes_la_SOURCES = processes.c
857 processes_la_LDFLAGS = $(PLUGIN_LDFLAGS)
858 processes_la_LIBADD =
859 if BUILD_WITH_LIBKVM_GETPROCS
860 processes_la_LIBADD += -lkvm
864 if BUILD_PLUGIN_PROTOCOLS
865 pkglib_LTLIBRARIES += protocols.la
866 protocols_la_SOURCES = protocols.c \
867 utils_ignorelist.c utils_ignorelist.h
868 protocols_la_LDFLAGS = $(PLUGIN_LDFLAGS)
871 if BUILD_PLUGIN_REDIS
872 pkglib_LTLIBRARIES += redis.la
873 redis_la_SOURCES = redis.c
874 redis_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBHIREDIS_LDFLAGS)
875 redis_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBHIREDIS_CPPFLAGS)
876 redis_la_LIBADD = -lhiredis
879 if BUILD_PLUGIN_ROUTEROS
880 pkglib_LTLIBRARIES += routeros.la
881 routeros_la_SOURCES = routeros.c
882 routeros_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBROUTEROS_CPPFLAGS)
883 routeros_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBROUTEROS_LDFLAGS)
884 routeros_la_LIBADD = -lrouteros
887 if BUILD_PLUGIN_RRDCACHED
888 pkglib_LTLIBRARIES += rrdcached.la
889 rrdcached_la_SOURCES = rrdcached.c utils_rrdcreate.c utils_rrdcreate.h
890 rrdcached_la_LDFLAGS = $(PLUGIN_LDFLAGS)
891 rrdcached_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
892 rrdcached_la_LIBADD = $(BUILD_WITH_LIBRRD_LDFLAGS)
895 if BUILD_PLUGIN_RRDTOOL
896 pkglib_LTLIBRARIES += rrdtool.la
897 rrdtool_la_SOURCES = rrdtool.c utils_rrdcreate.c utils_rrdcreate.h
898 rrdtool_la_LDFLAGS = $(PLUGIN_LDFLAGS)
899 rrdtool_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
900 rrdtool_la_LIBADD = $(BUILD_WITH_LIBRRD_LDFLAGS)
903 if BUILD_PLUGIN_SENSORS
904 pkglib_LTLIBRARIES += sensors.la
905 sensors_la_SOURCES = sensors.c \
906 utils_ignorelist.c utils_ignorelist.h
907 sensors_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBSENSORS_CFLAGS)
908 sensors_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBSENSORS_LDFLAGS)
909 sensors_la_LIBADD = -lsensors
912 if BUILD_PLUGIN_SERIAL
913 pkglib_LTLIBRARIES += serial.la
914 serial_la_SOURCES = serial.c
915 serial_la_LDFLAGS = $(PLUGIN_LDFLAGS)
918 if BUILD_PLUGIN_SIGROK
919 pkglib_LTLIBRARIES += sigrok.la
920 sigrok_la_SOURCES = sigrok.c
921 sigrok_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBSIGROK_CFLAGS)
922 sigrok_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBSIGROK_LDFLAGS)
923 sigrok_la_LIBADD = -lsigrok
926 if BUILD_PLUGIN_SMART
927 if BUILD_WITH_LIBUDEV
928 pkglib_LTLIBRARIES += smart.la
929 smart_la_SOURCES = smart.c \
930 utils_ignorelist.c utils_ignorelist.h
931 smart_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBATASMART_CPPFLAGS)
932 smart_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBATASMART_LDFLAGS)
933 smart_la_LIBADD = $(BUILD_WITH_LIBATASMART_LIBS) -ludev
938 pkglib_LTLIBRARIES += snmp.la
939 snmp_la_SOURCES = snmp.c
940 snmp_la_LDFLAGS = $(PLUGIN_LDFLAGS)
941 snmp_la_CFLAGS = $(AM_CFLAGS)
943 if BUILD_WITH_LIBNETSNMP
944 snmp_la_CFLAGS += $(BUILD_WITH_LIBSNMP_CFLAGS)
945 snmp_la_LIBADD += $(BUILD_WITH_LIBSNMP_LIBS)
947 if BUILD_WITH_LIBPTHREAD
948 snmp_la_LIBADD += -lpthread
952 if BUILD_PLUGIN_STATSD
953 pkglib_LTLIBRARIES += statsd.la
954 statsd_la_SOURCES = statsd.c \
955 utils_latency.h utils_latency.c
956 statsd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
957 statsd_la_LIBADD = -lpthread
961 pkglib_LTLIBRARIES += swap.la
962 swap_la_SOURCES = swap.c
963 swap_la_CFLAGS = $(AM_CFLAGS)
964 swap_la_LDFLAGS = $(PLUGIN_LDFLAGS)
966 if BUILD_WITH_LIBKSTAT
967 swap_la_LIBADD += -lkstat
969 if BUILD_WITH_LIBDEVINFO
970 swap_la_LIBADD += -ldevinfo
972 if BUILD_WITH_LIBKVM_GETSWAPINFO
973 swap_la_LIBADD += -lkvm
975 if BUILD_WITH_LIBSTATGRAB
976 swap_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
977 swap_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
979 if BUILD_WITH_PERFSTAT
980 swap_la_LIBADD += -lperfstat
985 if BUILD_PLUGIN_SYSLOG
986 pkglib_LTLIBRARIES += syslog.la
987 syslog_la_SOURCES = syslog.c
988 syslog_la_LDFLAGS = $(PLUGIN_LDFLAGS)
991 if BUILD_PLUGIN_TABLE
992 pkglib_LTLIBRARIES += table.la
993 table_la_SOURCES = table.c
994 table_la_LDFLAGS = $(PLUGIN_LDFLAGS)
998 pkglib_LTLIBRARIES += tail.la
999 tail_la_SOURCES = tail.c
1000 tail_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1003 if BUILD_PLUGIN_TAIL_CSV
1004 pkglib_LTLIBRARIES += tail_csv.la
1005 tail_csv_la_SOURCES = tail_csv.c
1006 tail_csv_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1009 if BUILD_PLUGIN_TAPE
1010 pkglib_LTLIBRARIES += tape.la
1011 tape_la_SOURCES = tape.c
1012 tape_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1013 tape_la_LIBADD = -lkstat -ldevinfo
1016 if BUILD_PLUGIN_TARGET_NOTIFICATION
1017 pkglib_LTLIBRARIES += target_notification.la
1018 target_notification_la_SOURCES = target_notification.c
1019 target_notification_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1022 if BUILD_PLUGIN_TARGET_REPLACE
1023 pkglib_LTLIBRARIES += target_replace.la
1024 target_replace_la_SOURCES = target_replace.c
1025 target_replace_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1028 if BUILD_PLUGIN_TARGET_SCALE
1029 pkglib_LTLIBRARIES += target_scale.la
1030 target_scale_la_SOURCES = target_scale.c
1031 target_scale_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1034 if BUILD_PLUGIN_TARGET_SET
1035 pkglib_LTLIBRARIES += target_set.la
1036 target_set_la_SOURCES = target_set.c
1037 target_set_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1040 if BUILD_PLUGIN_TARGET_V5UPGRADE
1041 pkglib_LTLIBRARIES += target_v5upgrade.la
1042 target_v5upgrade_la_SOURCES = target_v5upgrade.c
1043 target_v5upgrade_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1046 if BUILD_PLUGIN_TCPCONNS
1047 pkglib_LTLIBRARIES += tcpconns.la
1048 tcpconns_la_SOURCES = tcpconns.c
1049 tcpconns_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1050 tcpconns_la_LIBADD =
1051 if BUILD_WITH_LIBKVM_NLIST
1052 tcpconns_la_LIBADD += -lkvm
1056 if BUILD_PLUGIN_TEAMSPEAK2
1057 pkglib_LTLIBRARIES += teamspeak2.la
1058 teamspeak2_la_SOURCES = teamspeak2.c
1059 teamspeak2_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1063 pkglib_LTLIBRARIES += ted.la
1064 ted_la_SOURCES = ted.c
1065 ted_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1068 if BUILD_PLUGIN_THERMAL
1069 pkglib_LTLIBRARIES += thermal.la
1070 thermal_la_SOURCES = thermal.c \
1071 utils_ignorelist.c utils_ignorelist.h
1072 thermal_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1075 if BUILD_PLUGIN_THRESHOLD
1076 pkglib_LTLIBRARIES += threshold.la
1077 threshold_la_SOURCES = threshold.c
1078 threshold_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1081 if BUILD_PLUGIN_TOKYOTYRANT
1082 pkglib_LTLIBRARIES += tokyotyrant.la
1083 tokyotyrant_la_SOURCES = tokyotyrant.c
1084 tokyotyrant_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS)
1085 tokyotyrant_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS)
1086 tokyotyrant_la_LIBADD = $(BUILD_WITH_LIBTOKYOTYRANT_LIBS)
1087 if BUILD_WITH_LIBSOCKET
1088 tokyotyrant_la_LIBADD += -lsocket
1092 if BUILD_PLUGIN_TURBOSTAT
1093 pkglib_LTLIBRARIES += turbostat.la
1094 turbostat_la_SOURCES = turbostat.c
1095 turbostat_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1098 if BUILD_PLUGIN_UNIXSOCK
1099 pkglib_LTLIBRARIES += unixsock.la
1100 unixsock_la_SOURCES = unixsock.c \
1101 utils_cmd_flush.h utils_cmd_flush.c \
1102 utils_cmd_getval.h utils_cmd_getval.c \
1103 utils_cmd_getthreshold.h utils_cmd_getthreshold.c \
1104 utils_cmd_listval.h utils_cmd_listval.c \
1105 utils_cmd_putval.h utils_cmd_putval.c \
1106 utils_cmd_putnotif.h utils_cmd_putnotif.c \
1107 utils_parse_option.h utils_parse_option.c
1108 unixsock_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1109 unixsock_la_LIBADD = -lpthread
1112 if BUILD_PLUGIN_UPTIME
1113 pkglib_LTLIBRARIES += uptime.la
1114 uptime_la_SOURCES = uptime.c
1115 uptime_la_CFLAGS = $(AM_CFLAGS)
1116 uptime_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1118 if BUILD_WITH_LIBKSTAT
1119 uptime_la_LIBADD += -lkstat
1121 if BUILD_WITH_PERFSTAT
1122 uptime_la_LIBADD += -lperfstat
1126 if BUILD_PLUGIN_USERS
1127 pkglib_LTLIBRARIES += users.la
1128 users_la_SOURCES = users.c
1129 users_la_CFLAGS = $(AM_CFLAGS)
1130 users_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1132 if BUILD_WITH_LIBSTATGRAB
1133 users_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1134 users_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1138 if BUILD_PLUGIN_UUID
1139 pkglib_LTLIBRARIES += uuid.la
1140 uuid_la_SOURCES = uuid.c
1141 uuid_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBHAL_CFLAGS)
1142 uuid_la_LIBADD = $(BUILD_WITH_LIBHAL_LIBS)
1143 uuid_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1146 if BUILD_PLUGIN_VARNISH
1147 pkglib_LTLIBRARIES += varnish.la
1148 varnish_la_SOURCES = varnish.c
1149 varnish_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1150 varnish_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBVARNISH_CFLAGS)
1151 varnish_la_LIBADD = $(BUILD_WITH_LIBVARNISH_LIBS)
1154 if BUILD_PLUGIN_VIRT
1155 pkglib_LTLIBRARIES += virt.la
1156 virt_la_SOURCES = virt.c \
1157 utils_ignorelist.c utils_ignorelist.h
1158 virt_la_CFLAGS = $(AM_CFLAGS) \
1159 $(BUILD_WITH_LIBVIRT_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
1160 virt_la_LIBADD = $(BUILD_WITH_LIBVIRT_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
1161 virt_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1164 if BUILD_PLUGIN_VMEM
1165 pkglib_LTLIBRARIES += vmem.la
1166 vmem_la_SOURCES = vmem.c
1167 vmem_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1170 if BUILD_PLUGIN_VSERVER
1171 pkglib_LTLIBRARIES += vserver.la
1172 vserver_la_SOURCES = vserver.c
1173 vserver_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1176 if BUILD_PLUGIN_WIRELESS
1177 pkglib_LTLIBRARIES += wireless.la
1178 wireless_la_SOURCES = wireless.c
1179 wireless_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1182 if BUILD_PLUGIN_WRITE_GRAPHITE
1183 pkglib_LTLIBRARIES += write_graphite.la
1184 write_graphite_la_SOURCES = write_graphite.c \
1185 utils_format_graphite.c utils_format_graphite.h \
1186 utils_format_json.c utils_format_json.h
1187 write_graphite_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1190 if BUILD_PLUGIN_WRITE_HTTP
1191 pkglib_LTLIBRARIES += write_http.la
1192 write_http_la_SOURCES = write_http.c \
1193 utils_format_json.c utils_format_json.h
1194 write_http_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1195 write_http_la_CFLAGS = $(AM_CFLAGS)
1196 write_http_la_LIBADD =
1197 if BUILD_WITH_LIBCURL
1198 write_http_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
1199 write_http_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
1203 if BUILD_PLUGIN_WRITE_KAFKA
1204 pkglib_LTLIBRARIES += write_kafka.la
1205 write_kafka_la_SOURCES = write_kafka.c \
1206 utils_format_graphite.c utils_format_graphite.h \
1207 utils_format_json.c utils_format_json.h \
1208 utils_cmd_putval.c utils_cmd_putval.h \
1209 utils_crc32.c utils_crc32.h
1210 write_kafka_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBRDKAFKA_CPPFLAGS)
1211 write_kafka_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRDKAFKA_LDFLAGS)
1212 write_kafka_la_LIBADD = $(BUILD_WITH_LIBRDKAFKA_LIBS)
1215 if BUILD_PLUGIN_WRITE_LOG
1216 pkglib_LTLIBRARIES += write_log.la
1217 write_log_la_SOURCES = write_log.c \
1218 utils_format_graphite.c utils_format_graphite.h
1219 write_log_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1222 if BUILD_PLUGIN_WRITE_MONGODB
1223 pkglib_LTLIBRARIES += write_mongodb.la
1224 write_mongodb_la_SOURCES = write_mongodb.c
1225 write_mongodb_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMONGOC_CPPFLAGS)
1226 write_mongodb_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMONGOC_LDFLAGS)
1227 write_mongodb_la_LIBADD = -lmongoc
1230 if BUILD_PLUGIN_WRITE_REDIS
1231 pkglib_LTLIBRARIES += write_redis.la
1232 write_redis_la_SOURCES = write_redis.c
1233 write_redis_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBHIREDIS_LDFLAGS)
1234 write_redis_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBHIREDIS_CPPFLAGS)
1235 write_redis_la_LIBADD = -lhiredis
1238 if BUILD_PLUGIN_WRITE_RIEMANN
1239 pkglib_LTLIBRARIES += write_riemann.la
1240 write_riemann_la_SOURCES = write_riemann.c write_riemann_threshold.c
1241 nodist_write_riemann_la_SOURCES = riemann.pb-c.c riemann.pb-c.h
1242 write_riemann_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1243 write_riemann_la_LIBADD = -lprotobuf-c
1246 if BUILD_PLUGIN_WRITE_SENSU
1247 pkglib_LTLIBRARIES += write_sensu.la
1248 write_sensu_la_SOURCES = write_sensu.c
1249 write_sensu_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1252 if BUILD_PLUGIN_WRITE_TSDB
1253 pkglib_LTLIBRARIES += write_tsdb.la
1254 write_tsdb_la_SOURCES = write_tsdb.c
1255 write_tsdb_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1258 if BUILD_PLUGIN_XMMS
1259 pkglib_LTLIBRARIES += xmms.la
1260 xmms_la_SOURCES = xmms.c
1261 xmms_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBXMMS_CFLAGS)
1262 xmms_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1263 xmms_la_LIBADD = $(BUILD_WITH_LIBXMMS_LIBS)
1266 if BUILD_PLUGIN_ZFS_ARC
1267 pkglib_LTLIBRARIES += zfs_arc.la
1268 zfs_arc_la_SOURCES = zfs_arc.c
1269 zfs_arc_la_CFLAGS = $(AM_CFLAGS)
1270 zfs_arc_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1272 zfs_arc_la_LIBADD = -lm
1275 # zfs_arc requires no library on linux
1278 zfs_arc_la_LIBADD = -lkstat
1283 if BUILD_PLUGIN_ZOOKEEPER
1284 pkglib_LTLIBRARIES += zookeeper.la
1285 zookeeper_la_SOURCES = zookeeper.c
1286 zookeeper_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1289 BUILT_SOURCES += $(dist_man_MANS)
1291 if BUILD_PLUGIN_ZONE
1292 pkglib_LTLIBRARIES += zone.la
1293 zone_la_SOURCES = zone.c
1294 zone_la_CFLAGS = $(AM_CFLAGS)
1295 zone_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1298 dist_man_MANS = collectd.1 \
1310 collectd-threshold.5 \
1311 collectd-unixsock.5 \
1314 #collectd_1_SOURCES = collectd.pod
1316 EXTRA_DIST = types.db
1318 EXTRA_DIST += collectd.conf.pod \
1319 collectd-email.pod \
1324 collectd-nagios.pod \
1326 collectd-python.pod \
1330 collectd-threshold.pod \
1331 collectd-unixsock.pod \
1332 postgresql_default.conf \
1336 pod2man --release=$(VERSION) --center=$(PACKAGE) $< \
1337 >.pod2man.tmp.$$$$ 2>/dev/null && mv -f .pod2man.tmp.$$$$ $@ || true
1338 @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
1340 echo "$@ has some POD errors!"; false; \
1344 pod2man --section=5 --release=$(VERSION) --center=$(PACKAGE) $< \
1345 >.pod2man.tmp.$$$$ 2>/dev/null && mv -f .pod2man.tmp.$$$$ $@ || true
1346 @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
1348 echo "$@ has some POD errors!"; false; \
1351 # Protocol buffer for the "pinba" plugin.
1352 EXTRA_DIST += pinba.proto
1354 CLEANFILES += pinba.pb-c.c pinba.pb-c.h
1355 BUILT_SOURCES += pinba.pb-c.c pinba.pb-c.h
1357 pinba.pb-c.c pinba.pb-c.h: pinba.proto
1358 protoc-c -I$(srcdir) --c_out . $(srcdir)/pinba.proto
1361 # Protocol buffer for the "write_riemann" plugin.
1362 EXTRA_DIST += riemann.proto
1364 CLEANFILES += riemann.pb-c.c riemann.pb-c.h
1366 BUILT_SOURCES += riemann.pb-c.c riemann.pb-c.h
1368 riemann.pb-c.c riemann.pb-c.h: riemann.proto
1369 protoc-c -I$(srcdir) --c_out . $(srcdir)/riemann.proto
1373 $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
1374 if test -e $(DESTDIR)$(sysconfdir)/collectd.conf; \
1376 $(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf.pkg-orig; \
1378 $(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf; \
1380 $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
1381 $(INSTALL) -m 0644 $(srcdir)/types.db $(DESTDIR)$(pkgdatadir)/types.db;
1382 $(INSTALL) -m 0644 $(srcdir)/postgresql_default.conf \
1383 $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;
1386 rm -f $(DESTDIR)$(pkgdatadir)/types.db;
1387 rm -f $(DESTDIR)$(sysconfdir)/collectd.conf
1388 rm -f $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;
1390 check_PROGRAMS = test_utils_mount test_utils_vl_lookup
1392 test_utils_mount_SOURCES = utils_mount_test.c testing.h
1393 test_utils_mount_LDADD = libmount.la daemon/libplugin_mock.la
1395 test_utils_vl_lookup_SOURCES = utils_vl_lookup_test.c testing.h
1396 test_utils_vl_lookup_LDADD = liblookup.la daemon/libplugin_mock.la
1398 TESTS = test_utils_mount test_utils_vl_lookup