1 SUBDIRS = libcollectdclient
2 if BUILD_WITH_OWN_LIBOCONFIG
7 AM_CFLAGS = -Wall -Werror
10 AM_CPPFLAGS = -DPREFIX='"${prefix}"'
11 AM_CPPFLAGS += -DCONFIGFILE='"${sysconfdir}/${PACKAGE_NAME}.conf"'
12 AM_CPPFLAGS += -DLOCALSTATEDIR='"${localstatedir}"'
13 AM_CPPFLAGS += -DPKGLOCALSTATEDIR='"${localstatedir}/lib/${PACKAGE_NAME}"'
14 if BUILD_FEATURE_DAEMON
15 AM_CPPFLAGS += -DPIDFILE='"${localstatedir}/run/${PACKAGE_NAME}.pid"'
17 AM_CPPFLAGS += -DPLUGINDIR='"${pkglibdir}"'
18 AM_CPPFLAGS += -DPKGDATADIR='"${pkgdatadir}"'
20 sbin_PROGRAMS = collectd collectdmon
21 bin_PROGRAMS = collectd-nagios collectdctl
23 collectd_SOURCES = collectd.c collectd.h \
25 configfile.c configfile.h \
26 filter_chain.c filter_chain.h \
27 meta_data.c meta_data.h \
29 utils_avltree.c utils_avltree.h \
30 utils_cache.c utils_cache.h \
31 utils_complain.c utils_complain.h \
32 utils_heap.c utils_heap.h \
33 utils_ignorelist.c utils_ignorelist.h \
34 utils_llist.c utils_llist.h \
35 utils_parse_option.c utils_parse_option.h \
36 utils_tail_match.c utils_tail_match.h \
37 utils_match.c utils_match.h \
38 utils_subst.c utils_subst.h \
39 utils_tail.c utils_tail.h \
40 utils_time.c utils_time.h \
41 types_list.c types_list.h
43 collectd_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL)
44 collectd_CFLAGS = $(AM_CFLAGS)
45 collectd_LDFLAGS = -export-dynamic
47 collectd_DEPENDENCIES =
49 # Link to these libraries..
51 collectd_LDADD += -lrt
53 if BUILD_WITH_LIBPOSIX4
54 collectd_LDADD += -lposix4
56 if BUILD_WITH_LIBSOCKET
57 collectd_LDADD += -lsocket
59 if BUILD_WITH_LIBRESOLV
60 collectd_LDADD += -lresolv
62 if BUILD_WITH_LIBPTHREAD
63 collectd_LDADD += -lpthread
65 if BUILD_WITH_LIBKSTAT
66 collectd_LDADD += -lkstat
68 if BUILD_WITH_LIBDEVINFO
69 collectd_LDADD += -ldevinfo
72 collectd_LDFLAGS += -Wl,-bexpall,-brtllib
75 # The daemon needs to call sg_init, so we need to link it against libstatgrab,
77 if BUILD_WITH_LIBSTATGRAB
78 collectd_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
79 collectd_LDADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
82 if BUILD_WITH_OWN_LIBOCONFIG
83 collectd_LDADD += $(LIBLTDL) liboconfig/liboconfig.la
84 collectd_DEPENDENCIES += liboconfig/liboconfig.la
86 collectd_LDADD += -loconfig
89 collectdmon_SOURCES = collectdmon.c
90 collectdmon_CPPFLAGS = $(AM_CPPFLAGS)
92 collectd_nagios_SOURCES = collectd-nagios.c
93 collectd_nagios_LDADD =
94 if BUILD_WITH_LIBSOCKET
95 collectd_nagios_LDADD += -lsocket
98 collectd_nagios_LDADD += -lm
101 collectd_nagios_LDADD += libcollectdclient/libcollectdclient.la
102 collectd_nagios_DEPENDENCIES = libcollectdclient/libcollectdclient.la
105 collectdctl_SOURCES = collectdctl.c
107 if BUILD_WITH_LIBSOCKET
108 collectdctl_LDADD += -lsocket
111 collectdctl_LDADD += -lm
113 collectdctl_LDADD += libcollectdclient/libcollectdclient.la
114 collectdctl_DEPENDENCIES = libcollectdclient/libcollectdclient.la
123 pkglib_LTLIBRARIES += amqp.la
124 amqp_la_SOURCES = amqp.c \
125 utils_cmd_putval.c utils_cmd_putval.h \
126 utils_format_graphite.c utils_format_graphite.h \
127 utils_format_json.c utils_format_json.h
128 amqp_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBRABBITMQ_LDFLAGS)
129 amqp_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBRABBITMQ_CPPFLAGS)
130 amqp_la_LIBADD = $(BUILD_WITH_LIBRABBITMQ_LIBS)
131 collectd_LDADD += "-dlopen" amqp.la
132 collectd_DEPENDENCIES += amqp.la
135 if BUILD_PLUGIN_APACHE
136 pkglib_LTLIBRARIES += apache.la
137 apache_la_SOURCES = apache.c
138 apache_la_LDFLAGS = -module -avoid-version
139 apache_la_CFLAGS = $(AM_CFLAGS)
141 collectd_LDADD += "-dlopen" apache.la
142 if BUILD_WITH_LIBCURL
143 apache_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
144 apache_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
146 collectd_DEPENDENCIES += apache.la
149 if BUILD_PLUGIN_APCUPS
150 pkglib_LTLIBRARIES += apcups.la
151 apcups_la_SOURCES = apcups.c
152 apcups_la_LDFLAGS = -module -avoid-version
154 if BUILD_WITH_LIBSOCKET
155 apcups_la_LIBADD += -lsocket
157 collectd_LDADD += "-dlopen" apcups.la
158 collectd_DEPENDENCIES += apcups.la
161 if BUILD_PLUGIN_APPLE_SENSORS
162 pkglib_LTLIBRARIES += apple_sensors.la
163 apple_sensors_la_SOURCES = apple_sensors.c
164 apple_sensors_la_LDFLAGS = -module -avoid-version
165 apple_sensors_la_LIBADD = -lIOKit
166 collectd_LDADD += "-dlopen" apple_sensors.la
167 collectd_DEPENDENCIES += apple_sensors.la
170 if BUILD_PLUGIN_ASCENT
171 pkglib_LTLIBRARIES += ascent.la
172 ascent_la_SOURCES = ascent.c
173 ascent_la_LDFLAGS = -module -avoid-version
174 ascent_la_CFLAGS = $(AM_CFLAGS) \
175 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
176 ascent_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
177 collectd_LDADD += "-dlopen" ascent.la
178 collectd_DEPENDENCIES += ascent.la
181 if BUILD_PLUGIN_BATTERY
182 pkglib_LTLIBRARIES += battery.la
183 battery_la_SOURCES = battery.c
184 battery_la_LDFLAGS = -module -avoid-version
186 if BUILD_WITH_LIBIOKIT
187 battery_la_LIBADD += -lIOKit
189 collectd_LDADD += "-dlopen" battery.la
190 collectd_DEPENDENCIES += battery.la
194 pkglib_LTLIBRARIES += bind.la
195 bind_la_SOURCES = bind.c
196 bind_la_LDFLAGS = -module -avoid-version
197 bind_la_CFLAGS = $(AM_CFLAGS) \
198 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
199 bind_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
200 collectd_LDADD += "-dlopen" bind.la
201 collectd_DEPENDENCIES += bind.la
204 if BUILD_PLUGIN_CONNTRACK
205 pkglib_LTLIBRARIES += conntrack.la
206 conntrack_la_SOURCES = conntrack.c
207 conntrack_la_LDFLAGS = -module -avoid-version
208 collectd_LDADD += "-dlopen" conntrack.la
209 collectd_DEPENDENCIES += conntrack.la
212 if BUILD_PLUGIN_CONTEXTSWITCH
213 pkglib_LTLIBRARIES += contextswitch.la
214 contextswitch_la_SOURCES = contextswitch.c
215 contextswitch_la_LDFLAGS = -module -avoid-version
216 contextswitch_la_LIBADD =
217 if BUILD_WITH_PERFSTAT
218 contextswitch_la_LIBADD += -lperfstat
220 collectd_LDADD += "-dlopen" contextswitch.la
221 collectd_DEPENDENCIES += contextswitch.la
225 pkglib_LTLIBRARIES += cpu.la
226 cpu_la_SOURCES = cpu.c
227 cpu_la_CFLAGS = $(AM_CFLAGS)
228 cpu_la_LDFLAGS = -module -avoid-version
230 if BUILD_WITH_LIBKSTAT
231 cpu_la_LIBADD += -lkstat
233 if BUILD_WITH_LIBDEVINFO
234 cpu_la_LIBADD += -ldevinfo
236 if BUILD_WITH_LIBSTATGRAB
237 cpu_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
238 cpu_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
240 if BUILD_WITH_PERFSTAT
241 cpu_la_LIBADD += -lperfstat
243 collectd_LDADD += "-dlopen" cpu.la
244 collectd_DEPENDENCIES += cpu.la
247 if BUILD_PLUGIN_CPUFREQ
248 pkglib_LTLIBRARIES += cpufreq.la
249 cpufreq_la_SOURCES = cpufreq.c
250 cpufreq_la_LDFLAGS = -module -avoid-version
251 collectd_LDADD += "-dlopen" cpufreq.la
252 collectd_DEPENDENCIES += cpufreq.la
256 pkglib_LTLIBRARIES += csv.la
257 csv_la_SOURCES = csv.c
258 csv_la_LDFLAGS = -module -avoid-version
259 collectd_LDADD += "-dlopen" csv.la
260 collectd_DEPENDENCIES += csv.la
264 pkglib_LTLIBRARIES += curl.la
265 curl_la_SOURCES = curl.c
266 curl_la_LDFLAGS = -module -avoid-version
267 curl_la_CFLAGS = $(AM_CFLAGS)
269 collectd_LDADD += "-dlopen" curl.la
270 if BUILD_WITH_LIBCURL
271 curl_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
272 curl_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
274 collectd_DEPENDENCIES += curl.la
277 if BUILD_PLUGIN_CURL_JSON
278 pkglib_LTLIBRARIES += curl_json.la
279 curl_json_la_SOURCES = curl_json.c
280 curl_json_la_CFLAGS = $(AM_CFLAGS)
281 curl_json_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBYAJL_LDFLAGS)
282 curl_json_la_CPPFLAGS = $(BUILD_WITH_LIBYAJL_CPPFLAGS)
283 curl_json_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
284 if BUILD_WITH_LIBCURL
285 curl_json_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
286 curl_json_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
288 collectd_LDADD += "-dlopen" curl_json.la
289 collectd_DEPENDENCIES += curl_json.la
292 if BUILD_PLUGIN_CURL_XML
293 pkglib_LTLIBRARIES += curl_xml.la
294 curl_xml_la_SOURCES = curl_xml.c
295 curl_xml_la_LDFLAGS = -module -avoid-version
296 curl_xml_la_CFLAGS = $(AM_CFLAGS) \
297 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
298 curl_xml_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
299 collectd_LDADD += "-dlopen" curl_xml.la
300 collectd_DEPENDENCIES += curl_xml.la
304 pkglib_LTLIBRARIES += dbi.la
305 dbi_la_SOURCES = dbi.c \
306 utils_db_query.c utils_db_query.h
307 dbi_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBDBI_CPPFLAGS)
308 dbi_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBDBI_LDFLAGS)
309 dbi_la_LIBADD = $(BUILD_WITH_LIBDBI_LIBS)
310 collectd_LDADD += "-dlopen" dbi.la
311 collectd_DEPENDENCIES += dbi.la
315 pkglib_LTLIBRARIES += df.la
316 df_la_SOURCES = df.c utils_mount.c utils_mount.h
317 df_la_LDFLAGS = -module -avoid-version
318 collectd_LDADD += "-dlopen" df.la
319 collectd_DEPENDENCIES += df.la
323 pkglib_LTLIBRARIES += disk.la
324 disk_la_SOURCES = disk.c
325 disk_la_CFLAGS = $(AM_CFLAGS)
326 disk_la_LDFLAGS = -module -avoid-version
328 if BUILD_WITH_LIBKSTAT
329 disk_la_LIBADD += -lkstat
331 if BUILD_WITH_LIBDEVINFO
332 disk_la_LIBADD += -ldevinfo
334 if BUILD_WITH_LIBIOKIT
335 disk_la_LIBADD += -lIOKit
337 if BUILD_WITH_LIBSTATGRAB
338 disk_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
339 disk_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
341 if BUILD_WITH_PERFSTAT
342 disk_la_LIBADD += -lperfstat
344 collectd_LDADD += "-dlopen" disk.la
345 collectd_DEPENDENCIES += disk.la
349 pkglib_LTLIBRARIES += dns.la
350 dns_la_SOURCES = dns.c utils_dns.c utils_dns.h
351 dns_la_LDFLAGS = -module -avoid-version
352 dns_la_LIBADD = -lpcap -lpthread
353 collectd_LDADD += "-dlopen" dns.la
354 collectd_DEPENDENCIES += dns.la
357 if BUILD_PLUGIN_EMAIL
358 pkglib_LTLIBRARIES += email.la
359 email_la_SOURCES = email.c
360 email_la_LDFLAGS = -module -avoid-version
361 email_la_LIBADD = -lpthread
362 collectd_LDADD += "-dlopen" email.la
363 collectd_DEPENDENCIES += email.la
366 if BUILD_PLUGIN_ENTROPY
367 pkglib_LTLIBRARIES += entropy.la
368 entropy_la_SOURCES = entropy.c
369 entropy_la_LDFLAGS = -module -avoid-version
370 collectd_LDADD += "-dlopen" entropy.la
371 collectd_DEPENDENCIES += entropy.la
375 pkglib_LTLIBRARIES += exec.la
376 exec_la_SOURCES = exec.c \
377 utils_cmd_putnotif.c utils_cmd_putnotif.h \
378 utils_cmd_putval.c utils_cmd_putval.h
379 exec_la_LDFLAGS = -module -avoid-version
380 exec_la_LIBADD = -lpthread
381 collectd_LDADD += "-dlopen" exec.la
382 collectd_DEPENDENCIES += exec.la
385 if BUILD_PLUGIN_ETHSTAT
386 pkglib_LTLIBRARIES += ethstat.la
387 ethstat_la_SOURCES = ethstat.c
388 ethstat_la_LDFLAGS = -module -avoid-version
389 collectd_LDADD += "-dlopen" ethstat.la
390 collectd_DEPENDENCIES += ethstat.la
393 if BUILD_PLUGIN_FILECOUNT
394 pkglib_LTLIBRARIES += filecount.la
395 filecount_la_SOURCES = filecount.c
396 filecount_la_LDFLAGS = -module -avoid-version
397 collectd_LDADD += "-dlopen" filecount.la
398 collectd_DEPENDENCIES += filecount.la
401 if BUILD_PLUGIN_GMOND
402 pkglib_LTLIBRARIES += gmond.la
403 gmond_la_SOURCES = gmond.c
404 gmond_la_CPPFLAGS = $(AM_CPPFLAGS) $(GANGLIA_CPPFLAGS)
405 gmond_la_LDFLAGS = -module -avoid-version $(GANGLIA_LDFLAGS)
406 gmond_la_LIBADD = $(GANGLIA_LIBS)
407 collectd_LDADD += "-dlopen" gmond.la
408 collectd_DEPENDENCIES += gmond.la
411 if BUILD_PLUGIN_HDDTEMP
412 pkglib_LTLIBRARIES += hddtemp.la
413 hddtemp_la_SOURCES = hddtemp.c
414 hddtemp_la_LDFLAGS = -module -avoid-version
416 if BUILD_WITH_LIBSOCKET
417 hddtemp_la_LIBADD += -lsocket
419 collectd_LDADD += "-dlopen" hddtemp.la
420 collectd_DEPENDENCIES += hddtemp.la
423 if BUILD_PLUGIN_INTERFACE
424 pkglib_LTLIBRARIES += interface.la
425 interface_la_SOURCES = interface.c
426 interface_la_CFLAGS = $(AM_CFLAGS)
427 interface_la_LDFLAGS = -module -avoid-version
428 interface_la_LIBADD =
429 collectd_LDADD += "-dlopen" interface.la
430 collectd_DEPENDENCIES += interface.la
431 if BUILD_WITH_LIBSTATGRAB
432 interface_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
433 interface_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
435 if BUILD_WITH_LIBKSTAT
436 interface_la_LIBADD += -lkstat
438 if BUILD_WITH_LIBDEVINFO
439 interface_la_LIBADD += -ldevinfo
440 endif # BUILD_WITH_LIBDEVINFO
441 endif # !BUILD_WITH_LIBSTATGRAB
442 if BUILD_WITH_PERFSTAT
443 interface_la_LIBADD += -lperfstat
445 endif # BUILD_PLUGIN_INTERFACE
447 if BUILD_PLUGIN_IPTABLES
448 pkglib_LTLIBRARIES += iptables.la
449 iptables_la_SOURCES = iptables.c
450 iptables_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBIPTC_CPPFLAGS)
451 iptables_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBIPTC_LDFLAGS)
452 iptables_la_LIBADD = -liptc
453 collectd_LDADD += "-dlopen" iptables.la
454 collectd_DEPENDENCIES += iptables.la
458 pkglib_LTLIBRARIES += ipmi.la
459 ipmi_la_SOURCES = ipmi.c
460 ipmi_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_OPENIPMI_CFLAGS)
461 ipmi_la_LDFLAGS = -module -avoid-version
462 ipmi_la_LIBADD = $(BUILD_WITH_OPENIPMI_LIBS)
463 collectd_LDADD += "-dlopen" ipmi.la
464 collectd_DEPENDENCIES += ipmi.la
468 pkglib_LTLIBRARIES += ipvs.la
469 ipvs_la_SOURCES = ipvs.c
470 if IP_VS_H_NEEDS_KERNEL_CFLAGS
471 ipvs_la_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS)
473 ipvs_la_LDFLAGS = -module -avoid-version
474 collectd_LDADD += "-dlopen" ipvs.la
475 collectd_DEPENDENCIES += ipvs.la
479 pkglib_LTLIBRARIES += irq.la
480 irq_la_SOURCES = irq.c
481 irq_la_LDFLAGS = -module -avoid-version
482 collectd_LDADD += "-dlopen" irq.la
483 collectd_DEPENDENCIES += irq.la
487 pkglib_LTLIBRARIES += java.la
488 java_la_SOURCES = java.c
489 java_la_CPPFLAGS = $(AM_CPPFLAGS) $(JAVA_CPPFLAGS)
490 java_la_CFLAGS = $(AM_CFLAGS) $(JAVA_CFLAGS)
491 java_la_LDFLAGS = -module -avoid-version $(JAVA_LDFLAGS)
492 java_la_LIBADD = $(JAVA_LIBS)
493 collectd_LDADD += "-dlopen" java.la
494 collectd_DEPENDENCIES += java.la
497 if BUILD_PLUGIN_LIBVIRT
498 pkglib_LTLIBRARIES += libvirt.la
499 libvirt_la_SOURCES = libvirt.c
500 libvirt_la_CFLAGS = $(AM_CFLAGS) \
501 $(BUILD_WITH_LIBVIRT_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
502 libvirt_la_LIBADD = $(BUILD_WITH_LIBVIRT_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
503 libvirt_la_LDFLAGS = -module -avoid-version
504 collectd_LDADD += "-dlopen" libvirt.la
505 collectd_DEPENDENCIES += libvirt.la
509 pkglib_LTLIBRARIES += load.la
510 load_la_SOURCES = load.c
511 load_la_CFLAGS = $(AM_CFLAGS)
512 load_la_LDFLAGS = -module -avoid-version
514 collectd_LDADD += "-dlopen" load.la
515 collectd_DEPENDENCIES += load.la
516 if BUILD_WITH_LIBSTATGRAB
517 load_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
518 load_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
519 endif # BUILD_WITH_LIBSTATGRAB
520 if BUILD_WITH_PERFSTAT
521 load_la_LIBADD += -lperfstat
523 endif # BUILD_PLUGIN_LOAD
525 if BUILD_PLUGIN_LOGFILE
526 pkglib_LTLIBRARIES += logfile.la
527 logfile_la_SOURCES = logfile.c
528 logfile_la_LDFLAGS = -module -avoid-version
529 collectd_LDADD += "-dlopen" logfile.la
530 collectd_DEPENDENCIES += logfile.la
534 pkglib_LTLIBRARIES += lpar.la
535 lpar_la_SOURCES = lpar.c
536 lpar_la_LDFLAGS = -module -avoid-version
537 collectd_LDADD += "-dlopen" lpar.la
538 collectd_DEPENDENCIES += lpar.la
539 lpar_la_LIBADD = -lperfstat
542 if BUILD_PLUGIN_MADWIFI
543 pkglib_LTLIBRARIES += madwifi.la
544 madwifi_la_SOURCES = madwifi.c madwifi.h
545 madwifi_la_LDFLAGS = -module -avoid-version
546 collectd_LDADD += "-dlopen" madwifi.la
547 collectd_DEPENDENCIES += madwifi.la
550 if BUILD_PLUGIN_MATCH_EMPTY_COUNTER
551 pkglib_LTLIBRARIES += match_empty_counter.la
552 match_empty_counter_la_SOURCES = match_empty_counter.c
553 match_empty_counter_la_LDFLAGS = -module -avoid-version
554 collectd_LDADD += "-dlopen" match_empty_counter.la
555 collectd_DEPENDENCIES += match_empty_counter.la
558 if BUILD_PLUGIN_MATCH_HASHED
559 pkglib_LTLIBRARIES += match_hashed.la
560 match_hashed_la_SOURCES = match_hashed.c
561 match_hashed_la_LDFLAGS = -module -avoid-version
562 collectd_LDADD += "-dlopen" match_hashed.la
563 collectd_DEPENDENCIES += match_hashed.la
566 if BUILD_PLUGIN_MATCH_REGEX
567 pkglib_LTLIBRARIES += match_regex.la
568 match_regex_la_SOURCES = match_regex.c
569 match_regex_la_LDFLAGS = -module -avoid-version
570 collectd_LDADD += "-dlopen" match_regex.la
571 collectd_DEPENDENCIES += match_regex.la
574 if BUILD_PLUGIN_MATCH_TIMEDIFF
575 pkglib_LTLIBRARIES += match_timediff.la
576 match_timediff_la_SOURCES = match_timediff.c
577 match_timediff_la_LDFLAGS = -module -avoid-version
578 collectd_LDADD += "-dlopen" match_timediff.la
579 collectd_DEPENDENCIES += match_timediff.la
582 if BUILD_PLUGIN_MATCH_VALUE
583 pkglib_LTLIBRARIES += match_value.la
584 match_value_la_SOURCES = match_value.c
585 match_value_la_LDFLAGS = -module -avoid-version
586 collectd_LDADD += "-dlopen" match_value.la
587 collectd_DEPENDENCIES += match_value.la
590 if BUILD_PLUGIN_MBMON
591 pkglib_LTLIBRARIES += mbmon.la
592 mbmon_la_SOURCES = mbmon.c
593 mbmon_la_LDFLAGS = -module -avoid-version
595 if BUILD_WITH_LIBSOCKET
596 mbmon_la_LIBADD += -lsocket
598 collectd_LDADD += "-dlopen" mbmon.la
599 collectd_DEPENDENCIES += mbmon.la
603 pkglib_LTLIBRARIES += md.la
605 md_la_LDFLAGS = -module -avoid-version
606 collectd_LDADD += "-dlopen" md.la
607 collectd_DEPENDENCIES += md.la
610 if BUILD_PLUGIN_MEMCACHEC
611 pkglib_LTLIBRARIES += memcachec.la
612 memcachec_la_SOURCES = memcachec.c
613 memcachec_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBMEMCACHED_LDFLAGS)
614 memcachec_la_CPPFLAGS = $(BUILD_WITH_LIBMEMCACHED_CPPFLAGS)
615 memcachec_la_LIBADD = $(BUILD_WITH_LIBMEMCACHED_LIBS)
616 collectd_LDADD += "-dlopen" memcachec.la
617 collectd_DEPENDENCIES += memcachec.la
620 if BUILD_PLUGIN_MEMCACHED
621 pkglib_LTLIBRARIES += memcached.la
622 memcached_la_SOURCES = memcached.c
623 memcached_la_LDFLAGS = -module -avoid-version
624 memcached_la_LIBADD =
625 if BUILD_WITH_LIBSOCKET
626 memcached_la_LIBADD += -lsocket
628 collectd_LDADD += "-dlopen" memcached.la
629 collectd_DEPENDENCIES += memcached.la
632 if BUILD_PLUGIN_MEMORY
633 pkglib_LTLIBRARIES += memory.la
634 memory_la_SOURCES = memory.c
635 memory_la_CFLAGS = $(AM_CFLAGS)
636 memory_la_LDFLAGS = -module -avoid-version
638 collectd_LDADD += "-dlopen" memory.la
639 collectd_DEPENDENCIES += memory.la
640 if BUILD_WITH_LIBKSTAT
641 memory_la_LIBADD += -lkstat
643 if BUILD_WITH_LIBDEVINFO
644 memory_la_LIBADD += -ldevinfo
646 if BUILD_WITH_LIBSTATGRAB
647 memory_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
648 memory_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
650 if BUILD_WITH_PERFSTAT
651 memory_la_LIBADD += -lperfstat
655 if BUILD_PLUGIN_MODBUS
656 pkglib_LTLIBRARIES += modbus.la
657 modbus_la_SOURCES = modbus.c
658 modbus_la_LDFLAGS = -module -avoid-version
659 modbus_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMODBUS_CFLAGS)
660 modbus_la_LIBADD = $(BUILD_WITH_LIBMODBUS_LIBS)
661 collectd_LDADD += "-dlopen" modbus.la
662 collectd_DEPENDENCIES += modbus.la
665 if BUILD_PLUGIN_MULTIMETER
666 pkglib_LTLIBRARIES += multimeter.la
667 multimeter_la_SOURCES = multimeter.c
668 multimeter_la_LDFLAGS = -module -avoid-version
669 collectd_LDADD += "-dlopen" multimeter.la
670 collectd_DEPENDENCIES += multimeter.la
673 if BUILD_PLUGIN_MYSQL
674 pkglib_LTLIBRARIES += mysql.la
675 mysql_la_SOURCES = mysql.c
676 mysql_la_LDFLAGS = -module -avoid-version
677 mysql_la_CFLAGS = $(AM_CFLAGS)
679 collectd_LDADD += "-dlopen" mysql.la
680 if BUILD_WITH_LIBMYSQL
681 mysql_la_CFLAGS += $(BUILD_WITH_LIBMYSQL_CFLAGS)
682 mysql_la_LIBADD += $(BUILD_WITH_LIBMYSQL_LIBS)
684 collectd_DEPENDENCIES += mysql.la
687 if BUILD_PLUGIN_NETAPP
688 pkglib_LTLIBRARIES += netapp.la
689 netapp_la_SOURCES = netapp.c
690 netapp_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBNETAPP_CPPFLAGS)
691 netapp_la_LDFLAGS = -module -avoid-version $(LIBNETAPP_LDFLAGS)
692 netapp_la_LIBADD = $(LIBNETAPP_LIBS)
693 collectd_LDADD += "-dlopen" netapp.la
694 collectd_DEPENDENCIES += netapp.la
697 if BUILD_PLUGIN_NETLINK
698 pkglib_LTLIBRARIES += netlink.la
699 netlink_la_SOURCES = netlink.c
700 netlink_la_LDFLAGS = -module -avoid-version
701 netlink_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBNETLINK_CFLAGS)
702 netlink_la_LIBADD = $(BUILD_WITH_LIBNETLINK_LIBS)
703 collectd_LDADD += "-dlopen" netlink.la
704 collectd_DEPENDENCIES += netlink.la
707 if BUILD_PLUGIN_NETWORK
708 pkglib_LTLIBRARIES += network.la
709 network_la_SOURCES = network.c network.h \
710 utils_fbhash.c utils_fbhash.h
711 network_la_CPPFLAGS = $(AM_CPPFLAGS)
712 network_la_LDFLAGS = -module -avoid-version
713 network_la_LIBADD = -lpthread
714 if BUILD_WITH_LIBSOCKET
715 network_la_LIBADD += -lsocket
717 if BUILD_WITH_LIBGCRYPT
718 network_la_CPPFLAGS += $(GCRYPT_CPPFLAGS)
719 network_la_LDFLAGS += $(GCRYPT_LDFLAGS)
720 network_la_LIBADD += $(GCRYPT_LIBS)
722 collectd_LDADD += "-dlopen" network.la
723 collectd_DEPENDENCIES += network.la
727 pkglib_LTLIBRARIES += nfs.la
728 nfs_la_SOURCES = nfs.c
729 nfs_la_LDFLAGS = -module -avoid-version
730 collectd_LDADD += "-dlopen" nfs.la
731 collectd_DEPENDENCIES += nfs.la
734 if BUILD_PLUGIN_FSCACHE
735 pkglib_LTLIBRARIES += fscache.la
736 fscache_la_SOURCES = fscache.c
737 fscache_la_LDFLAGS = -module -avoid-version
738 collectd_LDADD += "-dlopen" fscache.la
739 collectd_DEPENDENCIES += fscache.la
742 if BUILD_PLUGIN_NGINX
743 pkglib_LTLIBRARIES += nginx.la
744 nginx_la_SOURCES = nginx.c
745 nginx_la_CFLAGS = $(AM_CFLAGS)
747 nginx_la_LDFLAGS = -module -avoid-version
748 if BUILD_WITH_LIBCURL
749 nginx_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
750 nginx_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
752 collectd_LDADD += "-dlopen" nginx.la
753 collectd_DEPENDENCIES += nginx.la
756 if BUILD_PLUGIN_NOTIFY_DESKTOP
757 pkglib_LTLIBRARIES += notify_desktop.la
758 notify_desktop_la_SOURCES = notify_desktop.c
759 notify_desktop_la_CFLAGS = $(AM_CFLAGS) $(LIBNOTIFY_CFLAGS)
760 notify_desktop_la_LDFLAGS = -module -avoid-version
761 notify_desktop_la_LIBADD = $(LIBNOTIFY_LIBS)
762 collectd_LDADD += "-dlopen" notify_desktop.la
763 collectd_DEPENDENCIES += notify_desktop.la
766 if BUILD_PLUGIN_NOTIFY_EMAIL
767 pkglib_LTLIBRARIES += notify_email.la
768 notify_email_la_SOURCES = notify_email.c
769 notify_email_la_LDFLAGS = -module -avoid-version
770 notify_email_la_LIBADD = -lesmtp -lssl -lcrypto -lpthread -ldl
771 collectd_LDADD += "-dlopen" notify_email.la
772 collectd_DEPENDENCIES += notify_email.la
776 pkglib_LTLIBRARIES += ntpd.la
777 ntpd_la_SOURCES = ntpd.c
778 ntpd_la_LDFLAGS = -module -avoid-version
780 if BUILD_WITH_LIBSOCKET
781 ntpd_la_LIBADD += -lsocket
783 collectd_LDADD += "-dlopen" ntpd.la
784 collectd_DEPENDENCIES += ntpd.la
788 pkglib_LTLIBRARIES += numa.la
789 numa_la_SOURCES = numa.c
790 numa_la_LDFLAGS = -module -avoid-version
791 collectd_LDADD += "-dlopen" numa.la
792 collectd_DEPENDENCIES += numa.la
796 pkglib_LTLIBRARIES += nut.la
797 nut_la_SOURCES = nut.c
798 nut_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
799 nut_la_LDFLAGS = -module -avoid-version
800 nut_la_LIBADD = -lpthread $(BUILD_WITH_LIBUPSCLIENT_LIBS)
801 collectd_LDADD += "-dlopen" nut.la
802 collectd_DEPENDENCIES += nut.la
805 if BUILD_PLUGIN_OLSRD
806 pkglib_LTLIBRARIES += olsrd.la
807 olsrd_la_SOURCES = olsrd.c
808 olsrd_la_LDFLAGS = -module -avoid-version
810 if BUILD_WITH_LIBSOCKET
811 olsrd_la_LIBADD += -lsocket
813 collectd_LDADD += "-dlopen" olsrd.la
814 collectd_DEPENDENCIES += olsrd.la
817 if BUILD_PLUGIN_ONEWIRE
818 pkglib_LTLIBRARIES += onewire.la
819 onewire_la_SOURCES = onewire.c
820 onewire_la_CFLAGS = $(AM_CFLAGS)
821 onewire_la_CPPFLAGS = $(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
822 onewire_la_LIBADD = $(BUILD_WITH_LIBOWCAPI_LIBS)
823 onewire_la_LDFLAGS = -module -avoid-version
824 collectd_LDADD += "-dlopen" onewire.la
825 collectd_DEPENDENCIES += onewire.la
828 if BUILD_PLUGIN_OPENVPN
829 pkglib_LTLIBRARIES += openvpn.la
830 openvpn_la_SOURCES = openvpn.c
831 openvpn_la_CFLAGS = $(AM_CFLAGS)
832 openvpn_la_LDFLAGS = -module -avoid-version
833 collectd_LDADD += "-dlopen" openvpn.la
834 collectd_DEPENDENCIES += openvpn.la
837 if BUILD_PLUGIN_ORACLE
838 pkglib_LTLIBRARIES += oracle.la
839 oracle_la_SOURCES = oracle.c \
840 utils_db_query.c utils_db_query.h
841 oracle_la_CFLAGS = $(AM_CFLAGS)
842 oracle_la_CPPFLAGS = $(BUILD_WITH_ORACLE_CFLAGS)
843 oracle_la_LIBADD = $(BUILD_WITH_ORACLE_LIBS)
844 oracle_la_LDFLAGS = -module -avoid-version
845 collectd_LDADD += "-dlopen" oracle.la
846 collectd_DEPENDENCIES += oracle.la
850 pkglib_LTLIBRARIES += perl.la
851 perl_la_SOURCES = perl.c
852 # Despite C99 providing the "bool" type thru stdbool.h, Perl defines its own
853 # version of that type if HAS_BOOL is not defined... *sigh*
854 perl_la_CPPFLAGS = $(AM_CPPFLAGS) -DHAS_BOOL=1
855 perl_la_CFLAGS = $(AM_CFLAGS) \
857 -DXS_VERSION=\"$(VERSION)\" -DVERSION=\"$(VERSION)\"
858 # Work-around for issues #41 and #42 - Perl 5.10 incorrectly introduced
859 # __attribute__nonnull__(3) for Perl_load_module().
860 if HAVE_BROKEN_PERL_LOAD_MODULE
861 perl_la_CFLAGS += -Wno-nonnull
863 perl_la_LDFLAGS = -module -avoid-version \
865 collectd_LDADD += "-dlopen" perl.la
866 collectd_DEPENDENCIES += perl.la
869 if BUILD_PLUGIN_PINBA
870 BUILT_SOURCES += pinba.pb-c.c pinba.pb-c.h
871 CLEANFILES += pinba.pb-c.c pinba.pb-c.h
872 pkglib_LTLIBRARIES += pinba.la
873 pinba_la_SOURCES = pinba.c
874 pinba_la_LDFLAGS = -module -avoid-version
875 pinba_la_LIBADD = -lprotobuf-c
876 collectd_LDADD += "-dlopen" pinba.la
877 collectd_DEPENDENCIES += pinba.la
881 pkglib_LTLIBRARIES += ping.la
882 ping_la_SOURCES = ping.c
883 ping_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOPING_CPPFLAGS)
884 ping_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBOPING_LDFLAGS)
885 ping_la_LIBADD = -loping -lm
886 collectd_LDADD += "-dlopen" ping.la
887 collectd_DEPENDENCIES += ping.la
890 if BUILD_PLUGIN_POSTGRESQL
891 pkglib_LTLIBRARIES += postgresql.la
892 postgresql_la_SOURCES = postgresql.c \
893 utils_db_query.c utils_db_query.h
894 postgresql_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPQ_CPPFLAGS)
895 postgresql_la_LDFLAGS = -module -avoid-version \
896 $(BUILD_WITH_LIBPQ_LDFLAGS)
897 postgresql_la_LIBADD = -lpq
898 collectd_LDADD += "-dlopen" postgresql.la
899 collectd_DEPENDENCIES += postgresql.la
902 if BUILD_PLUGIN_POWERDNS
903 pkglib_LTLIBRARIES += powerdns.la
904 powerdns_la_SOURCES = powerdns.c
905 powerdns_la_LDFLAGS = -module -avoid-version
906 collectd_LDADD += "-dlopen" powerdns.la
907 collectd_DEPENDENCIES += powerdns.la
910 if BUILD_PLUGIN_PYTHON
911 pkglib_LTLIBRARIES += python.la
912 python_la_SOURCES = python.c pyconfig.c pyvalues.c cpython.h
913 python_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_PYTHON_CPPFLAGS)
914 python_la_CFLAGS = $(AM_CFLAGS)
916 python_la_CFLAGS += -fno-strict-aliasing -Wno-strict-aliasing
918 python_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_PYTHON_LDFLAGS)
919 python_la_LIBADD = $(BUILD_WITH_PYTHON_LIBS)
920 collectd_LDADD += "-dlopen" python.la
921 collectd_DEPENDENCIES += python.la
924 if BUILD_PLUGIN_PROCESSES
925 pkglib_LTLIBRARIES += processes.la
926 processes_la_SOURCES = processes.c
927 processes_la_LDFLAGS = -module -avoid-version
928 processes_la_LIBADD =
929 collectd_LDADD += "-dlopen" processes.la
930 collectd_DEPENDENCIES += processes.la
931 if BUILD_WITH_LIBKVM_GETPROCS
932 processes_la_LIBADD += -lkvm
936 if BUILD_PLUGIN_PROTOCOLS
937 pkglib_LTLIBRARIES += protocols.la
938 protocols_la_SOURCES = protocols.c
939 protocols_la_LDFLAGS = -module -avoid-version
940 collectd_LDADD += "-dlopen" protocols.la
941 collectd_DEPENDENCIES += protocols.la
944 if BUILD_PLUGIN_REDIS
945 pkglib_LTLIBRARIES += redis.la
946 redis_la_SOURCES = redis.c
947 redis_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBCREDIS_LDFLAGS)
948 redis_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCREDIS_CPPFLAGS)
949 redis_la_LIBADD = -lcredis
950 collectd_LDADD += "-dlopen" redis.la
951 collectd_DEPENDENCIES += redis.la
954 if BUILD_PLUGIN_ROUTEROS
955 pkglib_LTLIBRARIES += routeros.la
956 routeros_la_SOURCES = routeros.c
957 routeros_la_CPPFLAGS = $(BUILD_WITH_LIBROUTEROS_CPPFLAGS)
958 routeros_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBROUTEROS_LDFLAGS)
959 routeros_la_LIBADD = -lrouteros
960 collectd_LDADD += "-dlopen" routeros.la
961 collectd_DEPENDENCIES += routeros.la
964 if BUILD_PLUGIN_RRDCACHED
965 pkglib_LTLIBRARIES += rrdcached.la
966 rrdcached_la_SOURCES = rrdcached.c utils_rrdcreate.c utils_rrdcreate.h
967 rrdcached_la_LDFLAGS = -module -avoid-version
968 rrdcached_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
969 rrdcached_la_LIBADD = $(BUILD_WITH_LIBRRD_LDFLAGS)
970 collectd_LDADD += "-dlopen" rrdcached.la
971 collectd_DEPENDENCIES += rrdcached.la
974 if BUILD_PLUGIN_RRDTOOL
975 pkglib_LTLIBRARIES += rrdtool.la
976 rrdtool_la_SOURCES = rrdtool.c utils_rrdcreate.c utils_rrdcreate.h
977 rrdtool_la_LDFLAGS = -module -avoid-version
978 rrdtool_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
979 rrdtool_la_LIBADD = $(BUILD_WITH_LIBRRD_LDFLAGS)
980 collectd_LDADD += "-dlopen" rrdtool.la
981 collectd_DEPENDENCIES += rrdtool.la
984 if BUILD_PLUGIN_SENSORS
985 pkglib_LTLIBRARIES += sensors.la
986 sensors_la_SOURCES = sensors.c
987 sensors_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBSENSORS_CFLAGS)
988 sensors_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBSENSORS_LDFLAGS)
989 sensors_la_LIBADD = -lsensors
990 collectd_LDADD += "-dlopen" sensors.la
991 collectd_DEPENDENCIES += sensors.la
994 if BUILD_PLUGIN_SERIAL
995 pkglib_LTLIBRARIES += serial.la
996 serial_la_SOURCES = serial.c
997 serial_la_LDFLAGS = -module -avoid-version
998 collectd_LDADD += "-dlopen" serial.la
999 collectd_DEPENDENCIES += serial.la
1002 if BUILD_PLUGIN_SNMP
1003 pkglib_LTLIBRARIES += snmp.la
1004 snmp_la_SOURCES = snmp.c
1005 snmp_la_LDFLAGS = -module -avoid-version
1006 snmp_la_CFLAGS = $(AM_CFLAGS)
1008 if BUILD_WITH_LIBNETSNMP
1009 snmp_la_CFLAGS += $(BUILD_WITH_LIBSNMP_CFLAGS)
1010 snmp_la_LIBADD += $(BUILD_WITH_LIBSNMP_LIBS)
1012 if BUILD_WITH_LIBPTHREAD
1013 snmp_la_LIBADD += -lpthread
1015 collectd_LDADD += "-dlopen" snmp.la
1016 collectd_DEPENDENCIES += snmp.la
1019 if BUILD_PLUGIN_SWAP
1020 pkglib_LTLIBRARIES += swap.la
1021 swap_la_SOURCES = swap.c
1022 swap_la_CFLAGS = $(AM_CFLAGS)
1023 swap_la_LDFLAGS = -module -avoid-version
1025 collectd_LDADD += "-dlopen" swap.la
1026 collectd_DEPENDENCIES += swap.la
1027 if BUILD_WITH_LIBKSTAT
1028 swap_la_LIBADD += -lkstat
1030 if BUILD_WITH_LIBDEVINFO
1031 swap_la_LIBADD += -ldevinfo
1033 if BUILD_WITH_LIBKVM_GETSWAPINFO
1034 swap_la_LIBADD += -lkvm
1036 if BUILD_WITH_LIBSTATGRAB
1037 swap_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1038 swap_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1040 if BUILD_WITH_PERFSTAT
1041 swap_la_LIBADD += -lperfstat
1046 if BUILD_PLUGIN_SYSLOG
1047 pkglib_LTLIBRARIES += syslog.la
1048 syslog_la_SOURCES = syslog.c
1049 syslog_la_LDFLAGS = -module -avoid-version
1050 collectd_LDADD += "-dlopen" syslog.la
1051 collectd_DEPENDENCIES += syslog.la
1054 if BUILD_PLUGIN_TABLE
1055 pkglib_LTLIBRARIES += table.la
1056 table_la_SOURCES = table.c
1057 table_la_LDFLAGS = -module -avoid-version
1058 collectd_LDADD += "-dlopen" table.la
1059 collectd_DEPENDENCIES += table.la
1062 if BUILD_PLUGIN_TAIL
1063 pkglib_LTLIBRARIES += tail.la
1064 tail_la_SOURCES = tail.c
1065 tail_la_LDFLAGS = -module -avoid-version
1066 collectd_LDADD += "-dlopen" tail.la
1067 collectd_DEPENDENCIES += tail.la
1070 if BUILD_PLUGIN_TAPE
1071 pkglib_LTLIBRARIES += tape.la
1072 tape_la_SOURCES = tape.c
1073 tape_la_LDFLAGS = -module -avoid-version
1074 tape_la_LIBADD = -lkstat -ldevinfo
1075 collectd_LDADD += "-dlopen" tape.la
1076 collectd_DEPENDENCIES += tape.la
1079 if BUILD_PLUGIN_TARGET_NOTIFICATION
1080 pkglib_LTLIBRARIES += target_notification.la
1081 target_notification_la_SOURCES = target_notification.c
1082 target_notification_la_LDFLAGS = -module -avoid-version
1083 collectd_LDADD += "-dlopen" target_notification.la
1084 collectd_DEPENDENCIES += target_notification.la
1087 if BUILD_PLUGIN_TARGET_REPLACE
1088 pkglib_LTLIBRARIES += target_replace.la
1089 target_replace_la_SOURCES = target_replace.c
1090 target_replace_la_LDFLAGS = -module -avoid-version
1091 collectd_LDADD += "-dlopen" target_replace.la
1092 collectd_DEPENDENCIES += target_replace.la
1095 if BUILD_PLUGIN_TARGET_SCALE
1096 pkglib_LTLIBRARIES += target_scale.la
1097 target_scale_la_SOURCES = target_scale.c
1098 target_scale_la_LDFLAGS = -module -avoid-version
1099 collectd_LDADD += "-dlopen" target_scale.la
1100 collectd_DEPENDENCIES += target_scale.la
1103 if BUILD_PLUGIN_TARGET_SET
1104 pkglib_LTLIBRARIES += target_set.la
1105 target_set_la_SOURCES = target_set.c
1106 target_set_la_LDFLAGS = -module -avoid-version
1107 collectd_LDADD += "-dlopen" target_set.la
1108 collectd_DEPENDENCIES += target_set.la
1111 if BUILD_PLUGIN_TARGET_V5UPGRADE
1112 pkglib_LTLIBRARIES += target_v5upgrade.la
1113 target_v5upgrade_la_SOURCES = target_v5upgrade.c
1114 target_v5upgrade_la_LDFLAGS = -module -avoid-version
1115 collectd_LDADD += "-dlopen" target_v5upgrade.la
1116 collectd_DEPENDENCIES += target_v5upgrade.la
1119 if BUILD_PLUGIN_TCPCONNS
1120 pkglib_LTLIBRARIES += tcpconns.la
1121 tcpconns_la_SOURCES = tcpconns.c
1122 tcpconns_la_LDFLAGS = -module -avoid-version
1123 tcpconns_la_LIBADD =
1124 collectd_LDADD += "-dlopen" tcpconns.la
1125 collectd_DEPENDENCIES += tcpconns.la
1126 if BUILD_WITH_LIBKVM_NLIST
1127 tcpconns_la_LIBADD += -lkvm
1131 if BUILD_PLUGIN_TEAMSPEAK2
1132 pkglib_LTLIBRARIES += teamspeak2.la
1133 teamspeak2_la_SOURCES = teamspeak2.c
1134 teamspeak2_la_LDFLAGS = -module -avoid-version
1135 collectd_LDADD += "-dlopen" teamspeak2.la
1136 collectd_DEPENDENCIES += teamspeak2.la
1140 pkglib_LTLIBRARIES += ted.la
1141 ted_la_SOURCES = ted.c
1142 ted_la_LDFLAGS = -module -avoid-version
1143 collectd_LDADD += "-dlopen" ted.la
1144 collectd_DEPENDENCIES += ted.la
1147 if BUILD_PLUGIN_THERMAL
1148 pkglib_LTLIBRARIES += thermal.la
1149 thermal_la_SOURCES = thermal.c
1150 thermal_la_LDFLAGS = -module -avoid-version
1151 collectd_LDADD += "-dlopen" thermal.la
1152 collectd_DEPENDENCIES += thermal.la
1155 if BUILD_PLUGIN_THRESHOLD
1156 pkglib_LTLIBRARIES += threshold.la
1157 threshold_la_SOURCES = threshold.c
1158 threshold_la_LDFLAGS = -module -avoid-version
1159 collectd_LDADD += "-dlopen" threshold.la
1160 collectd_DEPENDENCIES += threshold.la
1163 if BUILD_PLUGIN_TOKYOTYRANT
1164 pkglib_LTLIBRARIES += tokyotyrant.la
1165 tokyotyrant_la_SOURCES = tokyotyrant.c
1166 tokyotyrant_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS)
1167 tokyotyrant_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS)
1168 tokyotyrant_la_LIBADD = $(BUILD_WITH_LIBTOKYOTYRANT_LIBS)
1169 if BUILD_WITH_LIBSOCKET
1170 tokyotyrant_la_LIBADD += -lsocket
1172 collectd_LDADD += "-dlopen" tokyotyrant.la
1173 collectd_DEPENDENCIES += tokyotyrant.la
1176 if BUILD_PLUGIN_UNIXSOCK
1177 pkglib_LTLIBRARIES += unixsock.la
1178 unixsock_la_SOURCES = unixsock.c \
1179 utils_cmd_flush.h utils_cmd_flush.c \
1180 utils_cmd_getval.h utils_cmd_getval.c \
1181 utils_cmd_listval.h utils_cmd_listval.c \
1182 utils_cmd_putval.h utils_cmd_putval.c \
1183 utils_cmd_putnotif.h utils_cmd_putnotif.c
1184 unixsock_la_LDFLAGS = -module -avoid-version
1185 unixsock_la_LIBADD = -lpthread
1186 collectd_LDADD += "-dlopen" unixsock.la
1187 collectd_DEPENDENCIES += unixsock.la
1190 if BUILD_PLUGIN_UPTIME
1191 pkglib_LTLIBRARIES += uptime.la
1192 uptime_la_SOURCES = uptime.c
1193 uptime_la_CFLAGS = $(AM_CFLAGS)
1194 uptime_la_LDFLAGS = -module -avoid-version
1196 if BUILD_WITH_LIBKSTAT
1197 uptime_la_LIBADD += -lkstat
1199 if BUILD_WITH_PERFSTAT
1200 uptime_la_LIBADD += -lperfstat
1202 collectd_LDADD += "-dlopen" uptime.la
1203 collectd_DEPENDENCIES += uptime.la
1206 if BUILD_PLUGIN_USERS
1207 pkglib_LTLIBRARIES += users.la
1208 users_la_SOURCES = users.c
1209 users_la_CFLAGS = $(AM_CFLAGS)
1210 users_la_LDFLAGS = -module -avoid-version
1212 if BUILD_WITH_LIBSTATGRAB
1213 users_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1214 users_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1216 collectd_LDADD += "-dlopen" users.la
1217 collectd_DEPENDENCIES += users.la
1220 if BUILD_PLUGIN_UUID
1221 pkglib_LTLIBRARIES += uuid.la
1222 uuid_la_SOURCES = uuid.c
1223 uuid_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBHAL_CFLAGS)
1224 uuid_la_LIBADD = $(BUILD_WITH_LIBHAL_LIBS)
1225 uuid_la_LDFLAGS = -module -avoid-version
1226 collectd_LDADD += "-dlopen" uuid.la
1227 collectd_DEPENDENCIES += uuid.la
1230 if BUILD_PLUGIN_VARNISH
1231 pkglib_LTLIBRARIES += varnish.la
1232 varnish_la_SOURCES = varnish.c
1233 varnish_la_LDFLAGS = -module -avoid-version
1234 varnish_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBVARNISH_CFLAGS)
1235 varnish_la_LIBADD = $(BUILD_WITH_LIBVARNISH_LIBS)
1236 collectd_LDADD += "-dlopen" varnish.la
1237 collectd_DEPENDENCIES += varnish.la
1240 if BUILD_PLUGIN_VMEM
1241 pkglib_LTLIBRARIES += vmem.la
1242 vmem_la_SOURCES = vmem.c
1243 vmem_la_LDFLAGS = -module -avoid-version
1244 collectd_LDADD += "-dlopen" vmem.la
1245 collectd_DEPENDENCIES += vmem.la
1248 if BUILD_PLUGIN_VSERVER
1249 pkglib_LTLIBRARIES += vserver.la
1250 vserver_la_SOURCES = vserver.c
1251 vserver_la_LDFLAGS = -module -avoid-version
1252 collectd_LDADD += "-dlopen" vserver.la
1253 collectd_DEPENDENCIES += vserver.la
1256 if BUILD_PLUGIN_WIRELESS
1257 pkglib_LTLIBRARIES += wireless.la
1258 wireless_la_SOURCES = wireless.c
1259 wireless_la_LDFLAGS = -module -avoid-version
1260 collectd_LDADD += "-dlopen" wireless.la
1261 collectd_DEPENDENCIES += wireless.la
1264 if BUILD_PLUGIN_WRITE_GRAPHITE
1265 pkglib_LTLIBRARIES += write_graphite.la
1266 write_graphite_la_SOURCES = write_graphite.c \
1267 utils_format_graphite.c utils_format_graphite.h \
1268 utils_format_json.c utils_format_json.h
1269 write_graphite_la_LDFLAGS = -module -avoid-version
1270 collectd_LDADD += "-dlopen" write_graphite.la
1271 collectd_DEPENDENCIES += write_graphite.la
1274 if BUILD_PLUGIN_WRITE_HTTP
1275 pkglib_LTLIBRARIES += write_http.la
1276 write_http_la_SOURCES = write_http.c \
1277 utils_format_json.c utils_format_json.h
1278 write_http_la_LDFLAGS = -module -avoid-version
1279 write_http_la_CFLAGS = $(AM_CFLAGS)
1280 write_http_la_LIBADD =
1281 collectd_LDADD += "-dlopen" write_http.la
1282 if BUILD_WITH_LIBCURL
1283 write_http_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
1284 write_http_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
1286 collectd_DEPENDENCIES += write_http.la
1289 if BUILD_PLUGIN_WRITE_MONGODB
1290 pkglib_LTLIBRARIES += write_mongodb.la
1291 write_mongodb_la_SOURCES = write_mongodb.c
1292 write_mongodb_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMONGOC_CPPFLAGS)
1293 write_mongodb_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBMONGOC_LDFLAGS)
1294 write_mongodb_la_LIBADD = -lmongoc
1295 collectd_LDADD += "-dlopen" write_mongodb.la
1296 collectd_DEPENDENCIES += write_mongodb.la
1299 if BUILD_PLUGIN_WRITE_REDIS
1300 pkglib_LTLIBRARIES += write_redis.la
1301 write_redis_la_SOURCES = write_redis.c
1302 write_redis_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBCREDIS_LDFLAGS)
1303 write_redis_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCREDIS_CPPFLAGS)
1304 write_redis_la_LIBADD = -lcredis
1305 collectd_LDADD += "-dlopen" write_redis.la
1306 collectd_DEPENDENCIES += write_redis.la
1309 if BUILD_PLUGIN_XMMS
1310 pkglib_LTLIBRARIES += xmms.la
1311 xmms_la_SOURCES = xmms.c
1312 xmms_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBXMMS_CFLAGS)
1313 xmms_la_LDFLAGS = -module -avoid-version
1314 xmms_la_LIBADD = $(BUILD_WITH_LIBXMMS_LIBS)
1315 collectd_LDADD += "-dlopen" xmms.la
1316 collectd_DEPENDENCIES += xmms.la
1319 if BUILD_PLUGIN_ZFS_ARC
1320 pkglib_LTLIBRARIES += zfs_arc.la
1321 zfs_arc_la_SOURCES = zfs_arc.c
1322 zfs_arc_la_CFLAGS = $(AM_CFLAGS)
1323 zfs_arc_la_LDFLAGS = -module -avoid-version
1324 zfs_arc_la_LIBADD = -lkstat
1325 collectd_LDADD += "-dlopen" zfs_arc.la
1326 collectd_DEPENDENCIES += zfs_arc.la
1329 dist_man_MANS = collectd.1 \
1340 collectd-threshold.5 \
1341 collectd-unixsock.5 \
1344 #collectd_1_SOURCES = collectd.pod
1346 EXTRA_DIST = types.db pinba.proto
1348 EXTRA_DIST += collectd.conf.pod \
1349 collectd-email.pod \
1354 collectd-nagios.pod \
1356 collectd-python.pod \
1359 collectd-threshold.pod \
1360 collectd-unixsock.pod \
1361 postgresql_default.conf \
1365 pod2man --release=$(VERSION) --center=$(PACKAGE) $< \
1366 >.pod2man.tmp.$$$$ 2>/dev/null && mv -f .pod2man.tmp.$$$$ $@ || true
1367 @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
1369 echo "$@ has some POD errors!"; false; \
1373 pod2man --section=5 --release=$(VERSION) --center=$(PACKAGE) $< \
1374 >.pod2man.tmp.$$$$ 2>/dev/null && mv -f .pod2man.tmp.$$$$ $@ || true
1375 @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
1377 echo "$@ has some POD errors!"; false; \
1380 pinba.pb-c.c pinba.pb-c.h: pinba.proto
1381 protoc-c --c_out . pinba.proto
1384 $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
1385 if test -e $(DESTDIR)$(sysconfdir)/collectd.conf; \
1387 $(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf.pkg-orig; \
1389 $(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf; \
1391 $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
1392 $(INSTALL) -m 0644 $(srcdir)/types.db $(DESTDIR)$(pkgdatadir)/types.db;
1393 $(INSTALL) -m 0644 $(srcdir)/postgresql_default.conf \
1394 $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;