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 collectd-tg
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_random.c utils_random.h \
37 utils_tail_match.c utils_tail_match.h \
38 utils_match.c utils_match.h \
39 utils_subst.c utils_subst.h \
40 utils_tail.c utils_tail.h \
41 utils_time.c utils_time.h \
42 types_list.c types_list.h
44 collectd_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL)
45 collectd_CFLAGS = $(AM_CFLAGS)
46 collectd_LDFLAGS = -export-dynamic
48 collectd_DEPENDENCIES =
50 # Link to these libraries..
52 collectd_LDADD += -lrt
54 if BUILD_WITH_LIBPOSIX4
55 collectd_LDADD += -lposix4
57 if BUILD_WITH_LIBSOCKET
58 collectd_LDADD += -lsocket
60 if BUILD_WITH_LIBRESOLV
61 collectd_LDADD += -lresolv
63 if BUILD_WITH_LIBPTHREAD
64 collectd_LDADD += -lpthread
66 if BUILD_WITH_LIBKSTAT
67 collectd_LDADD += -lkstat
69 if BUILD_WITH_LIBDEVINFO
70 collectd_LDADD += -ldevinfo
73 collectd_LDFLAGS += -Wl,-bexpall,-brtllib
76 # The daemon needs to call sg_init, so we need to link it against libstatgrab,
78 if BUILD_WITH_LIBSTATGRAB
79 collectd_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
80 collectd_LDADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
83 if BUILD_WITH_OWN_LIBOCONFIG
84 collectd_LDADD += $(LIBLTDL) liboconfig/liboconfig.la
85 collectd_DEPENDENCIES += liboconfig/liboconfig.la
87 collectd_LDADD += -loconfig
90 collectdmon_SOURCES = collectdmon.c
91 collectdmon_CPPFLAGS = $(AM_CPPFLAGS)
93 collectd_nagios_SOURCES = collectd-nagios.c
94 collectd_nagios_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/src/libcollectdclient/collectd
95 collectd_nagios_LDADD =
96 if BUILD_WITH_LIBSOCKET
97 collectd_nagios_LDADD += -lsocket
100 collectd_nagios_LDADD += -lm
103 collectd_nagios_LDADD += libcollectdclient/libcollectdclient.la
104 collectd_nagios_DEPENDENCIES = libcollectdclient/libcollectdclient.la
107 collectdctl_SOURCES = collectdctl.c
108 collectdctl_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/src/libcollectdclient/collectd
110 if BUILD_WITH_LIBSOCKET
111 collectdctl_LDADD += -lsocket
114 collectdctl_LDADD += -lm
116 collectdctl_LDADD += libcollectdclient/libcollectdclient.la
117 collectdctl_DEPENDENCIES = libcollectdclient/libcollectdclient.la
119 collectd_tg_SOURCES = collectd-tg.c \
120 utils_heap.c utils_heap.h
121 collectd_tg_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/src/libcollectdclient/collectd
123 if BUILD_WITH_LIBSOCKET
124 collectd_tg_LDADD += -lsocket
127 collectd_tg_LDADD += -lrt
130 collectd_tg_LDADD += -lm
132 collectd_tg_LDADD += libcollectdclient/libcollectdclient.la
133 collectd_tg_DEPENDENCIES = libcollectdclient/libcollectdclient.la
141 if BUILD_PLUGIN_AGGREGATION
142 pkglib_LTLIBRARIES += aggregation.la
143 aggregation_la_SOURCES = aggregation.c \
144 utils_vl_lookup.c utils_vl_lookup.h
145 aggregation_la_LDFLAGS = -module -avoid-version
146 aggregation_la_LIBADD = -lm
147 collectd_LDADD += "-dlopen" aggregation.la
148 collectd_DEPENDENCIES += aggregation.la
152 pkglib_LTLIBRARIES += amqp.la
153 amqp_la_SOURCES = amqp.c \
154 utils_cmd_putval.c utils_cmd_putval.h \
155 utils_format_graphite.c utils_format_graphite.h \
156 utils_format_json.c utils_format_json.h
157 amqp_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBRABBITMQ_LDFLAGS)
158 amqp_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBRABBITMQ_CPPFLAGS)
159 amqp_la_LIBADD = $(BUILD_WITH_LIBRABBITMQ_LIBS)
160 collectd_LDADD += "-dlopen" amqp.la
161 collectd_DEPENDENCIES += amqp.la
164 if BUILD_PLUGIN_APACHE
165 pkglib_LTLIBRARIES += apache.la
166 apache_la_SOURCES = apache.c
167 apache_la_LDFLAGS = -module -avoid-version
168 apache_la_CFLAGS = $(AM_CFLAGS)
170 collectd_LDADD += "-dlopen" apache.la
171 if BUILD_WITH_LIBCURL
172 apache_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
173 apache_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
175 collectd_DEPENDENCIES += apache.la
178 if BUILD_PLUGIN_APCUPS
179 pkglib_LTLIBRARIES += apcups.la
180 apcups_la_SOURCES = apcups.c
181 apcups_la_LDFLAGS = -module -avoid-version
183 if BUILD_WITH_LIBSOCKET
184 apcups_la_LIBADD += -lsocket
186 collectd_LDADD += "-dlopen" apcups.la
187 collectd_DEPENDENCIES += apcups.la
190 if BUILD_PLUGIN_APPLE_SENSORS
191 pkglib_LTLIBRARIES += apple_sensors.la
192 apple_sensors_la_SOURCES = apple_sensors.c
193 apple_sensors_la_LDFLAGS = -module -avoid-version
194 apple_sensors_la_LDFLAGS += -framework IOKit
195 collectd_LDADD += "-dlopen" apple_sensors.la
196 collectd_DEPENDENCIES += apple_sensors.la
199 if BUILD_PLUGIN_ASCENT
200 pkglib_LTLIBRARIES += ascent.la
201 ascent_la_SOURCES = ascent.c
202 ascent_la_LDFLAGS = -module -avoid-version
203 ascent_la_CFLAGS = $(AM_CFLAGS) \
204 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
205 ascent_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
206 collectd_LDADD += "-dlopen" ascent.la
207 collectd_DEPENDENCIES += ascent.la
210 if BUILD_PLUGIN_BATTERY
211 pkglib_LTLIBRARIES += battery.la
212 battery_la_SOURCES = battery.c
213 battery_la_LDFLAGS = -module -avoid-version
215 if BUILD_WITH_LIBIOKIT
216 battery_la_LDFLAGS += -framework IOKit
218 collectd_LDADD += "-dlopen" battery.la
219 collectd_DEPENDENCIES += battery.la
223 pkglib_LTLIBRARIES += bind.la
224 bind_la_SOURCES = bind.c
225 bind_la_LDFLAGS = -module -avoid-version
226 bind_la_CFLAGS = $(AM_CFLAGS) \
227 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
228 bind_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
229 collectd_LDADD += "-dlopen" bind.la
230 collectd_DEPENDENCIES += bind.la
233 if BUILD_PLUGIN_CONNTRACK
234 pkglib_LTLIBRARIES += conntrack.la
235 conntrack_la_SOURCES = conntrack.c
236 conntrack_la_LDFLAGS = -module -avoid-version
237 collectd_LDADD += "-dlopen" conntrack.la
238 collectd_DEPENDENCIES += conntrack.la
241 if BUILD_PLUGIN_CONTEXTSWITCH
242 pkglib_LTLIBRARIES += contextswitch.la
243 contextswitch_la_SOURCES = contextswitch.c
244 contextswitch_la_LDFLAGS = -module -avoid-version
245 contextswitch_la_LIBADD =
246 if BUILD_WITH_PERFSTAT
247 contextswitch_la_LIBADD += -lperfstat
249 collectd_LDADD += "-dlopen" contextswitch.la
250 collectd_DEPENDENCIES += contextswitch.la
254 pkglib_LTLIBRARIES += cpu.la
255 cpu_la_SOURCES = cpu.c
256 cpu_la_CFLAGS = $(AM_CFLAGS)
257 cpu_la_LDFLAGS = -module -avoid-version
259 if BUILD_WITH_LIBKSTAT
260 cpu_la_LIBADD += -lkstat
262 if BUILD_WITH_LIBDEVINFO
263 cpu_la_LIBADD += -ldevinfo
265 if BUILD_WITH_LIBSTATGRAB
266 cpu_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
267 cpu_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
269 if BUILD_WITH_PERFSTAT
270 cpu_la_LIBADD += -lperfstat
272 collectd_LDADD += "-dlopen" cpu.la
273 collectd_DEPENDENCIES += cpu.la
276 if BUILD_PLUGIN_CPUFREQ
277 pkglib_LTLIBRARIES += cpufreq.la
278 cpufreq_la_SOURCES = cpufreq.c
279 cpufreq_la_LDFLAGS = -module -avoid-version
280 collectd_LDADD += "-dlopen" cpufreq.la
281 collectd_DEPENDENCIES += cpufreq.la
285 pkglib_LTLIBRARIES += csv.la
286 csv_la_SOURCES = csv.c
287 csv_la_LDFLAGS = -module -avoid-version
288 collectd_LDADD += "-dlopen" csv.la
289 collectd_DEPENDENCIES += csv.la
293 pkglib_LTLIBRARIES += curl.la
294 curl_la_SOURCES = curl.c
295 curl_la_LDFLAGS = -module -avoid-version
296 curl_la_CFLAGS = $(AM_CFLAGS)
298 collectd_LDADD += "-dlopen" curl.la
299 if BUILD_WITH_LIBCURL
300 curl_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
301 curl_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
303 collectd_DEPENDENCIES += curl.la
306 if BUILD_PLUGIN_CURL_JSON
307 pkglib_LTLIBRARIES += curl_json.la
308 curl_json_la_SOURCES = curl_json.c
309 curl_json_la_CFLAGS = $(AM_CFLAGS)
310 curl_json_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBYAJL_LDFLAGS)
311 curl_json_la_CPPFLAGS = $(BUILD_WITH_LIBYAJL_CPPFLAGS)
312 curl_json_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
313 if BUILD_WITH_LIBCURL
314 curl_json_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
315 curl_json_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
317 collectd_LDADD += "-dlopen" curl_json.la
318 collectd_DEPENDENCIES += curl_json.la
321 if BUILD_PLUGIN_CURL_XML
322 pkglib_LTLIBRARIES += curl_xml.la
323 curl_xml_la_SOURCES = curl_xml.c
324 curl_xml_la_LDFLAGS = -module -avoid-version
325 curl_xml_la_CFLAGS = $(AM_CFLAGS) \
326 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
327 curl_xml_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
328 collectd_LDADD += "-dlopen" curl_xml.la
329 collectd_DEPENDENCIES += curl_xml.la
333 pkglib_LTLIBRARIES += dbi.la
334 dbi_la_SOURCES = dbi.c \
335 utils_db_query.c utils_db_query.h
336 dbi_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBDBI_CPPFLAGS)
337 dbi_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBDBI_LDFLAGS)
338 dbi_la_LIBADD = $(BUILD_WITH_LIBDBI_LIBS)
339 collectd_LDADD += "-dlopen" dbi.la
340 collectd_DEPENDENCIES += dbi.la
344 pkglib_LTLIBRARIES += df.la
345 df_la_SOURCES = df.c utils_mount.c utils_mount.h
346 df_la_LDFLAGS = -module -avoid-version
347 collectd_LDADD += "-dlopen" df.la
348 collectd_DEPENDENCIES += df.la
352 pkglib_LTLIBRARIES += disk.la
353 disk_la_SOURCES = disk.c
354 disk_la_CFLAGS = $(AM_CFLAGS)
355 disk_la_LDFLAGS = -module -avoid-version
357 if BUILD_WITH_LIBKSTAT
358 disk_la_LIBADD += -lkstat
360 if BUILD_WITH_LIBDEVINFO
361 disk_la_LIBADD += -ldevinfo
363 if BUILD_WITH_LIBIOKIT
364 disk_la_LDFLAGS += -framework IOKit
366 if BUILD_WITH_LIBSTATGRAB
367 disk_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
368 disk_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
370 if BUILD_WITH_PERFSTAT
371 disk_la_LIBADD += -lperfstat
373 collectd_LDADD += "-dlopen" disk.la
374 collectd_DEPENDENCIES += disk.la
378 pkglib_LTLIBRARIES += dns.la
379 dns_la_SOURCES = dns.c utils_dns.c utils_dns.h
380 dns_la_LDFLAGS = -module -avoid-version
381 dns_la_LIBADD = -lpcap -lpthread
382 collectd_LDADD += "-dlopen" dns.la
383 collectd_DEPENDENCIES += dns.la
386 if BUILD_PLUGIN_EMAIL
387 pkglib_LTLIBRARIES += email.la
388 email_la_SOURCES = email.c
389 email_la_LDFLAGS = -module -avoid-version
390 email_la_LIBADD = -lpthread
391 collectd_LDADD += "-dlopen" email.la
392 collectd_DEPENDENCIES += email.la
395 if BUILD_PLUGIN_ENTROPY
396 pkglib_LTLIBRARIES += entropy.la
397 entropy_la_SOURCES = entropy.c
398 entropy_la_LDFLAGS = -module -avoid-version
399 collectd_LDADD += "-dlopen" entropy.la
400 collectd_DEPENDENCIES += entropy.la
404 pkglib_LTLIBRARIES += exec.la
405 exec_la_SOURCES = exec.c \
406 utils_cmd_putnotif.c utils_cmd_putnotif.h \
407 utils_cmd_putval.c utils_cmd_putval.h
408 exec_la_LDFLAGS = -module -avoid-version
409 exec_la_LIBADD = -lpthread
410 collectd_LDADD += "-dlopen" exec.la
411 collectd_DEPENDENCIES += exec.la
414 if BUILD_PLUGIN_ETHSTAT
415 pkglib_LTLIBRARIES += ethstat.la
416 ethstat_la_SOURCES = ethstat.c
417 ethstat_la_LDFLAGS = -module -avoid-version
418 collectd_LDADD += "-dlopen" ethstat.la
419 collectd_DEPENDENCIES += ethstat.la
422 if BUILD_PLUGIN_FILECOUNT
423 pkglib_LTLIBRARIES += filecount.la
424 filecount_la_SOURCES = filecount.c
425 filecount_la_LDFLAGS = -module -avoid-version
426 collectd_LDADD += "-dlopen" filecount.la
427 collectd_DEPENDENCIES += filecount.la
430 if BUILD_PLUGIN_GMOND
431 pkglib_LTLIBRARIES += gmond.la
432 gmond_la_SOURCES = gmond.c
433 gmond_la_CPPFLAGS = $(AM_CPPFLAGS) $(GANGLIA_CPPFLAGS)
434 gmond_la_LDFLAGS = -module -avoid-version $(GANGLIA_LDFLAGS)
435 gmond_la_LIBADD = $(GANGLIA_LIBS)
436 collectd_LDADD += "-dlopen" gmond.la
437 collectd_DEPENDENCIES += gmond.la
440 if BUILD_PLUGIN_HDDTEMP
441 pkglib_LTLIBRARIES += hddtemp.la
442 hddtemp_la_SOURCES = hddtemp.c
443 hddtemp_la_LDFLAGS = -module -avoid-version
445 if BUILD_WITH_LIBSOCKET
446 hddtemp_la_LIBADD += -lsocket
448 collectd_LDADD += "-dlopen" hddtemp.la
449 collectd_DEPENDENCIES += hddtemp.la
452 if BUILD_PLUGIN_INTERFACE
453 pkglib_LTLIBRARIES += interface.la
454 interface_la_SOURCES = interface.c
455 interface_la_CFLAGS = $(AM_CFLAGS)
456 interface_la_LDFLAGS = -module -avoid-version
457 interface_la_LIBADD =
458 collectd_LDADD += "-dlopen" interface.la
459 collectd_DEPENDENCIES += interface.la
460 if BUILD_WITH_LIBSTATGRAB
461 interface_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
462 interface_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
464 if BUILD_WITH_LIBKSTAT
465 interface_la_LIBADD += -lkstat
467 if BUILD_WITH_LIBDEVINFO
468 interface_la_LIBADD += -ldevinfo
469 endif # BUILD_WITH_LIBDEVINFO
470 endif # !BUILD_WITH_LIBSTATGRAB
471 if BUILD_WITH_PERFSTAT
472 interface_la_LIBADD += -lperfstat
474 endif # BUILD_PLUGIN_INTERFACE
476 if BUILD_PLUGIN_IPTABLES
477 pkglib_LTLIBRARIES += iptables.la
478 iptables_la_SOURCES = iptables.c
479 iptables_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBIPTC_CPPFLAGS)
480 iptables_la_LDFLAGS = -module -avoid-version
481 iptables_la_LIBADD = $(BUILD_WITH_LIBIPTC_LDFLAGS)
482 collectd_LDADD += "-dlopen" iptables.la
483 collectd_DEPENDENCIES += iptables.la
487 pkglib_LTLIBRARIES += ipmi.la
488 ipmi_la_SOURCES = ipmi.c
489 ipmi_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_OPENIPMI_CFLAGS)
490 ipmi_la_LDFLAGS = -module -avoid-version
491 ipmi_la_LIBADD = $(BUILD_WITH_OPENIPMI_LIBS)
492 collectd_LDADD += "-dlopen" ipmi.la
493 collectd_DEPENDENCIES += ipmi.la
497 pkglib_LTLIBRARIES += ipvs.la
498 ipvs_la_SOURCES = ipvs.c
499 if IP_VS_H_NEEDS_KERNEL_CFLAGS
500 ipvs_la_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS)
502 ipvs_la_LDFLAGS = -module -avoid-version
503 collectd_LDADD += "-dlopen" ipvs.la
504 collectd_DEPENDENCIES += ipvs.la
508 pkglib_LTLIBRARIES += irq.la
509 irq_la_SOURCES = irq.c
510 irq_la_LDFLAGS = -module -avoid-version
511 collectd_LDADD += "-dlopen" irq.la
512 collectd_DEPENDENCIES += irq.la
516 pkglib_LTLIBRARIES += java.la
517 java_la_SOURCES = java.c
518 java_la_CPPFLAGS = $(AM_CPPFLAGS) $(JAVA_CPPFLAGS)
519 java_la_CFLAGS = $(AM_CFLAGS) $(JAVA_CFLAGS)
520 java_la_LDFLAGS = -module -avoid-version $(JAVA_LDFLAGS)
521 java_la_LIBADD = $(JAVA_LIBS)
522 collectd_LDADD += "-dlopen" java.la
523 collectd_DEPENDENCIES += java.la
526 if BUILD_PLUGIN_LIBVIRT
527 pkglib_LTLIBRARIES += libvirt.la
528 libvirt_la_SOURCES = libvirt.c
529 libvirt_la_CFLAGS = $(AM_CFLAGS) \
530 $(BUILD_WITH_LIBVIRT_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
531 libvirt_la_LIBADD = $(BUILD_WITH_LIBVIRT_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
532 libvirt_la_LDFLAGS = -module -avoid-version
533 collectd_LDADD += "-dlopen" libvirt.la
534 collectd_DEPENDENCIES += libvirt.la
538 pkglib_LTLIBRARIES += load.la
539 load_la_SOURCES = load.c
540 load_la_CFLAGS = $(AM_CFLAGS)
541 load_la_LDFLAGS = -module -avoid-version
543 collectd_LDADD += "-dlopen" load.la
544 collectd_DEPENDENCIES += load.la
545 if BUILD_WITH_LIBSTATGRAB
546 load_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
547 load_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
548 endif # BUILD_WITH_LIBSTATGRAB
549 if BUILD_WITH_PERFSTAT
550 load_la_LIBADD += -lperfstat
552 endif # BUILD_PLUGIN_LOAD
554 if BUILD_PLUGIN_LOGFILE
555 pkglib_LTLIBRARIES += logfile.la
556 logfile_la_SOURCES = logfile.c
557 logfile_la_LDFLAGS = -module -avoid-version
558 collectd_LDADD += "-dlopen" logfile.la
559 collectd_DEPENDENCIES += logfile.la
563 pkglib_LTLIBRARIES += lpar.la
564 lpar_la_SOURCES = lpar.c
565 lpar_la_LDFLAGS = -module -avoid-version
566 collectd_LDADD += "-dlopen" lpar.la
567 collectd_DEPENDENCIES += lpar.la
568 lpar_la_LIBADD = -lperfstat
571 if BUILD_PLUGIN_MADWIFI
572 pkglib_LTLIBRARIES += madwifi.la
573 madwifi_la_SOURCES = madwifi.c madwifi.h
574 madwifi_la_LDFLAGS = -module -avoid-version
575 collectd_LDADD += "-dlopen" madwifi.la
576 collectd_DEPENDENCIES += madwifi.la
579 if BUILD_PLUGIN_MATCH_EMPTY_COUNTER
580 pkglib_LTLIBRARIES += match_empty_counter.la
581 match_empty_counter_la_SOURCES = match_empty_counter.c
582 match_empty_counter_la_LDFLAGS = -module -avoid-version
583 collectd_LDADD += "-dlopen" match_empty_counter.la
584 collectd_DEPENDENCIES += match_empty_counter.la
587 if BUILD_PLUGIN_MATCH_HASHED
588 pkglib_LTLIBRARIES += match_hashed.la
589 match_hashed_la_SOURCES = match_hashed.c
590 match_hashed_la_LDFLAGS = -module -avoid-version
591 collectd_LDADD += "-dlopen" match_hashed.la
592 collectd_DEPENDENCIES += match_hashed.la
595 if BUILD_PLUGIN_MATCH_REGEX
596 pkglib_LTLIBRARIES += match_regex.la
597 match_regex_la_SOURCES = match_regex.c
598 match_regex_la_LDFLAGS = -module -avoid-version
599 collectd_LDADD += "-dlopen" match_regex.la
600 collectd_DEPENDENCIES += match_regex.la
603 if BUILD_PLUGIN_MATCH_TIMEDIFF
604 pkglib_LTLIBRARIES += match_timediff.la
605 match_timediff_la_SOURCES = match_timediff.c
606 match_timediff_la_LDFLAGS = -module -avoid-version
607 collectd_LDADD += "-dlopen" match_timediff.la
608 collectd_DEPENDENCIES += match_timediff.la
611 if BUILD_PLUGIN_MATCH_VALUE
612 pkglib_LTLIBRARIES += match_value.la
613 match_value_la_SOURCES = match_value.c
614 match_value_la_LDFLAGS = -module -avoid-version
615 collectd_LDADD += "-dlopen" match_value.la
616 collectd_DEPENDENCIES += match_value.la
619 if BUILD_PLUGIN_MBMON
620 pkglib_LTLIBRARIES += mbmon.la
621 mbmon_la_SOURCES = mbmon.c
622 mbmon_la_LDFLAGS = -module -avoid-version
624 if BUILD_WITH_LIBSOCKET
625 mbmon_la_LIBADD += -lsocket
627 collectd_LDADD += "-dlopen" mbmon.la
628 collectd_DEPENDENCIES += mbmon.la
632 pkglib_LTLIBRARIES += md.la
634 md_la_LDFLAGS = -module -avoid-version
635 collectd_LDADD += "-dlopen" md.la
636 collectd_DEPENDENCIES += md.la
639 if BUILD_PLUGIN_MEMCACHEC
640 pkglib_LTLIBRARIES += memcachec.la
641 memcachec_la_SOURCES = memcachec.c
642 memcachec_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBMEMCACHED_LDFLAGS)
643 memcachec_la_CPPFLAGS = $(BUILD_WITH_LIBMEMCACHED_CPPFLAGS)
644 memcachec_la_LIBADD = $(BUILD_WITH_LIBMEMCACHED_LIBS)
645 collectd_LDADD += "-dlopen" memcachec.la
646 collectd_DEPENDENCIES += memcachec.la
649 if BUILD_PLUGIN_MEMCACHED
650 pkglib_LTLIBRARIES += memcached.la
651 memcached_la_SOURCES = memcached.c
652 memcached_la_LDFLAGS = -module -avoid-version
653 memcached_la_LIBADD =
654 if BUILD_WITH_LIBSOCKET
655 memcached_la_LIBADD += -lsocket
657 collectd_LDADD += "-dlopen" memcached.la
658 collectd_DEPENDENCIES += memcached.la
661 if BUILD_PLUGIN_MEMORY
662 pkglib_LTLIBRARIES += memory.la
663 memory_la_SOURCES = memory.c
664 memory_la_CFLAGS = $(AM_CFLAGS)
665 memory_la_LDFLAGS = -module -avoid-version
667 collectd_LDADD += "-dlopen" memory.la
668 collectd_DEPENDENCIES += memory.la
669 if BUILD_WITH_LIBKSTAT
670 memory_la_LIBADD += -lkstat
672 if BUILD_WITH_LIBDEVINFO
673 memory_la_LIBADD += -ldevinfo
675 if BUILD_WITH_LIBSTATGRAB
676 memory_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
677 memory_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
679 if BUILD_WITH_PERFSTAT
680 memory_la_LIBADD += -lperfstat
684 if BUILD_PLUGIN_MODBUS
685 pkglib_LTLIBRARIES += modbus.la
686 modbus_la_SOURCES = modbus.c
687 modbus_la_LDFLAGS = -module -avoid-version
688 modbus_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMODBUS_CFLAGS)
689 modbus_la_LIBADD = $(BUILD_WITH_LIBMODBUS_LIBS)
690 collectd_LDADD += "-dlopen" modbus.la
691 collectd_DEPENDENCIES += modbus.la
694 if BUILD_PLUGIN_MULTIMETER
695 pkglib_LTLIBRARIES += multimeter.la
696 multimeter_la_SOURCES = multimeter.c
697 multimeter_la_LDFLAGS = -module -avoid-version
698 collectd_LDADD += "-dlopen" multimeter.la
699 collectd_DEPENDENCIES += multimeter.la
702 if BUILD_PLUGIN_MYSQL
703 pkglib_LTLIBRARIES += mysql.la
704 mysql_la_SOURCES = mysql.c
705 mysql_la_LDFLAGS = -module -avoid-version
706 mysql_la_CFLAGS = $(AM_CFLAGS)
708 collectd_LDADD += "-dlopen" mysql.la
709 if BUILD_WITH_LIBMYSQL
710 mysql_la_CFLAGS += $(BUILD_WITH_LIBMYSQL_CFLAGS)
711 mysql_la_LIBADD += $(BUILD_WITH_LIBMYSQL_LIBS)
713 collectd_DEPENDENCIES += mysql.la
716 if BUILD_PLUGIN_NETAPP
717 pkglib_LTLIBRARIES += netapp.la
718 netapp_la_SOURCES = netapp.c
719 netapp_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBNETAPP_CPPFLAGS)
720 netapp_la_LDFLAGS = -module -avoid-version $(LIBNETAPP_LDFLAGS)
721 netapp_la_LIBADD = $(LIBNETAPP_LIBS)
722 collectd_LDADD += "-dlopen" netapp.la
723 collectd_DEPENDENCIES += netapp.la
726 if BUILD_PLUGIN_NETLINK
727 pkglib_LTLIBRARIES += netlink.la
728 netlink_la_SOURCES = netlink.c
729 netlink_la_LDFLAGS = -module -avoid-version
730 netlink_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBNETLINK_CFLAGS)
731 netlink_la_LIBADD = $(BUILD_WITH_LIBNETLINK_LIBS)
732 collectd_LDADD += "-dlopen" netlink.la
733 collectd_DEPENDENCIES += netlink.la
736 if BUILD_PLUGIN_NETWORK
737 pkglib_LTLIBRARIES += network.la
738 network_la_SOURCES = network.c network.h \
739 utils_fbhash.c utils_fbhash.h
740 network_la_CPPFLAGS = $(AM_CPPFLAGS)
741 network_la_LDFLAGS = -module -avoid-version
742 network_la_LIBADD = -lpthread
743 if BUILD_WITH_LIBSOCKET
744 network_la_LIBADD += -lsocket
746 if BUILD_WITH_LIBGCRYPT
747 network_la_CPPFLAGS += $(GCRYPT_CPPFLAGS)
748 network_la_LDFLAGS += $(GCRYPT_LDFLAGS)
749 network_la_LIBADD += $(GCRYPT_LIBS)
751 collectd_LDADD += "-dlopen" network.la
752 collectd_DEPENDENCIES += network.la
756 pkglib_LTLIBRARIES += nfs.la
757 nfs_la_SOURCES = nfs.c
758 nfs_la_LDFLAGS = -module -avoid-version
759 collectd_LDADD += "-dlopen" nfs.la
760 collectd_DEPENDENCIES += nfs.la
763 if BUILD_PLUGIN_FSCACHE
764 pkglib_LTLIBRARIES += fscache.la
765 fscache_la_SOURCES = fscache.c
766 fscache_la_LDFLAGS = -module -avoid-version
767 collectd_LDADD += "-dlopen" fscache.la
768 collectd_DEPENDENCIES += fscache.la
771 if BUILD_PLUGIN_NGINX
772 pkglib_LTLIBRARIES += nginx.la
773 nginx_la_SOURCES = nginx.c
774 nginx_la_CFLAGS = $(AM_CFLAGS)
776 nginx_la_LDFLAGS = -module -avoid-version
777 if BUILD_WITH_LIBCURL
778 nginx_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
779 nginx_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
781 collectd_LDADD += "-dlopen" nginx.la
782 collectd_DEPENDENCIES += nginx.la
785 if BUILD_PLUGIN_NOTIFY_DESKTOP
786 pkglib_LTLIBRARIES += notify_desktop.la
787 notify_desktop_la_SOURCES = notify_desktop.c
788 notify_desktop_la_CFLAGS = $(AM_CFLAGS) $(LIBNOTIFY_CFLAGS)
789 notify_desktop_la_LDFLAGS = -module -avoid-version
790 notify_desktop_la_LIBADD = $(LIBNOTIFY_LIBS)
791 collectd_LDADD += "-dlopen" notify_desktop.la
792 collectd_DEPENDENCIES += notify_desktop.la
795 if BUILD_PLUGIN_NOTIFY_EMAIL
796 pkglib_LTLIBRARIES += notify_email.la
797 notify_email_la_SOURCES = notify_email.c
798 notify_email_la_LDFLAGS = -module -avoid-version
799 notify_email_la_LIBADD = -lesmtp -lssl -lcrypto -lpthread -ldl
800 collectd_LDADD += "-dlopen" notify_email.la
801 collectd_DEPENDENCIES += notify_email.la
805 pkglib_LTLIBRARIES += ntpd.la
806 ntpd_la_SOURCES = ntpd.c
807 ntpd_la_LDFLAGS = -module -avoid-version
809 if BUILD_WITH_LIBSOCKET
810 ntpd_la_LIBADD += -lsocket
812 collectd_LDADD += "-dlopen" ntpd.la
813 collectd_DEPENDENCIES += ntpd.la
817 pkglib_LTLIBRARIES += numa.la
818 numa_la_SOURCES = numa.c
819 numa_la_LDFLAGS = -module -avoid-version
820 collectd_LDADD += "-dlopen" numa.la
821 collectd_DEPENDENCIES += numa.la
825 pkglib_LTLIBRARIES += nut.la
826 nut_la_SOURCES = nut.c
827 nut_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
828 nut_la_LDFLAGS = -module -avoid-version
829 nut_la_LIBADD = -lpthread $(BUILD_WITH_LIBUPSCLIENT_LIBS)
830 collectd_LDADD += "-dlopen" nut.la
831 collectd_DEPENDENCIES += nut.la
834 if BUILD_PLUGIN_OLSRD
835 pkglib_LTLIBRARIES += olsrd.la
836 olsrd_la_SOURCES = olsrd.c
837 olsrd_la_LDFLAGS = -module -avoid-version
839 if BUILD_WITH_LIBSOCKET
840 olsrd_la_LIBADD += -lsocket
842 collectd_LDADD += "-dlopen" olsrd.la
843 collectd_DEPENDENCIES += olsrd.la
846 if BUILD_PLUGIN_ONEWIRE
847 pkglib_LTLIBRARIES += onewire.la
848 onewire_la_SOURCES = onewire.c
849 onewire_la_CFLAGS = $(AM_CFLAGS)
850 onewire_la_CPPFLAGS = $(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
851 onewire_la_LIBADD = $(BUILD_WITH_LIBOWCAPI_LIBS)
852 onewire_la_LDFLAGS = -module -avoid-version
853 collectd_LDADD += "-dlopen" onewire.la
854 collectd_DEPENDENCIES += onewire.la
857 if BUILD_PLUGIN_OPENVPN
858 pkglib_LTLIBRARIES += openvpn.la
859 openvpn_la_SOURCES = openvpn.c
860 openvpn_la_CFLAGS = $(AM_CFLAGS)
861 openvpn_la_LDFLAGS = -module -avoid-version
862 collectd_LDADD += "-dlopen" openvpn.la
863 collectd_DEPENDENCIES += openvpn.la
866 if BUILD_PLUGIN_ORACLE
867 pkglib_LTLIBRARIES += oracle.la
868 oracle_la_SOURCES = oracle.c \
869 utils_db_query.c utils_db_query.h
870 oracle_la_CFLAGS = $(AM_CFLAGS)
871 oracle_la_CPPFLAGS = $(BUILD_WITH_ORACLE_CFLAGS)
872 oracle_la_LIBADD = $(BUILD_WITH_ORACLE_LIBS)
873 oracle_la_LDFLAGS = -module -avoid-version
874 collectd_LDADD += "-dlopen" oracle.la
875 collectd_DEPENDENCIES += oracle.la
879 pkglib_LTLIBRARIES += perl.la
880 perl_la_SOURCES = perl.c
881 # Despite C99 providing the "bool" type thru stdbool.h, Perl defines its own
882 # version of that type if HAS_BOOL is not defined... *sigh*
883 perl_la_CPPFLAGS = $(AM_CPPFLAGS) -DHAS_BOOL=1
884 perl_la_CFLAGS = $(AM_CFLAGS) \
886 -DXS_VERSION=\"$(VERSION)\" -DVERSION=\"$(VERSION)\"
887 # Work-around for issues #41 and #42 - Perl 5.10 incorrectly introduced
888 # __attribute__nonnull__(3) for Perl_load_module().
889 if HAVE_BROKEN_PERL_LOAD_MODULE
890 perl_la_CFLAGS += -Wno-nonnull
892 perl_la_LDFLAGS = -module -avoid-version \
894 perl_la_LIBADD = $(PERL_LIBS)
895 collectd_LDADD += "-dlopen" perl.la
896 collectd_DEPENDENCIES += perl.la
900 pkglib_LTLIBRARIES += pf.la
902 pf_la_LDFLAGS = -module -avoid-version
903 collectd_LDADD += "-dlopen" pf.la
904 collectd_DEPENDENCIES += pf.la
907 if BUILD_PLUGIN_PINBA
908 pkglib_LTLIBRARIES += pinba.la
909 pinba_la_SOURCES = pinba.c
910 nodist_pinba_la_SOURCES = pinba.pb-c.c pinba.pb-c.h
911 pinba_la_LDFLAGS = -module -avoid-version
912 pinba_la_LIBADD = -lprotobuf-c
913 collectd_LDADD += "-dlopen" pinba.la
914 collectd_DEPENDENCIES += pinba.la
918 pkglib_LTLIBRARIES += ping.la
919 ping_la_SOURCES = ping.c
920 ping_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOPING_CPPFLAGS)
921 ping_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBOPING_LDFLAGS)
922 ping_la_LIBADD = -loping -lm
923 collectd_LDADD += "-dlopen" ping.la
924 collectd_DEPENDENCIES += ping.la
927 if BUILD_PLUGIN_POSTGRESQL
928 pkglib_LTLIBRARIES += postgresql.la
929 postgresql_la_SOURCES = postgresql.c \
930 utils_db_query.c utils_db_query.h
931 postgresql_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPQ_CPPFLAGS)
932 postgresql_la_LDFLAGS = -module -avoid-version \
933 $(BUILD_WITH_LIBPQ_LDFLAGS)
934 postgresql_la_LIBADD = -lpq
935 collectd_LDADD += "-dlopen" postgresql.la
936 collectd_DEPENDENCIES += postgresql.la
939 if BUILD_PLUGIN_POWERDNS
940 pkglib_LTLIBRARIES += powerdns.la
941 powerdns_la_SOURCES = powerdns.c
942 powerdns_la_LDFLAGS = -module -avoid-version
943 collectd_LDADD += "-dlopen" powerdns.la
944 collectd_DEPENDENCIES += powerdns.la
947 if BUILD_PLUGIN_PYTHON
948 pkglib_LTLIBRARIES += python.la
949 python_la_SOURCES = python.c pyconfig.c pyvalues.c cpython.h
950 python_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_PYTHON_CPPFLAGS)
951 python_la_CFLAGS = $(AM_CFLAGS)
953 python_la_CFLAGS += -fno-strict-aliasing -Wno-strict-aliasing
955 python_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_PYTHON_LDFLAGS)
956 python_la_LIBADD = $(BUILD_WITH_PYTHON_LIBS)
957 collectd_LDADD += "-dlopen" python.la
958 collectd_DEPENDENCIES += python.la
961 if BUILD_PLUGIN_PROCESSES
962 pkglib_LTLIBRARIES += processes.la
963 processes_la_SOURCES = processes.c
964 processes_la_LDFLAGS = -module -avoid-version
965 processes_la_LIBADD =
966 collectd_LDADD += "-dlopen" processes.la
967 collectd_DEPENDENCIES += processes.la
968 if BUILD_WITH_LIBKVM_GETPROCS
969 processes_la_LIBADD += -lkvm
973 if BUILD_PLUGIN_PROTOCOLS
974 pkglib_LTLIBRARIES += protocols.la
975 protocols_la_SOURCES = protocols.c
976 protocols_la_LDFLAGS = -module -avoid-version
977 collectd_LDADD += "-dlopen" protocols.la
978 collectd_DEPENDENCIES += protocols.la
981 if BUILD_PLUGIN_REDIS
982 pkglib_LTLIBRARIES += redis.la
983 redis_la_SOURCES = redis.c
984 redis_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBCREDIS_LDFLAGS)
985 redis_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCREDIS_CPPFLAGS)
986 redis_la_LIBADD = -lcredis
987 collectd_LDADD += "-dlopen" redis.la
988 collectd_DEPENDENCIES += redis.la
991 if BUILD_PLUGIN_ROUTEROS
992 pkglib_LTLIBRARIES += routeros.la
993 routeros_la_SOURCES = routeros.c
994 routeros_la_CPPFLAGS = $(BUILD_WITH_LIBROUTEROS_CPPFLAGS)
995 routeros_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBROUTEROS_LDFLAGS)
996 routeros_la_LIBADD = -lrouteros
997 collectd_LDADD += "-dlopen" routeros.la
998 collectd_DEPENDENCIES += routeros.la
1001 if BUILD_PLUGIN_RRDCACHED
1002 pkglib_LTLIBRARIES += rrdcached.la
1003 rrdcached_la_SOURCES = rrdcached.c utils_rrdcreate.c utils_rrdcreate.h
1004 rrdcached_la_LDFLAGS = -module -avoid-version
1005 rrdcached_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
1006 rrdcached_la_LIBADD = $(BUILD_WITH_LIBRRD_LDFLAGS)
1007 collectd_LDADD += "-dlopen" rrdcached.la
1008 collectd_DEPENDENCIES += rrdcached.la
1011 if BUILD_PLUGIN_RRDTOOL
1012 pkglib_LTLIBRARIES += rrdtool.la
1013 rrdtool_la_SOURCES = rrdtool.c utils_rrdcreate.c utils_rrdcreate.h
1014 rrdtool_la_LDFLAGS = -module -avoid-version
1015 rrdtool_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
1016 rrdtool_la_LIBADD = $(BUILD_WITH_LIBRRD_LDFLAGS)
1017 collectd_LDADD += "-dlopen" rrdtool.la
1018 collectd_DEPENDENCIES += rrdtool.la
1021 if BUILD_PLUGIN_SENSORS
1022 pkglib_LTLIBRARIES += sensors.la
1023 sensors_la_SOURCES = sensors.c
1024 sensors_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBSENSORS_CFLAGS)
1025 sensors_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBSENSORS_LDFLAGS)
1026 sensors_la_LIBADD = -lsensors
1027 collectd_LDADD += "-dlopen" sensors.la
1028 collectd_DEPENDENCIES += sensors.la
1031 if BUILD_PLUGIN_SERIAL
1032 pkglib_LTLIBRARIES += serial.la
1033 serial_la_SOURCES = serial.c
1034 serial_la_LDFLAGS = -module -avoid-version
1035 collectd_LDADD += "-dlopen" serial.la
1036 collectd_DEPENDENCIES += serial.la
1039 if BUILD_PLUGIN_SNMP
1040 pkglib_LTLIBRARIES += snmp.la
1041 snmp_la_SOURCES = snmp.c
1042 snmp_la_LDFLAGS = -module -avoid-version
1043 snmp_la_CFLAGS = $(AM_CFLAGS)
1045 if BUILD_WITH_LIBNETSNMP
1046 snmp_la_CFLAGS += $(BUILD_WITH_LIBSNMP_CFLAGS)
1047 snmp_la_LIBADD += $(BUILD_WITH_LIBSNMP_LIBS)
1049 if BUILD_WITH_LIBPTHREAD
1050 snmp_la_LIBADD += -lpthread
1052 collectd_LDADD += "-dlopen" snmp.la
1053 collectd_DEPENDENCIES += snmp.la
1056 if BUILD_PLUGIN_SWAP
1057 pkglib_LTLIBRARIES += swap.la
1058 swap_la_SOURCES = swap.c
1059 swap_la_CFLAGS = $(AM_CFLAGS)
1060 swap_la_LDFLAGS = -module -avoid-version
1062 collectd_LDADD += "-dlopen" swap.la
1063 collectd_DEPENDENCIES += swap.la
1064 if BUILD_WITH_LIBKSTAT
1065 swap_la_LIBADD += -lkstat
1067 if BUILD_WITH_LIBDEVINFO
1068 swap_la_LIBADD += -ldevinfo
1070 if BUILD_WITH_LIBKVM_GETSWAPINFO
1071 swap_la_LIBADD += -lkvm
1073 if BUILD_WITH_LIBSTATGRAB
1074 swap_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1075 swap_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1077 if BUILD_WITH_PERFSTAT
1078 swap_la_LIBADD += -lperfstat
1083 if BUILD_PLUGIN_SYSLOG
1084 pkglib_LTLIBRARIES += syslog.la
1085 syslog_la_SOURCES = syslog.c
1086 syslog_la_LDFLAGS = -module -avoid-version
1087 collectd_LDADD += "-dlopen" syslog.la
1088 collectd_DEPENDENCIES += syslog.la
1091 if BUILD_PLUGIN_TABLE
1092 pkglib_LTLIBRARIES += table.la
1093 table_la_SOURCES = table.c
1094 table_la_LDFLAGS = -module -avoid-version
1095 collectd_LDADD += "-dlopen" table.la
1096 collectd_DEPENDENCIES += table.la
1099 if BUILD_PLUGIN_TAIL
1100 pkglib_LTLIBRARIES += tail.la
1101 tail_la_SOURCES = tail.c
1102 tail_la_LDFLAGS = -module -avoid-version
1103 collectd_LDADD += "-dlopen" tail.la
1104 collectd_DEPENDENCIES += tail.la
1107 if BUILD_PLUGIN_TAIL_CSV
1108 pkglib_LTLIBRARIES += tail_csv.la
1109 tail_csv_la_SOURCES = tail_csv.c
1110 tail_csv_la_LDFLAGS = -module -avoid-version
1111 collectd_LDADD += "-dlopen" tail_csv.la
1112 collectd_DEPENDENCIES += tail_csv.la
1115 if BUILD_PLUGIN_TAPE
1116 pkglib_LTLIBRARIES += tape.la
1117 tape_la_SOURCES = tape.c
1118 tape_la_LDFLAGS = -module -avoid-version
1119 tape_la_LIBADD = -lkstat -ldevinfo
1120 collectd_LDADD += "-dlopen" tape.la
1121 collectd_DEPENDENCIES += tape.la
1124 if BUILD_PLUGIN_TARGET_NOTIFICATION
1125 pkglib_LTLIBRARIES += target_notification.la
1126 target_notification_la_SOURCES = target_notification.c
1127 target_notification_la_LDFLAGS = -module -avoid-version
1128 collectd_LDADD += "-dlopen" target_notification.la
1129 collectd_DEPENDENCIES += target_notification.la
1132 if BUILD_PLUGIN_TARGET_REPLACE
1133 pkglib_LTLIBRARIES += target_replace.la
1134 target_replace_la_SOURCES = target_replace.c
1135 target_replace_la_LDFLAGS = -module -avoid-version
1136 collectd_LDADD += "-dlopen" target_replace.la
1137 collectd_DEPENDENCIES += target_replace.la
1140 if BUILD_PLUGIN_TARGET_SCALE
1141 pkglib_LTLIBRARIES += target_scale.la
1142 target_scale_la_SOURCES = target_scale.c
1143 target_scale_la_LDFLAGS = -module -avoid-version
1144 collectd_LDADD += "-dlopen" target_scale.la
1145 collectd_DEPENDENCIES += target_scale.la
1148 if BUILD_PLUGIN_TARGET_SET
1149 pkglib_LTLIBRARIES += target_set.la
1150 target_set_la_SOURCES = target_set.c
1151 target_set_la_LDFLAGS = -module -avoid-version
1152 collectd_LDADD += "-dlopen" target_set.la
1153 collectd_DEPENDENCIES += target_set.la
1156 if BUILD_PLUGIN_TARGET_V5UPGRADE
1157 pkglib_LTLIBRARIES += target_v5upgrade.la
1158 target_v5upgrade_la_SOURCES = target_v5upgrade.c
1159 target_v5upgrade_la_LDFLAGS = -module -avoid-version
1160 collectd_LDADD += "-dlopen" target_v5upgrade.la
1161 collectd_DEPENDENCIES += target_v5upgrade.la
1164 if BUILD_PLUGIN_TCPCONNS
1165 pkglib_LTLIBRARIES += tcpconns.la
1166 tcpconns_la_SOURCES = tcpconns.c
1167 tcpconns_la_LDFLAGS = -module -avoid-version
1168 tcpconns_la_LIBADD =
1169 collectd_LDADD += "-dlopen" tcpconns.la
1170 collectd_DEPENDENCIES += tcpconns.la
1171 if BUILD_WITH_LIBKVM_NLIST
1172 tcpconns_la_LIBADD += -lkvm
1176 if BUILD_PLUGIN_TEAMSPEAK2
1177 pkglib_LTLIBRARIES += teamspeak2.la
1178 teamspeak2_la_SOURCES = teamspeak2.c
1179 teamspeak2_la_LDFLAGS = -module -avoid-version
1180 collectd_LDADD += "-dlopen" teamspeak2.la
1181 collectd_DEPENDENCIES += teamspeak2.la
1185 pkglib_LTLIBRARIES += ted.la
1186 ted_la_SOURCES = ted.c
1187 ted_la_LDFLAGS = -module -avoid-version
1188 collectd_LDADD += "-dlopen" ted.la
1189 collectd_DEPENDENCIES += ted.la
1192 if BUILD_PLUGIN_THERMAL
1193 pkglib_LTLIBRARIES += thermal.la
1194 thermal_la_SOURCES = thermal.c
1195 thermal_la_LDFLAGS = -module -avoid-version
1196 collectd_LDADD += "-dlopen" thermal.la
1197 collectd_DEPENDENCIES += thermal.la
1200 if BUILD_PLUGIN_THRESHOLD
1201 pkglib_LTLIBRARIES += threshold.la
1202 threshold_la_SOURCES = threshold.c
1203 threshold_la_LDFLAGS = -module -avoid-version
1204 collectd_LDADD += "-dlopen" threshold.la
1205 collectd_DEPENDENCIES += threshold.la
1208 if BUILD_PLUGIN_TOKYOTYRANT
1209 pkglib_LTLIBRARIES += tokyotyrant.la
1210 tokyotyrant_la_SOURCES = tokyotyrant.c
1211 tokyotyrant_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS)
1212 tokyotyrant_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS)
1213 tokyotyrant_la_LIBADD = $(BUILD_WITH_LIBTOKYOTYRANT_LIBS)
1214 if BUILD_WITH_LIBSOCKET
1215 tokyotyrant_la_LIBADD += -lsocket
1217 collectd_LDADD += "-dlopen" tokyotyrant.la
1218 collectd_DEPENDENCIES += tokyotyrant.la
1221 if BUILD_PLUGIN_UNIXSOCK
1222 pkglib_LTLIBRARIES += unixsock.la
1223 unixsock_la_SOURCES = unixsock.c \
1224 utils_cmd_flush.h utils_cmd_flush.c \
1225 utils_cmd_getval.h utils_cmd_getval.c \
1226 utils_cmd_listval.h utils_cmd_listval.c \
1227 utils_cmd_putval.h utils_cmd_putval.c \
1228 utils_cmd_putnotif.h utils_cmd_putnotif.c
1229 unixsock_la_LDFLAGS = -module -avoid-version
1230 unixsock_la_LIBADD = -lpthread
1231 collectd_LDADD += "-dlopen" unixsock.la
1232 collectd_DEPENDENCIES += unixsock.la
1235 if BUILD_PLUGIN_UPTIME
1236 pkglib_LTLIBRARIES += uptime.la
1237 uptime_la_SOURCES = uptime.c
1238 uptime_la_CFLAGS = $(AM_CFLAGS)
1239 uptime_la_LDFLAGS = -module -avoid-version
1241 if BUILD_WITH_LIBKSTAT
1242 uptime_la_LIBADD += -lkstat
1244 if BUILD_WITH_PERFSTAT
1245 uptime_la_LIBADD += -lperfstat
1247 collectd_LDADD += "-dlopen" uptime.la
1248 collectd_DEPENDENCIES += uptime.la
1251 if BUILD_PLUGIN_USERS
1252 pkglib_LTLIBRARIES += users.la
1253 users_la_SOURCES = users.c
1254 users_la_CFLAGS = $(AM_CFLAGS)
1255 users_la_LDFLAGS = -module -avoid-version
1257 if BUILD_WITH_LIBSTATGRAB
1258 users_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1259 users_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1261 collectd_LDADD += "-dlopen" users.la
1262 collectd_DEPENDENCIES += users.la
1265 if BUILD_PLUGIN_UUID
1266 pkglib_LTLIBRARIES += uuid.la
1267 uuid_la_SOURCES = uuid.c
1268 uuid_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBHAL_CFLAGS)
1269 uuid_la_LIBADD = $(BUILD_WITH_LIBHAL_LIBS)
1270 uuid_la_LDFLAGS = -module -avoid-version
1271 collectd_LDADD += "-dlopen" uuid.la
1272 collectd_DEPENDENCIES += uuid.la
1275 if BUILD_PLUGIN_VARNISH
1276 pkglib_LTLIBRARIES += varnish.la
1277 varnish_la_SOURCES = varnish.c
1278 varnish_la_LDFLAGS = -module -avoid-version
1279 varnish_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBVARNISH_CFLAGS)
1280 varnish_la_LIBADD = $(BUILD_WITH_LIBVARNISH_LIBS)
1281 collectd_LDADD += "-dlopen" varnish.la
1282 collectd_DEPENDENCIES += varnish.la
1285 if BUILD_PLUGIN_VMEM
1286 pkglib_LTLIBRARIES += vmem.la
1287 vmem_la_SOURCES = vmem.c
1288 vmem_la_LDFLAGS = -module -avoid-version
1289 collectd_LDADD += "-dlopen" vmem.la
1290 collectd_DEPENDENCIES += vmem.la
1293 if BUILD_PLUGIN_VSERVER
1294 pkglib_LTLIBRARIES += vserver.la
1295 vserver_la_SOURCES = vserver.c
1296 vserver_la_LDFLAGS = -module -avoid-version
1297 collectd_LDADD += "-dlopen" vserver.la
1298 collectd_DEPENDENCIES += vserver.la
1301 if BUILD_PLUGIN_WIRELESS
1302 pkglib_LTLIBRARIES += wireless.la
1303 wireless_la_SOURCES = wireless.c
1304 wireless_la_LDFLAGS = -module -avoid-version
1305 collectd_LDADD += "-dlopen" wireless.la
1306 collectd_DEPENDENCIES += wireless.la
1309 if BUILD_PLUGIN_WRITE_GRAPHITE
1310 pkglib_LTLIBRARIES += write_graphite.la
1311 write_graphite_la_SOURCES = write_graphite.c \
1312 utils_format_graphite.c utils_format_graphite.h \
1313 utils_format_json.c utils_format_json.h
1314 write_graphite_la_LDFLAGS = -module -avoid-version
1315 collectd_LDADD += "-dlopen" write_graphite.la
1316 collectd_DEPENDENCIES += write_graphite.la
1319 if BUILD_PLUGIN_WRITE_HTTP
1320 pkglib_LTLIBRARIES += write_http.la
1321 write_http_la_SOURCES = write_http.c \
1322 utils_format_json.c utils_format_json.h
1323 write_http_la_LDFLAGS = -module -avoid-version
1324 write_http_la_CFLAGS = $(AM_CFLAGS)
1325 write_http_la_LIBADD =
1326 collectd_LDADD += "-dlopen" write_http.la
1327 if BUILD_WITH_LIBCURL
1328 write_http_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
1329 write_http_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
1331 collectd_DEPENDENCIES += write_http.la
1334 if BUILD_PLUGIN_WRITE_MONGODB
1335 pkglib_LTLIBRARIES += write_mongodb.la
1336 write_mongodb_la_SOURCES = write_mongodb.c
1337 write_mongodb_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMONGOC_CPPFLAGS)
1338 write_mongodb_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBMONGOC_LDFLAGS)
1339 write_mongodb_la_LIBADD = -lmongoc
1340 collectd_LDADD += "-dlopen" write_mongodb.la
1341 collectd_DEPENDENCIES += write_mongodb.la
1344 if BUILD_PLUGIN_WRITE_REDIS
1345 pkglib_LTLIBRARIES += write_redis.la
1346 write_redis_la_SOURCES = write_redis.c
1347 write_redis_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBCREDIS_LDFLAGS)
1348 write_redis_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCREDIS_CPPFLAGS)
1349 write_redis_la_LIBADD = -lcredis
1350 collectd_LDADD += "-dlopen" write_redis.la
1351 collectd_DEPENDENCIES += write_redis.la
1354 if BUILD_PLUGIN_WRITE_RIEMANN
1355 pkglib_LTLIBRARIES += write_riemann.la
1356 write_riemann_la_SOURCES = write_riemann.c
1357 nodist_write_riemann_la_SOURCES = riemann.pb-c.c riemann.pb-c.h
1358 write_riemann_la_LDFLAGS = -module -avoid-version
1359 write_riemann_la_LIBADD = -lprotobuf-c
1360 collectd_LDADD += "-dlopen" write_riemann.la
1361 collectd_DEPENDENCIES += write_riemann.la
1364 if BUILD_PLUGIN_XMMS
1365 pkglib_LTLIBRARIES += xmms.la
1366 xmms_la_SOURCES = xmms.c
1367 xmms_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBXMMS_CFLAGS)
1368 xmms_la_LDFLAGS = -module -avoid-version
1369 xmms_la_LIBADD = $(BUILD_WITH_LIBXMMS_LIBS)
1370 collectd_LDADD += "-dlopen" xmms.la
1371 collectd_DEPENDENCIES += xmms.la
1374 if BUILD_PLUGIN_ZFS_ARC
1375 pkglib_LTLIBRARIES += zfs_arc.la
1376 zfs_arc_la_SOURCES = zfs_arc.c
1377 zfs_arc_la_CFLAGS = $(AM_CFLAGS)
1378 zfs_arc_la_LDFLAGS = -module -avoid-version
1379 zfs_arc_la_LIBADD = -lkstat
1380 collectd_LDADD += "-dlopen" zfs_arc.la
1381 collectd_DEPENDENCIES += zfs_arc.la
1384 BUILT_SOURCES += $(dist_man_MANS)
1386 dist_man_MANS = collectd.1 \
1398 collectd-threshold.5 \
1399 collectd-unixsock.5 \
1402 #collectd_1_SOURCES = collectd.pod
1404 EXTRA_DIST = types.db
1406 EXTRA_DIST += collectd.conf.pod \
1407 collectd-email.pod \
1412 collectd-nagios.pod \
1414 collectd-python.pod \
1418 collectd-threshold.pod \
1419 collectd-unixsock.pod \
1420 postgresql_default.conf \
1424 pod2man --release=$(VERSION) --center=$(PACKAGE) $< \
1425 >.pod2man.tmp.$$$$ 2>/dev/null && mv -f .pod2man.tmp.$$$$ $@ || true
1426 @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
1428 echo "$@ has some POD errors!"; false; \
1432 pod2man --section=5 --release=$(VERSION) --center=$(PACKAGE) $< \
1433 >.pod2man.tmp.$$$$ 2>/dev/null && mv -f .pod2man.tmp.$$$$ $@ || true
1434 @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
1436 echo "$@ has some POD errors!"; false; \
1439 # Protocol buffer for the "pinba" plugin.
1440 EXTRA_DIST += pinba.proto
1442 CLEANFILES += pinba.pb-c.c pinba.pb-c.h
1443 BUILT_SOURCES += pinba.pb-c.c pinba.pb-c.h
1445 pinba.pb-c.c pinba.pb-c.h: pinba.proto
1446 protoc-c -I$(srcdir) --c_out . $(srcdir)/pinba.proto
1449 # Protocol buffer for the "write_riemann" plugin.
1450 EXTRA_DIST += riemann.proto
1452 CLEANFILES += riemann.pb-c.c riemann.pb-c.h
1454 BUILT_SOURCES += riemann.pb-c.c riemann.pb-c.h
1456 riemann.pb-c.c riemann.pb-c.h: riemann.proto
1457 protoc-c -I$(srcdir) --c_out . $(srcdir)/riemann.proto
1461 $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
1462 if test -e $(DESTDIR)$(sysconfdir)/collectd.conf; \
1464 $(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf.pkg-orig; \
1466 $(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf; \
1468 $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
1469 $(INSTALL) -m 0644 $(srcdir)/types.db $(DESTDIR)$(pkgdatadir)/types.db;
1470 $(INSTALL) -m 0644 $(srcdir)/postgresql_default.conf \
1471 $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;
1474 rm -f $(DESTDIR)$(pkgdatadir)/types.db;
1475 rm -f $(DESTDIR)$(sysconfdir)/collectd.conf
1476 rm -f $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;
1478 if BUILD_FEATURE_DEBUG
1479 bin_PROGRAMS += utils_vl_lookup_test
1480 utils_vl_lookup_test_SOURCES = utils_vl_lookup_test.c \
1481 utils_vl_lookup.h utils_vl_lookup.c \
1482 utils_avltree.c utils_avltree.h \
1485 utils_vl_lookup_test_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL) -DBUILD_TEST=1
1486 utils_vl_lookup_test_CFLAGS = $(AM_CFLAGS)
1487 utils_vl_lookup_test_LDFLAGS = -export-dynamic
1488 utils_vl_lookup_test_LDADD =