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
30 noinst_LTLIBRARIES += liblookup.la
31 liblookup_la_SOURCES = utils_vl_lookup.c utils_vl_lookup.h
32 liblookup_la_LIBADD = daemon/libavltree.la
33 check_PROGRAMS += test_utils_vl_lookup
34 TESTS += test_utils_vl_lookup
35 test_utils_vl_lookup_SOURCES = utils_vl_lookup_test.c testing.h
36 test_utils_vl_lookup_LDADD = liblookup.la daemon/libcommon.la daemon/libplugin_mock.la
38 noinst_LTLIBRARIES += libmount.la
39 libmount_la_SOURCES = utils_mount.c utils_mount.h
40 check_PROGRAMS += test_utils_mount
41 TESTS += test_utils_mount
42 test_utils_mount_SOURCES = utils_mount_test.c testing.h
43 test_utils_mount_LDADD = libmount.la daemon/libcommon.la daemon/libplugin_mock.la
46 sbin_PROGRAMS = collectdmon
47 bin_PROGRAMS = collectd-nagios collectdctl collectd-tg
49 collectdmon_SOURCES = collectdmon.c
50 collectdmon_CPPFLAGS = $(AM_CPPFLAGS)
52 collectd_nagios_SOURCES = collectd-nagios.c
53 collectd_nagios_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/libcollectdclient/collectd -I$(top_builddir)/src/libcollectdclient/collectd
54 collectd_nagios_LDADD =
55 if BUILD_WITH_LIBSOCKET
56 collectd_nagios_LDADD += -lsocket
59 collectd_nagios_LDADD += -lm
62 collectd_nagios_LDADD += libcollectdclient/libcollectdclient.la
63 collectd_nagios_DEPENDENCIES = libcollectdclient/libcollectdclient.la
66 collectdctl_SOURCES = collectdctl.c
67 collectdctl_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/libcollectdclient/collectd -I$(top_builddir)/src/libcollectdclient/collectd
69 if BUILD_WITH_LIBSOCKET
70 collectdctl_LDADD += -lsocket
73 collectdctl_LDADD += -lm
75 collectdctl_LDADD += libcollectdclient/libcollectdclient.la
76 collectdctl_DEPENDENCIES = libcollectdclient/libcollectdclient.la
78 collectd_tg_SOURCES = collectd-tg.c
79 collectd_tg_CPPFLAGS = $(AM_CPPFLAGS) \
80 -I$(top_srcdir)/src/libcollectdclient/collectd -I$(top_builddir)/src/libcollectdclient/collectd
81 collectd_tg_LDADD = daemon/libheap.la
82 if BUILD_WITH_LIBSOCKET
83 collectd_tg_LDADD += -lsocket
86 collectd_tg_LDADD += -lrt
89 collectd_tg_LDADD += -lm
91 if BUILD_WITH_LIBPTHREAD
92 collectd_tg_LDADD += -lpthread
94 collectd_tg_LDADD += libcollectdclient/libcollectdclient.la
95 collectd_tg_DEPENDENCIES = libcollectdclient/libcollectdclient.la
103 if BUILD_PLUGIN_AGGREGATION
104 pkglib_LTLIBRARIES += aggregation.la
105 aggregation_la_SOURCES = aggregation.c \
106 utils_vl_lookup.c utils_vl_lookup.h
107 aggregation_la_LDFLAGS = $(PLUGIN_LDFLAGS)
108 aggregation_la_LIBADD = -lm
112 pkglib_LTLIBRARIES += amqp.la
113 amqp_la_SOURCES = amqp.c \
114 utils_cmd_putval.c utils_cmd_putval.h \
115 utils_format_graphite.c utils_format_graphite.h \
116 utils_format_json.c utils_format_json.h
117 amqp_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRABBITMQ_LDFLAGS)
118 amqp_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBRABBITMQ_CPPFLAGS)
119 amqp_la_LIBADD = $(BUILD_WITH_LIBRABBITMQ_LIBS)
122 if BUILD_PLUGIN_APACHE
123 pkglib_LTLIBRARIES += apache.la
124 apache_la_SOURCES = apache.c
125 apache_la_LDFLAGS = $(PLUGIN_LDFLAGS)
126 apache_la_CFLAGS = $(AM_CFLAGS)
128 if BUILD_WITH_LIBCURL
129 apache_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
130 apache_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
134 if BUILD_PLUGIN_APCUPS
135 pkglib_LTLIBRARIES += apcups.la
136 apcups_la_SOURCES = apcups.c
137 apcups_la_LDFLAGS = $(PLUGIN_LDFLAGS)
139 if BUILD_WITH_LIBSOCKET
140 apcups_la_LIBADD += -lsocket
144 if BUILD_PLUGIN_APPLE_SENSORS
145 pkglib_LTLIBRARIES += apple_sensors.la
146 apple_sensors_la_SOURCES = apple_sensors.c
147 apple_sensors_la_LDFLAGS = $(PLUGIN_LDFLAGS)
148 apple_sensors_la_LDFLAGS += -framework IOKit
151 if BUILD_PLUGIN_AQUAERO
152 pkglib_LTLIBRARIES += aquaero.la
153 aquaero_la_SOURCES = aquaero.c
154 aquaero_la_LDFLAGS = $(PLUGIN_LDFLAGS)
155 aquaero_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBAQUAERO5_CFLAGS)
156 aquaero_la_LIBADD = $(BUILD_WITH_LIBAQUAERO5_LDFLAGS) -laquaero5
159 if BUILD_PLUGIN_ASCENT
160 pkglib_LTLIBRARIES += ascent.la
161 ascent_la_SOURCES = ascent.c
162 ascent_la_LDFLAGS = $(PLUGIN_LDFLAGS)
163 ascent_la_CFLAGS = $(AM_CFLAGS) \
164 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
165 ascent_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
168 if BUILD_PLUGIN_BAROMETER
169 pkglib_LTLIBRARIES += barometer.la
170 barometer_la_SOURCES = barometer.c
171 barometer_la_LDFLAGS = $(PLUGIN_LDFLAGS)
172 barometer_la_LIBADD = -lm
175 if BUILD_PLUGIN_BATTERY
176 pkglib_LTLIBRARIES += battery.la
177 battery_la_SOURCES = battery.c
178 battery_la_LDFLAGS = $(PLUGIN_LDFLAGS)
180 if BUILD_WITH_LIBIOKIT
181 battery_la_LDFLAGS += -framework IOKit
186 pkglib_LTLIBRARIES += bind.la
187 bind_la_SOURCES = bind.c
188 bind_la_LDFLAGS = $(PLUGIN_LDFLAGS)
189 bind_la_CFLAGS = $(AM_CFLAGS) \
190 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
191 bind_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
195 pkglib_LTLIBRARIES += ceph.la
196 ceph_la_SOURCES = ceph.c
197 ceph_la_CFLAGS = $(AM_CFLAGS)
198 ceph_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
199 ceph_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
200 ceph_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
203 if BUILD_PLUGIN_CGROUPS
204 pkglib_LTLIBRARIES += cgroups.la
205 cgroups_la_SOURCES = cgroups.c \
206 utils_ignorelist.c utils_ignorelist.h
207 cgroups_la_LDFLAGS = $(PLUGIN_LDFLAGS)
208 cgroups_la_LIBADD = libmount.la
211 if BUILD_PLUGIN_CONNTRACK
212 pkglib_LTLIBRARIES += conntrack.la
213 conntrack_la_SOURCES = conntrack.c
214 conntrack_la_LDFLAGS = $(PLUGIN_LDFLAGS)
217 if BUILD_PLUGIN_CONTEXTSWITCH
218 pkglib_LTLIBRARIES += contextswitch.la
219 contextswitch_la_SOURCES = contextswitch.c
220 contextswitch_la_LDFLAGS = $(PLUGIN_LDFLAGS)
221 contextswitch_la_LIBADD =
222 if BUILD_WITH_PERFSTAT
223 contextswitch_la_LIBADD += -lperfstat
228 pkglib_LTLIBRARIES += cpu.la
229 cpu_la_SOURCES = cpu.c
230 cpu_la_CFLAGS = $(AM_CFLAGS)
231 cpu_la_LDFLAGS = $(PLUGIN_LDFLAGS)
233 if BUILD_WITH_LIBKSTAT
234 cpu_la_LIBADD += -lkstat
236 if BUILD_WITH_LIBDEVINFO
237 cpu_la_LIBADD += -ldevinfo
239 if BUILD_WITH_LIBSTATGRAB
240 cpu_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
241 cpu_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
243 if BUILD_WITH_PERFSTAT
244 cpu_la_LIBADD += -lperfstat
248 if BUILD_PLUGIN_CPUFREQ
249 pkglib_LTLIBRARIES += cpufreq.la
250 cpufreq_la_SOURCES = cpufreq.c
251 cpufreq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
255 pkglib_LTLIBRARIES += csv.la
256 csv_la_SOURCES = csv.c
257 csv_la_LDFLAGS = $(PLUGIN_LDFLAGS)
261 pkglib_LTLIBRARIES += curl.la
262 curl_la_SOURCES = curl.c
263 curl_la_LDFLAGS = $(PLUGIN_LDFLAGS)
264 curl_la_CFLAGS = $(AM_CFLAGS)
266 if BUILD_WITH_LIBCURL
267 curl_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
268 curl_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
272 if BUILD_PLUGIN_CURL_JSON
273 pkglib_LTLIBRARIES += curl_json.la
274 curl_json_la_SOURCES = curl_json.c
275 curl_json_la_CFLAGS = $(AM_CFLAGS)
276 curl_json_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
277 curl_json_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
278 curl_json_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
279 if BUILD_WITH_LIBCURL
280 curl_json_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
281 curl_json_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
285 if BUILD_PLUGIN_CURL_XML
286 pkglib_LTLIBRARIES += curl_xml.la
287 curl_xml_la_SOURCES = curl_xml.c
288 curl_xml_la_LDFLAGS = $(PLUGIN_LDFLAGS)
289 curl_xml_la_CFLAGS = $(AM_CFLAGS) \
290 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
291 curl_xml_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
295 pkglib_LTLIBRARIES += dbi.la
296 dbi_la_SOURCES = dbi.c \
297 utils_db_query.c utils_db_query.h
298 dbi_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBDBI_CPPFLAGS)
299 dbi_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBDBI_LDFLAGS)
300 dbi_la_LIBADD = $(BUILD_WITH_LIBDBI_LIBS)
304 pkglib_LTLIBRARIES += df.la
305 df_la_SOURCES = df.c \
306 utils_ignorelist.c utils_ignorelist.h
307 df_la_LDFLAGS = $(PLUGIN_LDFLAGS)
308 df_la_LIBADD = libmount.la
312 pkglib_LTLIBRARIES += disk.la
313 disk_la_SOURCES = disk.c \
314 utils_ignorelist.c utils_ignorelist.h
315 disk_la_CFLAGS = $(AM_CFLAGS)
316 disk_la_LDFLAGS = $(PLUGIN_LDFLAGS)
318 if BUILD_WITH_LIBKSTAT
319 disk_la_LIBADD += -lkstat
321 if BUILD_WITH_LIBDEVINFO
322 disk_la_LIBADD += -ldevinfo
324 if BUILD_WITH_LIBIOKIT
325 disk_la_LDFLAGS += -framework IOKit
327 if BUILD_WITH_LIBSTATGRAB
328 disk_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
329 disk_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
331 if BUILD_WITH_LIBUDEV
332 disk_la_LIBADD += -ludev
334 if BUILD_WITH_PERFSTAT
335 disk_la_LIBADD += -lperfstat
340 pkglib_LTLIBRARIES += dns.la
341 dns_la_SOURCES = dns.c utils_dns.c utils_dns.h
342 dns_la_LDFLAGS = $(PLUGIN_LDFLAGS)
343 dns_la_LIBADD = -lpcap -lpthread
347 pkglib_LTLIBRARIES += drbd.la
348 drbd_la_SOURCES = drbd.c
349 drbd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
350 drbd_la_LIBADD = -lpthread
353 if BUILD_PLUGIN_EMAIL
354 pkglib_LTLIBRARIES += email.la
355 email_la_SOURCES = email.c
356 email_la_LDFLAGS = $(PLUGIN_LDFLAGS)
357 email_la_LIBADD = -lpthread
360 if BUILD_PLUGIN_ENTROPY
361 pkglib_LTLIBRARIES += entropy.la
362 entropy_la_SOURCES = entropy.c
363 entropy_la_LDFLAGS = $(PLUGIN_LDFLAGS)
367 pkglib_LTLIBRARIES += exec.la
368 exec_la_SOURCES = exec.c \
369 utils_cmd_putnotif.c utils_cmd_putnotif.h \
370 utils_cmd_putval.c utils_cmd_putval.h \
371 utils_parse_option.h utils_parse_option.c
372 exec_la_LDFLAGS = $(PLUGIN_LDFLAGS)
373 exec_la_LIBADD = -lpthread
376 if BUILD_PLUGIN_ETHSTAT
377 pkglib_LTLIBRARIES += ethstat.la
378 ethstat_la_SOURCES = ethstat.c
379 ethstat_la_LDFLAGS = $(PLUGIN_LDFLAGS)
382 if BUILD_PLUGIN_FHCOUNT
383 pkglib_LTLIBRARIES += fhcount.la
384 fhcount_la_SOURCES = fhcount.c
385 fhcount_la_LDFLAGS = $(PLUGIN_LDFLAGS)
388 if BUILD_PLUGIN_FILECOUNT
389 pkglib_LTLIBRARIES += filecount.la
390 filecount_la_SOURCES = filecount.c
391 filecount_la_LDFLAGS = $(PLUGIN_LDFLAGS)
394 if BUILD_PLUGIN_GMOND
395 pkglib_LTLIBRARIES += gmond.la
396 gmond_la_SOURCES = gmond.c
397 gmond_la_CPPFLAGS = $(AM_CPPFLAGS) $(GANGLIA_CPPFLAGS)
398 gmond_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(GANGLIA_LDFLAGS)
399 gmond_la_LIBADD = $(GANGLIA_LIBS)
402 if BUILD_PLUGIN_HDDTEMP
403 pkglib_LTLIBRARIES += hddtemp.la
404 hddtemp_la_SOURCES = hddtemp.c
405 hddtemp_la_LDFLAGS = $(PLUGIN_LDFLAGS)
407 if BUILD_WITH_LIBSOCKET
408 hddtemp_la_LIBADD += -lsocket
412 if BUILD_PLUGIN_INTERFACE
413 pkglib_LTLIBRARIES += interface.la
414 interface_la_SOURCES = interface.c \
415 utils_ignorelist.c utils_ignorelist.h
416 interface_la_CFLAGS = $(AM_CFLAGS)
417 interface_la_LDFLAGS = $(PLUGIN_LDFLAGS)
418 interface_la_LIBADD =
419 if BUILD_WITH_LIBSTATGRAB
420 interface_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
421 interface_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
423 if BUILD_WITH_LIBKSTAT
424 interface_la_LIBADD += -lkstat
426 if BUILD_WITH_LIBDEVINFO
427 interface_la_LIBADD += -ldevinfo
428 endif # BUILD_WITH_LIBDEVINFO
429 endif # !BUILD_WITH_LIBSTATGRAB
430 if BUILD_WITH_PERFSTAT
431 interface_la_LIBADD += -lperfstat
433 endif # BUILD_PLUGIN_INTERFACE
436 pkglib_LTLIBRARIES += ipc.la
437 ipc_la_SOURCES = ipc.c
438 ipc_la_CFLAGS = $(AM_CFLAGS)
439 ipc_la_LDFLAGS = $(PLUGIN_LDFLAGS)
442 if BUILD_PLUGIN_IPTABLES
443 pkglib_LTLIBRARIES += iptables.la
444 iptables_la_SOURCES = iptables.c
445 iptables_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBIPTC_CPPFLAGS)
446 iptables_la_LDFLAGS = $(PLUGIN_LDFLAGS)
447 iptables_la_LIBADD = $(BUILD_WITH_LIBIPTC_LDFLAGS)
451 pkglib_LTLIBRARIES += ipmi.la
452 ipmi_la_SOURCES = ipmi.c \
453 utils_ignorelist.c utils_ignorelist.h
454 ipmi_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_OPENIPMI_CFLAGS)
455 ipmi_la_LDFLAGS = $(PLUGIN_LDFLAGS)
456 ipmi_la_LIBADD = $(BUILD_WITH_OPENIPMI_LIBS)
460 pkglib_LTLIBRARIES += ipvs.la
461 ipvs_la_SOURCES = ipvs.c
462 if IP_VS_H_NEEDS_KERNEL_CFLAGS
463 ipvs_la_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS)
465 ipvs_la_CFLAGS = $(AM_CFLAGS)
467 ipvs_la_LDFLAGS = $(PLUGIN_LDFLAGS)
471 pkglib_LTLIBRARIES += irq.la
472 irq_la_SOURCES = irq.c \
473 utils_ignorelist.c utils_ignorelist.h
474 irq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
478 pkglib_LTLIBRARIES += java.la
479 java_la_SOURCES = java.c
480 java_la_CPPFLAGS = $(AM_CPPFLAGS) $(JAVA_CPPFLAGS)
481 java_la_CFLAGS = $(AM_CFLAGS) $(JAVA_CFLAGS)
482 java_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(JAVA_LDFLAGS)
483 java_la_LIBADD = $(JAVA_LIBS)
487 pkglib_LTLIBRARIES += load.la
488 load_la_SOURCES = load.c
489 load_la_CFLAGS = $(AM_CFLAGS)
490 load_la_LDFLAGS = $(PLUGIN_LDFLAGS)
492 if BUILD_WITH_LIBSTATGRAB
493 load_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
494 load_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
495 endif # BUILD_WITH_LIBSTATGRAB
496 if BUILD_WITH_PERFSTAT
497 load_la_LIBADD += -lperfstat
499 endif # BUILD_PLUGIN_LOAD
501 if BUILD_PLUGIN_LOGFILE
502 pkglib_LTLIBRARIES += logfile.la
503 logfile_la_SOURCES = logfile.c
504 logfile_la_LDFLAGS = $(PLUGIN_LDFLAGS)
507 if BUILD_PLUGIN_LOG_LOGSTASH
508 pkglib_LTLIBRARIES += log_logstash.la
509 log_logstash_la_SOURCES = log_logstash.c
510 log_logstash_la_CFLAGS = $(AM_CFLAGS)
511 log_logstash_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
512 log_logstash_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
513 log_logstash_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
517 pkglib_LTLIBRARIES += lpar.la
518 lpar_la_SOURCES = lpar.c
519 lpar_la_LDFLAGS = $(PLUGIN_LDFLAGS)
520 lpar_la_LIBADD = -lperfstat
524 pkglib_LTLIBRARIES += lvm.la
525 lvm_la_SOURCES = lvm.c
526 lvm_la_LDFLAGS = $(PLUGIN_LDFLAGS)
527 lvm_la_LIBADD = $(BUILD_WITH_LIBLVM2APP_LIBS)
530 if BUILD_PLUGIN_MADWIFI
531 pkglib_LTLIBRARIES += madwifi.la
532 madwifi_la_SOURCES = madwifi.c madwifi.h \
533 utils_ignorelist.c utils_ignorelist.h
534 madwifi_la_LDFLAGS = $(PLUGIN_LDFLAGS)
537 if BUILD_PLUGIN_MATCH_EMPTY_COUNTER
538 pkglib_LTLIBRARIES += match_empty_counter.la
539 match_empty_counter_la_SOURCES = match_empty_counter.c
540 match_empty_counter_la_LDFLAGS = $(PLUGIN_LDFLAGS)
543 if BUILD_PLUGIN_MATCH_HASHED
544 pkglib_LTLIBRARIES += match_hashed.la
545 match_hashed_la_SOURCES = match_hashed.c
546 match_hashed_la_LDFLAGS = $(PLUGIN_LDFLAGS)
549 if BUILD_PLUGIN_MATCH_REGEX
550 pkglib_LTLIBRARIES += match_regex.la
551 match_regex_la_SOURCES = match_regex.c
552 match_regex_la_LDFLAGS = $(PLUGIN_LDFLAGS)
555 if BUILD_PLUGIN_MATCH_TIMEDIFF
556 pkglib_LTLIBRARIES += match_timediff.la
557 match_timediff_la_SOURCES = match_timediff.c
558 match_timediff_la_LDFLAGS = $(PLUGIN_LDFLAGS)
561 if BUILD_PLUGIN_MATCH_VALUE
562 pkglib_LTLIBRARIES += match_value.la
563 match_value_la_SOURCES = match_value.c
564 match_value_la_LDFLAGS = $(PLUGIN_LDFLAGS)
567 if BUILD_PLUGIN_MBMON
568 pkglib_LTLIBRARIES += mbmon.la
569 mbmon_la_SOURCES = mbmon.c
570 mbmon_la_LDFLAGS = $(PLUGIN_LDFLAGS)
572 if BUILD_WITH_LIBSOCKET
573 mbmon_la_LIBADD += -lsocket
578 pkglib_LTLIBRARIES += md.la
579 md_la_SOURCES = md.c \
580 utils_ignorelist.c utils_ignorelist.h
581 md_la_LDFLAGS = $(PLUGIN_LDFLAGS)
584 if BUILD_PLUGIN_MEMCACHEC
585 pkglib_LTLIBRARIES += memcachec.la
586 memcachec_la_SOURCES = memcachec.c
587 memcachec_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMEMCACHED_LDFLAGS)
588 memcachec_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMEMCACHED_CPPFLAGS)
589 memcachec_la_LIBADD = $(BUILD_WITH_LIBMEMCACHED_LIBS)
592 if BUILD_PLUGIN_MEMCACHED
593 pkglib_LTLIBRARIES += memcached.la
594 memcached_la_SOURCES = memcached.c
595 memcached_la_LDFLAGS = $(PLUGIN_LDFLAGS)
596 memcached_la_LIBADD =
597 if BUILD_WITH_LIBSOCKET
598 memcached_la_LIBADD += -lsocket
602 if BUILD_PLUGIN_MEMORY
603 pkglib_LTLIBRARIES += memory.la
604 memory_la_SOURCES = memory.c
605 memory_la_CFLAGS = $(AM_CFLAGS)
606 memory_la_LDFLAGS = $(PLUGIN_LDFLAGS)
608 if BUILD_WITH_LIBKSTAT
609 memory_la_LIBADD += -lkstat
611 if BUILD_WITH_LIBDEVINFO
612 memory_la_LIBADD += -ldevinfo
614 if BUILD_WITH_LIBSTATGRAB
615 memory_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
616 memory_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
618 if BUILD_WITH_PERFSTAT
619 memory_la_LIBADD += -lperfstat
624 pkglib_LTLIBRARIES += mic.la
625 mic_la_SOURCES = mic.c \
626 utils_ignorelist.c utils_ignorelist.h
627 mic_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_MIC_LIBPATH)
628 mic_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_MIC_CPPFLAGS)
629 mic_la_LIBADD = $(BUILD_WITH_MIC_LDADD)
632 if BUILD_PLUGIN_MODBUS
633 pkglib_LTLIBRARIES += modbus.la
634 modbus_la_SOURCES = modbus.c
635 modbus_la_LDFLAGS = $(PLUGIN_LDFLAGS)
636 modbus_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMODBUS_CFLAGS)
637 modbus_la_LIBADD = $(BUILD_WITH_LIBMODBUS_LIBS)
640 if BUILD_PLUGIN_MULTIMETER
641 pkglib_LTLIBRARIES += multimeter.la
642 multimeter_la_SOURCES = multimeter.c
643 multimeter_la_LDFLAGS = $(PLUGIN_LDFLAGS)
646 if BUILD_PLUGIN_MYSQL
647 pkglib_LTLIBRARIES += mysql.la
648 mysql_la_SOURCES = mysql.c
649 mysql_la_LDFLAGS = $(PLUGIN_LDFLAGS)
650 mysql_la_CFLAGS = $(AM_CFLAGS)
652 if BUILD_WITH_LIBMYSQL
653 mysql_la_CFLAGS += $(BUILD_WITH_LIBMYSQL_CFLAGS)
654 mysql_la_LIBADD += $(BUILD_WITH_LIBMYSQL_LIBS)
658 if BUILD_PLUGIN_NETAPP
659 pkglib_LTLIBRARIES += netapp.la
660 netapp_la_SOURCES = netapp.c \
661 utils_ignorelist.c utils_ignorelist.h
662 netapp_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBNETAPP_CPPFLAGS)
663 netapp_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBNETAPP_LDFLAGS)
664 netapp_la_LIBADD = $(LIBNETAPP_LIBS)
667 if BUILD_PLUGIN_NETLINK
668 pkglib_LTLIBRARIES += netlink.la
669 netlink_la_SOURCES = netlink.c
670 netlink_la_LDFLAGS = $(PLUGIN_LDFLAGS)
671 netlink_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMNL_CFLAGS)
672 netlink_la_LIBADD = $(BUILD_WITH_LIBMNL_LIBS)
675 if BUILD_PLUGIN_NETWORK
676 pkglib_LTLIBRARIES += network.la
677 network_la_SOURCES = network.c network.h \
678 utils_fbhash.c utils_fbhash.h
679 network_la_CPPFLAGS = $(AM_CPPFLAGS)
680 network_la_LDFLAGS = $(PLUGIN_LDFLAGS)
681 network_la_LIBADD = -lpthread
682 if BUILD_WITH_LIBSOCKET
683 network_la_LIBADD += -lsocket
685 if BUILD_WITH_LIBGCRYPT
686 network_la_CPPFLAGS += $(GCRYPT_CPPFLAGS)
687 network_la_LDFLAGS += $(GCRYPT_LDFLAGS)
688 network_la_LIBADD += $(GCRYPT_LIBS)
693 pkglib_LTLIBRARIES += nfs.la
694 nfs_la_SOURCES = nfs.c
695 nfs_la_LDFLAGS = $(PLUGIN_LDFLAGS)
698 if BUILD_PLUGIN_FSCACHE
699 pkglib_LTLIBRARIES += fscache.la
700 fscache_la_SOURCES = fscache.c
701 fscache_la_LDFLAGS = $(PLUGIN_LDFLAGS)
704 if BUILD_PLUGIN_NGINX
705 pkglib_LTLIBRARIES += nginx.la
706 nginx_la_SOURCES = nginx.c
707 nginx_la_CFLAGS = $(AM_CFLAGS)
709 nginx_la_LDFLAGS = $(PLUGIN_LDFLAGS)
710 if BUILD_WITH_LIBCURL
711 nginx_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
712 nginx_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
716 if BUILD_PLUGIN_NOTIFY_DESKTOP
717 pkglib_LTLIBRARIES += notify_desktop.la
718 notify_desktop_la_SOURCES = notify_desktop.c
719 notify_desktop_la_CFLAGS = $(AM_CFLAGS) $(LIBNOTIFY_CFLAGS)
720 notify_desktop_la_LDFLAGS = $(PLUGIN_LDFLAGS)
721 notify_desktop_la_LIBADD = $(LIBNOTIFY_LIBS)
724 if BUILD_PLUGIN_NOTIFY_EMAIL
725 pkglib_LTLIBRARIES += notify_email.la
726 notify_email_la_SOURCES = notify_email.c
727 notify_email_la_LDFLAGS = $(PLUGIN_LDFLAGS)
728 notify_email_la_LIBADD = -lesmtp -lssl -lcrypto -lpthread
732 pkglib_LTLIBRARIES += ntpd.la
733 ntpd_la_SOURCES = ntpd.c
734 ntpd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
736 if BUILD_WITH_LIBSOCKET
737 ntpd_la_LIBADD += -lsocket
742 pkglib_LTLIBRARIES += numa.la
743 numa_la_SOURCES = numa.c
744 numa_la_LDFLAGS = $(PLUGIN_LDFLAGS)
748 pkglib_LTLIBRARIES += nut.la
749 nut_la_SOURCES = nut.c
750 nut_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
751 nut_la_LDFLAGS = $(PLUGIN_LDFLAGS)
752 nut_la_LIBADD = -lpthread $(BUILD_WITH_LIBUPSCLIENT_LIBS)
755 if BUILD_PLUGIN_OLSRD
756 pkglib_LTLIBRARIES += olsrd.la
757 olsrd_la_SOURCES = olsrd.c
758 olsrd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
760 if BUILD_WITH_LIBSOCKET
761 olsrd_la_LIBADD += -lsocket
765 if BUILD_PLUGIN_ONEWIRE
766 pkglib_LTLIBRARIES += onewire.la
767 onewire_la_SOURCES = onewire.c \
768 utils_ignorelist.c utils_ignorelist.h
769 onewire_la_CFLAGS = $(AM_CFLAGS)
770 onewire_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
771 onewire_la_LIBADD = $(BUILD_WITH_LIBOWCAPI_LIBS)
772 onewire_la_LDFLAGS = $(PLUGIN_LDFLAGS)
775 if BUILD_PLUGIN_OPENLDAP
776 pkglib_LTLIBRARIES += openldap.la
777 openldap_la_SOURCES = openldap.c
778 openldap_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBLDAP_LDFLAGS)
779 openldap_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBLDAP_CPPFLAGS)
780 openldap_la_LIBADD = -lldap
783 if BUILD_PLUGIN_OPENVPN
784 pkglib_LTLIBRARIES += openvpn.la
785 openvpn_la_SOURCES = openvpn.c
786 openvpn_la_CFLAGS = $(AM_CFLAGS)
787 openvpn_la_LDFLAGS = $(PLUGIN_LDFLAGS)
790 if BUILD_PLUGIN_ORACLE
791 pkglib_LTLIBRARIES += oracle.la
792 oracle_la_SOURCES = oracle.c \
793 utils_db_query.c utils_db_query.h
794 oracle_la_CFLAGS = $(AM_CFLAGS)
795 oracle_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_ORACLE_CFLAGS)
796 oracle_la_LIBADD = $(BUILD_WITH_ORACLE_LIBS)
797 oracle_la_LDFLAGS = $(PLUGIN_LDFLAGS)
801 pkglib_LTLIBRARIES += perl.la
802 perl_la_SOURCES = perl.c
803 # Despite C99 providing the "bool" type thru stdbool.h, Perl defines its own
804 # version of that type if HAS_BOOL is not defined... *sigh*
805 perl_la_CPPFLAGS = $(AM_CPPFLAGS) -DHAS_BOOL=1
806 perl_la_CFLAGS = $(AM_CFLAGS) \
808 -DXS_VERSION=\"$(VERSION)\" -DVERSION=\"$(VERSION)\"
809 # Work-around for issues #41 and #42 - Perl 5.10 incorrectly introduced
810 # __attribute__nonnull__(3) for Perl_load_module().
811 if HAVE_BROKEN_PERL_LOAD_MODULE
812 perl_la_CFLAGS += -Wno-nonnull
814 perl_la_LDFLAGS = $(PLUGIN_LDFLAGS) \
816 perl_la_LIBADD = $(PERL_LIBS)
820 pkglib_LTLIBRARIES += pf.la
822 pf_la_LDFLAGS = $(PLUGIN_LDFLAGS)
825 if BUILD_PLUGIN_PINBA
826 pkglib_LTLIBRARIES += pinba.la
827 pinba_la_SOURCES = pinba.c
828 nodist_pinba_la_SOURCES = pinba.pb-c.c pinba.pb-c.h
829 pinba_la_LDFLAGS = $(PLUGIN_LDFLAGS)
830 pinba_la_LIBADD = -lprotobuf-c
834 pkglib_LTLIBRARIES += ping.la
835 ping_la_SOURCES = ping.c
836 ping_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOPING_CPPFLAGS)
837 ping_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBOPING_LDFLAGS)
838 ping_la_LIBADD = -loping -lm
841 if BUILD_PLUGIN_POSTGRESQL
842 pkglib_LTLIBRARIES += postgresql.la
843 postgresql_la_SOURCES = postgresql.c \
844 utils_db_query.c utils_db_query.h
845 postgresql_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPQ_CPPFLAGS)
846 postgresql_la_LDFLAGS = $(PLUGIN_LDFLAGS) \
847 $(BUILD_WITH_LIBPQ_LDFLAGS)
848 postgresql_la_LIBADD = -lpq
851 if BUILD_PLUGIN_POWERDNS
852 pkglib_LTLIBRARIES += powerdns.la
853 powerdns_la_SOURCES = powerdns.c
854 powerdns_la_LDFLAGS = $(PLUGIN_LDFLAGS)
857 if BUILD_PLUGIN_PYTHON
858 pkglib_LTLIBRARIES += python.la
859 python_la_SOURCES = python.c pyconfig.c pyvalues.c cpython.h
860 python_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_PYTHON_CPPFLAGS)
861 python_la_CFLAGS = $(AM_CFLAGS)
863 python_la_CFLAGS += -fno-strict-aliasing -Wno-strict-aliasing
865 python_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_PYTHON_LDFLAGS)
866 python_la_LIBADD = $(BUILD_WITH_PYTHON_LIBS)
869 if BUILD_PLUGIN_PROCESSES
870 pkglib_LTLIBRARIES += processes.la
871 processes_la_SOURCES = processes.c
872 processes_la_LDFLAGS = $(PLUGIN_LDFLAGS)
873 processes_la_LIBADD =
874 if BUILD_WITH_LIBKVM_GETPROCS
875 processes_la_LIBADD += -lkvm
879 if BUILD_PLUGIN_PROTOCOLS
880 pkglib_LTLIBRARIES += protocols.la
881 protocols_la_SOURCES = protocols.c \
882 utils_ignorelist.c utils_ignorelist.h
883 protocols_la_LDFLAGS = $(PLUGIN_LDFLAGS)
886 if BUILD_PLUGIN_REDIS
887 pkglib_LTLIBRARIES += redis.la
888 redis_la_SOURCES = redis.c
889 redis_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBHIREDIS_LDFLAGS)
890 redis_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBHIREDIS_CPPFLAGS)
891 redis_la_LIBADD = -lhiredis
894 if BUILD_PLUGIN_ROUTEROS
895 pkglib_LTLIBRARIES += routeros.la
896 routeros_la_SOURCES = routeros.c
897 routeros_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBROUTEROS_CPPFLAGS)
898 routeros_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBROUTEROS_LDFLAGS)
899 routeros_la_LIBADD = -lrouteros
902 if BUILD_PLUGIN_RRDCACHED
903 pkglib_LTLIBRARIES += rrdcached.la
904 rrdcached_la_SOURCES = rrdcached.c utils_rrdcreate.c utils_rrdcreate.h
905 rrdcached_la_LDFLAGS = $(PLUGIN_LDFLAGS)
906 rrdcached_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
907 rrdcached_la_LIBADD = $(BUILD_WITH_LIBRRD_LDFLAGS)
910 if BUILD_PLUGIN_RRDTOOL
911 pkglib_LTLIBRARIES += rrdtool.la
912 rrdtool_la_SOURCES = rrdtool.c utils_rrdcreate.c utils_rrdcreate.h
913 rrdtool_la_LDFLAGS = $(PLUGIN_LDFLAGS)
914 rrdtool_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
915 rrdtool_la_LIBADD = $(BUILD_WITH_LIBRRD_LDFLAGS)
918 if BUILD_PLUGIN_SENSORS
919 pkglib_LTLIBRARIES += sensors.la
920 sensors_la_SOURCES = sensors.c \
921 utils_ignorelist.c utils_ignorelist.h
922 sensors_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBSENSORS_CFLAGS)
923 sensors_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBSENSORS_LDFLAGS)
924 sensors_la_LIBADD = -lsensors
927 if BUILD_PLUGIN_SERIAL
928 pkglib_LTLIBRARIES += serial.la
929 serial_la_SOURCES = serial.c
930 serial_la_LDFLAGS = $(PLUGIN_LDFLAGS)
933 if BUILD_PLUGIN_SIGROK
934 pkglib_LTLIBRARIES += sigrok.la
935 sigrok_la_SOURCES = sigrok.c
936 sigrok_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBSIGROK_CFLAGS)
937 sigrok_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBSIGROK_LDFLAGS)
938 sigrok_la_LIBADD = -lsigrok
941 if BUILD_PLUGIN_SMART
942 if BUILD_WITH_LIBUDEV
943 pkglib_LTLIBRARIES += smart.la
944 smart_la_SOURCES = smart.c \
945 utils_ignorelist.c utils_ignorelist.h
946 smart_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBATASMART_CPPFLAGS)
947 smart_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBATASMART_LDFLAGS)
948 smart_la_LIBADD = $(BUILD_WITH_LIBATASMART_LIBS) -ludev
953 pkglib_LTLIBRARIES += snmp.la
954 snmp_la_SOURCES = snmp.c
955 snmp_la_LDFLAGS = $(PLUGIN_LDFLAGS)
956 snmp_la_CFLAGS = $(AM_CFLAGS)
958 if BUILD_WITH_LIBNETSNMP
959 snmp_la_CFLAGS += $(BUILD_WITH_LIBSNMP_CFLAGS)
960 snmp_la_LIBADD += $(BUILD_WITH_LIBSNMP_LIBS)
962 if BUILD_WITH_LIBPTHREAD
963 snmp_la_LIBADD += -lpthread
967 if BUILD_PLUGIN_STATSD
968 pkglib_LTLIBRARIES += statsd.la
969 statsd_la_SOURCES = statsd.c \
970 utils_latency.h utils_latency.c
971 statsd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
972 statsd_la_LIBADD = -lpthread -lm
976 pkglib_LTLIBRARIES += swap.la
977 swap_la_SOURCES = swap.c
978 swap_la_CFLAGS = $(AM_CFLAGS)
979 swap_la_LDFLAGS = $(PLUGIN_LDFLAGS)
981 if BUILD_WITH_LIBKSTAT
982 swap_la_LIBADD += -lkstat
984 if BUILD_WITH_LIBDEVINFO
985 swap_la_LIBADD += -ldevinfo
987 if BUILD_WITH_LIBKVM_GETSWAPINFO
988 swap_la_LIBADD += -lkvm
990 if BUILD_WITH_LIBSTATGRAB
991 swap_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
992 swap_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
994 if BUILD_WITH_PERFSTAT
995 swap_la_LIBADD += -lperfstat
1000 if BUILD_PLUGIN_SYSLOG
1001 pkglib_LTLIBRARIES += syslog.la
1002 syslog_la_SOURCES = syslog.c
1003 syslog_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1006 if BUILD_PLUGIN_TABLE
1007 pkglib_LTLIBRARIES += table.la
1008 table_la_SOURCES = table.c
1009 table_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1012 if BUILD_PLUGIN_TAIL
1013 pkglib_LTLIBRARIES += tail.la
1014 tail_la_SOURCES = tail.c
1015 tail_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1018 if BUILD_PLUGIN_TAIL_CSV
1019 pkglib_LTLIBRARIES += tail_csv.la
1020 tail_csv_la_SOURCES = tail_csv.c
1021 tail_csv_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1024 if BUILD_PLUGIN_TAPE
1025 pkglib_LTLIBRARIES += tape.la
1026 tape_la_SOURCES = tape.c
1027 tape_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1028 tape_la_LIBADD = -lkstat -ldevinfo
1031 if BUILD_PLUGIN_TARGET_NOTIFICATION
1032 pkglib_LTLIBRARIES += target_notification.la
1033 target_notification_la_SOURCES = target_notification.c
1034 target_notification_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1037 if BUILD_PLUGIN_TARGET_REPLACE
1038 pkglib_LTLIBRARIES += target_replace.la
1039 target_replace_la_SOURCES = target_replace.c
1040 target_replace_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1043 if BUILD_PLUGIN_TARGET_SCALE
1044 pkglib_LTLIBRARIES += target_scale.la
1045 target_scale_la_SOURCES = target_scale.c
1046 target_scale_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1049 if BUILD_PLUGIN_TARGET_SET
1050 pkglib_LTLIBRARIES += target_set.la
1051 target_set_la_SOURCES = target_set.c
1052 target_set_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1055 if BUILD_PLUGIN_TARGET_V5UPGRADE
1056 pkglib_LTLIBRARIES += target_v5upgrade.la
1057 target_v5upgrade_la_SOURCES = target_v5upgrade.c
1058 target_v5upgrade_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1061 if BUILD_PLUGIN_TCPCONNS
1062 pkglib_LTLIBRARIES += tcpconns.la
1063 tcpconns_la_SOURCES = tcpconns.c
1064 tcpconns_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1065 tcpconns_la_LIBADD =
1066 if BUILD_WITH_LIBKVM_NLIST
1067 tcpconns_la_LIBADD += -lkvm
1071 if BUILD_PLUGIN_TEAMSPEAK2
1072 pkglib_LTLIBRARIES += teamspeak2.la
1073 teamspeak2_la_SOURCES = teamspeak2.c
1074 teamspeak2_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1078 pkglib_LTLIBRARIES += ted.la
1079 ted_la_SOURCES = ted.c
1080 ted_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1083 if BUILD_PLUGIN_THERMAL
1084 pkglib_LTLIBRARIES += thermal.la
1085 thermal_la_SOURCES = thermal.c \
1086 utils_ignorelist.c utils_ignorelist.h
1087 thermal_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1090 if BUILD_PLUGIN_THRESHOLD
1091 pkglib_LTLIBRARIES += threshold.la
1092 threshold_la_SOURCES = threshold.c
1093 threshold_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1096 if BUILD_PLUGIN_TOKYOTYRANT
1097 pkglib_LTLIBRARIES += tokyotyrant.la
1098 tokyotyrant_la_SOURCES = tokyotyrant.c
1099 tokyotyrant_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS)
1100 tokyotyrant_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS)
1101 tokyotyrant_la_LIBADD = $(BUILD_WITH_LIBTOKYOTYRANT_LIBS)
1102 if BUILD_WITH_LIBSOCKET
1103 tokyotyrant_la_LIBADD += -lsocket
1107 if BUILD_PLUGIN_TURBOSTAT
1108 pkglib_LTLIBRARIES += turbostat.la
1109 turbostat_la_SOURCES = turbostat.c
1110 turbostat_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1113 if BUILD_PLUGIN_UNIXSOCK
1114 pkglib_LTLIBRARIES += unixsock.la
1115 unixsock_la_SOURCES = unixsock.c \
1116 utils_cmd_flush.h utils_cmd_flush.c \
1117 utils_cmd_getval.h utils_cmd_getval.c \
1118 utils_cmd_getthreshold.h utils_cmd_getthreshold.c \
1119 utils_cmd_listval.h utils_cmd_listval.c \
1120 utils_cmd_putval.h utils_cmd_putval.c \
1121 utils_cmd_putnotif.h utils_cmd_putnotif.c \
1122 utils_parse_option.h utils_parse_option.c
1123 unixsock_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1124 unixsock_la_LIBADD = -lpthread
1127 if BUILD_PLUGIN_UPTIME
1128 pkglib_LTLIBRARIES += uptime.la
1129 uptime_la_SOURCES = uptime.c
1130 uptime_la_CFLAGS = $(AM_CFLAGS)
1131 uptime_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1133 if BUILD_WITH_LIBKSTAT
1134 uptime_la_LIBADD += -lkstat
1136 if BUILD_WITH_PERFSTAT
1137 uptime_la_LIBADD += -lperfstat
1141 if BUILD_PLUGIN_USERS
1142 pkglib_LTLIBRARIES += users.la
1143 users_la_SOURCES = users.c
1144 users_la_CFLAGS = $(AM_CFLAGS)
1145 users_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1147 if BUILD_WITH_LIBSTATGRAB
1148 users_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1149 users_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1153 if BUILD_PLUGIN_UUID
1154 pkglib_LTLIBRARIES += uuid.la
1155 uuid_la_SOURCES = uuid.c
1156 uuid_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBHAL_CFLAGS)
1157 uuid_la_LIBADD = $(BUILD_WITH_LIBHAL_LIBS)
1158 uuid_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1161 if BUILD_PLUGIN_VARNISH
1162 pkglib_LTLIBRARIES += varnish.la
1163 varnish_la_SOURCES = varnish.c
1164 varnish_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1165 varnish_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBVARNISH_CFLAGS)
1166 varnish_la_LIBADD = $(BUILD_WITH_LIBVARNISH_LIBS)
1169 if BUILD_PLUGIN_VIRT
1170 pkglib_LTLIBRARIES += virt.la
1171 virt_la_SOURCES = virt.c \
1172 utils_ignorelist.c utils_ignorelist.h
1173 virt_la_CFLAGS = $(AM_CFLAGS) \
1174 $(BUILD_WITH_LIBVIRT_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
1175 virt_la_LIBADD = $(BUILD_WITH_LIBVIRT_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
1176 virt_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1179 if BUILD_PLUGIN_VMEM
1180 pkglib_LTLIBRARIES += vmem.la
1181 vmem_la_SOURCES = vmem.c
1182 vmem_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1185 if BUILD_PLUGIN_VSERVER
1186 pkglib_LTLIBRARIES += vserver.la
1187 vserver_la_SOURCES = vserver.c
1188 vserver_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1191 if BUILD_PLUGIN_WIRELESS
1192 pkglib_LTLIBRARIES += wireless.la
1193 wireless_la_SOURCES = wireless.c
1194 wireless_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1197 if BUILD_PLUGIN_WRITE_GRAPHITE
1198 pkglib_LTLIBRARIES += write_graphite.la
1199 write_graphite_la_SOURCES = write_graphite.c \
1200 utils_format_graphite.c utils_format_graphite.h \
1201 utils_format_json.c utils_format_json.h
1202 write_graphite_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1205 if BUILD_PLUGIN_WRITE_HTTP
1206 pkglib_LTLIBRARIES += write_http.la
1207 write_http_la_SOURCES = write_http.c \
1208 utils_format_json.c utils_format_json.h
1209 write_http_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1210 write_http_la_CFLAGS = $(AM_CFLAGS)
1211 write_http_la_LIBADD =
1212 if BUILD_WITH_LIBCURL
1213 write_http_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
1214 write_http_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
1218 if BUILD_PLUGIN_WRITE_KAFKA
1219 pkglib_LTLIBRARIES += write_kafka.la
1220 write_kafka_la_SOURCES = write_kafka.c \
1221 utils_format_graphite.c utils_format_graphite.h \
1222 utils_format_json.c utils_format_json.h \
1223 utils_cmd_putval.c utils_cmd_putval.h \
1224 utils_crc32.c utils_crc32.h
1225 write_kafka_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBRDKAFKA_CPPFLAGS)
1226 write_kafka_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRDKAFKA_LDFLAGS)
1227 write_kafka_la_LIBADD = $(BUILD_WITH_LIBRDKAFKA_LIBS)
1230 if BUILD_PLUGIN_WRITE_LOG
1231 pkglib_LTLIBRARIES += write_log.la
1232 write_log_la_SOURCES = write_log.c \
1233 utils_format_graphite.c utils_format_graphite.h
1234 write_log_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1237 if BUILD_PLUGIN_WRITE_MONGODB
1238 pkglib_LTLIBRARIES += write_mongodb.la
1239 write_mongodb_la_SOURCES = write_mongodb.c
1240 write_mongodb_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMONGOC_CPPFLAGS)
1241 write_mongodb_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMONGOC_LDFLAGS)
1242 write_mongodb_la_LIBADD = -lmongoc
1245 if BUILD_PLUGIN_WRITE_REDIS
1246 pkglib_LTLIBRARIES += write_redis.la
1247 write_redis_la_SOURCES = write_redis.c
1248 write_redis_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBHIREDIS_LDFLAGS)
1249 write_redis_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBHIREDIS_CPPFLAGS)
1250 write_redis_la_LIBADD = -lhiredis
1253 if BUILD_PLUGIN_WRITE_RIEMANN
1254 pkglib_LTLIBRARIES += write_riemann.la
1255 write_riemann_la_SOURCES = write_riemann.c write_riemann_threshold.c
1256 nodist_write_riemann_la_SOURCES = riemann.pb-c.c riemann.pb-c.h
1257 write_riemann_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1258 write_riemann_la_LIBADD = -lprotobuf-c
1261 if BUILD_PLUGIN_WRITE_SENSU
1262 pkglib_LTLIBRARIES += write_sensu.la
1263 write_sensu_la_SOURCES = write_sensu.c
1264 write_sensu_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1267 if BUILD_PLUGIN_WRITE_TSDB
1268 pkglib_LTLIBRARIES += write_tsdb.la
1269 write_tsdb_la_SOURCES = write_tsdb.c
1270 write_tsdb_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1273 if BUILD_PLUGIN_XMMS
1274 pkglib_LTLIBRARIES += xmms.la
1275 xmms_la_SOURCES = xmms.c
1276 xmms_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBXMMS_CFLAGS)
1277 xmms_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1278 xmms_la_LIBADD = $(BUILD_WITH_LIBXMMS_LIBS)
1281 if BUILD_PLUGIN_ZFS_ARC
1282 pkglib_LTLIBRARIES += zfs_arc.la
1283 zfs_arc_la_SOURCES = zfs_arc.c
1284 zfs_arc_la_CFLAGS = $(AM_CFLAGS)
1285 zfs_arc_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1287 zfs_arc_la_LIBADD = -lm
1290 # zfs_arc requires no library on linux
1293 zfs_arc_la_LIBADD = -lkstat
1298 if BUILD_PLUGIN_ZOOKEEPER
1299 pkglib_LTLIBRARIES += zookeeper.la
1300 zookeeper_la_SOURCES = zookeeper.c
1301 zookeeper_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1304 BUILT_SOURCES += $(dist_man_MANS)
1306 if BUILD_PLUGIN_ZONE
1307 pkglib_LTLIBRARIES += zone.la
1308 zone_la_SOURCES = zone.c
1309 zone_la_CFLAGS = $(AM_CFLAGS)
1310 zone_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1313 dist_man_MANS = collectd.1 \
1325 collectd-threshold.5 \
1326 collectd-unixsock.5 \
1329 #collectd_1_SOURCES = collectd.pod
1331 EXTRA_DIST = types.db
1333 EXTRA_DIST += collectd.conf.pod \
1334 collectd-email.pod \
1339 collectd-nagios.pod \
1341 collectd-python.pod \
1345 collectd-threshold.pod \
1346 collectd-unixsock.pod \
1347 postgresql_default.conf \
1351 pod2man --release=$(VERSION) --center=$(PACKAGE) $< \
1352 >.pod2man.tmp.$$$$ 2>/dev/null && mv -f .pod2man.tmp.$$$$ $@ || true
1353 @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
1355 echo "$@ has some POD errors!"; false; \
1359 pod2man --section=5 --release=$(VERSION) --center=$(PACKAGE) $< \
1360 >.pod2man.tmp.$$$$ 2>/dev/null && mv -f .pod2man.tmp.$$$$ $@ || true
1361 @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
1363 echo "$@ has some POD errors!"; false; \
1366 # Protocol buffer for the "pinba" plugin.
1367 EXTRA_DIST += pinba.proto
1369 CLEANFILES += pinba.pb-c.c pinba.pb-c.h
1370 BUILT_SOURCES += pinba.pb-c.c pinba.pb-c.h
1372 pinba.pb-c.c pinba.pb-c.h: pinba.proto
1373 protoc-c -I$(srcdir) --c_out . $(srcdir)/pinba.proto
1376 # Protocol buffer for the "write_riemann" plugin.
1377 EXTRA_DIST += riemann.proto
1379 CLEANFILES += riemann.pb-c.c riemann.pb-c.h
1381 BUILT_SOURCES += riemann.pb-c.c riemann.pb-c.h
1383 riemann.pb-c.c riemann.pb-c.h: riemann.proto
1384 protoc-c -I$(srcdir) --c_out . $(srcdir)/riemann.proto
1388 $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
1389 if test -e $(DESTDIR)$(sysconfdir)/collectd.conf; \
1391 $(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf.pkg-orig; \
1393 $(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf; \
1395 $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
1396 $(INSTALL) -m 0644 $(srcdir)/types.db $(DESTDIR)$(pkgdatadir)/types.db;
1397 $(INSTALL) -m 0644 $(srcdir)/postgresql_default.conf \
1398 $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;
1401 rm -f $(DESTDIR)$(pkgdatadir)/types.db;
1402 rm -f $(DESTDIR)$(sysconfdir)/collectd.conf
1403 rm -f $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;