1 SUBDIRS = libcollectdclient
2 if BUILD_WITH_OWN_LIBIPTC
5 if BUILD_WITH_OWN_LIBOCONFIG
10 AM_CFLAGS = -Wall -Werror
13 AM_CPPFLAGS = -DPREFIX='"${prefix}"'
14 AM_CPPFLAGS += -DCONFIGFILE='"${sysconfdir}/${PACKAGE_NAME}.conf"'
15 AM_CPPFLAGS += -DLOCALSTATEDIR='"${localstatedir}"'
16 AM_CPPFLAGS += -DPKGLOCALSTATEDIR='"${localstatedir}/lib/${PACKAGE_NAME}"'
17 if BUILD_FEATURE_DAEMON
18 AM_CPPFLAGS += -DPIDFILE='"${localstatedir}/run/${PACKAGE_NAME}.pid"'
20 AM_CPPFLAGS += -DPLUGINDIR='"${pkglibdir}"'
21 AM_CPPFLAGS += -DPKGDATADIR='"${pkgdatadir}"'
23 sbin_PROGRAMS = collectd collectdmon
24 bin_PROGRAMS = collectd-nagios
26 collectd_SOURCES = collectd.c collectd.h \
28 configfile.c configfile.h \
29 filter_chain.c filter_chain.h \
30 meta_data.c meta_data.h \
32 utils_avltree.c utils_avltree.h \
33 utils_cache.c utils_cache.h \
34 utils_complain.c utils_complain.h \
35 utils_heap.c utils_heap.h \
36 utils_ignorelist.c utils_ignorelist.h \
37 utils_llist.c utils_llist.h \
38 utils_parse_option.c utils_parse_option.h \
39 utils_tail_match.c utils_tail_match.h \
40 utils_match.c utils_match.h \
41 utils_mount.c utils_mount.h \
42 utils_subst.c utils_subst.h \
43 utils_tail.c utils_tail.h \
44 utils_threshold.c utils_threshold.h \
45 types_list.c types_list.h
47 collectd_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL)
48 collectd_CFLAGS = $(AM_CFLAGS)
49 collectd_LDFLAGS = -export-dynamic
51 collectd_DEPENDENCIES =
53 # Link to these libraries..
55 collectd_LDADD += -lrt
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 # The daemon needs to call sg_init, so we need to link it against libstatgrab,
75 if BUILD_WITH_LIBSTATGRAB
76 collectd_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
77 collectd_LDADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
80 if BUILD_WITH_OWN_LIBOCONFIG
81 collectd_LDADD += $(LIBLTDL) liboconfig/liboconfig.la
82 collectd_DEPENDENCIES += $(LIBLTDL) liboconfig/liboconfig.la
84 collectd_LDADD += -loconfig
87 collectdmon_SOURCES = collectdmon.c
88 collectdmon_CPPFLAGS = $(AM_CPPFLAGS)
90 collectd_nagios_SOURCES = collectd-nagios.c
91 collectd_nagios_LDADD =
92 if BUILD_WITH_LIBSOCKET
93 collectd_nagios_LDADD += -lsocket
95 collectd_nagios_LDADD += libcollectdclient/libcollectdclient.la
96 collectd_nagios_DEPENDENCIES = libcollectdclient/libcollectdclient.la
100 if BUILD_PLUGIN_APACHE
101 pkglib_LTLIBRARIES += apache.la
102 apache_la_SOURCES = apache.c
103 apache_la_LDFLAGS = -module -avoid-version
104 apache_la_CFLAGS = $(AM_CFLAGS)
106 collectd_LDADD += "-dlopen" apache.la
107 if BUILD_WITH_LIBCURL
108 apache_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
109 apache_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
111 collectd_DEPENDENCIES += apache.la
114 if BUILD_PLUGIN_APCUPS
115 pkglib_LTLIBRARIES += apcups.la
116 apcups_la_SOURCES = apcups.c
117 apcups_la_LDFLAGS = -module -avoid-version
119 if BUILD_WITH_LIBSOCKET
120 apcups_la_LIBADD += -lsocket
122 collectd_LDADD += "-dlopen" apcups.la
123 collectd_DEPENDENCIES += apcups.la
126 if BUILD_PLUGIN_APPLE_SENSORS
127 pkglib_LTLIBRARIES += apple_sensors.la
128 apple_sensors_la_SOURCES = apple_sensors.c
129 apple_sensors_la_LDFLAGS = -module -avoid-version
130 apple_sensors_la_LIBADD = -lIOKit
131 collectd_LDADD += "-dlopen" apple_sensors.la
132 collectd_DEPENDENCIES += apple_sensors.la
135 if BUILD_PLUGIN_ASCENT
136 pkglib_LTLIBRARIES += ascent.la
137 ascent_la_SOURCES = ascent.c
138 ascent_la_LDFLAGS = -module -avoid-version
139 ascent_la_CFLAGS = $(AM_CFLAGS) \
140 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
141 ascent_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
142 collectd_LDADD += "-dlopen" ascent.la
143 collectd_DEPENDENCIES += ascent.la
146 if BUILD_PLUGIN_BATTERY
147 pkglib_LTLIBRARIES += battery.la
148 battery_la_SOURCES = battery.c
149 battery_la_LDFLAGS = -module -avoid-version
151 if BUILD_WITH_LIBIOKIT
152 battery_la_LIBADD += -lIOKit
154 collectd_LDADD += "-dlopen" battery.la
155 collectd_DEPENDENCIES += battery.la
159 pkglib_LTLIBRARIES += bind.la
160 bind_la_SOURCES = bind.c
161 bind_la_LDFLAGS = -module -avoid-version
162 bind_la_CFLAGS = $(AM_CFLAGS) \
163 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
164 bind_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
165 collectd_LDADD += "-dlopen" bind.la
166 collectd_DEPENDENCIES += bind.la
169 if BUILD_PLUGIN_CONNTRACK
170 pkglib_LTLIBRARIES += conntrack.la
171 conntrack_la_SOURCES = conntrack.c
172 conntrack_la_LDFLAGS = -module -avoid-version
173 collectd_LDADD += "-dlopen" conntrack.la
174 collectd_DEPENDENCIES += conntrack.la
178 pkglib_LTLIBRARIES += cpu.la
179 cpu_la_SOURCES = cpu.c
180 cpu_la_CFLAGS = $(AM_CFLAGS)
181 cpu_la_LDFLAGS = -module -avoid-version
183 if BUILD_WITH_LIBKSTAT
184 cpu_la_LIBADD += -lkstat
186 if BUILD_WITH_LIBDEVINFO
187 cpu_la_LIBADD += -ldevinfo
189 if BUILD_WITH_LIBSTATGRAB
190 cpu_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
191 cpu_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
193 collectd_LDADD += "-dlopen" cpu.la
194 collectd_DEPENDENCIES += cpu.la
197 if BUILD_PLUGIN_CPUFREQ
198 pkglib_LTLIBRARIES += cpufreq.la
199 cpufreq_la_SOURCES = cpufreq.c
200 cpufreq_la_LDFLAGS = -module -avoid-version
201 collectd_LDADD += "-dlopen" cpufreq.la
202 collectd_DEPENDENCIES += cpufreq.la
206 pkglib_LTLIBRARIES += csv.la
207 csv_la_SOURCES = csv.c
208 csv_la_LDFLAGS = -module -avoid-version
209 collectd_LDADD += "-dlopen" csv.la
210 collectd_DEPENDENCIES += csv.la
214 pkglib_LTLIBRARIES += curl.la
215 curl_la_SOURCES = curl.c
216 curl_la_LDFLAGS = -module -avoid-version
217 curl_la_CFLAGS = $(AM_CFLAGS)
219 collectd_LDADD += "-dlopen" curl.la
220 if BUILD_WITH_LIBCURL
221 curl_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
222 curl_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
224 collectd_DEPENDENCIES += curl.la
228 pkglib_LTLIBRARIES += dbi.la
229 dbi_la_SOURCES = dbi.c \
230 utils_db_query.c utils_db_query.h
231 dbi_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBDBI_CPPFLAGS)
232 dbi_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBDBI_LDFLAGS)
233 dbi_la_LIBADD = $(BUILD_WITH_LIBDBI_LIBS)
234 collectd_LDADD += "-dlopen" dbi.la
235 collectd_DEPENDENCIES += dbi.la
239 pkglib_LTLIBRARIES += df.la
241 df_la_LDFLAGS = -module -avoid-version
242 collectd_LDADD += "-dlopen" df.la
243 collectd_DEPENDENCIES += df.la
247 pkglib_LTLIBRARIES += disk.la
248 disk_la_SOURCES = disk.c
249 disk_la_CFLAGS = $(AM_CFLAGS)
250 disk_la_LDFLAGS = -module -avoid-version
252 if BUILD_WITH_LIBKSTAT
253 disk_la_LIBADD += -lkstat
255 if BUILD_WITH_LIBDEVINFO
256 disk_la_LIBADD += -ldevinfo
258 if BUILD_WITH_LIBIOKIT
259 disk_la_LIBADD += -lIOKit
261 if BUILD_WITH_LIBSTATGRAB
262 disk_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
263 disk_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
265 collectd_LDADD += "-dlopen" disk.la
266 collectd_DEPENDENCIES += disk.la
270 pkglib_LTLIBRARIES += dns.la
271 dns_la_SOURCES = dns.c utils_dns.c utils_dns.h
272 dns_la_LDFLAGS = -module -avoid-version
273 dns_la_LIBADD = -lpcap -lpthread
274 collectd_LDADD += "-dlopen" dns.la
275 collectd_DEPENDENCIES += dns.la
278 if BUILD_PLUGIN_EMAIL
279 pkglib_LTLIBRARIES += email.la
280 email_la_SOURCES = email.c
281 email_la_LDFLAGS = -module -avoid-version
282 email_la_LIBADD = -lpthread
283 collectd_LDADD += "-dlopen" email.la
284 collectd_DEPENDENCIES += email.la
287 if BUILD_PLUGIN_ENTROPY
288 pkglib_LTLIBRARIES += entropy.la
289 entropy_la_SOURCES = entropy.c
290 entropy_la_LDFLAGS = -module -avoid-version
291 collectd_LDADD += "-dlopen" entropy.la
292 collectd_DEPENDENCIES += entropy.la
296 pkglib_LTLIBRARIES += exec.la
297 exec_la_SOURCES = exec.c \
298 utils_cmd_putnotif.c utils_cmd_putnotif.h \
299 utils_cmd_putval.c utils_cmd_putval.h
300 exec_la_LDFLAGS = -module -avoid-version
301 exec_la_LIBADD = -lpthread
302 collectd_LDADD += "-dlopen" exec.la
303 collectd_DEPENDENCIES += exec.la
306 if BUILD_PLUGIN_FILECOUNT
307 pkglib_LTLIBRARIES += filecount.la
308 filecount_la_SOURCES = filecount.c
309 filecount_la_LDFLAGS = -module -avoid-version
310 collectd_LDADD += "-dlopen" filecount.la
311 collectd_DEPENDENCIES += filecount.la
314 if BUILD_PLUGIN_GMOND
315 pkglib_LTLIBRARIES += gmond.la
316 gmond_la_SOURCES = gmond.c
317 gmond_la_CPPFLAGS = $(AM_CPPFLAGS) $(GANGLIA_CPPFLAGS)
318 gmond_la_LDFLAGS = -module -avoid-version $(GANGLIA_LDFLAGS)
319 gmond_la_LIBADD = $(GANGLIA_LIBS)
320 collectd_LDADD += "-dlopen" gmond.la
321 collectd_DEPENDENCIES += gmond.la
324 if BUILD_PLUGIN_HDDTEMP
325 pkglib_LTLIBRARIES += hddtemp.la
326 hddtemp_la_SOURCES = hddtemp.c
327 hddtemp_la_LDFLAGS = -module -avoid-version
329 if BUILD_WITH_LIBSOCKET
330 hddtemp_la_LIBADD += -lsocket
332 collectd_LDADD += "-dlopen" hddtemp.la
333 collectd_DEPENDENCIES += hddtemp.la
336 if BUILD_PLUGIN_INTERFACE
337 pkglib_LTLIBRARIES += interface.la
338 interface_la_SOURCES = interface.c
339 interface_la_CFLAGS = $(AM_CFLAGS)
340 interface_la_LDFLAGS = -module -avoid-version
341 interface_la_LIBADD =
342 collectd_LDADD += "-dlopen" interface.la
343 collectd_DEPENDENCIES += interface.la
344 if BUILD_WITH_LIBSTATGRAB
345 interface_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
346 interface_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
348 if BUILD_WITH_LIBKSTAT
349 interface_la_LIBADD += -lkstat
351 if BUILD_WITH_LIBDEVINFO
352 interface_la_LIBADD += -ldevinfo
353 endif # BUILD_WITH_LIBDEVINFO
354 endif # !BUILD_WITH_LIBSTATGRAB
355 endif # BUILD_PLUGIN_INTERFACE
357 if BUILD_PLUGIN_IPTABLES
358 pkglib_LTLIBRARIES += iptables.la
359 iptables_la_SOURCES = iptables.c
360 iptables_la_LDFLAGS = -module -avoid-version
361 if BUILD_WITH_OWN_LIBIPTC
362 iptables_la_LIBADD = libiptc/libiptc.la
363 iptables_la_DEPENDENCIES = libiptc/libiptc.la
365 iptables_la_LIBADD = -liptc
367 collectd_LDADD += "-dlopen" iptables.la
368 collectd_DEPENDENCIES += iptables.la
372 pkglib_LTLIBRARIES += ipmi.la
373 ipmi_la_SOURCES = ipmi.c
374 ipmi_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_OPENIPMI_CFLAGS)
375 ipmi_la_LDFLAGS = -module -avoid-version
376 ipmi_la_LIBADD = $(BUILD_WITH_OPENIPMI_LIBS)
377 collectd_LDADD += "-dlopen" ipmi.la
378 collectd_DEPENDENCIES += ipmi.la
382 pkglib_LTLIBRARIES += ipvs.la
383 ipvs_la_SOURCES = ipvs.c
384 ipvs_la_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS)
385 ipvs_la_LDFLAGS = -module -avoid-version
386 collectd_LDADD += "-dlopen" ipvs.la
387 collectd_DEPENDENCIES += ipvs.la
391 pkglib_LTLIBRARIES += irq.la
392 irq_la_SOURCES = irq.c
393 irq_la_LDFLAGS = -module -avoid-version
394 collectd_LDADD += "-dlopen" irq.la
395 collectd_DEPENDENCIES += irq.la
399 pkglib_LTLIBRARIES += java.la
400 java_la_SOURCES = java.c
401 java_la_CPPFLAGS = $(AM_CPPFLAGS) $(JAVA_CPPFLAGS)
402 java_la_CFLAGS = $(AM_CFLAGS) $(JAVA_CFLAGS)
403 java_la_LDFLAGS = -module -avoid-version $(JAVA_LDFLAGS)
404 java_la_LIBADD = $(JAVA_LIBS)
405 collectd_LDADD += "-dlopen" java.la
406 collectd_DEPENDENCIES += java.la
409 if BUILD_PLUGIN_LIBVIRT
410 pkglib_LTLIBRARIES += libvirt.la
411 libvirt_la_SOURCES = libvirt.c
412 libvirt_la_CFLAGS = $(AM_CFLAGS) \
413 $(BUILD_WITH_LIBVIRT_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
414 libvirt_la_LIBADD = $(BUILD_WITH_LIBVIRT_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
415 libvirt_la_LDFLAGS = -module -avoid-version
416 collectd_LDADD += "-dlopen" libvirt.la
417 collectd_DEPENDENCIES += libvirt.la
421 pkglib_LTLIBRARIES += load.la
422 load_la_SOURCES = load.c
423 load_la_CFLAGS = $(AM_CFLAGS)
424 load_la_LDFLAGS = -module -avoid-version
426 collectd_LDADD += "-dlopen" load.la
427 collectd_DEPENDENCIES += load.la
428 if BUILD_WITH_LIBSTATGRAB
429 load_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
430 load_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
431 endif # BUILD_WITH_LIBSTATGRAB
432 endif # BUILD_PLUGIN_LOAD
434 if BUILD_PLUGIN_LOGFILE
435 pkglib_LTLIBRARIES += logfile.la
436 logfile_la_SOURCES = logfile.c
437 logfile_la_LDFLAGS = -module -avoid-version
438 collectd_LDADD += "-dlopen" logfile.la
439 collectd_DEPENDENCIES += logfile.la
442 if BUILD_PLUGIN_MATCH_REGEX
443 pkglib_LTLIBRARIES += match_regex.la
444 match_regex_la_SOURCES = match_regex.c
445 match_regex_la_LDFLAGS = -module -avoid-version
446 collectd_LDADD += "-dlopen" match_regex.la
447 collectd_DEPENDENCIES += match_regex.la
450 if BUILD_PLUGIN_MATCH_TIMEDIFF
451 pkglib_LTLIBRARIES += match_timediff.la
452 match_timediff_la_SOURCES = match_timediff.c
453 match_timediff_la_LDFLAGS = -module -avoid-version
454 collectd_LDADD += "-dlopen" match_timediff.la
455 collectd_DEPENDENCIES += match_timediff.la
458 if BUILD_PLUGIN_MATCH_VALUE
459 pkglib_LTLIBRARIES += match_value.la
460 match_value_la_SOURCES = match_value.c
461 match_value_la_LDFLAGS = -module -avoid-version
462 collectd_LDADD += "-dlopen" match_value.la
463 collectd_DEPENDENCIES += match_value.la
466 if BUILD_PLUGIN_MBMON
467 pkglib_LTLIBRARIES += mbmon.la
468 mbmon_la_SOURCES = mbmon.c
469 mbmon_la_LDFLAGS = -module -avoid-version
471 if BUILD_WITH_LIBSOCKET
472 mbmon_la_LIBADD += -lsocket
474 collectd_LDADD += "-dlopen" mbmon.la
475 collectd_DEPENDENCIES += mbmon.la
478 if BUILD_PLUGIN_MEMCACHEC
479 pkglib_LTLIBRARIES += memcachec.la
480 memcachec_la_SOURCES = memcachec.c
481 memcachec_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBMEMCACHED_LDFLAGS)
482 memcachec_la_CPPFLAGS = $(BUILD_WITH_LIBMEMCACHED_CPPFLAGS)
483 memcachec_la_LIBADD = $(BUILD_WITH_LIBMEMCACHED_LIBS)
484 collectd_LDADD += "-dlopen" memcachec.la
485 collectd_DEPENDENCIES += memcachec.la
488 if BUILD_PLUGIN_MEMCACHED
489 pkglib_LTLIBRARIES += memcached.la
490 memcached_la_SOURCES = memcached.c
491 memcached_la_LDFLAGS = -module -avoid-version
492 memcached_la_LIBADD =
493 if BUILD_WITH_LIBSOCKET
494 memcached_la_LIBADD += -lsocket
496 collectd_LDADD += "-dlopen" memcached.la
497 collectd_DEPENDENCIES += memcached.la
500 if BUILD_PLUGIN_MEMORY
501 pkglib_LTLIBRARIES += memory.la
502 memory_la_SOURCES = memory.c
503 memory_la_CFLAGS = $(AM_CFLAGS)
504 memory_la_LDFLAGS = -module -avoid-version
506 collectd_LDADD += "-dlopen" memory.la
507 collectd_DEPENDENCIES += memory.la
508 if BUILD_WITH_LIBKSTAT
509 memory_la_LIBADD += -lkstat
511 if BUILD_WITH_LIBDEVINFO
512 memory_la_LIBADD += -ldevinfo
514 if BUILD_WITH_LIBSTATGRAB
515 memory_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
516 memory_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
520 if BUILD_PLUGIN_MULTIMETER
521 pkglib_LTLIBRARIES += multimeter.la
522 multimeter_la_SOURCES = multimeter.c
523 multimeter_la_LDFLAGS = -module -avoid-version
524 collectd_LDADD += "-dlopen" multimeter.la
525 collectd_DEPENDENCIES += multimeter.la
528 if BUILD_PLUGIN_MYSQL
529 pkglib_LTLIBRARIES += mysql.la
530 mysql_la_SOURCES = mysql.c
531 mysql_la_LDFLAGS = -module -avoid-version
532 mysql_la_CFLAGS = $(AM_CFLAGS)
534 collectd_LDADD += "-dlopen" mysql.la
535 if BUILD_WITH_LIBMYSQL
536 mysql_la_CFLAGS += $(BUILD_WITH_LIBMYSQL_CFLAGS)
537 mysql_la_LIBADD += $(BUILD_WITH_LIBMYSQL_LIBS)
539 collectd_DEPENDENCIES += mysql.la
542 if BUILD_PLUGIN_NETLINK
543 pkglib_LTLIBRARIES += netlink.la
544 netlink_la_SOURCES = netlink.c
545 netlink_la_LDFLAGS = -module -avoid-version
546 netlink_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBNETLINK_CFLAGS)
547 netlink_la_LIBADD = $(BUILD_WITH_LIBNETLINK_LIBS)
548 collectd_LDADD += "-dlopen" netlink.la
549 collectd_DEPENDENCIES += netlink.la
552 if BUILD_PLUGIN_NETWORK
553 pkglib_LTLIBRARIES += network.la
554 network_la_SOURCES = network.c network.h
555 network_la_CPPFLAGS = $(AM_CPPFLAGS)
556 network_la_LDFLAGS = -module -avoid-version
557 network_la_LIBADD = -lpthread
558 if BUILD_WITH_LIBSOCKET
559 network_la_LIBADD += -lsocket
561 if BUILD_WITH_LIBGCRYPT
562 network_la_CPPFLAGS += $(GCRYPT_CPPFLAGS)
563 network_la_LDFLAGS += $(GCRYPT_LDFLAGS)
564 network_la_LIBADD += $(GCRYPT_LIBS)
566 collectd_LDADD += "-dlopen" network.la
567 collectd_DEPENDENCIES += network.la
571 pkglib_LTLIBRARIES += nfs.la
572 nfs_la_SOURCES = nfs.c
573 nfs_la_LDFLAGS = -module -avoid-version
574 collectd_LDADD += "-dlopen" nfs.la
575 collectd_DEPENDENCIES += nfs.la
578 if BUILD_PLUGIN_NGINX
579 pkglib_LTLIBRARIES += nginx.la
580 nginx_la_SOURCES = nginx.c
581 nginx_la_CFLAGS = $(AM_CFLAGS)
583 nginx_la_LDFLAGS = -module -avoid-version
584 if BUILD_WITH_LIBCURL
585 nginx_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
586 nginx_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
588 collectd_LDADD += "-dlopen" nginx.la
589 collectd_DEPENDENCIES += nginx.la
592 if BUILD_PLUGIN_NOTIFY_DESKTOP
593 pkglib_LTLIBRARIES += notify_desktop.la
594 notify_desktop_la_SOURCES = notify_desktop.c
595 notify_desktop_la_CFLAGS = $(AM_CFLAGS) $(LIBNOTIFY_CFLAGS)
596 notify_desktop_la_LDFLAGS = -module -avoid-version
597 notify_desktop_la_LIBADD = $(LIBNOTIFY_LIBS)
598 collectd_LDADD += "-dlopen" notify_desktop.la
599 collectd_DEPENDENCIES += notify_desktop.la
602 if BUILD_PLUGIN_NOTIFY_EMAIL
603 pkglib_LTLIBRARIES += notify_email.la
604 notify_email_la_SOURCES = notify_email.c
605 notify_email_la_LDFLAGS = -module -avoid-version
606 notify_email_la_LIBADD = -lesmtp -lssl -lcrypto -lpthread -ldl
607 collectd_LDADD += "-dlopen" notify_email.la
608 collectd_DEPENDENCIES += notify_email.la
612 pkglib_LTLIBRARIES += ntpd.la
613 ntpd_la_SOURCES = ntpd.c
614 ntpd_la_LDFLAGS = -module -avoid-version
616 if BUILD_WITH_LIBSOCKET
617 ntpd_la_LIBADD += -lsocket
619 collectd_LDADD += "-dlopen" ntpd.la
620 collectd_DEPENDENCIES += ntpd.la
624 pkglib_LTLIBRARIES += nut.la
625 nut_la_SOURCES = nut.c
626 nut_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
627 nut_la_LDFLAGS = -module -avoid-version
628 nut_la_LIBADD = -lpthread $(BUILD_WITH_LIBUPSCLIENT_LIBS)
629 collectd_LDADD += "-dlopen" nut.la
630 collectd_DEPENDENCIES += nut.la
633 if BUILD_PLUGIN_ONEWIRE
634 pkglib_LTLIBRARIES += onewire.la
635 onewire_la_SOURCES = onewire.c
636 onewire_la_CFLAGS = $(AM_CFLAGS)
637 onewire_la_CPPFLAGS = $(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
638 onewire_la_LIBADD = $(BUILD_WITH_LIBOWCAPI_LIBS)
639 onewire_la_LDFLAGS = -module -avoid-version
640 collectd_LDADD += "-dlopen" onewire.la
641 collectd_DEPENDENCIES += onewire.la
644 if BUILD_PLUGIN_OPENVPN
645 pkglib_LTLIBRARIES += openvpn.la
646 openvpn_la_SOURCES = openvpn.c
647 openvpn_la_CFLAGS = $(AM_CFLAGS)
648 openvpn_la_LDFLAGS = -module -avoid-version
649 collectd_LDADD += "-dlopen" openvpn.la
650 collectd_DEPENDENCIES += openvpn.la
653 if BUILD_PLUGIN_ORACLE
654 pkglib_LTLIBRARIES += oracle.la
655 oracle_la_SOURCES = oracle.c \
656 utils_db_query.c utils_db_query.h
657 oracle_la_CFLAGS = $(AM_CFLAGS)
658 oracle_la_CPPFLAGS = $(BUILD_WITH_ORACLE_CFLAGS)
659 oracle_la_LIBADD = $(BUILD_WITH_ORACLE_LIBS)
660 oracle_la_LDFLAGS = -module -avoid-version
661 collectd_LDADD += "-dlopen" oracle.la
662 collectd_DEPENDENCIES += oracle.la
666 pkglib_LTLIBRARIES += perl.la
667 perl_la_SOURCES = perl.c
668 # Despite C99 providing the "bool" type thru stdbool.h, Perl defines its own
669 # version of that type if HAS_BOOL is not defined... *sigh*
670 perl_la_CPPFLAGS = $(AM_CPPFLAGS) -DHAS_BOOL=1
671 perl_la_CFLAGS = $(AM_CFLAGS) \
673 -DXS_VERSION=\"$(VERSION)\" -DVERSION=\"$(VERSION)\"
674 # Work-around for issues #41 and #42 - Perl 5.10 incorrectly introduced
675 # __attribute__nonnull__(3) for Perl_load_module().
676 if HAVE_BROKEN_PERL_LOAD_MODULE
677 perl_la_CFLAGS += -Wno-nonnull
679 perl_la_LDFLAGS = -module -avoid-version \
681 collectd_LDADD += "-dlopen" perl.la
682 collectd_DEPENDENCIES += perl.la
686 pkglib_LTLIBRARIES += ping.la
687 ping_la_SOURCES = ping.c
688 ping_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOPING_CPPFLAGS)
689 ping_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBOPING_LDFLAGS)
690 ping_la_LIBADD = -loping
691 collectd_LDADD += "-dlopen" ping.la
692 collectd_DEPENDENCIES += ping.la
695 if BUILD_PLUGIN_POSTGRESQL
696 pkglib_LTLIBRARIES += postgresql.la
697 postgresql_la_SOURCES = postgresql.c \
698 utils_db_query.c utils_db_query.h
699 postgresql_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPQ_CPPFLAGS)
700 postgresql_la_LDFLAGS = -module -avoid-version \
701 $(BUILD_WITH_LIBPQ_LDFLAGS)
702 postgresql_la_LIBADD = -lpq
703 collectd_LDADD += "-dlopen" postgresql.la
704 collectd_DEPENDENCIES += postgresql.la
707 if BUILD_PLUGIN_POWERDNS
708 pkglib_LTLIBRARIES += powerdns.la
709 powerdns_la_SOURCES = powerdns.c
710 powerdns_la_LDFLAGS = -module -avoid-version
711 collectd_LDADD += "-dlopen" powerdns.la
712 collectd_DEPENDENCIES += powerdns.la
715 if BUILD_PLUGIN_PROCESSES
716 pkglib_LTLIBRARIES += processes.la
717 processes_la_SOURCES = processes.c
718 processes_la_LDFLAGS = -module -avoid-version
719 processes_la_LIBADD =
720 collectd_LDADD += "-dlopen" processes.la
721 collectd_DEPENDENCIES += processes.la
722 if BUILD_WITH_LIBKVM_GETPROCS
723 processes_la_LIBADD += -lkvm
727 if BUILD_PLUGIN_PROTOCOLS
728 pkglib_LTLIBRARIES += protocols.la
729 protocols_la_SOURCES = protocols.c
730 protocols_la_LDFLAGS = -module -avoid-version
731 collectd_LDADD += "-dlopen" protocols.la
732 collectd_DEPENDENCIES += protocols.la
735 if BUILD_PLUGIN_RRDCACHED
736 pkglib_LTLIBRARIES += rrdcached.la
737 rrdcached_la_SOURCES = rrdcached.c utils_rrdcreate.c utils_rrdcreate.h
738 rrdcached_la_LDFLAGS = -module -avoid-version
739 rrdcached_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
740 rrdcached_la_LIBADD = $(BUILD_WITH_LIBRRD_LDFLAGS)
741 collectd_LDADD += "-dlopen" rrdcached.la
742 collectd_DEPENDENCIES += rrdcached.la
745 if BUILD_PLUGIN_RRDTOOL
746 pkglib_LTLIBRARIES += rrdtool.la
747 rrdtool_la_SOURCES = rrdtool.c utils_rrdcreate.c utils_rrdcreate.h
748 rrdtool_la_LDFLAGS = -module -avoid-version
749 rrdtool_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
750 rrdtool_la_LIBADD = $(BUILD_WITH_LIBRRD_LDFLAGS)
751 collectd_LDADD += "-dlopen" rrdtool.la
752 collectd_DEPENDENCIES += rrdtool.la
755 if BUILD_PLUGIN_SENSORS
756 pkglib_LTLIBRARIES += sensors.la
757 sensors_la_SOURCES = sensors.c
758 sensors_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBSENSORS_CFLAGS)
759 sensors_la_LDFLAGS = -module -avoid-version
760 sensors_la_LIBADD = $(BUILD_WITH_LIBSENSORS_LDFLAGS)
761 collectd_LDADD += "-dlopen" sensors.la
762 collectd_DEPENDENCIES += sensors.la
765 if BUILD_PLUGIN_SERIAL
766 pkglib_LTLIBRARIES += serial.la
767 serial_la_SOURCES = serial.c
768 serial_la_LDFLAGS = -module -avoid-version
769 collectd_LDADD += "-dlopen" serial.la
770 collectd_DEPENDENCIES += serial.la
774 pkglib_LTLIBRARIES += snmp.la
775 snmp_la_SOURCES = snmp.c
776 snmp_la_LDFLAGS = -module -avoid-version
777 snmp_la_CFLAGS = $(AM_CFLAGS)
779 if BUILD_WITH_LIBNETSNMP
780 snmp_la_CFLAGS += $(BUILD_WITH_LIBSNMP_CFLAGS)
781 snmp_la_LIBADD += $(BUILD_WITH_LIBSNMP_LIBS)
783 if BUILD_WITH_LIBPTHREAD
784 snmp_la_LIBADD += -lpthread
786 collectd_LDADD += "-dlopen" snmp.la
787 collectd_DEPENDENCIES += snmp.la
791 pkglib_LTLIBRARIES += swap.la
792 swap_la_SOURCES = swap.c
793 swap_la_CFLAGS = $(AM_CFLAGS)
794 swap_la_LDFLAGS = -module -avoid-version
796 collectd_LDADD += "-dlopen" swap.la
797 collectd_DEPENDENCIES += swap.la
798 if BUILD_WITH_LIBKSTAT
799 swap_la_LIBADD += -lkstat
801 if BUILD_WITH_LIBDEVINFO
802 swap_la_LIBADD += -ldevinfo
804 if BUILD_WITH_LIBKVM_GETSWAPINFO
805 swap_la_LIBADD += -lkvm
807 if BUILD_WITH_LIBSTATGRAB
808 swap_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
809 swap_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
813 if BUILD_PLUGIN_SYSLOG
814 pkglib_LTLIBRARIES += syslog.la
815 syslog_la_SOURCES = syslog.c
816 syslog_la_LDFLAGS = -module -avoid-version
817 collectd_LDADD += "-dlopen" syslog.la
818 collectd_DEPENDENCIES += syslog.la
821 if BUILD_PLUGIN_TABLE
822 pkglib_LTLIBRARIES += table.la
823 table_la_SOURCES = table.c
824 table_la_LDFLAGS = -module -avoid-version
825 collectd_LDADD += "-dlopen" table.la
826 collectd_DEPENDENCIES += table.la
830 pkglib_LTLIBRARIES += tail.la
831 tail_la_SOURCES = tail.c
832 tail_la_LDFLAGS = -module -avoid-version
833 collectd_LDADD += "-dlopen" tail.la
834 collectd_DEPENDENCIES += tail.la
838 pkglib_LTLIBRARIES += tape.la
839 tape_la_SOURCES = tape.c
840 tape_la_LDFLAGS = -module -avoid-version
841 tape_la_LIBADD = -lkstat -ldevinfo
842 collectd_LDADD += "-dlopen" tape.la
843 collectd_DEPENDENCIES += tape.la
846 if BUILD_PLUGIN_TARGET_NOTIFICATION
847 pkglib_LTLIBRARIES += target_notification.la
848 target_notification_la_SOURCES = target_notification.c
849 target_notification_la_LDFLAGS = -module -avoid-version
850 collectd_LDADD += "-dlopen" target_notification.la
851 collectd_DEPENDENCIES += target_notification.la
854 if BUILD_PLUGIN_TARGET_REPLACE
855 pkglib_LTLIBRARIES += target_replace.la
856 target_replace_la_SOURCES = target_replace.c
857 target_replace_la_LDFLAGS = -module -avoid-version
858 collectd_LDADD += "-dlopen" target_replace.la
859 collectd_DEPENDENCIES += target_replace.la
862 if BUILD_PLUGIN_TARGET_SET
863 pkglib_LTLIBRARIES += target_set.la
864 target_set_la_SOURCES = target_set.c
865 target_set_la_LDFLAGS = -module -avoid-version
866 collectd_LDADD += "-dlopen" target_set.la
867 collectd_DEPENDENCIES += target_set.la
870 if BUILD_PLUGIN_TCPCONNS
871 pkglib_LTLIBRARIES += tcpconns.la
872 tcpconns_la_SOURCES = tcpconns.c
873 tcpconns_la_LDFLAGS = -module -avoid-version
875 collectd_LDADD += "-dlopen" tcpconns.la
876 collectd_DEPENDENCIES += tcpconns.la
877 if BUILD_WITH_LIBKVM_NLIST
878 tcpconns_la_LIBADD += -lkvm
882 if BUILD_PLUGIN_TEAMSPEAK2
883 pkglib_LTLIBRARIES += teamspeak2.la
884 teamspeak2_la_SOURCES = teamspeak2.c
885 teamspeak2_la_LDFLAGS = -module -avoid-version
886 collectd_LDADD += "-dlopen" teamspeak2.la
887 collectd_DEPENDENCIES += teamspeak2.la
891 pkglib_LTLIBRARIES += ted.la
892 ted_la_SOURCES = ted.c
893 ted_la_LDFLAGS = -module -avoid-version
894 collectd_LDADD += "-dlopen" ted.la
895 collectd_DEPENDENCIES += ted.la
898 if BUILD_PLUGIN_THERMAL
899 pkglib_LTLIBRARIES += thermal.la
900 thermal_la_SOURCES = thermal.c
901 thermal_la_LDFLAGS = -module -avoid-version
902 collectd_LDADD += "-dlopen" thermal.la
903 collectd_DEPENDENCIES += thermal.la
906 if BUILD_PLUGIN_UNIXSOCK
907 pkglib_LTLIBRARIES += unixsock.la
908 unixsock_la_SOURCES = unixsock.c \
909 utils_cmd_flush.h utils_cmd_flush.c \
910 utils_cmd_getval.h utils_cmd_getval.c \
911 utils_cmd_listval.h utils_cmd_listval.c \
912 utils_cmd_putval.h utils_cmd_putval.c \
913 utils_cmd_putnotif.h utils_cmd_putnotif.c
914 unixsock_la_LDFLAGS = -module -avoid-version
915 unixsock_la_LIBADD = -lpthread
916 collectd_LDADD += "-dlopen" unixsock.la
917 collectd_DEPENDENCIES += unixsock.la
920 if BUILD_PLUGIN_UPTIME
921 pkglib_LTLIBRARIES += uptime.la
922 uptime_la_SOURCES = uptime.c
923 uptime_la_CFLAGS = $(AM_CFLAGS)
924 uptime_la_LDFLAGS = -module -avoid-version
926 if BUILD_WITH_LIBKSTAT
927 uptime_la_LIBADD += -lkstat
929 collectd_LDADD += "-dlopen" uptime.la
930 collectd_DEPENDENCIES += uptime.la
933 if BUILD_PLUGIN_USERS
934 pkglib_LTLIBRARIES += users.la
935 users_la_SOURCES = users.c
936 users_la_CFLAGS = $(AM_CFLAGS)
937 users_la_LDFLAGS = -module -avoid-version
939 if BUILD_WITH_LIBSTATGRAB
940 users_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
941 users_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
943 collectd_LDADD += "-dlopen" users.la
944 collectd_DEPENDENCIES += users.la
948 pkglib_LTLIBRARIES += uuid.la
949 uuid_la_SOURCES = uuid.c
950 uuid_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBHAL_CFLAGS)
951 uuid_la_LIBADD = $(BUILD_WITH_LIBHAL_LIBS)
952 uuid_la_LDFLAGS = -module -avoid-version
953 collectd_LDADD += "-dlopen" uuid.la
954 collectd_DEPENDENCIES += uuid.la
958 pkglib_LTLIBRARIES += vmem.la
959 vmem_la_SOURCES = vmem.c
960 vmem_la_LDFLAGS = -module -avoid-version
961 collectd_LDADD += "-dlopen" vmem.la
962 collectd_DEPENDENCIES += vmem.la
965 if BUILD_PLUGIN_VSERVER
966 pkglib_LTLIBRARIES += vserver.la
967 vserver_la_SOURCES = vserver.c
968 vserver_la_LDFLAGS = -module -avoid-version
969 collectd_LDADD += "-dlopen" vserver.la
970 collectd_DEPENDENCIES += vserver.la
973 if BUILD_PLUGIN_WIRELESS
974 pkglib_LTLIBRARIES += wireless.la
975 wireless_la_SOURCES = wireless.c
976 wireless_la_LDFLAGS = -module -avoid-version
977 collectd_LDADD += "-dlopen" wireless.la
978 collectd_DEPENDENCIES += wireless.la
982 pkglib_LTLIBRARIES += xmms.la
983 xmms_la_SOURCES = xmms.c
984 xmms_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBXMMS_CFLAGS)
985 xmms_la_LDFLAGS = -module -avoid-version
986 xmms_la_LIBADD = $(BUILD_WITH_LIBXMMS_LIBS)
987 collectd_LDADD += "-dlopen" xmms.la
988 collectd_DEPENDENCIES += xmms.la
992 dist_man_MANS = collectd.1 \
1001 collectd-unixsock.5 \
1004 #collectd_1_SOURCES = collectd.pod
1006 EXTRA_DIST = types.db
1008 EXTRA_DIST += collectd.conf.pod \
1009 collectd-email.pod \
1013 collectd-nagios.pod \
1017 collectd-unixsock.pod \
1018 postgresql_default.conf \
1022 pod2man --release=$(VERSION) --center=$(PACKAGE) $< \
1023 >.pod2man.tmp 2>/dev/null && mv -f .pod2man.tmp $@ || true
1024 @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
1026 echo "$@ has some POD errors!"; false; \
1030 pod2man --section=5 --release=$(VERSION) --center=$(PACKAGE) $< \
1031 >.pod2man.tmp 2>/dev/null && mv -f .pod2man.tmp $@ || true
1032 @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
1034 echo "$@ has some POD errors!"; false; \
1038 $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
1039 if test -e $(DESTDIR)$(sysconfdir)/collectd.conf; \
1041 $(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf.pkg-orig; \
1043 $(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf; \
1045 $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
1046 $(INSTALL) -m 0644 $(srcdir)/types.db $(DESTDIR)$(pkgdatadir)/types.db;
1047 $(INSTALL) -m 0644 $(srcdir)/postgresql_default.conf \
1048 $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;