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 sbin_PROGRAMS = collectdmon
27 bin_PROGRAMS = collectd-nagios collectdctl collectd-tg
29 collectdmon_SOURCES = collectdmon.c
30 collectdmon_CPPFLAGS = $(AM_CPPFLAGS)
32 collectd_nagios_SOURCES = collectd-nagios.c
33 collectd_nagios_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/libcollectdclient/collectd -I$(top_builddir)/src/libcollectdclient/collectd
34 collectd_nagios_LDADD =
35 if BUILD_WITH_LIBSOCKET
36 collectd_nagios_LDADD += -lsocket
39 collectd_nagios_LDADD += -lm
42 collectd_nagios_LDADD += libcollectdclient/libcollectdclient.la
43 collectd_nagios_DEPENDENCIES = libcollectdclient/libcollectdclient.la
46 collectdctl_SOURCES = collectdctl.c
47 collectdctl_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/libcollectdclient/collectd -I$(top_builddir)/src/libcollectdclient/collectd
49 if BUILD_WITH_LIBSOCKET
50 collectdctl_LDADD += -lsocket
53 collectdctl_LDADD += -lm
55 collectdctl_LDADD += libcollectdclient/libcollectdclient.la
56 collectdctl_DEPENDENCIES = libcollectdclient/libcollectdclient.la
58 collectd_tg_SOURCES = collectd-tg.c \
59 daemon/utils_heap.c daemon/utils_heap.h
60 collectd_tg_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/libcollectdclient/collectd -I$(top_builddir)/src/libcollectdclient/collectd
62 if BUILD_WITH_LIBSOCKET
63 collectd_tg_LDADD += -lsocket
66 collectd_tg_LDADD += -lrt
69 collectd_tg_LDADD += -lm
71 if BUILD_WITH_LIBPTHREAD
72 collectd_tg_LDADD += -lpthread
74 collectd_tg_LDADD += libcollectdclient/libcollectdclient.la
75 collectd_tg_DEPENDENCIES = libcollectdclient/libcollectdclient.la
83 if BUILD_PLUGIN_AGGREGATION
84 pkglib_LTLIBRARIES += aggregation.la
85 aggregation_la_SOURCES = aggregation.c \
86 utils_vl_lookup.c utils_vl_lookup.h
87 aggregation_la_LDFLAGS = $(PLUGIN_LDFLAGS)
88 aggregation_la_LIBADD = -lm
92 pkglib_LTLIBRARIES += amqp.la
93 amqp_la_SOURCES = amqp.c \
94 utils_cmd_putval.c utils_cmd_putval.h \
95 utils_format_graphite.c utils_format_graphite.h \
96 utils_format_json.c utils_format_json.h
97 amqp_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRABBITMQ_LDFLAGS)
98 amqp_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBRABBITMQ_CPPFLAGS)
99 amqp_la_LIBADD = $(BUILD_WITH_LIBRABBITMQ_LIBS)
102 if BUILD_PLUGIN_APACHE
103 pkglib_LTLIBRARIES += apache.la
104 apache_la_SOURCES = apache.c
105 apache_la_LDFLAGS = $(PLUGIN_LDFLAGS)
106 apache_la_CFLAGS = $(AM_CFLAGS)
108 if BUILD_WITH_LIBCURL
109 apache_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
110 apache_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
114 if BUILD_PLUGIN_APCUPS
115 pkglib_LTLIBRARIES += apcups.la
116 apcups_la_SOURCES = apcups.c
117 apcups_la_LDFLAGS = $(PLUGIN_LDFLAGS)
119 if BUILD_WITH_LIBSOCKET
120 apcups_la_LIBADD += -lsocket
124 if BUILD_PLUGIN_APPLE_SENSORS
125 pkglib_LTLIBRARIES += apple_sensors.la
126 apple_sensors_la_SOURCES = apple_sensors.c
127 apple_sensors_la_LDFLAGS = $(PLUGIN_LDFLAGS)
128 apple_sensors_la_LDFLAGS += -framework IOKit
131 if BUILD_PLUGIN_AQUAERO
132 pkglib_LTLIBRARIES += aquaero.la
133 aquaero_la_SOURCES = aquaero.c
134 aquaero_la_LDFLAGS = $(PLUGIN_LDFLAGS)
135 aquaero_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBAQUAERO5_CFLAGS)
136 aquaero_la_LIBADD = $(BUILD_WITH_LIBAQUAERO5_LDFLAGS) -laquaero5
139 if BUILD_PLUGIN_ASCENT
140 pkglib_LTLIBRARIES += ascent.la
141 ascent_la_SOURCES = ascent.c
142 ascent_la_LDFLAGS = $(PLUGIN_LDFLAGS)
143 ascent_la_CFLAGS = $(AM_CFLAGS) \
144 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
145 ascent_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
148 if BUILD_PLUGIN_BAROMETER
149 pkglib_LTLIBRARIES += barometer.la
150 barometer_la_SOURCES = barometer.c
151 barometer_la_LDFLAGS = $(PLUGIN_LDFLAGS)
152 barometer_la_LIBADD = -lm
155 if BUILD_PLUGIN_BATTERY
156 pkglib_LTLIBRARIES += battery.la
157 battery_la_SOURCES = battery.c
158 battery_la_LDFLAGS = $(PLUGIN_LDFLAGS)
160 if BUILD_WITH_LIBIOKIT
161 battery_la_LDFLAGS += -framework IOKit
166 pkglib_LTLIBRARIES += bind.la
167 bind_la_SOURCES = bind.c
168 bind_la_LDFLAGS = $(PLUGIN_LDFLAGS)
169 bind_la_CFLAGS = $(AM_CFLAGS) \
170 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
171 bind_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
174 if BUILD_PLUGIN_CGROUPS
175 pkglib_LTLIBRARIES += cgroups.la
176 cgroups_la_SOURCES = cgroups.c \
177 utils_ignorelist.c utils_ignorelist.h \
178 utils_mount.c utils_mount.h
179 cgroups_la_LDFLAGS = $(PLUGIN_LDFLAGS)
182 if BUILD_PLUGIN_CONNTRACK
183 pkglib_LTLIBRARIES += conntrack.la
184 conntrack_la_SOURCES = conntrack.c
185 conntrack_la_LDFLAGS = $(PLUGIN_LDFLAGS)
188 if BUILD_PLUGIN_CONTEXTSWITCH
189 pkglib_LTLIBRARIES += contextswitch.la
190 contextswitch_la_SOURCES = contextswitch.c
191 contextswitch_la_LDFLAGS = $(PLUGIN_LDFLAGS)
192 contextswitch_la_LIBADD =
193 if BUILD_WITH_PERFSTAT
194 contextswitch_la_LIBADD += -lperfstat
199 pkglib_LTLIBRARIES += cpu.la
200 cpu_la_SOURCES = cpu.c
201 cpu_la_CFLAGS = $(AM_CFLAGS)
202 cpu_la_LDFLAGS = $(PLUGIN_LDFLAGS)
204 if BUILD_WITH_LIBKSTAT
205 cpu_la_LIBADD += -lkstat
207 if BUILD_WITH_LIBDEVINFO
208 cpu_la_LIBADD += -ldevinfo
210 if BUILD_WITH_LIBSTATGRAB
211 cpu_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
212 cpu_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
214 if BUILD_WITH_PERFSTAT
215 cpu_la_LIBADD += -lperfstat
219 if BUILD_PLUGIN_CPUFREQ
220 pkglib_LTLIBRARIES += cpufreq.la
221 cpufreq_la_SOURCES = cpufreq.c
222 cpufreq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
226 pkglib_LTLIBRARIES += csv.la
227 csv_la_SOURCES = csv.c
228 csv_la_LDFLAGS = $(PLUGIN_LDFLAGS)
232 pkglib_LTLIBRARIES += curl.la
233 curl_la_SOURCES = curl.c
234 curl_la_LDFLAGS = $(PLUGIN_LDFLAGS)
235 curl_la_CFLAGS = $(AM_CFLAGS)
237 if BUILD_WITH_LIBCURL
238 curl_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
239 curl_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
243 if BUILD_PLUGIN_CURL_JSON
244 pkglib_LTLIBRARIES += curl_json.la
245 curl_json_la_SOURCES = curl_json.c
246 curl_json_la_CFLAGS = $(AM_CFLAGS)
247 curl_json_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
248 curl_json_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
249 curl_json_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
250 if BUILD_WITH_LIBCURL
251 curl_json_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
252 curl_json_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
256 if BUILD_PLUGIN_CURL_XML
257 pkglib_LTLIBRARIES += curl_xml.la
258 curl_xml_la_SOURCES = curl_xml.c
259 curl_xml_la_LDFLAGS = $(PLUGIN_LDFLAGS)
260 curl_xml_la_CFLAGS = $(AM_CFLAGS) \
261 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
262 curl_xml_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
266 pkglib_LTLIBRARIES += dbi.la
267 dbi_la_SOURCES = dbi.c \
268 utils_db_query.c utils_db_query.h
269 dbi_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBDBI_CPPFLAGS)
270 dbi_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBDBI_LDFLAGS)
271 dbi_la_LIBADD = $(BUILD_WITH_LIBDBI_LIBS)
275 pkglib_LTLIBRARIES += df.la
276 df_la_SOURCES = df.c \
277 utils_ignorelist.c utils_ignorelist.h \
278 utils_mount.c utils_mount.h
279 df_la_LDFLAGS = $(PLUGIN_LDFLAGS)
283 pkglib_LTLIBRARIES += disk.la
284 disk_la_SOURCES = disk.c \
285 utils_ignorelist.c utils_ignorelist.h
286 disk_la_CFLAGS = $(AM_CFLAGS)
287 disk_la_LDFLAGS = $(PLUGIN_LDFLAGS)
289 if BUILD_WITH_LIBKSTAT
290 disk_la_LIBADD += -lkstat
292 if BUILD_WITH_LIBDEVINFO
293 disk_la_LIBADD += -ldevinfo
295 if BUILD_WITH_LIBIOKIT
296 disk_la_LDFLAGS += -framework IOKit
298 if BUILD_WITH_LIBSTATGRAB
299 disk_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
300 disk_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
302 if BUILD_WITH_LIBUDEV
303 disk_la_LIBADD += -ludev
305 if BUILD_WITH_PERFSTAT
306 disk_la_LIBADD += -lperfstat
311 pkglib_LTLIBRARIES += dns.la
312 dns_la_SOURCES = dns.c utils_dns.c utils_dns.h
313 dns_la_LDFLAGS = $(PLUGIN_LDFLAGS)
314 dns_la_LIBADD = -lpcap -lpthread
318 pkglib_LTLIBRARIES += drbd.la
319 drbd_la_SOURCES = drbd.c
320 drbd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
321 drbd_la_LIBADD = -lpthread
324 if BUILD_PLUGIN_EMAIL
325 pkglib_LTLIBRARIES += email.la
326 email_la_SOURCES = email.c
327 email_la_LDFLAGS = $(PLUGIN_LDFLAGS)
328 email_la_LIBADD = -lpthread
331 if BUILD_PLUGIN_ENTROPY
332 pkglib_LTLIBRARIES += entropy.la
333 entropy_la_SOURCES = entropy.c
334 entropy_la_LDFLAGS = $(PLUGIN_LDFLAGS)
338 pkglib_LTLIBRARIES += exec.la
339 exec_la_SOURCES = exec.c \
340 utils_cmd_putnotif.c utils_cmd_putnotif.h \
341 utils_cmd_putval.c utils_cmd_putval.h \
342 utils_parse_option.h utils_parse_option.c
343 exec_la_LDFLAGS = $(PLUGIN_LDFLAGS)
344 exec_la_LIBADD = -lpthread
347 if BUILD_PLUGIN_ETHSTAT
348 pkglib_LTLIBRARIES += ethstat.la
349 ethstat_la_SOURCES = ethstat.c
350 ethstat_la_LDFLAGS = $(PLUGIN_LDFLAGS)
353 if BUILD_PLUGIN_FILECOUNT
354 pkglib_LTLIBRARIES += filecount.la
355 filecount_la_SOURCES = filecount.c
356 filecount_la_LDFLAGS = $(PLUGIN_LDFLAGS)
359 if BUILD_PLUGIN_GMOND
360 pkglib_LTLIBRARIES += gmond.la
361 gmond_la_SOURCES = gmond.c
362 gmond_la_CPPFLAGS = $(AM_CPPFLAGS) $(GANGLIA_CPPFLAGS)
363 gmond_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(GANGLIA_LDFLAGS)
364 gmond_la_LIBADD = $(GANGLIA_LIBS)
367 if BUILD_PLUGIN_HDDTEMP
368 pkglib_LTLIBRARIES += hddtemp.la
369 hddtemp_la_SOURCES = hddtemp.c
370 hddtemp_la_LDFLAGS = $(PLUGIN_LDFLAGS)
372 if BUILD_WITH_LIBSOCKET
373 hddtemp_la_LIBADD += -lsocket
377 if BUILD_PLUGIN_INTERFACE
378 pkglib_LTLIBRARIES += interface.la
379 interface_la_SOURCES = interface.c \
380 utils_ignorelist.c utils_ignorelist.h
381 interface_la_CFLAGS = $(AM_CFLAGS)
382 interface_la_LDFLAGS = $(PLUGIN_LDFLAGS)
383 interface_la_LIBADD =
384 if BUILD_WITH_LIBSTATGRAB
385 interface_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
386 interface_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
388 if BUILD_WITH_LIBKSTAT
389 interface_la_LIBADD += -lkstat
391 if BUILD_WITH_LIBDEVINFO
392 interface_la_LIBADD += -ldevinfo
393 endif # BUILD_WITH_LIBDEVINFO
394 endif # !BUILD_WITH_LIBSTATGRAB
395 if BUILD_WITH_PERFSTAT
396 interface_la_LIBADD += -lperfstat
398 endif # BUILD_PLUGIN_INTERFACE
400 if BUILD_PLUGIN_IPTABLES
401 pkglib_LTLIBRARIES += iptables.la
402 iptables_la_SOURCES = iptables.c
403 iptables_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBIPTC_CPPFLAGS)
404 iptables_la_LDFLAGS = $(PLUGIN_LDFLAGS)
405 iptables_la_LIBADD = $(BUILD_WITH_LIBIPTC_LDFLAGS)
409 pkglib_LTLIBRARIES += ipmi.la
410 ipmi_la_SOURCES = ipmi.c \
411 utils_ignorelist.c utils_ignorelist.h
412 ipmi_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_OPENIPMI_CFLAGS)
413 ipmi_la_LDFLAGS = $(PLUGIN_LDFLAGS)
414 ipmi_la_LIBADD = $(BUILD_WITH_OPENIPMI_LIBS)
418 pkglib_LTLIBRARIES += ipvs.la
419 ipvs_la_SOURCES = ipvs.c
420 if IP_VS_H_NEEDS_KERNEL_CFLAGS
421 ipvs_la_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS)
423 ipvs_la_LDFLAGS = $(PLUGIN_LDFLAGS)
427 pkglib_LTLIBRARIES += irq.la
428 irq_la_SOURCES = irq.c \
429 utils_ignorelist.c utils_ignorelist.h
430 irq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
434 pkglib_LTLIBRARIES += java.la
435 java_la_SOURCES = java.c
436 java_la_CPPFLAGS = $(AM_CPPFLAGS) $(JAVA_CPPFLAGS)
437 java_la_CFLAGS = $(AM_CFLAGS) $(JAVA_CFLAGS)
438 java_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(JAVA_LDFLAGS)
439 java_la_LIBADD = $(JAVA_LIBS)
443 pkglib_LTLIBRARIES += load.la
444 load_la_SOURCES = load.c
445 load_la_CFLAGS = $(AM_CFLAGS)
446 load_la_LDFLAGS = $(PLUGIN_LDFLAGS)
448 if BUILD_WITH_LIBSTATGRAB
449 load_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
450 load_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
451 endif # BUILD_WITH_LIBSTATGRAB
452 if BUILD_WITH_PERFSTAT
453 load_la_LIBADD += -lperfstat
455 endif # BUILD_PLUGIN_LOAD
457 if BUILD_PLUGIN_LOGFILE
458 pkglib_LTLIBRARIES += logfile.la
459 logfile_la_SOURCES = logfile.c
460 logfile_la_LDFLAGS = $(PLUGIN_LDFLAGS)
463 if BUILD_PLUGIN_LOG_LOGSTASH
464 pkglib_LTLIBRARIES += log_logstash.la
465 log_logstash_la_SOURCES = log_logstash.c
466 log_logstash_la_CFLAGS = $(AM_CFLAGS)
467 log_logstash_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
468 log_logstash_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
469 log_logstash_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
473 pkglib_LTLIBRARIES += lpar.la
474 lpar_la_SOURCES = lpar.c
475 lpar_la_LDFLAGS = $(PLUGIN_LDFLAGS)
476 lpar_la_LIBADD = -lperfstat
480 pkglib_LTLIBRARIES += lvm.la
481 lvm_la_SOURCES = lvm.c
482 lvm_la_LDFLAGS = $(PLUGIN_LDFLAGS)
483 lvm_la_LIBADD = $(BUILD_WITH_LIBLVM2APP_LIBS)
486 if BUILD_PLUGIN_MADWIFI
487 pkglib_LTLIBRARIES += madwifi.la
488 madwifi_la_SOURCES = madwifi.c madwifi.h \
489 utils_ignorelist.c utils_ignorelist.h
490 madwifi_la_LDFLAGS = $(PLUGIN_LDFLAGS)
493 if BUILD_PLUGIN_MATCH_EMPTY_COUNTER
494 pkglib_LTLIBRARIES += match_empty_counter.la
495 match_empty_counter_la_SOURCES = match_empty_counter.c
496 match_empty_counter_la_LDFLAGS = $(PLUGIN_LDFLAGS)
499 if BUILD_PLUGIN_MATCH_HASHED
500 pkglib_LTLIBRARIES += match_hashed.la
501 match_hashed_la_SOURCES = match_hashed.c
502 match_hashed_la_LDFLAGS = $(PLUGIN_LDFLAGS)
505 if BUILD_PLUGIN_MATCH_REGEX
506 pkglib_LTLIBRARIES += match_regex.la
507 match_regex_la_SOURCES = match_regex.c
508 match_regex_la_LDFLAGS = $(PLUGIN_LDFLAGS)
511 if BUILD_PLUGIN_MATCH_TIMEDIFF
512 pkglib_LTLIBRARIES += match_timediff.la
513 match_timediff_la_SOURCES = match_timediff.c
514 match_timediff_la_LDFLAGS = $(PLUGIN_LDFLAGS)
517 if BUILD_PLUGIN_MATCH_VALUE
518 pkglib_LTLIBRARIES += match_value.la
519 match_value_la_SOURCES = match_value.c
520 match_value_la_LDFLAGS = $(PLUGIN_LDFLAGS)
523 if BUILD_PLUGIN_MBMON
524 pkglib_LTLIBRARIES += mbmon.la
525 mbmon_la_SOURCES = mbmon.c
526 mbmon_la_LDFLAGS = $(PLUGIN_LDFLAGS)
528 if BUILD_WITH_LIBSOCKET
529 mbmon_la_LIBADD += -lsocket
534 pkglib_LTLIBRARIES += md.la
535 md_la_SOURCES = md.c \
536 utils_ignorelist.c utils_ignorelist.h
537 md_la_LDFLAGS = $(PLUGIN_LDFLAGS)
540 if BUILD_PLUGIN_MEMCACHEC
541 pkglib_LTLIBRARIES += memcachec.la
542 memcachec_la_SOURCES = memcachec.c
543 memcachec_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMEMCACHED_LDFLAGS)
544 memcachec_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMEMCACHED_CPPFLAGS)
545 memcachec_la_LIBADD = $(BUILD_WITH_LIBMEMCACHED_LIBS)
548 if BUILD_PLUGIN_MEMCACHED
549 pkglib_LTLIBRARIES += memcached.la
550 memcached_la_SOURCES = memcached.c
551 memcached_la_LDFLAGS = $(PLUGIN_LDFLAGS)
552 memcached_la_LIBADD =
553 if BUILD_WITH_LIBSOCKET
554 memcached_la_LIBADD += -lsocket
558 if BUILD_PLUGIN_MEMORY
559 pkglib_LTLIBRARIES += memory.la
560 memory_la_SOURCES = memory.c
561 memory_la_CFLAGS = $(AM_CFLAGS)
562 memory_la_LDFLAGS = $(PLUGIN_LDFLAGS)
564 if BUILD_WITH_LIBKSTAT
565 memory_la_LIBADD += -lkstat
567 if BUILD_WITH_LIBDEVINFO
568 memory_la_LIBADD += -ldevinfo
570 if BUILD_WITH_LIBSTATGRAB
571 memory_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
572 memory_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
574 if BUILD_WITH_PERFSTAT
575 memory_la_LIBADD += -lperfstat
580 pkglib_LTLIBRARIES += mic.la
581 mic_la_SOURCES = mic.c \
582 utils_ignorelist.c utils_ignorelist.h
583 mic_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_MIC_LIBPATH)
584 mic_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_MIC_CPPFLAGS)
585 mic_la_LIBADD = $(BUILD_WITH_MIC_LDADD)
588 if BUILD_PLUGIN_MODBUS
589 pkglib_LTLIBRARIES += modbus.la
590 modbus_la_SOURCES = modbus.c
591 modbus_la_LDFLAGS = $(PLUGIN_LDFLAGS)
592 modbus_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMODBUS_CFLAGS)
593 modbus_la_LIBADD = $(BUILD_WITH_LIBMODBUS_LIBS)
596 if BUILD_PLUGIN_MULTIMETER
597 pkglib_LTLIBRARIES += multimeter.la
598 multimeter_la_SOURCES = multimeter.c
599 multimeter_la_LDFLAGS = $(PLUGIN_LDFLAGS)
602 if BUILD_PLUGIN_MYSQL
603 pkglib_LTLIBRARIES += mysql.la
604 mysql_la_SOURCES = mysql.c
605 mysql_la_LDFLAGS = $(PLUGIN_LDFLAGS)
606 mysql_la_CFLAGS = $(AM_CFLAGS)
608 if BUILD_WITH_LIBMYSQL
609 mysql_la_CFLAGS += $(BUILD_WITH_LIBMYSQL_CFLAGS)
610 mysql_la_LIBADD += $(BUILD_WITH_LIBMYSQL_LIBS)
614 if BUILD_PLUGIN_NETAPP
615 pkglib_LTLIBRARIES += netapp.la
616 netapp_la_SOURCES = netapp.c \
617 utils_ignorelist.c utils_ignorelist.h
618 netapp_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBNETAPP_CPPFLAGS)
619 netapp_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBNETAPP_LDFLAGS)
620 netapp_la_LIBADD = $(LIBNETAPP_LIBS)
623 if BUILD_PLUGIN_NETLINK
624 pkglib_LTLIBRARIES += netlink.la
625 netlink_la_SOURCES = netlink.c
626 netlink_la_LDFLAGS = $(PLUGIN_LDFLAGS)
627 netlink_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMNL_CFLAGS)
628 netlink_la_LIBADD = $(BUILD_WITH_LIBMNL_LIBS)
631 if BUILD_PLUGIN_NETWORK
632 pkglib_LTLIBRARIES += network.la
633 network_la_SOURCES = network.c network.h \
634 utils_fbhash.c utils_fbhash.h
635 network_la_CPPFLAGS = $(AM_CPPFLAGS)
636 network_la_LDFLAGS = $(PLUGIN_LDFLAGS)
637 network_la_LIBADD = -lpthread
638 if BUILD_WITH_LIBSOCKET
639 network_la_LIBADD += -lsocket
641 if BUILD_WITH_LIBGCRYPT
642 network_la_CPPFLAGS += $(GCRYPT_CPPFLAGS)
643 network_la_LDFLAGS += $(GCRYPT_LDFLAGS)
644 network_la_LIBADD += $(GCRYPT_LIBS)
649 pkglib_LTLIBRARIES += nfs.la
650 nfs_la_SOURCES = nfs.c
651 nfs_la_LDFLAGS = $(PLUGIN_LDFLAGS)
654 if BUILD_PLUGIN_FSCACHE
655 pkglib_LTLIBRARIES += fscache.la
656 fscache_la_SOURCES = fscache.c
657 fscache_la_LDFLAGS = $(PLUGIN_LDFLAGS)
660 if BUILD_PLUGIN_NGINX
661 pkglib_LTLIBRARIES += nginx.la
662 nginx_la_SOURCES = nginx.c
663 nginx_la_CFLAGS = $(AM_CFLAGS)
665 nginx_la_LDFLAGS = $(PLUGIN_LDFLAGS)
666 if BUILD_WITH_LIBCURL
667 nginx_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
668 nginx_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
672 if BUILD_PLUGIN_NOTIFY_DESKTOP
673 pkglib_LTLIBRARIES += notify_desktop.la
674 notify_desktop_la_SOURCES = notify_desktop.c
675 notify_desktop_la_CFLAGS = $(AM_CFLAGS) $(LIBNOTIFY_CFLAGS)
676 notify_desktop_la_LDFLAGS = $(PLUGIN_LDFLAGS)
677 notify_desktop_la_LIBADD = $(LIBNOTIFY_LIBS)
680 if BUILD_PLUGIN_NOTIFY_EMAIL
681 pkglib_LTLIBRARIES += notify_email.la
682 notify_email_la_SOURCES = notify_email.c
683 notify_email_la_LDFLAGS = $(PLUGIN_LDFLAGS)
684 notify_email_la_LIBADD = -lesmtp -lssl -lcrypto -lpthread -ldl
688 pkglib_LTLIBRARIES += ntpd.la
689 ntpd_la_SOURCES = ntpd.c
690 ntpd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
692 if BUILD_WITH_LIBSOCKET
693 ntpd_la_LIBADD += -lsocket
698 pkglib_LTLIBRARIES += numa.la
699 numa_la_SOURCES = numa.c
700 numa_la_LDFLAGS = $(PLUGIN_LDFLAGS)
704 pkglib_LTLIBRARIES += nut.la
705 nut_la_SOURCES = nut.c
706 nut_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
707 nut_la_LDFLAGS = $(PLUGIN_LDFLAGS)
708 nut_la_LIBADD = -lpthread $(BUILD_WITH_LIBUPSCLIENT_LIBS)
711 if BUILD_PLUGIN_OLSRD
712 pkglib_LTLIBRARIES += olsrd.la
713 olsrd_la_SOURCES = olsrd.c
714 olsrd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
716 if BUILD_WITH_LIBSOCKET
717 olsrd_la_LIBADD += -lsocket
721 if BUILD_PLUGIN_ONEWIRE
722 pkglib_LTLIBRARIES += onewire.la
723 onewire_la_SOURCES = onewire.c \
724 utils_ignorelist.c utils_ignorelist.h
725 onewire_la_CFLAGS = $(AM_CFLAGS)
726 onewire_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
727 onewire_la_LIBADD = $(BUILD_WITH_LIBOWCAPI_LIBS)
728 onewire_la_LDFLAGS = $(PLUGIN_LDFLAGS)
731 if BUILD_PLUGIN_OPENLDAP
732 pkglib_LTLIBRARIES += openldap.la
733 openldap_la_SOURCES = openldap.c
734 openldap_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBLDAP_LDFLAGS)
735 openldap_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBLDAP_CPPFLAGS)
736 openldap_la_LIBADD = -lldap
739 if BUILD_PLUGIN_OPENVPN
740 pkglib_LTLIBRARIES += openvpn.la
741 openvpn_la_SOURCES = openvpn.c
742 openvpn_la_CFLAGS = $(AM_CFLAGS)
743 openvpn_la_LDFLAGS = $(PLUGIN_LDFLAGS)
746 if BUILD_PLUGIN_ORACLE
747 pkglib_LTLIBRARIES += oracle.la
748 oracle_la_SOURCES = oracle.c \
749 utils_db_query.c utils_db_query.h
750 oracle_la_CFLAGS = $(AM_CFLAGS)
751 oracle_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_ORACLE_CFLAGS)
752 oracle_la_LIBADD = $(BUILD_WITH_ORACLE_LIBS)
753 oracle_la_LDFLAGS = $(PLUGIN_LDFLAGS)
757 pkglib_LTLIBRARIES += perl.la
758 perl_la_SOURCES = perl.c
759 # Despite C99 providing the "bool" type thru stdbool.h, Perl defines its own
760 # version of that type if HAS_BOOL is not defined... *sigh*
761 perl_la_CPPFLAGS = $(AM_CPPFLAGS) -DHAS_BOOL=1
762 perl_la_CFLAGS = $(AM_CFLAGS) \
764 -DXS_VERSION=\"$(VERSION)\" -DVERSION=\"$(VERSION)\"
765 # Work-around for issues #41 and #42 - Perl 5.10 incorrectly introduced
766 # __attribute__nonnull__(3) for Perl_load_module().
767 if HAVE_BROKEN_PERL_LOAD_MODULE
768 perl_la_CFLAGS += -Wno-nonnull
770 perl_la_LDFLAGS = $(PLUGIN_LDFLAGS) \
772 perl_la_LIBS = $(PERL_LIBS)
776 pkglib_LTLIBRARIES += pf.la
778 pf_la_LDFLAGS = $(PLUGIN_LDFLAGS)
781 if BUILD_PLUGIN_PINBA
782 pkglib_LTLIBRARIES += pinba.la
783 pinba_la_SOURCES = pinba.c
784 nodist_pinba_la_SOURCES = pinba.pb-c.c pinba.pb-c.h
785 pinba_la_LDFLAGS = $(PLUGIN_LDFLAGS)
786 pinba_la_LIBADD = -lprotobuf-c
790 pkglib_LTLIBRARIES += ping.la
791 ping_la_SOURCES = ping.c
792 ping_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOPING_CPPFLAGS)
793 ping_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBOPING_LDFLAGS)
794 ping_la_LIBADD = -loping -lm
797 if BUILD_PLUGIN_POSTGRESQL
798 pkglib_LTLIBRARIES += postgresql.la
799 postgresql_la_SOURCES = postgresql.c \
800 utils_db_query.c utils_db_query.h
801 postgresql_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPQ_CPPFLAGS)
802 postgresql_la_LDFLAGS = $(PLUGIN_LDFLAGS) \
803 $(BUILD_WITH_LIBPQ_LDFLAGS)
804 postgresql_la_LIBADD = -lpq
807 if BUILD_PLUGIN_POWERDNS
808 pkglib_LTLIBRARIES += powerdns.la
809 powerdns_la_SOURCES = powerdns.c
810 powerdns_la_LDFLAGS = $(PLUGIN_LDFLAGS)
813 if BUILD_PLUGIN_PYTHON
814 pkglib_LTLIBRARIES += python.la
815 python_la_SOURCES = python.c pyconfig.c pyvalues.c cpython.h
816 python_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_PYTHON_CPPFLAGS)
817 python_la_CFLAGS = $(AM_CFLAGS)
819 python_la_CFLAGS += -fno-strict-aliasing -Wno-strict-aliasing
821 python_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_PYTHON_LDFLAGS)
822 python_la_LIBADD = $(BUILD_WITH_PYTHON_LIBS)
825 if BUILD_PLUGIN_PROCESSES
826 pkglib_LTLIBRARIES += processes.la
827 processes_la_SOURCES = processes.c
828 processes_la_LDFLAGS = $(PLUGIN_LDFLAGS)
829 processes_la_LIBADD =
830 if BUILD_WITH_LIBKVM_GETPROCS
831 processes_la_LIBADD += -lkvm
835 if BUILD_PLUGIN_PROTOCOLS
836 pkglib_LTLIBRARIES += protocols.la
837 protocols_la_SOURCES = protocols.c \
838 utils_ignorelist.c utils_ignorelist.h
839 protocols_la_LDFLAGS = $(PLUGIN_LDFLAGS)
842 if BUILD_PLUGIN_REDIS
843 pkglib_LTLIBRARIES += redis.la
844 redis_la_SOURCES = redis.c
845 redis_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBHIREDIS_LDFLAGS)
846 redis_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBHIREDIS_CPPFLAGS)
847 redis_la_LIBADD = -lhiredis
850 if BUILD_PLUGIN_ROUTEROS
851 pkglib_LTLIBRARIES += routeros.la
852 routeros_la_SOURCES = routeros.c
853 routeros_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBROUTEROS_CPPFLAGS)
854 routeros_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBROUTEROS_LDFLAGS)
855 routeros_la_LIBADD = -lrouteros
858 if BUILD_PLUGIN_RRDCACHED
859 pkglib_LTLIBRARIES += rrdcached.la
860 rrdcached_la_SOURCES = rrdcached.c utils_rrdcreate.c utils_rrdcreate.h
861 rrdcached_la_LDFLAGS = $(PLUGIN_LDFLAGS)
862 rrdcached_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
863 rrdcached_la_LIBADD = $(BUILD_WITH_LIBRRD_LDFLAGS)
866 if BUILD_PLUGIN_RRDTOOL
867 pkglib_LTLIBRARIES += rrdtool.la
868 rrdtool_la_SOURCES = rrdtool.c utils_rrdcreate.c utils_rrdcreate.h
869 rrdtool_la_LDFLAGS = $(PLUGIN_LDFLAGS)
870 rrdtool_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
871 rrdtool_la_LIBADD = $(BUILD_WITH_LIBRRD_LDFLAGS)
874 if BUILD_PLUGIN_SENSORS
875 pkglib_LTLIBRARIES += sensors.la
876 sensors_la_SOURCES = sensors.c \
877 utils_ignorelist.c utils_ignorelist.h
878 sensors_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBSENSORS_CFLAGS)
879 sensors_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBSENSORS_LDFLAGS)
880 sensors_la_LIBADD = -lsensors
883 if BUILD_PLUGIN_SERIAL
884 pkglib_LTLIBRARIES += serial.la
885 serial_la_SOURCES = serial.c
886 serial_la_LDFLAGS = $(PLUGIN_LDFLAGS)
889 if BUILD_PLUGIN_SIGROK
890 pkglib_LTLIBRARIES += sigrok.la
891 sigrok_la_SOURCES = sigrok.c
892 sigrok_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBSIGROK_CFLAGS)
893 sigrok_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBSIGROK_LDFLAGS)
894 sigrok_la_LIBADD = -lsigrok
897 if BUILD_PLUGIN_SMART
898 if BUILD_WITH_LIBUDEV
899 pkglib_LTLIBRARIES += smart.la
900 smart_la_SOURCES = smart.c \
901 utils_ignorelist.c utils_ignorelist.h
902 smart_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBATASMART_CPPFLAGS)
903 smart_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBATASMART_LDFLAGS)
904 smart_la_LIBADD = $(BUILD_WITH_LIBATASMART_LIBS) -ludev
909 pkglib_LTLIBRARIES += snmp.la
910 snmp_la_SOURCES = snmp.c
911 snmp_la_LDFLAGS = $(PLUGIN_LDFLAGS)
912 snmp_la_CFLAGS = $(AM_CFLAGS)
914 if BUILD_WITH_LIBNETSNMP
915 snmp_la_CFLAGS += $(BUILD_WITH_LIBSNMP_CFLAGS)
916 snmp_la_LIBADD += $(BUILD_WITH_LIBSNMP_LIBS)
918 if BUILD_WITH_LIBPTHREAD
919 snmp_la_LIBADD += -lpthread
923 if BUILD_PLUGIN_STATSD
924 pkglib_LTLIBRARIES += statsd.la
925 statsd_la_SOURCES = statsd.c \
926 utils_latency.h utils_latency.c
927 statsd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
928 statsd_la_LIBADD = -lpthread
932 pkglib_LTLIBRARIES += swap.la
933 swap_la_SOURCES = swap.c
934 swap_la_CFLAGS = $(AM_CFLAGS)
935 swap_la_LDFLAGS = $(PLUGIN_LDFLAGS)
937 if BUILD_WITH_LIBKSTAT
938 swap_la_LIBADD += -lkstat
940 if BUILD_WITH_LIBDEVINFO
941 swap_la_LIBADD += -ldevinfo
943 if BUILD_WITH_LIBKVM_GETSWAPINFO
944 swap_la_LIBADD += -lkvm
946 if BUILD_WITH_LIBSTATGRAB
947 swap_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
948 swap_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
950 if BUILD_WITH_PERFSTAT
951 swap_la_LIBADD += -lperfstat
956 if BUILD_PLUGIN_SYSLOG
957 pkglib_LTLIBRARIES += syslog.la
958 syslog_la_SOURCES = syslog.c
959 syslog_la_LDFLAGS = $(PLUGIN_LDFLAGS)
962 if BUILD_PLUGIN_TABLE
963 pkglib_LTLIBRARIES += table.la
964 table_la_SOURCES = table.c
965 table_la_LDFLAGS = $(PLUGIN_LDFLAGS)
969 pkglib_LTLIBRARIES += tail.la
970 tail_la_SOURCES = tail.c
971 tail_la_LDFLAGS = $(PLUGIN_LDFLAGS)
974 if BUILD_PLUGIN_TAIL_CSV
975 pkglib_LTLIBRARIES += tail_csv.la
976 tail_csv_la_SOURCES = tail_csv.c
977 tail_csv_la_LDFLAGS = $(PLUGIN_LDFLAGS)
981 pkglib_LTLIBRARIES += tape.la
982 tape_la_SOURCES = tape.c
983 tape_la_LDFLAGS = $(PLUGIN_LDFLAGS)
984 tape_la_LIBADD = -lkstat -ldevinfo
987 if BUILD_PLUGIN_TARGET_NOTIFICATION
988 pkglib_LTLIBRARIES += target_notification.la
989 target_notification_la_SOURCES = target_notification.c
990 target_notification_la_LDFLAGS = $(PLUGIN_LDFLAGS)
993 if BUILD_PLUGIN_TARGET_REPLACE
994 pkglib_LTLIBRARIES += target_replace.la
995 target_replace_la_SOURCES = target_replace.c
996 target_replace_la_LDFLAGS = $(PLUGIN_LDFLAGS)
999 if BUILD_PLUGIN_TARGET_SCALE
1000 pkglib_LTLIBRARIES += target_scale.la
1001 target_scale_la_SOURCES = target_scale.c
1002 target_scale_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1005 if BUILD_PLUGIN_TARGET_SET
1006 pkglib_LTLIBRARIES += target_set.la
1007 target_set_la_SOURCES = target_set.c
1008 target_set_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1011 if BUILD_PLUGIN_TARGET_V5UPGRADE
1012 pkglib_LTLIBRARIES += target_v5upgrade.la
1013 target_v5upgrade_la_SOURCES = target_v5upgrade.c
1014 target_v5upgrade_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1017 if BUILD_PLUGIN_TCPCONNS
1018 pkglib_LTLIBRARIES += tcpconns.la
1019 tcpconns_la_SOURCES = tcpconns.c
1020 tcpconns_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1021 tcpconns_la_LIBADD =
1022 if BUILD_WITH_LIBKVM_NLIST
1023 tcpconns_la_LIBADD += -lkvm
1027 if BUILD_PLUGIN_TEAMSPEAK2
1028 pkglib_LTLIBRARIES += teamspeak2.la
1029 teamspeak2_la_SOURCES = teamspeak2.c
1030 teamspeak2_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1034 pkglib_LTLIBRARIES += ted.la
1035 ted_la_SOURCES = ted.c
1036 ted_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1039 if BUILD_PLUGIN_THERMAL
1040 pkglib_LTLIBRARIES += thermal.la
1041 thermal_la_SOURCES = thermal.c \
1042 utils_ignorelist.c utils_ignorelist.h
1043 thermal_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1046 if BUILD_PLUGIN_THRESHOLD
1047 pkglib_LTLIBRARIES += threshold.la
1048 threshold_la_SOURCES = threshold.c
1049 threshold_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1052 if BUILD_PLUGIN_TOKYOTYRANT
1053 pkglib_LTLIBRARIES += tokyotyrant.la
1054 tokyotyrant_la_SOURCES = tokyotyrant.c
1055 tokyotyrant_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS)
1056 tokyotyrant_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS)
1057 tokyotyrant_la_LIBADD = $(BUILD_WITH_LIBTOKYOTYRANT_LIBS)
1058 if BUILD_WITH_LIBSOCKET
1059 tokyotyrant_la_LIBADD += -lsocket
1063 if BUILD_PLUGIN_UNIXSOCK
1064 pkglib_LTLIBRARIES += unixsock.la
1065 unixsock_la_SOURCES = unixsock.c \
1066 utils_cmd_flush.h utils_cmd_flush.c \
1067 utils_cmd_getval.h utils_cmd_getval.c \
1068 utils_cmd_getthreshold.h utils_cmd_getthreshold.c \
1069 utils_cmd_listval.h utils_cmd_listval.c \
1070 utils_cmd_putval.h utils_cmd_putval.c \
1071 utils_cmd_putnotif.h utils_cmd_putnotif.c \
1072 utils_parse_option.h utils_parse_option.c
1073 unixsock_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1074 unixsock_la_LIBADD = -lpthread
1077 if BUILD_PLUGIN_UPTIME
1078 pkglib_LTLIBRARIES += uptime.la
1079 uptime_la_SOURCES = uptime.c
1080 uptime_la_CFLAGS = $(AM_CFLAGS)
1081 uptime_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1083 if BUILD_WITH_LIBKSTAT
1084 uptime_la_LIBADD += -lkstat
1086 if BUILD_WITH_PERFSTAT
1087 uptime_la_LIBADD += -lperfstat
1091 if BUILD_PLUGIN_USERS
1092 pkglib_LTLIBRARIES += users.la
1093 users_la_SOURCES = users.c
1094 users_la_CFLAGS = $(AM_CFLAGS)
1095 users_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1097 if BUILD_WITH_LIBSTATGRAB
1098 users_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1099 users_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1103 if BUILD_PLUGIN_UUID
1104 pkglib_LTLIBRARIES += uuid.la
1105 uuid_la_SOURCES = uuid.c
1106 uuid_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBHAL_CFLAGS)
1107 uuid_la_LIBADD = $(BUILD_WITH_LIBHAL_LIBS)
1108 uuid_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1111 if BUILD_PLUGIN_VARNISH
1112 pkglib_LTLIBRARIES += varnish.la
1113 varnish_la_SOURCES = varnish.c
1114 varnish_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1115 varnish_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBVARNISH_CFLAGS)
1116 varnish_la_LIBADD = $(BUILD_WITH_LIBVARNISH_LIBS)
1119 if BUILD_PLUGIN_VIRT
1120 pkglib_LTLIBRARIES += virt.la
1121 virt_la_SOURCES = virt.c \
1122 utils_ignorelist.c utils_ignorelist.h
1123 virt_la_CFLAGS = $(AM_CFLAGS) \
1124 $(BUILD_WITH_LIBVIRT_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
1125 virt_la_LIBADD = $(BUILD_WITH_LIBVIRT_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
1126 virt_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1129 if BUILD_PLUGIN_VMEM
1130 pkglib_LTLIBRARIES += vmem.la
1131 vmem_la_SOURCES = vmem.c
1132 vmem_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1135 if BUILD_PLUGIN_VSERVER
1136 pkglib_LTLIBRARIES += vserver.la
1137 vserver_la_SOURCES = vserver.c
1138 vserver_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1141 if BUILD_PLUGIN_WIRELESS
1142 pkglib_LTLIBRARIES += wireless.la
1143 wireless_la_SOURCES = wireless.c
1144 wireless_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1147 if BUILD_PLUGIN_WRITE_GRAPHITE
1148 pkglib_LTLIBRARIES += write_graphite.la
1149 write_graphite_la_SOURCES = write_graphite.c \
1150 utils_format_graphite.c utils_format_graphite.h \
1151 utils_format_json.c utils_format_json.h
1152 write_graphite_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1155 if BUILD_PLUGIN_WRITE_HTTP
1156 pkglib_LTLIBRARIES += write_http.la
1157 write_http_la_SOURCES = write_http.c \
1158 utils_format_json.c utils_format_json.h
1159 write_http_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1160 write_http_la_CFLAGS = $(AM_CFLAGS)
1161 write_http_la_LIBADD =
1162 if BUILD_WITH_LIBCURL
1163 write_http_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
1164 write_http_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
1168 if BUILD_PLUGIN_WRITE_KAFKA
1169 pkglib_LTLIBRARIES += write_kafka.la
1170 write_kafka_la_SOURCES = write_kafka.c \
1171 utils_format_graphite.c utils_format_graphite.h \
1172 utils_format_json.c utils_format_json.h \
1173 utils_cmd_putval.c utils_cmd_putval.h \
1174 utils_crc32.c utils_crc32.h
1175 write_kafka_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRDKAFKA_LDFLAGS)
1176 write_kafka_la_LIBADD = $(BUILD_WITH_LIBRDKAFKA_LIBS)
1179 if BUILD_PLUGIN_WRITE_LOG
1180 pkglib_LTLIBRARIES += write_log.la
1181 write_log_la_SOURCES = write_log.c \
1182 utils_format_graphite.c utils_format_graphite.h
1183 write_log_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1186 if BUILD_PLUGIN_WRITE_MONGODB
1187 pkglib_LTLIBRARIES += write_mongodb.la
1188 write_mongodb_la_SOURCES = write_mongodb.c
1189 write_mongodb_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMONGOC_CPPFLAGS)
1190 write_mongodb_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMONGOC_LDFLAGS)
1191 write_mongodb_la_LIBADD = -lmongoc
1194 if BUILD_PLUGIN_WRITE_REDIS
1195 pkglib_LTLIBRARIES += write_redis.la
1196 write_redis_la_SOURCES = write_redis.c
1197 write_redis_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBHIREDIS_LDFLAGS)
1198 write_redis_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBHIREDIS_CPPFLAGS)
1199 write_redis_la_LIBADD = -lhiredis
1202 if BUILD_PLUGIN_WRITE_RIEMANN
1203 pkglib_LTLIBRARIES += write_riemann.la
1204 write_riemann_la_SOURCES = write_riemann.c write_riemann_threshold.c
1205 nodist_write_riemann_la_SOURCES = riemann.pb-c.c riemann.pb-c.h
1206 write_riemann_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1207 write_riemann_la_LIBADD = -lprotobuf-c
1210 if BUILD_PLUGIN_WRITE_TSDB
1211 pkglib_LTLIBRARIES += write_tsdb.la
1212 write_tsdb_la_SOURCES = write_tsdb.c
1213 write_tsdb_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1216 if BUILD_PLUGIN_XMMS
1217 pkglib_LTLIBRARIES += xmms.la
1218 xmms_la_SOURCES = xmms.c
1219 xmms_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBXMMS_CFLAGS)
1220 xmms_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1221 xmms_la_LIBADD = $(BUILD_WITH_LIBXMMS_LIBS)
1224 if BUILD_PLUGIN_ZFS_ARC
1225 pkglib_LTLIBRARIES += zfs_arc.la
1226 zfs_arc_la_SOURCES = zfs_arc.c
1227 zfs_arc_la_CFLAGS = $(AM_CFLAGS)
1228 zfs_arc_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1230 zfs_arc_la_LIBADD = -lm
1233 # zfs_arc requires no library on linux
1236 zfs_arc_la_LIBADD = -lkstat
1241 if BUILD_PLUGIN_ZOOKEEPER
1242 pkglib_LTLIBRARIES += zookeeper.la
1243 zookeeper_la_SOURCES = zookeeper.c
1244 zookeeper_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1247 BUILT_SOURCES += $(dist_man_MANS)
1249 dist_man_MANS = collectd.1 \
1261 collectd-threshold.5 \
1262 collectd-unixsock.5 \
1265 #collectd_1_SOURCES = collectd.pod
1267 EXTRA_DIST = types.db
1269 EXTRA_DIST += collectd.conf.pod \
1270 collectd-email.pod \
1275 collectd-nagios.pod \
1277 collectd-python.pod \
1281 collectd-threshold.pod \
1282 collectd-unixsock.pod \
1283 postgresql_default.conf \
1287 pod2man --release=$(VERSION) --center=$(PACKAGE) $< \
1288 >.pod2man.tmp.$$$$ 2>/dev/null && mv -f .pod2man.tmp.$$$$ $@ || true
1289 @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
1291 echo "$@ has some POD errors!"; false; \
1295 pod2man --section=5 --release=$(VERSION) --center=$(PACKAGE) $< \
1296 >.pod2man.tmp.$$$$ 2>/dev/null && mv -f .pod2man.tmp.$$$$ $@ || true
1297 @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
1299 echo "$@ has some POD errors!"; false; \
1302 # Protocol buffer for the "pinba" plugin.
1303 EXTRA_DIST += pinba.proto
1305 CLEANFILES += pinba.pb-c.c pinba.pb-c.h
1306 BUILT_SOURCES += pinba.pb-c.c pinba.pb-c.h
1308 pinba.pb-c.c pinba.pb-c.h: pinba.proto
1309 protoc-c -I$(srcdir) --c_out . $(srcdir)/pinba.proto
1312 # Protocol buffer for the "write_riemann" plugin.
1313 EXTRA_DIST += riemann.proto
1315 CLEANFILES += riemann.pb-c.c riemann.pb-c.h
1317 BUILT_SOURCES += riemann.pb-c.c riemann.pb-c.h
1319 riemann.pb-c.c riemann.pb-c.h: riemann.proto
1320 protoc-c -I$(srcdir) --c_out . $(srcdir)/riemann.proto
1324 $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
1325 if test -e $(DESTDIR)$(sysconfdir)/collectd.conf; \
1327 $(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf.pkg-orig; \
1329 $(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf; \
1331 $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
1332 $(INSTALL) -m 0644 $(srcdir)/types.db $(DESTDIR)$(pkgdatadir)/types.db;
1333 $(INSTALL) -m 0644 $(srcdir)/postgresql_default.conf \
1334 $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;
1337 rm -f $(DESTDIR)$(pkgdatadir)/types.db;
1338 rm -f $(DESTDIR)$(sysconfdir)/collectd.conf
1339 rm -f $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;
1341 check_PROGRAMS = test_common test_utils_avltree test_utils_heap test_utils_mount test_utils_vl_lookup
1343 test_common_SOURCES = tests/test_common.c \
1344 daemon/common.h daemon/common.c \
1345 tests/mock/plugin.c \
1346 tests/mock/utils_cache.c \
1347 tests/mock/utils_time.c
1348 test_common_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL)
1349 test_common_LDFLAGS = -export-dynamic
1352 test_utils_avltree_SOURCES = tests/test_utils_avltree.c \
1353 daemon/utils_avltree.c daemon/utils_avltree.h
1354 test_utils_avltree_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL)
1355 test_utils_avltree_LDFLAGS = -export-dynamic
1356 test_utils_avltree_LDADD =
1358 test_utils_heap_SOURCES = tests/test_utils_heap.c \
1359 daemon/utils_heap.c daemon/utils_heap.h
1360 test_utils_heap_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL)
1361 test_utils_heap_LDFLAGS = -export-dynamic
1362 test_utils_heap_LDADD =
1364 test_utils_mount_SOURCES = tests/test_utils_mount.c \
1365 utils_mount.c utils_mount.h \
1366 daemon/common.c daemon/common.h \
1367 tests/mock/plugin.c \
1368 tests/mock/utils_cache.c \
1369 tests/mock/utils_time.c
1370 test_utils_mount_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL)
1371 test_utils_mount_LDFLAGS = -export-dynamic
1372 test_utils_mount_LDADD =
1374 test_utils_vl_lookup_SOURCES = tests/test_utils_vl_lookup.c \
1375 utils_vl_lookup.h utils_vl_lookup.c \
1376 daemon/utils_avltree.c daemon/utils_avltree.h \
1377 daemon/common.c daemon/common.h \
1378 tests/mock/plugin.c \
1379 tests/mock/utils_cache.c \
1380 tests/mock/utils_time.c
1381 test_utils_vl_lookup_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL)
1382 test_utils_vl_lookup_LDFLAGS = -export-dynamic
1383 test_utils_vl_lookup_LDADD =
1385 TESTS = test_common test_utils_avltree test_utils_heap test_utils_mount test_utils_vl_lookup