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)
175 pkglib_LTLIBRARIES += ceph.la
176 ceph_la_SOURCES = ceph.c
177 ceph_la_CFLAGS = $(AM_CFLAGS)
178 ceph_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
179 ceph_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
180 ceph_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
183 if BUILD_PLUGIN_CGROUPS
184 pkglib_LTLIBRARIES += cgroups.la
185 cgroups_la_SOURCES = cgroups.c \
186 utils_ignorelist.c utils_ignorelist.h \
187 utils_mount.c utils_mount.h
188 cgroups_la_LDFLAGS = $(PLUGIN_LDFLAGS)
191 if BUILD_PLUGIN_CONNTRACK
192 pkglib_LTLIBRARIES += conntrack.la
193 conntrack_la_SOURCES = conntrack.c
194 conntrack_la_LDFLAGS = $(PLUGIN_LDFLAGS)
197 if BUILD_PLUGIN_CONTEXTSWITCH
198 pkglib_LTLIBRARIES += contextswitch.la
199 contextswitch_la_SOURCES = contextswitch.c
200 contextswitch_la_LDFLAGS = $(PLUGIN_LDFLAGS)
201 contextswitch_la_LIBADD =
202 if BUILD_WITH_PERFSTAT
203 contextswitch_la_LIBADD += -lperfstat
208 pkglib_LTLIBRARIES += cpu.la
209 cpu_la_SOURCES = cpu.c
210 cpu_la_CFLAGS = $(AM_CFLAGS)
211 cpu_la_LDFLAGS = $(PLUGIN_LDFLAGS)
213 if BUILD_WITH_LIBKSTAT
214 cpu_la_LIBADD += -lkstat
216 if BUILD_WITH_LIBDEVINFO
217 cpu_la_LIBADD += -ldevinfo
219 if BUILD_WITH_LIBSTATGRAB
220 cpu_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
221 cpu_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
223 if BUILD_WITH_PERFSTAT
224 cpu_la_LIBADD += -lperfstat
228 if BUILD_PLUGIN_CPUFREQ
229 pkglib_LTLIBRARIES += cpufreq.la
230 cpufreq_la_SOURCES = cpufreq.c
231 cpufreq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
235 pkglib_LTLIBRARIES += csv.la
236 csv_la_SOURCES = csv.c
237 csv_la_LDFLAGS = $(PLUGIN_LDFLAGS)
241 pkglib_LTLIBRARIES += curl.la
242 curl_la_SOURCES = curl.c
243 curl_la_LDFLAGS = $(PLUGIN_LDFLAGS)
244 curl_la_CFLAGS = $(AM_CFLAGS)
246 if BUILD_WITH_LIBCURL
247 curl_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
248 curl_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
252 if BUILD_PLUGIN_CURL_JSON
253 pkglib_LTLIBRARIES += curl_json.la
254 curl_json_la_SOURCES = curl_json.c
255 curl_json_la_CFLAGS = $(AM_CFLAGS)
256 curl_json_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
257 curl_json_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
258 curl_json_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
259 if BUILD_WITH_LIBCURL
260 curl_json_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
261 curl_json_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
265 if BUILD_PLUGIN_CURL_XML
266 pkglib_LTLIBRARIES += curl_xml.la
267 curl_xml_la_SOURCES = curl_xml.c
268 curl_xml_la_LDFLAGS = $(PLUGIN_LDFLAGS)
269 curl_xml_la_CFLAGS = $(AM_CFLAGS) \
270 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
271 curl_xml_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
275 pkglib_LTLIBRARIES += dbi.la
276 dbi_la_SOURCES = dbi.c \
277 utils_db_query.c utils_db_query.h
278 dbi_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBDBI_CPPFLAGS)
279 dbi_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBDBI_LDFLAGS)
280 dbi_la_LIBADD = $(BUILD_WITH_LIBDBI_LIBS)
284 pkglib_LTLIBRARIES += df.la
285 df_la_SOURCES = df.c \
286 utils_ignorelist.c utils_ignorelist.h \
287 utils_mount.c utils_mount.h
288 df_la_LDFLAGS = $(PLUGIN_LDFLAGS)
292 pkglib_LTLIBRARIES += disk.la
293 disk_la_SOURCES = disk.c \
294 utils_ignorelist.c utils_ignorelist.h
295 disk_la_CFLAGS = $(AM_CFLAGS)
296 disk_la_LDFLAGS = $(PLUGIN_LDFLAGS)
298 if BUILD_WITH_LIBKSTAT
299 disk_la_LIBADD += -lkstat
301 if BUILD_WITH_LIBDEVINFO
302 disk_la_LIBADD += -ldevinfo
304 if BUILD_WITH_LIBIOKIT
305 disk_la_LDFLAGS += -framework IOKit
307 if BUILD_WITH_LIBSTATGRAB
308 disk_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
309 disk_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
311 if BUILD_WITH_LIBUDEV
312 disk_la_LIBADD += -ludev
314 if BUILD_WITH_PERFSTAT
315 disk_la_LIBADD += -lperfstat
320 pkglib_LTLIBRARIES += dns.la
321 dns_la_SOURCES = dns.c utils_dns.c utils_dns.h
322 dns_la_LDFLAGS = $(PLUGIN_LDFLAGS)
323 dns_la_LIBADD = -lpcap -lpthread
327 pkglib_LTLIBRARIES += drbd.la
328 drbd_la_SOURCES = drbd.c
329 drbd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
330 drbd_la_LIBADD = -lpthread
333 if BUILD_PLUGIN_EMAIL
334 pkglib_LTLIBRARIES += email.la
335 email_la_SOURCES = email.c
336 email_la_LDFLAGS = $(PLUGIN_LDFLAGS)
337 email_la_LIBADD = -lpthread
340 if BUILD_PLUGIN_ENTROPY
341 pkglib_LTLIBRARIES += entropy.la
342 entropy_la_SOURCES = entropy.c
343 entropy_la_LDFLAGS = $(PLUGIN_LDFLAGS)
347 pkglib_LTLIBRARIES += exec.la
348 exec_la_SOURCES = exec.c \
349 utils_cmd_putnotif.c utils_cmd_putnotif.h \
350 utils_cmd_putval.c utils_cmd_putval.h \
351 utils_parse_option.h utils_parse_option.c
352 exec_la_LDFLAGS = $(PLUGIN_LDFLAGS)
353 exec_la_LIBADD = -lpthread
356 if BUILD_PLUGIN_ETHSTAT
357 pkglib_LTLIBRARIES += ethstat.la
358 ethstat_la_SOURCES = ethstat.c
359 ethstat_la_LDFLAGS = $(PLUGIN_LDFLAGS)
362 if BUILD_PLUGIN_FILECOUNT
363 pkglib_LTLIBRARIES += filecount.la
364 filecount_la_SOURCES = filecount.c
365 filecount_la_LDFLAGS = $(PLUGIN_LDFLAGS)
368 if BUILD_PLUGIN_GMOND
369 pkglib_LTLIBRARIES += gmond.la
370 gmond_la_SOURCES = gmond.c
371 gmond_la_CPPFLAGS = $(AM_CPPFLAGS) $(GANGLIA_CPPFLAGS)
372 gmond_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(GANGLIA_LDFLAGS)
373 gmond_la_LIBADD = $(GANGLIA_LIBS)
376 if BUILD_PLUGIN_HDDTEMP
377 pkglib_LTLIBRARIES += hddtemp.la
378 hddtemp_la_SOURCES = hddtemp.c
379 hddtemp_la_LDFLAGS = $(PLUGIN_LDFLAGS)
381 if BUILD_WITH_LIBSOCKET
382 hddtemp_la_LIBADD += -lsocket
386 if BUILD_PLUGIN_INTERFACE
387 pkglib_LTLIBRARIES += interface.la
388 interface_la_SOURCES = interface.c \
389 utils_ignorelist.c utils_ignorelist.h
390 interface_la_CFLAGS = $(AM_CFLAGS)
391 interface_la_LDFLAGS = $(PLUGIN_LDFLAGS)
392 interface_la_LIBADD =
393 if BUILD_WITH_LIBSTATGRAB
394 interface_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
395 interface_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
397 if BUILD_WITH_LIBKSTAT
398 interface_la_LIBADD += -lkstat
400 if BUILD_WITH_LIBDEVINFO
401 interface_la_LIBADD += -ldevinfo
402 endif # BUILD_WITH_LIBDEVINFO
403 endif # !BUILD_WITH_LIBSTATGRAB
404 if BUILD_WITH_PERFSTAT
405 interface_la_LIBADD += -lperfstat
407 endif # BUILD_PLUGIN_INTERFACE
410 pkglib_LTLIBRARIES += ipc.la
411 ipc_la_SOURCES = ipc.c
412 ipc_la_CFLAGS = $(AM_CFLAGS)
413 ipc_la_LDFLAGS = $(PLUGIN_LDFLAGS)
416 if BUILD_PLUGIN_IPTABLES
417 pkglib_LTLIBRARIES += iptables.la
418 iptables_la_SOURCES = iptables.c
419 iptables_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBIPTC_CPPFLAGS)
420 iptables_la_LDFLAGS = $(PLUGIN_LDFLAGS)
421 iptables_la_LIBADD = $(BUILD_WITH_LIBIPTC_LDFLAGS)
425 pkglib_LTLIBRARIES += ipmi.la
426 ipmi_la_SOURCES = ipmi.c \
427 utils_ignorelist.c utils_ignorelist.h
428 ipmi_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_OPENIPMI_CFLAGS)
429 ipmi_la_LDFLAGS = $(PLUGIN_LDFLAGS)
430 ipmi_la_LIBADD = $(BUILD_WITH_OPENIPMI_LIBS)
434 pkglib_LTLIBRARIES += ipvs.la
435 ipvs_la_SOURCES = ipvs.c
436 if IP_VS_H_NEEDS_KERNEL_CFLAGS
437 ipvs_la_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS)
439 ipvs_la_LDFLAGS = $(PLUGIN_LDFLAGS)
443 pkglib_LTLIBRARIES += irq.la
444 irq_la_SOURCES = irq.c \
445 utils_ignorelist.c utils_ignorelist.h
446 irq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
450 pkglib_LTLIBRARIES += java.la
451 java_la_SOURCES = java.c
452 java_la_CPPFLAGS = $(AM_CPPFLAGS) $(JAVA_CPPFLAGS)
453 java_la_CFLAGS = $(AM_CFLAGS) $(JAVA_CFLAGS)
454 java_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(JAVA_LDFLAGS)
455 java_la_LIBADD = $(JAVA_LIBS)
459 pkglib_LTLIBRARIES += load.la
460 load_la_SOURCES = load.c
461 load_la_CFLAGS = $(AM_CFLAGS)
462 load_la_LDFLAGS = $(PLUGIN_LDFLAGS)
464 if BUILD_WITH_LIBSTATGRAB
465 load_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
466 load_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
467 endif # BUILD_WITH_LIBSTATGRAB
468 if BUILD_WITH_PERFSTAT
469 load_la_LIBADD += -lperfstat
471 endif # BUILD_PLUGIN_LOAD
473 if BUILD_PLUGIN_LOGFILE
474 pkglib_LTLIBRARIES += logfile.la
475 logfile_la_SOURCES = logfile.c
476 logfile_la_LDFLAGS = $(PLUGIN_LDFLAGS)
479 if BUILD_PLUGIN_LOG_LOGSTASH
480 pkglib_LTLIBRARIES += log_logstash.la
481 log_logstash_la_SOURCES = log_logstash.c
482 log_logstash_la_CFLAGS = $(AM_CFLAGS)
483 log_logstash_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
484 log_logstash_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
485 log_logstash_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
489 pkglib_LTLIBRARIES += lpar.la
490 lpar_la_SOURCES = lpar.c
491 lpar_la_LDFLAGS = $(PLUGIN_LDFLAGS)
492 lpar_la_LIBADD = -lperfstat
496 pkglib_LTLIBRARIES += lvm.la
497 lvm_la_SOURCES = lvm.c
498 lvm_la_LDFLAGS = $(PLUGIN_LDFLAGS)
499 lvm_la_LIBADD = $(BUILD_WITH_LIBLVM2APP_LIBS)
502 if BUILD_PLUGIN_MADWIFI
503 pkglib_LTLIBRARIES += madwifi.la
504 madwifi_la_SOURCES = madwifi.c madwifi.h \
505 utils_ignorelist.c utils_ignorelist.h
506 madwifi_la_LDFLAGS = $(PLUGIN_LDFLAGS)
509 if BUILD_PLUGIN_MATCH_EMPTY_COUNTER
510 pkglib_LTLIBRARIES += match_empty_counter.la
511 match_empty_counter_la_SOURCES = match_empty_counter.c
512 match_empty_counter_la_LDFLAGS = $(PLUGIN_LDFLAGS)
515 if BUILD_PLUGIN_MATCH_HASHED
516 pkglib_LTLIBRARIES += match_hashed.la
517 match_hashed_la_SOURCES = match_hashed.c
518 match_hashed_la_LDFLAGS = $(PLUGIN_LDFLAGS)
521 if BUILD_PLUGIN_MATCH_REGEX
522 pkglib_LTLIBRARIES += match_regex.la
523 match_regex_la_SOURCES = match_regex.c
524 match_regex_la_LDFLAGS = $(PLUGIN_LDFLAGS)
527 if BUILD_PLUGIN_MATCH_TIMEDIFF
528 pkglib_LTLIBRARIES += match_timediff.la
529 match_timediff_la_SOURCES = match_timediff.c
530 match_timediff_la_LDFLAGS = $(PLUGIN_LDFLAGS)
533 if BUILD_PLUGIN_MATCH_VALUE
534 pkglib_LTLIBRARIES += match_value.la
535 match_value_la_SOURCES = match_value.c
536 match_value_la_LDFLAGS = $(PLUGIN_LDFLAGS)
539 if BUILD_PLUGIN_MBMON
540 pkglib_LTLIBRARIES += mbmon.la
541 mbmon_la_SOURCES = mbmon.c
542 mbmon_la_LDFLAGS = $(PLUGIN_LDFLAGS)
544 if BUILD_WITH_LIBSOCKET
545 mbmon_la_LIBADD += -lsocket
550 pkglib_LTLIBRARIES += md.la
551 md_la_SOURCES = md.c \
552 utils_ignorelist.c utils_ignorelist.h
553 md_la_LDFLAGS = $(PLUGIN_LDFLAGS)
556 if BUILD_PLUGIN_MEMCACHEC
557 pkglib_LTLIBRARIES += memcachec.la
558 memcachec_la_SOURCES = memcachec.c
559 memcachec_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMEMCACHED_LDFLAGS)
560 memcachec_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMEMCACHED_CPPFLAGS)
561 memcachec_la_LIBADD = $(BUILD_WITH_LIBMEMCACHED_LIBS)
564 if BUILD_PLUGIN_MEMCACHED
565 pkglib_LTLIBRARIES += memcached.la
566 memcached_la_SOURCES = memcached.c
567 memcached_la_LDFLAGS = $(PLUGIN_LDFLAGS)
568 memcached_la_LIBADD =
569 if BUILD_WITH_LIBSOCKET
570 memcached_la_LIBADD += -lsocket
574 if BUILD_PLUGIN_MEMORY
575 pkglib_LTLIBRARIES += memory.la
576 memory_la_SOURCES = memory.c
577 memory_la_CFLAGS = $(AM_CFLAGS)
578 memory_la_LDFLAGS = $(PLUGIN_LDFLAGS)
580 if BUILD_WITH_LIBKSTAT
581 memory_la_LIBADD += -lkstat
583 if BUILD_WITH_LIBDEVINFO
584 memory_la_LIBADD += -ldevinfo
586 if BUILD_WITH_LIBSTATGRAB
587 memory_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
588 memory_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
590 if BUILD_WITH_PERFSTAT
591 memory_la_LIBADD += -lperfstat
596 pkglib_LTLIBRARIES += mic.la
597 mic_la_SOURCES = mic.c \
598 utils_ignorelist.c utils_ignorelist.h
599 mic_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_MIC_LIBPATH)
600 mic_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_MIC_CPPFLAGS)
601 mic_la_LIBADD = $(BUILD_WITH_MIC_LDADD)
604 if BUILD_PLUGIN_MODBUS
605 pkglib_LTLIBRARIES += modbus.la
606 modbus_la_SOURCES = modbus.c
607 modbus_la_LDFLAGS = $(PLUGIN_LDFLAGS)
608 modbus_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMODBUS_CFLAGS)
609 modbus_la_LIBADD = $(BUILD_WITH_LIBMODBUS_LIBS)
612 if BUILD_PLUGIN_MULTIMETER
613 pkglib_LTLIBRARIES += multimeter.la
614 multimeter_la_SOURCES = multimeter.c
615 multimeter_la_LDFLAGS = $(PLUGIN_LDFLAGS)
618 if BUILD_PLUGIN_MYSQL
619 pkglib_LTLIBRARIES += mysql.la
620 mysql_la_SOURCES = mysql.c
621 mysql_la_LDFLAGS = $(PLUGIN_LDFLAGS)
622 mysql_la_CFLAGS = $(AM_CFLAGS)
624 if BUILD_WITH_LIBMYSQL
625 mysql_la_CFLAGS += $(BUILD_WITH_LIBMYSQL_CFLAGS)
626 mysql_la_LIBADD += $(BUILD_WITH_LIBMYSQL_LIBS)
630 if BUILD_PLUGIN_NETAPP
631 pkglib_LTLIBRARIES += netapp.la
632 netapp_la_SOURCES = netapp.c \
633 utils_ignorelist.c utils_ignorelist.h
634 netapp_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBNETAPP_CPPFLAGS)
635 netapp_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBNETAPP_LDFLAGS)
636 netapp_la_LIBADD = $(LIBNETAPP_LIBS)
639 if BUILD_PLUGIN_NETLINK
640 pkglib_LTLIBRARIES += netlink.la
641 netlink_la_SOURCES = netlink.c
642 netlink_la_LDFLAGS = $(PLUGIN_LDFLAGS)
643 netlink_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMNL_CFLAGS)
644 netlink_la_LIBADD = $(BUILD_WITH_LIBMNL_LIBS)
647 if BUILD_PLUGIN_NETWORK
648 pkglib_LTLIBRARIES += network.la
649 network_la_SOURCES = network.c network.h \
650 utils_fbhash.c utils_fbhash.h
651 network_la_CPPFLAGS = $(AM_CPPFLAGS)
652 network_la_LDFLAGS = $(PLUGIN_LDFLAGS)
653 network_la_LIBADD = -lpthread
654 if BUILD_WITH_LIBSOCKET
655 network_la_LIBADD += -lsocket
657 if BUILD_WITH_LIBGCRYPT
658 network_la_CPPFLAGS += $(GCRYPT_CPPFLAGS)
659 network_la_LDFLAGS += $(GCRYPT_LDFLAGS)
660 network_la_LIBADD += $(GCRYPT_LIBS)
665 pkglib_LTLIBRARIES += nfs.la
666 nfs_la_SOURCES = nfs.c
667 nfs_la_LDFLAGS = $(PLUGIN_LDFLAGS)
670 if BUILD_PLUGIN_FSCACHE
671 pkglib_LTLIBRARIES += fscache.la
672 fscache_la_SOURCES = fscache.c
673 fscache_la_LDFLAGS = $(PLUGIN_LDFLAGS)
676 if BUILD_PLUGIN_NGINX
677 pkglib_LTLIBRARIES += nginx.la
678 nginx_la_SOURCES = nginx.c
679 nginx_la_CFLAGS = $(AM_CFLAGS)
681 nginx_la_LDFLAGS = $(PLUGIN_LDFLAGS)
682 if BUILD_WITH_LIBCURL
683 nginx_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
684 nginx_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
688 if BUILD_PLUGIN_NOTIFY_DESKTOP
689 pkglib_LTLIBRARIES += notify_desktop.la
690 notify_desktop_la_SOURCES = notify_desktop.c
691 notify_desktop_la_CFLAGS = $(AM_CFLAGS) $(LIBNOTIFY_CFLAGS)
692 notify_desktop_la_LDFLAGS = $(PLUGIN_LDFLAGS)
693 notify_desktop_la_LIBADD = $(LIBNOTIFY_LIBS)
696 if BUILD_PLUGIN_NOTIFY_EMAIL
697 pkglib_LTLIBRARIES += notify_email.la
698 notify_email_la_SOURCES = notify_email.c
699 notify_email_la_LDFLAGS = $(PLUGIN_LDFLAGS)
700 notify_email_la_LIBADD = -lesmtp -lssl -lcrypto -lpthread
704 pkglib_LTLIBRARIES += ntpd.la
705 ntpd_la_SOURCES = ntpd.c
706 ntpd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
708 if BUILD_WITH_LIBSOCKET
709 ntpd_la_LIBADD += -lsocket
714 pkglib_LTLIBRARIES += numa.la
715 numa_la_SOURCES = numa.c
716 numa_la_LDFLAGS = $(PLUGIN_LDFLAGS)
720 pkglib_LTLIBRARIES += nut.la
721 nut_la_SOURCES = nut.c
722 nut_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
723 nut_la_LDFLAGS = $(PLUGIN_LDFLAGS)
724 nut_la_LIBADD = -lpthread $(BUILD_WITH_LIBUPSCLIENT_LIBS)
727 if BUILD_PLUGIN_OLSRD
728 pkglib_LTLIBRARIES += olsrd.la
729 olsrd_la_SOURCES = olsrd.c
730 olsrd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
732 if BUILD_WITH_LIBSOCKET
733 olsrd_la_LIBADD += -lsocket
737 if BUILD_PLUGIN_ONEWIRE
738 pkglib_LTLIBRARIES += onewire.la
739 onewire_la_SOURCES = onewire.c \
740 utils_ignorelist.c utils_ignorelist.h
741 onewire_la_CFLAGS = $(AM_CFLAGS)
742 onewire_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
743 onewire_la_LIBADD = $(BUILD_WITH_LIBOWCAPI_LIBS)
744 onewire_la_LDFLAGS = $(PLUGIN_LDFLAGS)
747 if BUILD_PLUGIN_OPENLDAP
748 pkglib_LTLIBRARIES += openldap.la
749 openldap_la_SOURCES = openldap.c
750 openldap_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBLDAP_LDFLAGS)
751 openldap_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBLDAP_CPPFLAGS)
752 openldap_la_LIBADD = -lldap
755 if BUILD_PLUGIN_OPENVPN
756 pkglib_LTLIBRARIES += openvpn.la
757 openvpn_la_SOURCES = openvpn.c
758 openvpn_la_CFLAGS = $(AM_CFLAGS)
759 openvpn_la_LDFLAGS = $(PLUGIN_LDFLAGS)
762 if BUILD_PLUGIN_ORACLE
763 pkglib_LTLIBRARIES += oracle.la
764 oracle_la_SOURCES = oracle.c \
765 utils_db_query.c utils_db_query.h
766 oracle_la_CFLAGS = $(AM_CFLAGS)
767 oracle_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_ORACLE_CFLAGS)
768 oracle_la_LIBADD = $(BUILD_WITH_ORACLE_LIBS)
769 oracle_la_LDFLAGS = $(PLUGIN_LDFLAGS)
773 pkglib_LTLIBRARIES += perl.la
774 perl_la_SOURCES = perl.c
775 # Despite C99 providing the "bool" type thru stdbool.h, Perl defines its own
776 # version of that type if HAS_BOOL is not defined... *sigh*
777 perl_la_CPPFLAGS = $(AM_CPPFLAGS) -DHAS_BOOL=1
778 perl_la_CFLAGS = $(AM_CFLAGS) \
780 -DXS_VERSION=\"$(VERSION)\" -DVERSION=\"$(VERSION)\"
781 # Work-around for issues #41 and #42 - Perl 5.10 incorrectly introduced
782 # __attribute__nonnull__(3) for Perl_load_module().
783 if HAVE_BROKEN_PERL_LOAD_MODULE
784 perl_la_CFLAGS += -Wno-nonnull
786 perl_la_LDFLAGS = $(PLUGIN_LDFLAGS) \
788 perl_la_LIBADD = $(PERL_LIBS)
792 pkglib_LTLIBRARIES += pf.la
794 pf_la_LDFLAGS = $(PLUGIN_LDFLAGS)
797 if BUILD_PLUGIN_PINBA
798 pkglib_LTLIBRARIES += pinba.la
799 pinba_la_SOURCES = pinba.c
800 nodist_pinba_la_SOURCES = pinba.pb-c.c pinba.pb-c.h
801 pinba_la_LDFLAGS = $(PLUGIN_LDFLAGS)
802 pinba_la_LIBADD = -lprotobuf-c
806 pkglib_LTLIBRARIES += ping.la
807 ping_la_SOURCES = ping.c
808 ping_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOPING_CPPFLAGS)
809 ping_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBOPING_LDFLAGS)
810 ping_la_LIBADD = -loping -lm
813 if BUILD_PLUGIN_POSTGRESQL
814 pkglib_LTLIBRARIES += postgresql.la
815 postgresql_la_SOURCES = postgresql.c \
816 utils_db_query.c utils_db_query.h
817 postgresql_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPQ_CPPFLAGS)
818 postgresql_la_LDFLAGS = $(PLUGIN_LDFLAGS) \
819 $(BUILD_WITH_LIBPQ_LDFLAGS)
820 postgresql_la_LIBADD = -lpq
823 if BUILD_PLUGIN_POWERDNS
824 pkglib_LTLIBRARIES += powerdns.la
825 powerdns_la_SOURCES = powerdns.c
826 powerdns_la_LDFLAGS = $(PLUGIN_LDFLAGS)
829 if BUILD_PLUGIN_PYTHON
830 pkglib_LTLIBRARIES += python.la
831 python_la_SOURCES = python.c pyconfig.c pyvalues.c cpython.h
832 python_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_PYTHON_CPPFLAGS)
833 python_la_CFLAGS = $(AM_CFLAGS)
835 python_la_CFLAGS += -fno-strict-aliasing -Wno-strict-aliasing
837 python_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_PYTHON_LDFLAGS)
838 python_la_LIBADD = $(BUILD_WITH_PYTHON_LIBS)
841 if BUILD_PLUGIN_PROCESSES
842 pkglib_LTLIBRARIES += processes.la
843 processes_la_SOURCES = processes.c
844 processes_la_LDFLAGS = $(PLUGIN_LDFLAGS)
845 processes_la_LIBADD =
846 if BUILD_WITH_LIBKVM_GETPROCS
847 processes_la_LIBADD += -lkvm
851 if BUILD_PLUGIN_PROTOCOLS
852 pkglib_LTLIBRARIES += protocols.la
853 protocols_la_SOURCES = protocols.c \
854 utils_ignorelist.c utils_ignorelist.h
855 protocols_la_LDFLAGS = $(PLUGIN_LDFLAGS)
858 if BUILD_PLUGIN_REDIS
859 pkglib_LTLIBRARIES += redis.la
860 redis_la_SOURCES = redis.c
861 redis_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBHIREDIS_LDFLAGS)
862 redis_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBHIREDIS_CPPFLAGS)
863 redis_la_LIBADD = -lhiredis
866 if BUILD_PLUGIN_ROUTEROS
867 pkglib_LTLIBRARIES += routeros.la
868 routeros_la_SOURCES = routeros.c
869 routeros_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBROUTEROS_CPPFLAGS)
870 routeros_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBROUTEROS_LDFLAGS)
871 routeros_la_LIBADD = -lrouteros
874 if BUILD_PLUGIN_RRDCACHED
875 pkglib_LTLIBRARIES += rrdcached.la
876 rrdcached_la_SOURCES = rrdcached.c utils_rrdcreate.c utils_rrdcreate.h
877 rrdcached_la_LDFLAGS = $(PLUGIN_LDFLAGS)
878 rrdcached_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
879 rrdcached_la_LIBADD = $(BUILD_WITH_LIBRRD_LDFLAGS)
882 if BUILD_PLUGIN_RRDTOOL
883 pkglib_LTLIBRARIES += rrdtool.la
884 rrdtool_la_SOURCES = rrdtool.c utils_rrdcreate.c utils_rrdcreate.h
885 rrdtool_la_LDFLAGS = $(PLUGIN_LDFLAGS)
886 rrdtool_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
887 rrdtool_la_LIBADD = $(BUILD_WITH_LIBRRD_LDFLAGS)
890 if BUILD_PLUGIN_SENSORS
891 pkglib_LTLIBRARIES += sensors.la
892 sensors_la_SOURCES = sensors.c \
893 utils_ignorelist.c utils_ignorelist.h
894 sensors_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBSENSORS_CFLAGS)
895 sensors_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBSENSORS_LDFLAGS)
896 sensors_la_LIBADD = -lsensors
899 if BUILD_PLUGIN_SERIAL
900 pkglib_LTLIBRARIES += serial.la
901 serial_la_SOURCES = serial.c
902 serial_la_LDFLAGS = $(PLUGIN_LDFLAGS)
905 if BUILD_PLUGIN_SIGROK
906 pkglib_LTLIBRARIES += sigrok.la
907 sigrok_la_SOURCES = sigrok.c
908 sigrok_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBSIGROK_CFLAGS)
909 sigrok_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBSIGROK_LDFLAGS)
910 sigrok_la_LIBADD = -lsigrok
913 if BUILD_PLUGIN_SMART
914 if BUILD_WITH_LIBUDEV
915 pkglib_LTLIBRARIES += smart.la
916 smart_la_SOURCES = smart.c \
917 utils_ignorelist.c utils_ignorelist.h
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
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 utils_ignorelist.c utils_ignorelist.h
1059 thermal_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1062 if BUILD_PLUGIN_THRESHOLD
1063 pkglib_LTLIBRARIES += threshold.la
1064 threshold_la_SOURCES = threshold.c
1065 threshold_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1068 if BUILD_PLUGIN_TOKYOTYRANT
1069 pkglib_LTLIBRARIES += tokyotyrant.la
1070 tokyotyrant_la_SOURCES = tokyotyrant.c
1071 tokyotyrant_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS)
1072 tokyotyrant_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS)
1073 tokyotyrant_la_LIBADD = $(BUILD_WITH_LIBTOKYOTYRANT_LIBS)
1074 if BUILD_WITH_LIBSOCKET
1075 tokyotyrant_la_LIBADD += -lsocket
1079 if BUILD_PLUGIN_UNIXSOCK
1080 pkglib_LTLIBRARIES += unixsock.la
1081 unixsock_la_SOURCES = unixsock.c \
1082 utils_cmd_flush.h utils_cmd_flush.c \
1083 utils_cmd_getval.h utils_cmd_getval.c \
1084 utils_cmd_getthreshold.h utils_cmd_getthreshold.c \
1085 utils_cmd_listval.h utils_cmd_listval.c \
1086 utils_cmd_putval.h utils_cmd_putval.c \
1087 utils_cmd_putnotif.h utils_cmd_putnotif.c \
1088 utils_parse_option.h utils_parse_option.c
1089 unixsock_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1090 unixsock_la_LIBADD = -lpthread
1093 if BUILD_PLUGIN_UPTIME
1094 pkglib_LTLIBRARIES += uptime.la
1095 uptime_la_SOURCES = uptime.c
1096 uptime_la_CFLAGS = $(AM_CFLAGS)
1097 uptime_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1099 if BUILD_WITH_LIBKSTAT
1100 uptime_la_LIBADD += -lkstat
1102 if BUILD_WITH_PERFSTAT
1103 uptime_la_LIBADD += -lperfstat
1107 if BUILD_PLUGIN_USERS
1108 pkglib_LTLIBRARIES += users.la
1109 users_la_SOURCES = users.c
1110 users_la_CFLAGS = $(AM_CFLAGS)
1111 users_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1113 if BUILD_WITH_LIBSTATGRAB
1114 users_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1115 users_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1119 if BUILD_PLUGIN_UUID
1120 pkglib_LTLIBRARIES += uuid.la
1121 uuid_la_SOURCES = uuid.c
1122 uuid_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBHAL_CFLAGS)
1123 uuid_la_LIBADD = $(BUILD_WITH_LIBHAL_LIBS)
1124 uuid_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1127 if BUILD_PLUGIN_VARNISH
1128 pkglib_LTLIBRARIES += varnish.la
1129 varnish_la_SOURCES = varnish.c
1130 varnish_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1131 varnish_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBVARNISH_CFLAGS)
1132 varnish_la_LIBADD = $(BUILD_WITH_LIBVARNISH_LIBS)
1135 if BUILD_PLUGIN_VIRT
1136 pkglib_LTLIBRARIES += virt.la
1137 virt_la_SOURCES = virt.c \
1138 utils_ignorelist.c utils_ignorelist.h
1139 virt_la_CFLAGS = $(AM_CFLAGS) \
1140 $(BUILD_WITH_LIBVIRT_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
1141 virt_la_LIBADD = $(BUILD_WITH_LIBVIRT_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
1142 virt_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1145 if BUILD_PLUGIN_VMEM
1146 pkglib_LTLIBRARIES += vmem.la
1147 vmem_la_SOURCES = vmem.c
1148 vmem_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1151 if BUILD_PLUGIN_VSERVER
1152 pkglib_LTLIBRARIES += vserver.la
1153 vserver_la_SOURCES = vserver.c
1154 vserver_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1157 if BUILD_PLUGIN_WIRELESS
1158 pkglib_LTLIBRARIES += wireless.la
1159 wireless_la_SOURCES = wireless.c
1160 wireless_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1163 if BUILD_PLUGIN_WRITE_GRAPHITE
1164 pkglib_LTLIBRARIES += write_graphite.la
1165 write_graphite_la_SOURCES = write_graphite.c \
1166 utils_format_graphite.c utils_format_graphite.h \
1167 utils_format_json.c utils_format_json.h
1168 write_graphite_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1171 if BUILD_PLUGIN_WRITE_HTTP
1172 pkglib_LTLIBRARIES += write_http.la
1173 write_http_la_SOURCES = write_http.c \
1174 utils_format_json.c utils_format_json.h
1175 write_http_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1176 write_http_la_CFLAGS = $(AM_CFLAGS)
1177 write_http_la_LIBADD =
1178 if BUILD_WITH_LIBCURL
1179 write_http_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
1180 write_http_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
1184 if BUILD_PLUGIN_WRITE_KAFKA
1185 pkglib_LTLIBRARIES += write_kafka.la
1186 write_kafka_la_SOURCES = write_kafka.c \
1187 utils_format_graphite.c utils_format_graphite.h \
1188 utils_format_json.c utils_format_json.h \
1189 utils_cmd_putval.c utils_cmd_putval.h \
1190 utils_crc32.c utils_crc32.h
1191 write_kafka_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBRDKAFKA_CPPFLAGS)
1192 write_kafka_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRDKAFKA_LDFLAGS)
1193 write_kafka_la_LIBADD = $(BUILD_WITH_LIBRDKAFKA_LIBS)
1196 if BUILD_PLUGIN_WRITE_LOG
1197 pkglib_LTLIBRARIES += write_log.la
1198 write_log_la_SOURCES = write_log.c \
1199 utils_format_graphite.c utils_format_graphite.h
1200 write_log_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1203 if BUILD_PLUGIN_WRITE_MONGODB
1204 pkglib_LTLIBRARIES += write_mongodb.la
1205 write_mongodb_la_SOURCES = write_mongodb.c
1206 write_mongodb_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMONGOC_CPPFLAGS)
1207 write_mongodb_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMONGOC_LDFLAGS)
1208 write_mongodb_la_LIBADD = -lmongoc
1211 if BUILD_PLUGIN_WRITE_REDIS
1212 pkglib_LTLIBRARIES += write_redis.la
1213 write_redis_la_SOURCES = write_redis.c
1214 write_redis_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBHIREDIS_LDFLAGS)
1215 write_redis_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBHIREDIS_CPPFLAGS)
1216 write_redis_la_LIBADD = -lhiredis
1219 if BUILD_PLUGIN_WRITE_RIEMANN
1220 pkglib_LTLIBRARIES += write_riemann.la
1221 write_riemann_la_SOURCES = write_riemann.c write_riemann_threshold.c
1222 nodist_write_riemann_la_SOURCES = riemann.pb-c.c riemann.pb-c.h
1223 write_riemann_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1224 write_riemann_la_LIBADD = -lprotobuf-c
1227 if BUILD_PLUGIN_WRITE_SENSU
1228 pkglib_LTLIBRARIES += write_sensu.la
1229 write_sensu_la_SOURCES = write_sensu.c
1230 write_sensu_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1233 if BUILD_PLUGIN_WRITE_TSDB
1234 pkglib_LTLIBRARIES += write_tsdb.la
1235 write_tsdb_la_SOURCES = write_tsdb.c
1236 write_tsdb_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1239 if BUILD_PLUGIN_XMMS
1240 pkglib_LTLIBRARIES += xmms.la
1241 xmms_la_SOURCES = xmms.c
1242 xmms_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBXMMS_CFLAGS)
1243 xmms_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1244 xmms_la_LIBADD = $(BUILD_WITH_LIBXMMS_LIBS)
1247 if BUILD_PLUGIN_ZFS_ARC
1248 pkglib_LTLIBRARIES += zfs_arc.la
1249 zfs_arc_la_SOURCES = zfs_arc.c
1250 zfs_arc_la_CFLAGS = $(AM_CFLAGS)
1251 zfs_arc_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1253 zfs_arc_la_LIBADD = -lm
1256 # zfs_arc requires no library on linux
1259 zfs_arc_la_LIBADD = -lkstat
1264 if BUILD_PLUGIN_ZOOKEEPER
1265 pkglib_LTLIBRARIES += zookeeper.la
1266 zookeeper_la_SOURCES = zookeeper.c
1267 zookeeper_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1270 BUILT_SOURCES += $(dist_man_MANS)
1272 dist_man_MANS = collectd.1 \
1284 collectd-threshold.5 \
1285 collectd-unixsock.5 \
1288 #collectd_1_SOURCES = collectd.pod
1290 EXTRA_DIST = types.db
1292 EXTRA_DIST += collectd.conf.pod \
1293 collectd-email.pod \
1298 collectd-nagios.pod \
1300 collectd-python.pod \
1304 collectd-threshold.pod \
1305 collectd-unixsock.pod \
1306 postgresql_default.conf \
1310 pod2man --release=$(VERSION) --center=$(PACKAGE) $< \
1311 >.pod2man.tmp.$$$$ 2>/dev/null && mv -f .pod2man.tmp.$$$$ $@ || true
1312 @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
1314 echo "$@ has some POD errors!"; false; \
1318 pod2man --section=5 --release=$(VERSION) --center=$(PACKAGE) $< \
1319 >.pod2man.tmp.$$$$ 2>/dev/null && mv -f .pod2man.tmp.$$$$ $@ || true
1320 @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
1322 echo "$@ has some POD errors!"; false; \
1325 # Protocol buffer for the "pinba" plugin.
1326 EXTRA_DIST += pinba.proto
1328 CLEANFILES += pinba.pb-c.c pinba.pb-c.h
1329 BUILT_SOURCES += pinba.pb-c.c pinba.pb-c.h
1331 pinba.pb-c.c pinba.pb-c.h: pinba.proto
1332 protoc-c -I$(srcdir) --c_out . $(srcdir)/pinba.proto
1335 # Protocol buffer for the "write_riemann" plugin.
1336 EXTRA_DIST += riemann.proto
1338 CLEANFILES += riemann.pb-c.c riemann.pb-c.h
1340 BUILT_SOURCES += riemann.pb-c.c riemann.pb-c.h
1342 riemann.pb-c.c riemann.pb-c.h: riemann.proto
1343 protoc-c -I$(srcdir) --c_out . $(srcdir)/riemann.proto
1347 $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
1348 if test -e $(DESTDIR)$(sysconfdir)/collectd.conf; \
1350 $(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf.pkg-orig; \
1352 $(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf; \
1354 $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
1355 $(INSTALL) -m 0644 $(srcdir)/types.db $(DESTDIR)$(pkgdatadir)/types.db;
1356 $(INSTALL) -m 0644 $(srcdir)/postgresql_default.conf \
1357 $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;
1360 rm -f $(DESTDIR)$(pkgdatadir)/types.db;
1361 rm -f $(DESTDIR)$(sysconfdir)/collectd.conf
1362 rm -f $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;
1364 check_PROGRAMS = test_common test_utils_avltree test_utils_heap test_utils_mount test_utils_vl_lookup
1366 test_common_SOURCES = tests/test_common.c \
1367 daemon/common.h daemon/common.c \
1369 tests/mock/plugin.c \
1370 tests/mock/utils_cache.c \
1371 tests/mock/utils_time.c
1372 test_common_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL)
1373 test_common_LDFLAGS = -export-dynamic
1376 test_utils_avltree_SOURCES = tests/test_utils_avltree.c \
1377 daemon/utils_avltree.c daemon/utils_avltree.h
1378 test_utils_avltree_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL)
1379 test_utils_avltree_LDFLAGS = -export-dynamic
1380 test_utils_avltree_LDADD =
1382 test_utils_heap_SOURCES = tests/test_utils_heap.c \
1383 daemon/utils_heap.c daemon/utils_heap.h
1384 test_utils_heap_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL)
1385 test_utils_heap_LDFLAGS = -export-dynamic
1386 test_utils_heap_LDADD =
1388 test_utils_mount_SOURCES = tests/test_utils_mount.c \
1389 utils_mount.c utils_mount.h \
1390 daemon/common.c daemon/common.h \
1391 tests/mock/plugin.c \
1392 tests/mock/utils_cache.c \
1393 tests/mock/utils_time.c
1394 test_utils_mount_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL)
1395 test_utils_mount_LDFLAGS = -export-dynamic
1396 test_utils_mount_LDADD =
1398 test_utils_vl_lookup_SOURCES = tests/test_utils_vl_lookup.c \
1399 utils_vl_lookup.h utils_vl_lookup.c \
1400 daemon/utils_avltree.c daemon/utils_avltree.h \
1401 daemon/common.c daemon/common.h \
1402 tests/mock/plugin.c \
1403 tests/mock/utils_cache.c \
1404 tests/mock/utils_time.c
1405 test_utils_vl_lookup_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL)
1406 test_utils_vl_lookup_LDFLAGS = -export-dynamic
1407 test_utils_vl_lookup_LDADD =
1409 TESTS = test_common test_utils_avltree test_utils_heap test_utils_mount test_utils_vl_lookup