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_parse_option.c utils_parse_option.h \
103 utils_format_graphite.c utils_format_graphite.h \
104 utils_format_json.c utils_format_json.h
105 amqp_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRABBITMQ_LDFLAGS)
106 amqp_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBRABBITMQ_CPPFLAGS)
107 amqp_la_LIBADD = $(BUILD_WITH_LIBRABBITMQ_LIBS)
110 if BUILD_PLUGIN_APACHE
111 pkglib_LTLIBRARIES += apache.la
112 apache_la_SOURCES = apache.c
113 apache_la_LDFLAGS = $(PLUGIN_LDFLAGS)
114 apache_la_CFLAGS = $(AM_CFLAGS)
116 if BUILD_WITH_LIBCURL
117 apache_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
118 apache_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
122 if BUILD_PLUGIN_APCUPS
123 pkglib_LTLIBRARIES += apcups.la
124 apcups_la_SOURCES = apcups.c
125 apcups_la_LDFLAGS = $(PLUGIN_LDFLAGS)
127 if BUILD_WITH_LIBSOCKET
128 apcups_la_LIBADD += -lsocket
132 if BUILD_PLUGIN_APPLE_SENSORS
133 pkglib_LTLIBRARIES += apple_sensors.la
134 apple_sensors_la_SOURCES = apple_sensors.c
135 apple_sensors_la_LDFLAGS = $(PLUGIN_LDFLAGS)
136 apple_sensors_la_LDFLAGS += -framework IOKit
139 if BUILD_PLUGIN_AQUAERO
140 pkglib_LTLIBRARIES += aquaero.la
141 aquaero_la_SOURCES = aquaero.c
142 aquaero_la_LDFLAGS = $(PLUGIN_LDFLAGS)
143 aquaero_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBAQUAERO5_CFLAGS)
144 aquaero_la_LIBADD = $(BUILD_WITH_LIBAQUAERO5_LDFLAGS) -laquaero5
147 if BUILD_PLUGIN_ASCENT
148 pkglib_LTLIBRARIES += ascent.la
149 ascent_la_SOURCES = ascent.c
150 ascent_la_LDFLAGS = $(PLUGIN_LDFLAGS)
151 ascent_la_CFLAGS = $(AM_CFLAGS) \
152 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
153 ascent_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
156 if BUILD_PLUGIN_BAROMETER
157 pkglib_LTLIBRARIES += barometer.la
158 barometer_la_SOURCES = barometer.c
159 barometer_la_LDFLAGS = $(PLUGIN_LDFLAGS)
160 barometer_la_LIBADD = -lm
163 if BUILD_PLUGIN_BATTERY
164 pkglib_LTLIBRARIES += battery.la
165 battery_la_SOURCES = battery.c
166 battery_la_LDFLAGS = $(PLUGIN_LDFLAGS)
168 if BUILD_WITH_LIBIOKIT
169 battery_la_LDFLAGS += -framework IOKit
174 pkglib_LTLIBRARIES += bind.la
175 bind_la_SOURCES = bind.c
176 bind_la_LDFLAGS = $(PLUGIN_LDFLAGS)
177 bind_la_CFLAGS = $(AM_CFLAGS) \
178 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
179 bind_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
183 pkglib_LTLIBRARIES += ceph.la
184 ceph_la_SOURCES = ceph.c
185 ceph_la_CFLAGS = $(AM_CFLAGS)
186 ceph_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
187 ceph_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
188 ceph_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
191 if BUILD_PLUGIN_CGROUPS
192 pkglib_LTLIBRARIES += cgroups.la
193 cgroups_la_SOURCES = cgroups.c
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
293 df_la_LDFLAGS = $(PLUGIN_LDFLAGS)
294 df_la_LIBADD = libmount.la
298 pkglib_LTLIBRARIES += disk.la
299 disk_la_SOURCES = disk.c
300 disk_la_CFLAGS = $(AM_CFLAGS)
301 disk_la_LDFLAGS = $(PLUGIN_LDFLAGS)
303 if BUILD_WITH_LIBKSTAT
304 disk_la_LIBADD += -lkstat
306 if BUILD_WITH_LIBDEVINFO
307 disk_la_LIBADD += -ldevinfo
309 if BUILD_WITH_LIBIOKIT
310 disk_la_LDFLAGS += -framework IOKit
312 if BUILD_WITH_LIBSTATGRAB
313 disk_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
314 disk_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
316 if BUILD_WITH_LIBUDEV
317 disk_la_LIBADD += -ludev
319 if BUILD_WITH_PERFSTAT
320 disk_la_LIBADD += -lperfstat
325 pkglib_LTLIBRARIES += dns.la
326 dns_la_SOURCES = dns.c utils_dns.c utils_dns.h
327 dns_la_LDFLAGS = $(PLUGIN_LDFLAGS)
328 dns_la_LIBADD = -lpcap -lpthread
332 pkglib_LTLIBRARIES += drbd.la
333 drbd_la_SOURCES = drbd.c
334 drbd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
335 drbd_la_LIBADD = -lpthread
338 if BUILD_PLUGIN_EMAIL
339 pkglib_LTLIBRARIES += email.la
340 email_la_SOURCES = email.c
341 email_la_LDFLAGS = $(PLUGIN_LDFLAGS)
342 email_la_LIBADD = -lpthread
345 if BUILD_PLUGIN_ENTROPY
346 pkglib_LTLIBRARIES += entropy.la
347 entropy_la_SOURCES = entropy.c
348 entropy_la_LDFLAGS = $(PLUGIN_LDFLAGS)
352 pkglib_LTLIBRARIES += exec.la
353 exec_la_SOURCES = exec.c \
354 utils_cmd_putnotif.c utils_cmd_putnotif.h \
355 utils_cmd_putval.c utils_cmd_putval.h \
356 utils_parse_option.h utils_parse_option.c
357 exec_la_LDFLAGS = $(PLUGIN_LDFLAGS)
358 exec_la_LIBADD = -lpthread
361 if BUILD_PLUGIN_ETHSTAT
362 pkglib_LTLIBRARIES += ethstat.la
363 ethstat_la_SOURCES = ethstat.c
364 ethstat_la_LDFLAGS = $(PLUGIN_LDFLAGS)
367 if BUILD_PLUGIN_FHCOUNT
368 pkglib_LTLIBRARIES += fhcount.la
369 fhcount_la_SOURCES = fhcount.c
370 fhcount_la_LDFLAGS = $(PLUGIN_LDFLAGS)
373 if BUILD_PLUGIN_FILECOUNT
374 pkglib_LTLIBRARIES += filecount.la
375 filecount_la_SOURCES = filecount.c
376 filecount_la_LDFLAGS = $(PLUGIN_LDFLAGS)
379 if BUILD_PLUGIN_GMOND
380 pkglib_LTLIBRARIES += gmond.la
381 gmond_la_SOURCES = gmond.c
382 gmond_la_CPPFLAGS = $(AM_CPPFLAGS) $(GANGLIA_CPPFLAGS)
383 gmond_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(GANGLIA_LDFLAGS)
384 gmond_la_LIBADD = $(GANGLIA_LIBS)
387 if BUILD_PLUGIN_HDDTEMP
388 pkglib_LTLIBRARIES += hddtemp.la
389 hddtemp_la_SOURCES = hddtemp.c
390 hddtemp_la_LDFLAGS = $(PLUGIN_LDFLAGS)
392 if BUILD_WITH_LIBSOCKET
393 hddtemp_la_LIBADD += -lsocket
397 if BUILD_PLUGIN_INTERFACE
398 pkglib_LTLIBRARIES += interface.la
399 interface_la_SOURCES = interface.c
400 interface_la_CFLAGS = $(AM_CFLAGS)
401 interface_la_LDFLAGS = $(PLUGIN_LDFLAGS)
402 interface_la_LIBADD =
403 if BUILD_WITH_LIBSTATGRAB
404 interface_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
405 interface_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
407 if BUILD_WITH_LIBKSTAT
408 interface_la_LIBADD += -lkstat
410 if BUILD_WITH_LIBDEVINFO
411 interface_la_LIBADD += -ldevinfo
412 endif # BUILD_WITH_LIBDEVINFO
413 endif # !BUILD_WITH_LIBSTATGRAB
414 if BUILD_WITH_PERFSTAT
415 interface_la_LIBADD += -lperfstat
417 endif # BUILD_PLUGIN_INTERFACE
420 pkglib_LTLIBRARIES += ipc.la
421 ipc_la_SOURCES = ipc.c
422 ipc_la_CFLAGS = $(AM_CFLAGS)
423 ipc_la_LDFLAGS = $(PLUGIN_LDFLAGS)
426 if BUILD_PLUGIN_IPTABLES
427 pkglib_LTLIBRARIES += iptables.la
428 iptables_la_SOURCES = iptables.c
429 iptables_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBIPTC_CPPFLAGS)
430 iptables_la_LDFLAGS = $(PLUGIN_LDFLAGS)
431 iptables_la_LIBADD = $(BUILD_WITH_LIBIPTC_LDFLAGS)
435 pkglib_LTLIBRARIES += ipmi.la
436 ipmi_la_SOURCES = ipmi.c
437 ipmi_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_OPENIPMI_CFLAGS)
438 ipmi_la_LDFLAGS = $(PLUGIN_LDFLAGS)
439 ipmi_la_LIBADD = $(BUILD_WITH_OPENIPMI_LIBS)
443 pkglib_LTLIBRARIES += ipvs.la
444 ipvs_la_SOURCES = ipvs.c
445 if IP_VS_H_NEEDS_KERNEL_CFLAGS
446 ipvs_la_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS)
448 ipvs_la_LDFLAGS = $(PLUGIN_LDFLAGS)
452 pkglib_LTLIBRARIES += irq.la
453 irq_la_SOURCES = irq.c
454 irq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
458 pkglib_LTLIBRARIES += java.la
459 java_la_SOURCES = java.c
460 java_la_CPPFLAGS = $(AM_CPPFLAGS) $(JAVA_CPPFLAGS)
461 java_la_CFLAGS = $(AM_CFLAGS) $(JAVA_CFLAGS)
462 java_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(JAVA_LDFLAGS)
463 java_la_LIBADD = $(JAVA_LIBS)
467 pkglib_LTLIBRARIES += load.la
468 load_la_SOURCES = load.c
469 load_la_CFLAGS = $(AM_CFLAGS)
470 load_la_LDFLAGS = $(PLUGIN_LDFLAGS)
472 if BUILD_WITH_LIBSTATGRAB
473 load_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
474 load_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
475 endif # BUILD_WITH_LIBSTATGRAB
476 if BUILD_WITH_PERFSTAT
477 load_la_LIBADD += -lperfstat
479 endif # BUILD_PLUGIN_LOAD
481 if BUILD_PLUGIN_LOGFILE
482 pkglib_LTLIBRARIES += logfile.la
483 logfile_la_SOURCES = logfile.c
484 logfile_la_LDFLAGS = $(PLUGIN_LDFLAGS)
487 if BUILD_PLUGIN_LOG_LOGSTASH
488 pkglib_LTLIBRARIES += log_logstash.la
489 log_logstash_la_SOURCES = log_logstash.c
490 log_logstash_la_CFLAGS = $(AM_CFLAGS)
491 log_logstash_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
492 log_logstash_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
493 log_logstash_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
497 pkglib_LTLIBRARIES += lpar.la
498 lpar_la_SOURCES = lpar.c
499 lpar_la_LDFLAGS = $(PLUGIN_LDFLAGS)
500 lpar_la_LIBADD = -lperfstat
504 pkglib_LTLIBRARIES += lvm.la
505 lvm_la_SOURCES = lvm.c
506 lvm_la_LDFLAGS = $(PLUGIN_LDFLAGS)
507 lvm_la_LIBADD = $(BUILD_WITH_LIBLVM2APP_LIBS)
510 if BUILD_PLUGIN_MADWIFI
511 pkglib_LTLIBRARIES += madwifi.la
512 madwifi_la_SOURCES = madwifi.c madwifi.h
513 madwifi_la_LDFLAGS = $(PLUGIN_LDFLAGS)
516 if BUILD_PLUGIN_MATCH_EMPTY_COUNTER
517 pkglib_LTLIBRARIES += match_empty_counter.la
518 match_empty_counter_la_SOURCES = match_empty_counter.c
519 match_empty_counter_la_LDFLAGS = $(PLUGIN_LDFLAGS)
522 if BUILD_PLUGIN_MATCH_HASHED
523 pkglib_LTLIBRARIES += match_hashed.la
524 match_hashed_la_SOURCES = match_hashed.c
525 match_hashed_la_LDFLAGS = $(PLUGIN_LDFLAGS)
528 if BUILD_PLUGIN_MATCH_REGEX
529 pkglib_LTLIBRARIES += match_regex.la
530 match_regex_la_SOURCES = match_regex.c
531 match_regex_la_LDFLAGS = $(PLUGIN_LDFLAGS)
534 if BUILD_PLUGIN_MATCH_TIMEDIFF
535 pkglib_LTLIBRARIES += match_timediff.la
536 match_timediff_la_SOURCES = match_timediff.c
537 match_timediff_la_LDFLAGS = $(PLUGIN_LDFLAGS)
540 if BUILD_PLUGIN_MATCH_VALUE
541 pkglib_LTLIBRARIES += match_value.la
542 match_value_la_SOURCES = match_value.c
543 match_value_la_LDFLAGS = $(PLUGIN_LDFLAGS)
546 if BUILD_PLUGIN_MBMON
547 pkglib_LTLIBRARIES += mbmon.la
548 mbmon_la_SOURCES = mbmon.c
549 mbmon_la_LDFLAGS = $(PLUGIN_LDFLAGS)
551 if BUILD_WITH_LIBSOCKET
552 mbmon_la_LIBADD += -lsocket
557 pkglib_LTLIBRARIES += md.la
559 md_la_LDFLAGS = $(PLUGIN_LDFLAGS)
562 if BUILD_PLUGIN_MEMCACHEC
563 pkglib_LTLIBRARIES += memcachec.la
564 memcachec_la_SOURCES = memcachec.c
565 memcachec_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMEMCACHED_LDFLAGS)
566 memcachec_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMEMCACHED_CPPFLAGS)
567 memcachec_la_LIBADD = $(BUILD_WITH_LIBMEMCACHED_LIBS)
570 if BUILD_PLUGIN_MEMCACHED
571 pkglib_LTLIBRARIES += memcached.la
572 memcached_la_SOURCES = memcached.c
573 memcached_la_LDFLAGS = $(PLUGIN_LDFLAGS)
574 memcached_la_LIBADD =
575 if BUILD_WITH_LIBSOCKET
576 memcached_la_LIBADD += -lsocket
580 if BUILD_PLUGIN_MEMORY
581 pkglib_LTLIBRARIES += memory.la
582 memory_la_SOURCES = memory.c
583 memory_la_CFLAGS = $(AM_CFLAGS)
584 memory_la_LDFLAGS = $(PLUGIN_LDFLAGS)
586 if BUILD_WITH_LIBKSTAT
587 memory_la_LIBADD += -lkstat
589 if BUILD_WITH_LIBDEVINFO
590 memory_la_LIBADD += -ldevinfo
592 if BUILD_WITH_LIBSTATGRAB
593 memory_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
594 memory_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
596 if BUILD_WITH_PERFSTAT
597 memory_la_LIBADD += -lperfstat
602 pkglib_LTLIBRARIES += mic.la
603 mic_la_SOURCES = mic.c
604 mic_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_MIC_LIBPATH)
605 mic_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_MIC_CPPFLAGS)
606 mic_la_LIBADD = $(BUILD_WITH_MIC_LDADD)
609 if BUILD_PLUGIN_MODBUS
610 pkglib_LTLIBRARIES += modbus.la
611 modbus_la_SOURCES = modbus.c
612 modbus_la_LDFLAGS = $(PLUGIN_LDFLAGS)
613 modbus_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMODBUS_CFLAGS)
614 modbus_la_LIBADD = $(BUILD_WITH_LIBMODBUS_LIBS)
617 if BUILD_PLUGIN_MULTIMETER
618 pkglib_LTLIBRARIES += multimeter.la
619 multimeter_la_SOURCES = multimeter.c
620 multimeter_la_LDFLAGS = $(PLUGIN_LDFLAGS)
623 if BUILD_PLUGIN_MYSQL
624 pkglib_LTLIBRARIES += mysql.la
625 mysql_la_SOURCES = mysql.c
626 mysql_la_LDFLAGS = $(PLUGIN_LDFLAGS)
627 mysql_la_CFLAGS = $(AM_CFLAGS)
629 if BUILD_WITH_LIBMYSQL
630 mysql_la_CFLAGS += $(BUILD_WITH_LIBMYSQL_CFLAGS)
631 mysql_la_LIBADD += $(BUILD_WITH_LIBMYSQL_LIBS)
635 if BUILD_PLUGIN_NETAPP
636 pkglib_LTLIBRARIES += netapp.la
637 netapp_la_SOURCES = netapp.c
638 netapp_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBNETAPP_CPPFLAGS)
639 netapp_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBNETAPP_LDFLAGS)
640 netapp_la_LIBADD = $(LIBNETAPP_LIBS)
643 if BUILD_PLUGIN_NETLINK
644 pkglib_LTLIBRARIES += netlink.la
645 netlink_la_SOURCES = netlink.c
646 netlink_la_LDFLAGS = $(PLUGIN_LDFLAGS)
647 netlink_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMNL_CFLAGS)
648 netlink_la_LIBADD = $(BUILD_WITH_LIBMNL_LIBS)
651 if BUILD_PLUGIN_NETWORK
652 pkglib_LTLIBRARIES += network.la
653 network_la_SOURCES = network.c network.h \
654 utils_fbhash.c utils_fbhash.h
655 network_la_CPPFLAGS = $(AM_CPPFLAGS)
656 network_la_LDFLAGS = $(PLUGIN_LDFLAGS)
657 network_la_LIBADD = -lpthread
658 if BUILD_WITH_LIBSOCKET
659 network_la_LIBADD += -lsocket
661 if BUILD_WITH_LIBGCRYPT
662 network_la_CPPFLAGS += $(GCRYPT_CPPFLAGS)
663 network_la_LDFLAGS += $(GCRYPT_LDFLAGS)
664 network_la_LIBADD += $(GCRYPT_LIBS)
669 pkglib_LTLIBRARIES += nfs.la
670 nfs_la_SOURCES = nfs.c
671 nfs_la_LDFLAGS = $(PLUGIN_LDFLAGS)
674 if BUILD_PLUGIN_FSCACHE
675 pkglib_LTLIBRARIES += fscache.la
676 fscache_la_SOURCES = fscache.c
677 fscache_la_LDFLAGS = $(PLUGIN_LDFLAGS)
680 if BUILD_PLUGIN_NGINX
681 pkglib_LTLIBRARIES += nginx.la
682 nginx_la_SOURCES = nginx.c
683 nginx_la_CFLAGS = $(AM_CFLAGS)
685 nginx_la_LDFLAGS = $(PLUGIN_LDFLAGS)
686 if BUILD_WITH_LIBCURL
687 nginx_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
688 nginx_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
692 if BUILD_PLUGIN_NOTIFY_DESKTOP
693 pkglib_LTLIBRARIES += notify_desktop.la
694 notify_desktop_la_SOURCES = notify_desktop.c
695 notify_desktop_la_CFLAGS = $(AM_CFLAGS) $(LIBNOTIFY_CFLAGS)
696 notify_desktop_la_LDFLAGS = $(PLUGIN_LDFLAGS)
697 notify_desktop_la_LIBADD = $(LIBNOTIFY_LIBS)
700 if BUILD_PLUGIN_NOTIFY_EMAIL
701 pkglib_LTLIBRARIES += notify_email.la
702 notify_email_la_SOURCES = notify_email.c
703 notify_email_la_LDFLAGS = $(PLUGIN_LDFLAGS)
704 notify_email_la_LIBADD = -lesmtp -lssl -lcrypto -lpthread
708 pkglib_LTLIBRARIES += ntpd.la
709 ntpd_la_SOURCES = ntpd.c
710 ntpd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
712 if BUILD_WITH_LIBSOCKET
713 ntpd_la_LIBADD += -lsocket
718 pkglib_LTLIBRARIES += numa.la
719 numa_la_SOURCES = numa.c
720 numa_la_LDFLAGS = $(PLUGIN_LDFLAGS)
724 pkglib_LTLIBRARIES += nut.la
725 nut_la_SOURCES = nut.c
726 nut_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
727 nut_la_LDFLAGS = $(PLUGIN_LDFLAGS)
728 nut_la_LIBADD = -lpthread $(BUILD_WITH_LIBUPSCLIENT_LIBS)
731 if BUILD_PLUGIN_OLSRD
732 pkglib_LTLIBRARIES += olsrd.la
733 olsrd_la_SOURCES = olsrd.c
734 olsrd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
736 if BUILD_WITH_LIBSOCKET
737 olsrd_la_LIBADD += -lsocket
741 if BUILD_PLUGIN_ONEWIRE
742 pkglib_LTLIBRARIES += onewire.la
743 onewire_la_SOURCES = onewire.c
744 onewire_la_CFLAGS = $(AM_CFLAGS)
745 onewire_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
746 onewire_la_LIBADD = $(BUILD_WITH_LIBOWCAPI_LIBS)
747 onewire_la_LDFLAGS = $(PLUGIN_LDFLAGS)
750 if BUILD_PLUGIN_OPENLDAP
751 pkglib_LTLIBRARIES += openldap.la
752 openldap_la_SOURCES = openldap.c
753 openldap_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBLDAP_LDFLAGS)
754 openldap_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBLDAP_CPPFLAGS)
755 openldap_la_LIBADD = -lldap
758 if BUILD_PLUGIN_OPENVPN
759 pkglib_LTLIBRARIES += openvpn.la
760 openvpn_la_SOURCES = openvpn.c
761 openvpn_la_CFLAGS = $(AM_CFLAGS)
762 openvpn_la_LDFLAGS = $(PLUGIN_LDFLAGS)
765 if BUILD_PLUGIN_ORACLE
766 pkglib_LTLIBRARIES += oracle.la
767 oracle_la_SOURCES = oracle.c \
768 utils_db_query.c utils_db_query.h
769 oracle_la_CFLAGS = $(AM_CFLAGS)
770 oracle_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_ORACLE_CFLAGS)
771 oracle_la_LIBADD = $(BUILD_WITH_ORACLE_LIBS)
772 oracle_la_LDFLAGS = $(PLUGIN_LDFLAGS)
776 pkglib_LTLIBRARIES += perl.la
777 perl_la_SOURCES = perl.c
778 # Despite C99 providing the "bool" type thru stdbool.h, Perl defines its own
779 # version of that type if HAS_BOOL is not defined... *sigh*
780 perl_la_CPPFLAGS = $(AM_CPPFLAGS) -DHAS_BOOL=1
781 perl_la_CFLAGS = $(AM_CFLAGS) \
783 -DXS_VERSION=\"$(VERSION)\" -DVERSION=\"$(VERSION)\"
784 # Work-around for issues #41 and #42 - Perl 5.10 incorrectly introduced
785 # __attribute__nonnull__(3) for Perl_load_module().
786 if HAVE_BROKEN_PERL_LOAD_MODULE
787 perl_la_CFLAGS += -Wno-nonnull
789 perl_la_LDFLAGS = $(PLUGIN_LDFLAGS) \
791 perl_la_LIBADD = $(PERL_LIBS)
795 pkglib_LTLIBRARIES += pf.la
797 pf_la_LDFLAGS = $(PLUGIN_LDFLAGS)
800 if BUILD_PLUGIN_PINBA
801 pkglib_LTLIBRARIES += pinba.la
802 pinba_la_SOURCES = pinba.c
803 nodist_pinba_la_SOURCES = pinba.pb-c.c pinba.pb-c.h
804 pinba_la_LDFLAGS = $(PLUGIN_LDFLAGS)
805 pinba_la_LIBADD = -lprotobuf-c
809 pkglib_LTLIBRARIES += ping.la
810 ping_la_SOURCES = ping.c
811 ping_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOPING_CPPFLAGS)
812 ping_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBOPING_LDFLAGS)
813 ping_la_LIBADD = -loping -lm
816 if BUILD_PLUGIN_POSTGRESQL
817 pkglib_LTLIBRARIES += postgresql.la
818 postgresql_la_SOURCES = postgresql.c \
819 utils_db_query.c utils_db_query.h
820 postgresql_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPQ_CPPFLAGS)
821 postgresql_la_LDFLAGS = $(PLUGIN_LDFLAGS) \
822 $(BUILD_WITH_LIBPQ_LDFLAGS)
823 postgresql_la_LIBADD = -lpq
826 if BUILD_PLUGIN_POWERDNS
827 pkglib_LTLIBRARIES += powerdns.la
828 powerdns_la_SOURCES = powerdns.c
829 powerdns_la_LDFLAGS = $(PLUGIN_LDFLAGS)
832 if BUILD_PLUGIN_PYTHON
833 pkglib_LTLIBRARIES += python.la
834 python_la_SOURCES = python.c pyconfig.c pyvalues.c cpython.h
835 python_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_PYTHON_CPPFLAGS)
836 python_la_CFLAGS = $(AM_CFLAGS)
838 python_la_CFLAGS += -fno-strict-aliasing -Wno-strict-aliasing
840 python_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_PYTHON_LDFLAGS)
841 python_la_LIBADD = $(BUILD_WITH_PYTHON_LIBS)
844 if BUILD_PLUGIN_PROCESSES
845 pkglib_LTLIBRARIES += processes.la
846 processes_la_SOURCES = processes.c
847 processes_la_LDFLAGS = $(PLUGIN_LDFLAGS)
848 processes_la_LIBADD =
849 if BUILD_WITH_LIBKVM_GETPROCS
850 processes_la_LIBADD += -lkvm
854 if BUILD_PLUGIN_PROTOCOLS
855 pkglib_LTLIBRARIES += protocols.la
856 protocols_la_SOURCES = protocols.c
857 protocols_la_LDFLAGS = $(PLUGIN_LDFLAGS)
860 if BUILD_PLUGIN_REDIS
861 pkglib_LTLIBRARIES += redis.la
862 redis_la_SOURCES = redis.c
863 redis_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBHIREDIS_LDFLAGS)
864 redis_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBHIREDIS_CPPFLAGS)
865 redis_la_LIBADD = -lhiredis
868 if BUILD_PLUGIN_ROUTEROS
869 pkglib_LTLIBRARIES += routeros.la
870 routeros_la_SOURCES = routeros.c
871 routeros_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBROUTEROS_CPPFLAGS)
872 routeros_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBROUTEROS_LDFLAGS)
873 routeros_la_LIBADD = -lrouteros
876 if BUILD_PLUGIN_RRDCACHED
877 pkglib_LTLIBRARIES += rrdcached.la
878 rrdcached_la_SOURCES = rrdcached.c utils_rrdcreate.c utils_rrdcreate.h
879 rrdcached_la_LDFLAGS = $(PLUGIN_LDFLAGS)
880 rrdcached_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
881 rrdcached_la_LIBADD = $(BUILD_WITH_LIBRRD_LDFLAGS)
884 if BUILD_PLUGIN_RRDTOOL
885 pkglib_LTLIBRARIES += rrdtool.la
886 rrdtool_la_SOURCES = rrdtool.c utils_rrdcreate.c utils_rrdcreate.h
887 rrdtool_la_LDFLAGS = $(PLUGIN_LDFLAGS)
888 rrdtool_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
889 rrdtool_la_LIBADD = $(BUILD_WITH_LIBRRD_LDFLAGS)
892 if BUILD_PLUGIN_SENSORS
893 pkglib_LTLIBRARIES += sensors.la
894 sensors_la_SOURCES = sensors.c
895 sensors_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBSENSORS_CFLAGS)
896 sensors_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBSENSORS_LDFLAGS)
897 sensors_la_LIBADD = -lsensors
900 if BUILD_PLUGIN_SERIAL
901 pkglib_LTLIBRARIES += serial.la
902 serial_la_SOURCES = serial.c
903 serial_la_LDFLAGS = $(PLUGIN_LDFLAGS)
906 if BUILD_PLUGIN_SIGROK
907 pkglib_LTLIBRARIES += sigrok.la
908 sigrok_la_SOURCES = sigrok.c
909 sigrok_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBSIGROK_CFLAGS)
910 sigrok_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBSIGROK_LDFLAGS)
911 sigrok_la_LIBADD = -lsigrok
914 if BUILD_PLUGIN_SMART
915 if BUILD_WITH_LIBUDEV
916 pkglib_LTLIBRARIES += smart.la
917 smart_la_SOURCES = smart.c
918 smart_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBATASMART_CPPFLAGS)
919 smart_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBATASMART_LDFLAGS)
920 smart_la_LIBADD = $(BUILD_WITH_LIBATASMART_LIBS) -ludev
925 pkglib_LTLIBRARIES += snmp.la
926 snmp_la_SOURCES = snmp.c
927 snmp_la_LDFLAGS = $(PLUGIN_LDFLAGS)
928 snmp_la_CFLAGS = $(AM_CFLAGS)
930 if BUILD_WITH_LIBNETSNMP
931 snmp_la_CFLAGS += $(BUILD_WITH_LIBSNMP_CFLAGS)
932 snmp_la_LIBADD += $(BUILD_WITH_LIBSNMP_LIBS)
934 if BUILD_WITH_LIBPTHREAD
935 snmp_la_LIBADD += -lpthread
939 if BUILD_PLUGIN_STATSD
940 pkglib_LTLIBRARIES += statsd.la
941 statsd_la_SOURCES = statsd.c \
942 utils_latency.h utils_latency.c
943 statsd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
944 statsd_la_LIBADD = -lpthread -lm
948 pkglib_LTLIBRARIES += swap.la
949 swap_la_SOURCES = swap.c
950 swap_la_CFLAGS = $(AM_CFLAGS)
951 swap_la_LDFLAGS = $(PLUGIN_LDFLAGS)
953 if BUILD_WITH_LIBKSTAT
954 swap_la_LIBADD += -lkstat
956 if BUILD_WITH_LIBDEVINFO
957 swap_la_LIBADD += -ldevinfo
959 if BUILD_WITH_LIBKVM_GETSWAPINFO
960 swap_la_LIBADD += -lkvm
962 if BUILD_WITH_LIBSTATGRAB
963 swap_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
964 swap_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
966 if BUILD_WITH_PERFSTAT
967 swap_la_LIBADD += -lperfstat
972 if BUILD_PLUGIN_SYSLOG
973 pkglib_LTLIBRARIES += syslog.la
974 syslog_la_SOURCES = syslog.c
975 syslog_la_LDFLAGS = $(PLUGIN_LDFLAGS)
978 if BUILD_PLUGIN_TABLE
979 pkglib_LTLIBRARIES += table.la
980 table_la_SOURCES = table.c
981 table_la_LDFLAGS = $(PLUGIN_LDFLAGS)
985 pkglib_LTLIBRARIES += tail.la
986 tail_la_SOURCES = tail.c
987 tail_la_LDFLAGS = $(PLUGIN_LDFLAGS)
990 if BUILD_PLUGIN_TAIL_CSV
991 pkglib_LTLIBRARIES += tail_csv.la
992 tail_csv_la_SOURCES = tail_csv.c
993 tail_csv_la_LDFLAGS = $(PLUGIN_LDFLAGS)
997 pkglib_LTLIBRARIES += tape.la
998 tape_la_SOURCES = tape.c
999 tape_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1000 tape_la_LIBADD = -lkstat -ldevinfo
1003 if BUILD_PLUGIN_TARGET_NOTIFICATION
1004 pkglib_LTLIBRARIES += target_notification.la
1005 target_notification_la_SOURCES = target_notification.c
1006 target_notification_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1009 if BUILD_PLUGIN_TARGET_REPLACE
1010 pkglib_LTLIBRARIES += target_replace.la
1011 target_replace_la_SOURCES = target_replace.c
1012 target_replace_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1015 if BUILD_PLUGIN_TARGET_SCALE
1016 pkglib_LTLIBRARIES += target_scale.la
1017 target_scale_la_SOURCES = target_scale.c
1018 target_scale_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1021 if BUILD_PLUGIN_TARGET_SET
1022 pkglib_LTLIBRARIES += target_set.la
1023 target_set_la_SOURCES = target_set.c
1024 target_set_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1027 if BUILD_PLUGIN_TARGET_V5UPGRADE
1028 pkglib_LTLIBRARIES += target_v5upgrade.la
1029 target_v5upgrade_la_SOURCES = target_v5upgrade.c
1030 target_v5upgrade_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1033 if BUILD_PLUGIN_TCPCONNS
1034 pkglib_LTLIBRARIES += tcpconns.la
1035 tcpconns_la_SOURCES = tcpconns.c
1036 tcpconns_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1037 tcpconns_la_LIBADD =
1038 if BUILD_WITH_LIBKVM_NLIST
1039 tcpconns_la_LIBADD += -lkvm
1043 if BUILD_PLUGIN_TEAMSPEAK2
1044 pkglib_LTLIBRARIES += teamspeak2.la
1045 teamspeak2_la_SOURCES = teamspeak2.c
1046 teamspeak2_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1050 pkglib_LTLIBRARIES += ted.la
1051 ted_la_SOURCES = ted.c
1052 ted_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1055 if BUILD_PLUGIN_THERMAL
1056 pkglib_LTLIBRARIES += thermal.la
1057 thermal_la_SOURCES = thermal.c
1058 thermal_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1061 if BUILD_PLUGIN_THRESHOLD
1062 pkglib_LTLIBRARIES += threshold.la
1063 threshold_la_SOURCES = threshold.c
1064 threshold_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1067 if BUILD_PLUGIN_TOKYOTYRANT
1068 pkglib_LTLIBRARIES += tokyotyrant.la
1069 tokyotyrant_la_SOURCES = tokyotyrant.c
1070 tokyotyrant_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS)
1071 tokyotyrant_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS)
1072 tokyotyrant_la_LIBADD = $(BUILD_WITH_LIBTOKYOTYRANT_LIBS)
1073 if BUILD_WITH_LIBSOCKET
1074 tokyotyrant_la_LIBADD += -lsocket
1078 if BUILD_PLUGIN_TURBOSTAT
1079 pkglib_LTLIBRARIES += turbostat.la
1080 turbostat_la_SOURCES = turbostat.c
1081 turbostat_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1084 if BUILD_PLUGIN_UNIXSOCK
1085 pkglib_LTLIBRARIES += unixsock.la
1086 unixsock_la_SOURCES = unixsock.c \
1087 utils_cmd_flush.h utils_cmd_flush.c \
1088 utils_cmd_getval.h utils_cmd_getval.c \
1089 utils_cmd_getthreshold.h utils_cmd_getthreshold.c \
1090 utils_cmd_listval.h utils_cmd_listval.c \
1091 utils_cmd_putval.h utils_cmd_putval.c \
1092 utils_cmd_putnotif.h utils_cmd_putnotif.c \
1093 utils_parse_option.h utils_parse_option.c
1094 unixsock_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1095 unixsock_la_LIBADD = -lpthread
1098 if BUILD_PLUGIN_UPTIME
1099 pkglib_LTLIBRARIES += uptime.la
1100 uptime_la_SOURCES = uptime.c
1101 uptime_la_CFLAGS = $(AM_CFLAGS)
1102 uptime_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1104 if BUILD_WITH_LIBKSTAT
1105 uptime_la_LIBADD += -lkstat
1107 if BUILD_WITH_PERFSTAT
1108 uptime_la_LIBADD += -lperfstat
1112 if BUILD_PLUGIN_USERS
1113 pkglib_LTLIBRARIES += users.la
1114 users_la_SOURCES = users.c
1115 users_la_CFLAGS = $(AM_CFLAGS)
1116 users_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1118 if BUILD_WITH_LIBSTATGRAB
1119 users_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1120 users_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1124 if BUILD_PLUGIN_UUID
1125 pkglib_LTLIBRARIES += uuid.la
1126 uuid_la_SOURCES = uuid.c
1127 uuid_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBHAL_CFLAGS)
1128 uuid_la_LIBADD = $(BUILD_WITH_LIBHAL_LIBS)
1129 uuid_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1132 if BUILD_PLUGIN_VARNISH
1133 pkglib_LTLIBRARIES += varnish.la
1134 varnish_la_SOURCES = varnish.c
1135 varnish_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1136 varnish_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBVARNISH_CFLAGS)
1137 varnish_la_LIBADD = $(BUILD_WITH_LIBVARNISH_LIBS)
1140 if BUILD_PLUGIN_VIRT
1141 pkglib_LTLIBRARIES += virt.la
1142 virt_la_SOURCES = virt.c
1143 virt_la_CFLAGS = $(AM_CFLAGS) \
1144 $(BUILD_WITH_LIBVIRT_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
1145 virt_la_LIBADD = $(BUILD_WITH_LIBVIRT_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
1146 virt_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1149 if BUILD_PLUGIN_VMEM
1150 pkglib_LTLIBRARIES += vmem.la
1151 vmem_la_SOURCES = vmem.c
1152 vmem_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1155 if BUILD_PLUGIN_VSERVER
1156 pkglib_LTLIBRARIES += vserver.la
1157 vserver_la_SOURCES = vserver.c
1158 vserver_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1161 if BUILD_PLUGIN_WIRELESS
1162 pkglib_LTLIBRARIES += wireless.la
1163 wireless_la_SOURCES = wireless.c
1164 wireless_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1167 if BUILD_PLUGIN_WRITE_GRAPHITE
1168 pkglib_LTLIBRARIES += write_graphite.la
1169 write_graphite_la_SOURCES = write_graphite.c \
1170 utils_format_graphite.c utils_format_graphite.h \
1171 utils_format_json.c utils_format_json.h
1172 write_graphite_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1175 if BUILD_PLUGIN_WRITE_HTTP
1176 pkglib_LTLIBRARIES += write_http.la
1177 write_http_la_SOURCES = write_http.c \
1178 utils_format_json.c utils_format_json.h
1179 write_http_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1180 write_http_la_CFLAGS = $(AM_CFLAGS)
1181 write_http_la_LIBADD =
1182 if BUILD_WITH_LIBCURL
1183 write_http_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
1184 write_http_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
1188 if BUILD_PLUGIN_WRITE_KAFKA
1189 pkglib_LTLIBRARIES += write_kafka.la
1190 write_kafka_la_SOURCES = write_kafka.c \
1191 utils_format_graphite.c utils_format_graphite.h \
1192 utils_format_json.c utils_format_json.h \
1193 utils_cmd_putval.c utils_cmd_putval.h \
1194 utils_crc32.c utils_crc32.h
1195 write_kafka_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBRDKAFKA_CPPFLAGS)
1196 write_kafka_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRDKAFKA_LDFLAGS)
1197 write_kafka_la_LIBADD = $(BUILD_WITH_LIBRDKAFKA_LIBS)
1200 if BUILD_PLUGIN_WRITE_LOG
1201 pkglib_LTLIBRARIES += write_log.la
1202 write_log_la_SOURCES = write_log.c \
1203 utils_format_graphite.c utils_format_graphite.h
1204 write_log_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1207 if BUILD_PLUGIN_WRITE_MONGODB
1208 pkglib_LTLIBRARIES += write_mongodb.la
1209 write_mongodb_la_SOURCES = write_mongodb.c
1210 write_mongodb_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMONGOC_CPPFLAGS)
1211 write_mongodb_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMONGOC_LDFLAGS)
1212 write_mongodb_la_LIBADD = -lmongoc
1215 if BUILD_PLUGIN_WRITE_REDIS
1216 pkglib_LTLIBRARIES += write_redis.la
1217 write_redis_la_SOURCES = write_redis.c
1218 write_redis_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBHIREDIS_LDFLAGS)
1219 write_redis_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBHIREDIS_CPPFLAGS)
1220 write_redis_la_LIBADD = -lhiredis
1223 if BUILD_PLUGIN_WRITE_RIEMANN
1224 pkglib_LTLIBRARIES += write_riemann.la
1225 write_riemann_la_SOURCES = write_riemann.c write_riemann_threshold.c write_riemann_threshold.h
1226 nodist_write_riemann_la_SOURCES = riemann.pb-c.c riemann.pb-c.h
1227 write_riemann_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1228 write_riemann_la_LIBADD = -lprotobuf-c
1231 if BUILD_PLUGIN_WRITE_SENSU
1232 pkglib_LTLIBRARIES += write_sensu.la
1233 write_sensu_la_SOURCES = write_sensu.c
1234 write_sensu_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1237 if BUILD_PLUGIN_WRITE_TSDB
1238 pkglib_LTLIBRARIES += write_tsdb.la
1239 write_tsdb_la_SOURCES = write_tsdb.c
1240 write_tsdb_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1243 if BUILD_PLUGIN_XMMS
1244 pkglib_LTLIBRARIES += xmms.la
1245 xmms_la_SOURCES = xmms.c
1246 xmms_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBXMMS_CFLAGS)
1247 xmms_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1248 xmms_la_LIBADD = $(BUILD_WITH_LIBXMMS_LIBS)
1251 if BUILD_PLUGIN_ZFS_ARC
1252 pkglib_LTLIBRARIES += zfs_arc.la
1253 zfs_arc_la_SOURCES = zfs_arc.c
1254 zfs_arc_la_CFLAGS = $(AM_CFLAGS)
1255 zfs_arc_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1257 zfs_arc_la_LIBADD = -lm
1260 # zfs_arc requires no library on linux
1263 zfs_arc_la_LIBADD = -lkstat
1268 if BUILD_PLUGIN_ZOOKEEPER
1269 pkglib_LTLIBRARIES += zookeeper.la
1270 zookeeper_la_SOURCES = zookeeper.c
1271 zookeeper_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1274 BUILT_SOURCES += $(dist_man_MANS)
1276 dist_man_MANS = collectd.1 \
1288 collectd-threshold.5 \
1289 collectd-unixsock.5 \
1292 #collectd_1_SOURCES = collectd.pod
1294 EXTRA_DIST = types.db
1296 EXTRA_DIST += collectd.conf.pod \
1297 collectd-email.pod \
1302 collectd-nagios.pod \
1304 collectd-python.pod \
1308 collectd-threshold.pod \
1309 collectd-unixsock.pod \
1310 postgresql_default.conf \
1314 pod2man --release=$(VERSION) --center=$(PACKAGE) $< \
1315 >.pod2man.tmp.$$$$ 2>/dev/null && mv -f .pod2man.tmp.$$$$ $@ || true
1316 @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
1318 echo "$@ has some POD errors!"; false; \
1322 pod2man --section=5 --release=$(VERSION) --center=$(PACKAGE) $< \
1323 >.pod2man.tmp.$$$$ 2>/dev/null && mv -f .pod2man.tmp.$$$$ $@ || true
1324 @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
1326 echo "$@ has some POD errors!"; false; \
1329 AM_V_PROTOC_C = $(am__v_PROTOC_C_@AM_V@)
1330 am__v_PROTOC_C_ = $(am__v_PROTOC_C_@AM_DEFAULT_V@)
1331 am__v_PROTOC_C_0 = @echo " PROTOC-C " $@;
1334 # Protocol buffer for the "pinba" plugin.
1335 EXTRA_DIST += pinba.proto
1336 if BUILD_PLUGIN_PINBA
1337 CLEANFILES += pinba.pb-c.c pinba.pb-c.h
1338 BUILT_SOURCES += pinba.pb-c.c pinba.pb-c.h
1340 pinba.pb-c.c pinba.pb-c.h: pinba.proto
1341 $(AM_V_PROTOC_C)protoc-c -I$(srcdir) --c_out . $(srcdir)/pinba.proto
1344 # Protocol buffer for the "write_riemann" plugin.
1345 EXTRA_DIST += riemann.proto
1346 if BUILD_PLUGIN_WRITE_RIEMANN
1347 CLEANFILES += riemann.pb-c.c riemann.pb-c.h
1349 BUILT_SOURCES += riemann.pb-c.c riemann.pb-c.h
1351 riemann.pb-c.c riemann.pb-c.h: riemann.proto
1352 $(AM_V_PROTOC_C)protoc-c -I$(srcdir) --c_out . $(srcdir)/riemann.proto
1356 $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
1357 if test -e $(DESTDIR)$(sysconfdir)/collectd.conf; \
1359 $(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf.pkg-orig; \
1361 $(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf; \
1363 $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
1364 $(INSTALL) -m 0644 $(srcdir)/types.db $(DESTDIR)$(pkgdatadir)/types.db;
1365 $(INSTALL) -m 0644 $(srcdir)/postgresql_default.conf \
1366 $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;
1369 rm -f $(DESTDIR)$(pkgdatadir)/types.db;
1370 rm -f $(DESTDIR)$(sysconfdir)/collectd.conf
1371 rm -f $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;
1373 check_PROGRAMS = test_utils_mount test_utils_vl_lookup
1375 test_utils_mount_SOURCES = utils_mount_test.c testing.h
1376 test_utils_mount_LDADD = libmount.la daemon/libplugin_mock.la
1378 test_utils_vl_lookup_SOURCES = utils_vl_lookup_test.c testing.h
1379 test_utils_vl_lookup_LDADD = liblookup.la daemon/libplugin_mock.la
1381 TESTS = test_utils_mount test_utils_vl_lookup
1383 if BUILD_PLUGIN_CEPH
1384 test_plugin_ceph_SOURCES = ceph_test.c
1385 test_plugin_ceph_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
1386 test_plugin_ceph_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
1387 test_plugin_ceph_LDADD = daemon/libcommon.la daemon/libplugin_mock.la $(BUILD_WITH_LIBYAJL_LIBS)
1388 check_PROGRAMS += test_plugin_ceph
1389 TESTS += test_plugin_ceph