Code

Varnish plugin: Use DERIVE data sources for (most of) the worker thread statistics.
[collectd.git] / src / Makefile.am
1 SUBDIRS = libcollectdclient
2 if BUILD_WITH_OWN_LIBIPTC
3 SUBDIRS += owniptc
4 endif
5 if BUILD_WITH_OWN_LIBOCONFIG
6 SUBDIRS += liboconfig
7 endif
9 if COMPILER_IS_GCC
10 AM_CFLAGS = -Wall -Werror
11 endif
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"'
19 endif
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 \
27                    common.c common.h \
28                    configfile.c configfile.h \
29                    filter_chain.c filter_chain.h \
30                    meta_data.c meta_data.h \
31                    plugin.c plugin.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_subst.c utils_subst.h \
42                    utils_tail.c utils_tail.h \
43                    utils_threshold.c utils_threshold.h \
44                    types_list.c types_list.h
46 collectd_CPPFLAGS =  $(AM_CPPFLAGS) $(LTDLINCL)
47 collectd_CFLAGS = $(AM_CFLAGS)
48 collectd_LDFLAGS = -export-dynamic
49 collectd_LDADD =
50 collectd_DEPENDENCIES =
52 # Link to these libraries..
53 if BUILD_WITH_LIBRT
54 collectd_LDADD += -lrt
55 endif
56 if BUILD_WITH_LIBPOSIX4
57 collectd_LDADD += -lposix4
58 endif
59 if BUILD_WITH_LIBSOCKET
60 collectd_LDADD += -lsocket
61 endif
62 if BUILD_WITH_LIBRESOLV
63 collectd_LDADD += -lresolv
64 endif
65 if BUILD_WITH_LIBPTHREAD
66 collectd_LDADD += -lpthread
67 endif
68 if BUILD_WITH_LIBKSTAT
69 collectd_LDADD += -lkstat
70 endif
71 if BUILD_WITH_LIBDEVINFO
72 collectd_LDADD += -ldevinfo
73 endif
74 if BUILD_AIX
75 collectd_LDFLAGS += -Wl,-bexpall,-brtllib
76 collectd_LDADD += -lm
77 endif
79 # The daemon needs to call sg_init, so we need to link it against libstatgrab,
80 # too. -octo
81 if BUILD_WITH_LIBSTATGRAB
82 collectd_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
83 collectd_LDADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
84 endif
86 if BUILD_WITH_OWN_LIBOCONFIG
87 collectd_LDADD += $(LIBLTDL) liboconfig/liboconfig.la
88 collectd_DEPENDENCIES += $(LIBLTDL) liboconfig/liboconfig.la
89 else
90 collectd_LDADD += -loconfig
91 endif
93 collectdmon_SOURCES = collectdmon.c
94 collectdmon_CPPFLAGS = $(AM_CPPFLAGS)
96 collectd_nagios_SOURCES = collectd-nagios.c
97 collectd_nagios_LDADD =
98 if BUILD_WITH_LIBSOCKET
99 collectd_nagios_LDADD += -lsocket
100 endif
101 if BUILD_AIX
102 collectd_nagios_LDADD += -lm
103 endif
105 collectd_nagios_LDADD += libcollectdclient/libcollectdclient.la
106 collectd_nagios_DEPENDENCIES = libcollectdclient/libcollectdclient.la
108 pkglib_LTLIBRARIES = 
110 BUILT_SOURCES = 
111 CLEANFILES = 
113 if BUILD_PLUGIN_APACHE
114 pkglib_LTLIBRARIES += apache.la
115 apache_la_SOURCES = apache.c
116 apache_la_LDFLAGS = -module -avoid-version
117 apache_la_CFLAGS = $(AM_CFLAGS)
118 apache_la_LIBADD =
119 collectd_LDADD += "-dlopen" apache.la
120 if BUILD_WITH_LIBCURL
121 apache_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
122 apache_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
123 endif
124 collectd_DEPENDENCIES += apache.la
125 endif
127 if BUILD_PLUGIN_APCUPS
128 pkglib_LTLIBRARIES += apcups.la
129 apcups_la_SOURCES = apcups.c
130 apcups_la_LDFLAGS = -module -avoid-version
131 apcups_la_LIBADD =
132 if BUILD_WITH_LIBSOCKET
133 apcups_la_LIBADD += -lsocket
134 endif
135 collectd_LDADD += "-dlopen" apcups.la
136 collectd_DEPENDENCIES += apcups.la
137 endif
139 if BUILD_PLUGIN_APPLE_SENSORS
140 pkglib_LTLIBRARIES += apple_sensors.la
141 apple_sensors_la_SOURCES = apple_sensors.c
142 apple_sensors_la_LDFLAGS = -module -avoid-version
143 apple_sensors_la_LIBADD = -lIOKit
144 collectd_LDADD += "-dlopen" apple_sensors.la
145 collectd_DEPENDENCIES += apple_sensors.la
146 endif
148 if BUILD_PLUGIN_ASCENT
149 pkglib_LTLIBRARIES += ascent.la
150 ascent_la_SOURCES = ascent.c
151 ascent_la_LDFLAGS = -module -avoid-version
152 ascent_la_CFLAGS = $(AM_CFLAGS) \
153                 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
154 ascent_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
155 collectd_LDADD += "-dlopen" ascent.la
156 collectd_DEPENDENCIES += ascent.la
157 endif
159 if BUILD_PLUGIN_BATTERY
160 pkglib_LTLIBRARIES += battery.la
161 battery_la_SOURCES = battery.c
162 battery_la_LDFLAGS = -module -avoid-version
163 battery_la_LIBADD =
164 if BUILD_WITH_LIBIOKIT
165 battery_la_LIBADD += -lIOKit
166 endif
167 collectd_LDADD += "-dlopen" battery.la
168 collectd_DEPENDENCIES += battery.la
169 endif
171 if BUILD_PLUGIN_BIND
172 pkglib_LTLIBRARIES += bind.la
173 bind_la_SOURCES = bind.c
174 bind_la_LDFLAGS = -module -avoid-version
175 bind_la_CFLAGS = $(AM_CFLAGS) \
176                 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
177 bind_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
178 collectd_LDADD += "-dlopen" bind.la
179 collectd_DEPENDENCIES += bind.la
180 endif
182 if BUILD_PLUGIN_CONNTRACK
183 pkglib_LTLIBRARIES += conntrack.la
184 conntrack_la_SOURCES = conntrack.c
185 conntrack_la_LDFLAGS = -module -avoid-version
186 collectd_LDADD += "-dlopen" conntrack.la
187 collectd_DEPENDENCIES += conntrack.la
188 endif
190 if BUILD_PLUGIN_CONTEXTSWITCH
191 pkglib_LTLIBRARIES += contextswitch.la
192 contextswitch_la_SOURCES = contextswitch.c
193 contextswitch_la_LDFLAGS = -module -avoid-version
194 collectd_LDADD += "-dlopen" contextswitch.la
195 collectd_DEPENDENCIES += contextswitch.la
196 endif
198 if BUILD_PLUGIN_CPU
199 pkglib_LTLIBRARIES += cpu.la
200 cpu_la_SOURCES = cpu.c
201 cpu_la_CFLAGS = $(AM_CFLAGS)
202 cpu_la_LDFLAGS = -module -avoid-version
203 cpu_la_LIBADD = 
204 if BUILD_WITH_LIBKSTAT
205 cpu_la_LIBADD += -lkstat
206 endif
207 if BUILD_WITH_LIBDEVINFO
208 cpu_la_LIBADD += -ldevinfo
209 endif
210 if BUILD_WITH_LIBSTATGRAB
211 cpu_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
212 cpu_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
213 endif
214 if BUILD_WITH_PERFSTAT
215 cpu_la_LIBADD += -lperfstat
216 endif
217 collectd_LDADD += "-dlopen" cpu.la
218 collectd_DEPENDENCIES += cpu.la
219 endif
221 if BUILD_PLUGIN_CPUFREQ
222 pkglib_LTLIBRARIES += cpufreq.la
223 cpufreq_la_SOURCES = cpufreq.c
224 cpufreq_la_LDFLAGS = -module -avoid-version
225 collectd_LDADD += "-dlopen" cpufreq.la
226 collectd_DEPENDENCIES += cpufreq.la
227 endif
229 if BUILD_PLUGIN_CSV
230 pkglib_LTLIBRARIES += csv.la
231 csv_la_SOURCES = csv.c
232 csv_la_LDFLAGS = -module -avoid-version
233 collectd_LDADD += "-dlopen" csv.la
234 collectd_DEPENDENCIES += csv.la
235 endif
237 if BUILD_PLUGIN_CURL
238 pkglib_LTLIBRARIES += curl.la
239 curl_la_SOURCES = curl.c
240 curl_la_LDFLAGS = -module -avoid-version
241 curl_la_CFLAGS = $(AM_CFLAGS)
242 curl_la_LIBADD =
243 collectd_LDADD += "-dlopen" curl.la
244 if BUILD_WITH_LIBCURL
245 curl_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
246 curl_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
247 endif
248 collectd_DEPENDENCIES += curl.la
249 endif
251 if BUILD_PLUGIN_CURL_JSON
252 pkglib_LTLIBRARIES += curl_json.la
253 curl_json_la_SOURCES = curl_json.c
254 curl_json_la_CFLAGS = $(AM_CFLAGS)
255 curl_json_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBYAJL_LDFLAGS)
256 curl_json_la_CPPFLAGS = $(BUILD_WITH_LIBYAJL_CPPFLAGS)
257 curl_json_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
258 if BUILD_WITH_LIBCURL
259 curl_json_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
260 curl_json_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
261 endif
262 collectd_LDADD += "-dlopen" curl_json.la
263 collectd_DEPENDENCIES += curl_json.la
264 endif
266 if BUILD_PLUGIN_CURL_XML
267 pkglib_LTLIBRARIES += curl_xml.la
268 curl_xml_la_SOURCES = curl_xml.c
269 curl_xml_la_LDFLAGS = -module -avoid-version
270 curl_xml_la_CFLAGS = $(AM_CFLAGS) \
271                 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
272 curl_xml_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
273 collectd_LDADD += "-dlopen" curl_xml.la
274 collectd_DEPENDENCIES += curl_xml.la
275 endif
277 if BUILD_PLUGIN_DBI
278 pkglib_LTLIBRARIES += dbi.la
279 dbi_la_SOURCES = dbi.c \
280                  utils_db_query.c utils_db_query.h
281 dbi_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBDBI_CPPFLAGS)
282 dbi_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBDBI_LDFLAGS)
283 dbi_la_LIBADD = $(BUILD_WITH_LIBDBI_LIBS)
284 collectd_LDADD += "-dlopen" dbi.la
285 collectd_DEPENDENCIES += dbi.la
286 endif
288 if BUILD_PLUGIN_DF
289 pkglib_LTLIBRARIES += df.la
290 df_la_SOURCES = df.c utils_mount.c utils_mount.h
291 df_la_LDFLAGS = -module -avoid-version
292 collectd_LDADD += "-dlopen" df.la
293 collectd_DEPENDENCIES += df.la
294 endif
296 if BUILD_PLUGIN_DISK
297 pkglib_LTLIBRARIES += disk.la
298 disk_la_SOURCES = disk.c
299 disk_la_CFLAGS = $(AM_CFLAGS)
300 disk_la_LDFLAGS = -module -avoid-version
301 disk_la_LIBADD = 
302 if BUILD_WITH_LIBKSTAT
303 disk_la_LIBADD += -lkstat
304 endif
305 if BUILD_WITH_LIBDEVINFO
306 disk_la_LIBADD += -ldevinfo
307 endif
308 if BUILD_WITH_LIBIOKIT
309 disk_la_LIBADD += -lIOKit
310 endif
311 if BUILD_WITH_LIBSTATGRAB
312 disk_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)  
313 disk_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
314 endif
315 if BUILD_WITH_PERFSTAT
316 disk_la_LIBADD += -lperfstat
317 endif
318 collectd_LDADD += "-dlopen" disk.la
319 collectd_DEPENDENCIES += disk.la
320 endif
322 if BUILD_PLUGIN_DNS
323 pkglib_LTLIBRARIES += dns.la
324 dns_la_SOURCES = dns.c utils_dns.c utils_dns.h
325 dns_la_LDFLAGS = -module -avoid-version
326 dns_la_LIBADD = -lpcap -lpthread
327 collectd_LDADD += "-dlopen" dns.la
328 collectd_DEPENDENCIES += dns.la
329 endif
331 if BUILD_PLUGIN_EMAIL
332 pkglib_LTLIBRARIES += email.la
333 email_la_SOURCES = email.c
334 email_la_LDFLAGS = -module -avoid-version
335 email_la_LIBADD = -lpthread
336 collectd_LDADD += "-dlopen" email.la
337 collectd_DEPENDENCIES += email.la
338 endif
340 if BUILD_PLUGIN_ENTROPY
341 pkglib_LTLIBRARIES += entropy.la
342 entropy_la_SOURCES = entropy.c
343 entropy_la_LDFLAGS = -module -avoid-version
344 collectd_LDADD += "-dlopen" entropy.la
345 collectd_DEPENDENCIES += entropy.la
346 endif
348 if BUILD_PLUGIN_EXEC
349 pkglib_LTLIBRARIES += exec.la
350 exec_la_SOURCES = exec.c \
351                   utils_cmd_putnotif.c utils_cmd_putnotif.h \
352                   utils_cmd_putval.c utils_cmd_putval.h
353 exec_la_LDFLAGS = -module -avoid-version
354 exec_la_LIBADD = -lpthread
355 collectd_LDADD += "-dlopen" exec.la
356 collectd_DEPENDENCIES += exec.la
357 endif
359 if BUILD_PLUGIN_FILECOUNT
360 pkglib_LTLIBRARIES += filecount.la
361 filecount_la_SOURCES = filecount.c
362 filecount_la_LDFLAGS = -module -avoid-version
363 collectd_LDADD += "-dlopen" filecount.la
364 collectd_DEPENDENCIES += filecount.la
365 endif
367 if BUILD_PLUGIN_GMOND
368 pkglib_LTLIBRARIES += gmond.la
369 gmond_la_SOURCES = gmond.c
370 gmond_la_CPPFLAGS = $(AM_CPPFLAGS) $(GANGLIA_CPPFLAGS)
371 gmond_la_LDFLAGS = -module -avoid-version $(GANGLIA_LDFLAGS)
372 gmond_la_LIBADD = $(GANGLIA_LIBS)
373 collectd_LDADD += "-dlopen" gmond.la
374 collectd_DEPENDENCIES += gmond.la
375 endif
377 if BUILD_PLUGIN_HDDTEMP
378 pkglib_LTLIBRARIES += hddtemp.la
379 hddtemp_la_SOURCES = hddtemp.c
380 hddtemp_la_LDFLAGS = -module -avoid-version
381 hddtemp_la_LIBADD =
382 if BUILD_WITH_LIBSOCKET
383 hddtemp_la_LIBADD += -lsocket
384 endif
385 collectd_LDADD += "-dlopen" hddtemp.la
386 collectd_DEPENDENCIES += hddtemp.la
387 endif
389 if BUILD_PLUGIN_INTERFACE
390 pkglib_LTLIBRARIES += interface.la
391 interface_la_SOURCES = interface.c
392 interface_la_CFLAGS = $(AM_CFLAGS)
393 interface_la_LDFLAGS = -module -avoid-version
394 interface_la_LIBADD =
395 collectd_LDADD += "-dlopen" interface.la
396 collectd_DEPENDENCIES += interface.la
397 if BUILD_WITH_LIBSTATGRAB
398 interface_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
399 interface_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
400 else
401 if BUILD_WITH_LIBKSTAT
402 interface_la_LIBADD += -lkstat
403 endif
404 if BUILD_WITH_LIBDEVINFO
405 interface_la_LIBADD += -ldevinfo
406 endif # BUILD_WITH_LIBDEVINFO
407 endif # !BUILD_WITH_LIBSTATGRAB
408 if BUILD_WITH_PERFSTAT
409 interface_la_LIBADD += -lperfstat
410 endif
411 endif # BUILD_PLUGIN_INTERFACE
413 if BUILD_PLUGIN_IPTABLES
414 pkglib_LTLIBRARIES += iptables.la
415 iptables_la_SOURCES = iptables.c
416 iptables_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBIPTC_CPPFLAGS)
417 iptables_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBIPTC_LDFLAGS)
418 if BUILD_WITH_OWN_LIBIPTC
419 iptables_la_LIBADD  = owniptc/libiptc.la
420 iptables_la_DEPENDENCIES = owniptc/libiptc.la
421 else
422 iptables_la_LIBADD = -liptc
423 endif
424 collectd_LDADD += "-dlopen" iptables.la
425 collectd_DEPENDENCIES += iptables.la
426 endif
428 if BUILD_PLUGIN_IPMI
429 pkglib_LTLIBRARIES += ipmi.la
430 ipmi_la_SOURCES = ipmi.c
431 ipmi_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_OPENIPMI_CFLAGS)
432 ipmi_la_LDFLAGS = -module -avoid-version
433 ipmi_la_LIBADD = $(BUILD_WITH_OPENIPMI_LIBS)
434 collectd_LDADD += "-dlopen" ipmi.la
435 collectd_DEPENDENCIES += ipmi.la
436 endif
438 if BUILD_PLUGIN_IPVS
439 pkglib_LTLIBRARIES += ipvs.la
440 ipvs_la_SOURCES = ipvs.c
441 ipvs_la_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS)
442 ipvs_la_LDFLAGS = -module -avoid-version
443 collectd_LDADD += "-dlopen" ipvs.la
444 collectd_DEPENDENCIES += ipvs.la
445 endif
447 if BUILD_PLUGIN_IRQ
448 pkglib_LTLIBRARIES += irq.la
449 irq_la_SOURCES = irq.c
450 irq_la_LDFLAGS = -module -avoid-version
451 collectd_LDADD += "-dlopen" irq.la
452 collectd_DEPENDENCIES += irq.la
453 endif
455 if BUILD_PLUGIN_JAVA
456 pkglib_LTLIBRARIES += java.la
457 java_la_SOURCES = java.c
458 java_la_CPPFLAGS = $(AM_CPPFLAGS) $(JAVA_CPPFLAGS)
459 java_la_CFLAGS = $(AM_CFLAGS) $(JAVA_CFLAGS)
460 java_la_LDFLAGS = -module -avoid-version $(JAVA_LDFLAGS)
461 java_la_LIBADD = $(JAVA_LIBS)
462 collectd_LDADD += "-dlopen" java.la
463 collectd_DEPENDENCIES += java.la
464 endif
466 if BUILD_PLUGIN_LIBVIRT
467 pkglib_LTLIBRARIES += libvirt.la
468 libvirt_la_SOURCES = libvirt.c
469 libvirt_la_CFLAGS = $(AM_CFLAGS) \
470                 $(BUILD_WITH_LIBVIRT_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
471 libvirt_la_LIBADD = $(BUILD_WITH_LIBVIRT_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
472 libvirt_la_LDFLAGS = -module -avoid-version
473 collectd_LDADD += "-dlopen" libvirt.la
474 collectd_DEPENDENCIES += libvirt.la
475 endif
477 if BUILD_PLUGIN_LOAD
478 pkglib_LTLIBRARIES += load.la
479 load_la_SOURCES = load.c
480 load_la_CFLAGS = $(AM_CFLAGS)
481 load_la_LDFLAGS = -module -avoid-version
482 load_la_LIBADD =
483 collectd_LDADD += "-dlopen" load.la
484 collectd_DEPENDENCIES += load.la
485 if BUILD_WITH_LIBSTATGRAB
486 load_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
487 load_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
488 endif # BUILD_WITH_LIBSTATGRAB
489 if BUILD_WITH_PERFSTAT
490 load_la_LIBADD += -lperfstat
491 endif
492 endif # BUILD_PLUGIN_LOAD
494 if BUILD_PLUGIN_LOGFILE
495 pkglib_LTLIBRARIES += logfile.la
496 logfile_la_SOURCES = logfile.c
497 logfile_la_LDFLAGS = -module -avoid-version
498 collectd_LDADD += "-dlopen" logfile.la
499 collectd_DEPENDENCIES += logfile.la
500 endif
502 if BUILD_PLUGIN_MADWIFI
503 pkglib_LTLIBRARIES += madwifi.la
504 madwifi_la_SOURCES = madwifi.c madwifi.h
505 madwifi_la_LDFLAGS = -module -avoid-version
506 collectd_LDADD += "-dlopen" madwifi.la
507 collectd_DEPENDENCIES += madwifi.la
508 endif
510 if BUILD_PLUGIN_MATCH_EMPTY_COUNTER
511 pkglib_LTLIBRARIES += match_empty_counter.la
512 match_empty_counter_la_SOURCES = match_empty_counter.c
513 match_empty_counter_la_LDFLAGS = -module -avoid-version
514 collectd_LDADD += "-dlopen" match_empty_counter.la
515 collectd_DEPENDENCIES += match_empty_counter.la
516 endif
518 if BUILD_PLUGIN_MATCH_HASHED
519 pkglib_LTLIBRARIES += match_hashed.la
520 match_hashed_la_SOURCES = match_hashed.c
521 match_hashed_la_LDFLAGS = -module -avoid-version
522 collectd_LDADD += "-dlopen" match_hashed.la
523 collectd_DEPENDENCIES += match_hashed.la
524 endif
526 if BUILD_PLUGIN_MATCH_REGEX
527 pkglib_LTLIBRARIES += match_regex.la
528 match_regex_la_SOURCES = match_regex.c
529 match_regex_la_LDFLAGS = -module -avoid-version
530 collectd_LDADD += "-dlopen" match_regex.la
531 collectd_DEPENDENCIES += match_regex.la
532 endif
534 if BUILD_PLUGIN_MATCH_TIMEDIFF
535 pkglib_LTLIBRARIES += match_timediff.la
536 match_timediff_la_SOURCES = match_timediff.c
537 match_timediff_la_LDFLAGS = -module -avoid-version
538 collectd_LDADD += "-dlopen" match_timediff.la
539 collectd_DEPENDENCIES += match_timediff.la
540 endif
542 if BUILD_PLUGIN_MATCH_VALUE
543 pkglib_LTLIBRARIES += match_value.la
544 match_value_la_SOURCES = match_value.c
545 match_value_la_LDFLAGS = -module -avoid-version
546 collectd_LDADD += "-dlopen" match_value.la
547 collectd_DEPENDENCIES += match_value.la
548 endif
550 if BUILD_PLUGIN_MBMON
551 pkglib_LTLIBRARIES += mbmon.la
552 mbmon_la_SOURCES = mbmon.c
553 mbmon_la_LDFLAGS = -module -avoid-version
554 mbmon_la_LIBADD =
555 if BUILD_WITH_LIBSOCKET
556 mbmon_la_LIBADD += -lsocket
557 endif
558 collectd_LDADD += "-dlopen" mbmon.la
559 collectd_DEPENDENCIES += mbmon.la
560 endif
562 if BUILD_PLUGIN_MEMCACHEC
563 pkglib_LTLIBRARIES += memcachec.la
564 memcachec_la_SOURCES = memcachec.c
565 memcachec_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBMEMCACHED_LDFLAGS)
566 memcachec_la_CPPFLAGS = $(BUILD_WITH_LIBMEMCACHED_CPPFLAGS)
567 memcachec_la_LIBADD = $(BUILD_WITH_LIBMEMCACHED_LIBS)
568 collectd_LDADD += "-dlopen" memcachec.la
569 collectd_DEPENDENCIES += memcachec.la
570 endif
572 if BUILD_PLUGIN_MEMCACHED
573 pkglib_LTLIBRARIES += memcached.la
574 memcached_la_SOURCES = memcached.c
575 memcached_la_LDFLAGS = -module -avoid-version
576 memcached_la_LIBADD =
577 if BUILD_WITH_LIBSOCKET
578 memcached_la_LIBADD += -lsocket
579 endif
580 collectd_LDADD += "-dlopen" memcached.la
581 collectd_DEPENDENCIES += memcached.la
582 endif
584 if BUILD_PLUGIN_MEMORY
585 pkglib_LTLIBRARIES += memory.la
586 memory_la_SOURCES = memory.c
587 memory_la_CFLAGS = $(AM_CFLAGS)
588 memory_la_LDFLAGS = -module -avoid-version
589 memory_la_LIBADD =
590 collectd_LDADD += "-dlopen" memory.la
591 collectd_DEPENDENCIES += memory.la
592 if BUILD_WITH_LIBKSTAT
593 memory_la_LIBADD += -lkstat
594 endif
595 if BUILD_WITH_LIBDEVINFO
596 memory_la_LIBADD += -ldevinfo
597 endif
598 if BUILD_WITH_LIBSTATGRAB
599 memory_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
600 memory_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
601 endif
602 if BUILD_WITH_PERFSTAT
603 memory_la_LIBADD += -lperfstat
604 endif
605 endif
607 if BUILD_PLUGIN_MODBUS
608 pkglib_LTLIBRARIES += modbus.la
609 modbus_la_SOURCES = modbus.c
610 modbus_la_LDFLAGS = -module -avoid-version
611 modbus_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMODBUS_CFLAGS)
612 modbus_la_LIBADD = $(BUILD_WITH_LIBMODBUS_LIBS)
613 collectd_LDADD += "-dlopen" modbus.la
614 collectd_DEPENDENCIES += modbus.la
615 endif
617 if BUILD_PLUGIN_MULTIMETER
618 pkglib_LTLIBRARIES += multimeter.la
619 multimeter_la_SOURCES = multimeter.c
620 multimeter_la_LDFLAGS = -module -avoid-version
621 collectd_LDADD += "-dlopen" multimeter.la
622 collectd_DEPENDENCIES += multimeter.la
623 endif
625 if BUILD_PLUGIN_MYSQL
626 pkglib_LTLIBRARIES += mysql.la
627 mysql_la_SOURCES = mysql.c
628 mysql_la_LDFLAGS = -module -avoid-version
629 mysql_la_CFLAGS = $(AM_CFLAGS)
630 mysql_la_LIBADD =
631 collectd_LDADD += "-dlopen" mysql.la
632 if BUILD_WITH_LIBMYSQL
633 mysql_la_CFLAGS += $(BUILD_WITH_LIBMYSQL_CFLAGS)
634 mysql_la_LIBADD += $(BUILD_WITH_LIBMYSQL_LIBS)
635 endif
636 collectd_DEPENDENCIES += mysql.la
637 endif
639 if BUILD_PLUGIN_NETAPP
640 pkglib_LTLIBRARIES += netapp.la
641 netapp_la_SOURCES = netapp.c
642 netapp_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBNETAPP_CPPFLAGS)
643 netapp_la_LDFLAGS = -module -avoid-version $(LIBNETAPP_LDFLAGS)
644 netapp_la_LIBADD = $(LIBNETAPP_LIBS)
645 collectd_LDADD += "-dlopen" netapp.la
646 collectd_DEPENDENCIES += netapp.la
647 endif
649 if BUILD_PLUGIN_NETLINK
650 pkglib_LTLIBRARIES += netlink.la
651 netlink_la_SOURCES = netlink.c
652 netlink_la_LDFLAGS = -module -avoid-version
653 netlink_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBNETLINK_CFLAGS)
654 netlink_la_LIBADD = $(BUILD_WITH_LIBNETLINK_LIBS)
655 collectd_LDADD += "-dlopen" netlink.la
656 collectd_DEPENDENCIES += netlink.la
657 endif
659 if BUILD_PLUGIN_NETWORK
660 pkglib_LTLIBRARIES += network.la
661 network_la_SOURCES = network.c network.h \
662                      utils_fbhash.c utils_fbhash.h
663 network_la_CPPFLAGS = $(AM_CPPFLAGS)
664 network_la_LDFLAGS = -module -avoid-version
665 network_la_LIBADD = -lpthread
666 if BUILD_WITH_LIBSOCKET
667 network_la_LIBADD += -lsocket
668 endif
669 if BUILD_WITH_LIBGCRYPT
670 network_la_CPPFLAGS += $(GCRYPT_CPPFLAGS)
671 network_la_LDFLAGS += $(GCRYPT_LDFLAGS)
672 network_la_LIBADD += $(GCRYPT_LIBS)
673 endif
674 collectd_LDADD += "-dlopen" network.la
675 collectd_DEPENDENCIES += network.la
676 endif
678 if BUILD_PLUGIN_NFS
679 pkglib_LTLIBRARIES += nfs.la
680 nfs_la_SOURCES = nfs.c
681 nfs_la_LDFLAGS = -module -avoid-version
682 collectd_LDADD += "-dlopen" nfs.la
683 collectd_DEPENDENCIES += nfs.la
684 endif
686 if BUILD_PLUGIN_FSCACHE
687 pkglib_LTLIBRARIES += fscache.la
688 fscache_la_SOURCES = fscache.c
689 fscache_la_LDFLAGS = -module -avoid-version
690 collectd_LDADD += "-dlopen" fscache.la
691 collectd_DEPENDENCIES += fscache.la
692 endif
694 if BUILD_PLUGIN_NGINX
695 pkglib_LTLIBRARIES += nginx.la
696 nginx_la_SOURCES = nginx.c
697 nginx_la_CFLAGS = $(AM_CFLAGS)
698 nginx_la_LIBADD =
699 nginx_la_LDFLAGS = -module -avoid-version
700 if BUILD_WITH_LIBCURL
701 nginx_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
702 nginx_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
703 endif
704 collectd_LDADD += "-dlopen" nginx.la
705 collectd_DEPENDENCIES += nginx.la
706 endif
708 if BUILD_PLUGIN_NOTIFY_DESKTOP
709 pkglib_LTLIBRARIES += notify_desktop.la
710 notify_desktop_la_SOURCES = notify_desktop.c
711 notify_desktop_la_CFLAGS = $(AM_CFLAGS) $(LIBNOTIFY_CFLAGS)
712 notify_desktop_la_LDFLAGS = -module -avoid-version
713 notify_desktop_la_LIBADD = $(LIBNOTIFY_LIBS)
714 collectd_LDADD += "-dlopen" notify_desktop.la
715 collectd_DEPENDENCIES += notify_desktop.la
716 endif
718 if BUILD_PLUGIN_NOTIFY_EMAIL
719 pkglib_LTLIBRARIES += notify_email.la
720 notify_email_la_SOURCES = notify_email.c
721 notify_email_la_LDFLAGS = -module -avoid-version
722 notify_email_la_LIBADD = -lesmtp -lssl -lcrypto -lpthread -ldl
723 collectd_LDADD += "-dlopen" notify_email.la
724 collectd_DEPENDENCIES += notify_email.la
725 endif
727 if BUILD_PLUGIN_NTPD
728 pkglib_LTLIBRARIES += ntpd.la
729 ntpd_la_SOURCES = ntpd.c
730 ntpd_la_LDFLAGS = -module -avoid-version
731 ntpd_la_LIBADD =
732 if BUILD_WITH_LIBSOCKET
733 ntpd_la_LIBADD += -lsocket
734 endif
735 collectd_LDADD += "-dlopen" ntpd.la
736 collectd_DEPENDENCIES += ntpd.la
737 endif
739 if BUILD_PLUGIN_NUT
740 pkglib_LTLIBRARIES += nut.la
741 nut_la_SOURCES = nut.c
742 nut_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
743 nut_la_LDFLAGS = -module -avoid-version
744 nut_la_LIBADD = -lpthread $(BUILD_WITH_LIBUPSCLIENT_LIBS)
745 collectd_LDADD += "-dlopen" nut.la
746 collectd_DEPENDENCIES += nut.la
747 endif
749 if BUILD_PLUGIN_OLSRD
750 pkglib_LTLIBRARIES += olsrd.la
751 olsrd_la_SOURCES = olsrd.c
752 olsrd_la_LDFLAGS = -module -avoid-version
753 olsrd_la_LIBADD = 
754 if BUILD_WITH_LIBSOCKET
755 olsrd_la_LIBADD += -lsocket
756 endif
757 collectd_LDADD += "-dlopen" olsrd.la
758 collectd_DEPENDENCIES += olsrd.la
759 endif
761 if BUILD_PLUGIN_ONEWIRE
762 pkglib_LTLIBRARIES += onewire.la
763 onewire_la_SOURCES = onewire.c
764 onewire_la_CFLAGS = $(AM_CFLAGS)
765 onewire_la_CPPFLAGS = $(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
766 onewire_la_LIBADD = $(BUILD_WITH_LIBOWCAPI_LIBS)
767 onewire_la_LDFLAGS = -module -avoid-version
768 collectd_LDADD += "-dlopen" onewire.la
769 collectd_DEPENDENCIES += onewire.la
770 endif
772 if BUILD_PLUGIN_OPENVPN
773 pkglib_LTLIBRARIES += openvpn.la
774 openvpn_la_SOURCES = openvpn.c
775 openvpn_la_CFLAGS = $(AM_CFLAGS)
776 openvpn_la_LDFLAGS = -module -avoid-version
777 collectd_LDADD += "-dlopen" openvpn.la
778 collectd_DEPENDENCIES += openvpn.la
779 endif
781 if BUILD_PLUGIN_ORACLE
782 pkglib_LTLIBRARIES += oracle.la
783 oracle_la_SOURCES = oracle.c \
784         utils_db_query.c utils_db_query.h
785 oracle_la_CFLAGS = $(AM_CFLAGS)
786 oracle_la_CPPFLAGS = $(BUILD_WITH_ORACLE_CFLAGS)
787 oracle_la_LIBADD = $(BUILD_WITH_ORACLE_LIBS)
788 oracle_la_LDFLAGS = -module -avoid-version
789 collectd_LDADD += "-dlopen" oracle.la
790 collectd_DEPENDENCIES += oracle.la
791 endif
793 if BUILD_PLUGIN_PERL
794 pkglib_LTLIBRARIES += perl.la
795 perl_la_SOURCES = perl.c
796 # Despite C99 providing the "bool" type thru stdbool.h, Perl defines its own
797 # version of that type if HAS_BOOL is not defined... *sigh*
798 perl_la_CPPFLAGS = $(AM_CPPFLAGS) -DHAS_BOOL=1
799 perl_la_CFLAGS  = $(AM_CFLAGS) \
800                 $(PERL_CFLAGS) \
801                 -DXS_VERSION=\"$(VERSION)\" -DVERSION=\"$(VERSION)\"
802 # Work-around for issues #41 and #42 - Perl 5.10 incorrectly introduced
803 # __attribute__nonnull__(3) for Perl_load_module().
804 if HAVE_BROKEN_PERL_LOAD_MODULE
805 perl_la_CFLAGS += -Wno-nonnull
806 endif
807 perl_la_LDFLAGS = -module -avoid-version \
808                 $(PERL_LDFLAGS)
809 collectd_LDADD += "-dlopen" perl.la
810 collectd_DEPENDENCIES += perl.la
811 endif
813 if BUILD_PLUGIN_PINBA
814 BUILT_SOURCES += pinba.pb-c.c pinba.pb-c.h
815 CLEANFILES += pinba.pb-c.c pinba.pb-c.h
816 pkglib_LTLIBRARIES += pinba.la
817 pinba_la_SOURCES = pinba.c
818 pinba_la_LDFLAGS = -module -avoid-version
819 pinba_la_LIBADD = -lprotobuf-c
820 collectd_LDADD += "-dlopen" pinba.la
821 collectd_DEPENDENCIES += pinba.la
822 endif
824 if BUILD_PLUGIN_PING
825 pkglib_LTLIBRARIES += ping.la
826 ping_la_SOURCES = ping.c
827 ping_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOPING_CPPFLAGS)
828 ping_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBOPING_LDFLAGS)
829 ping_la_LIBADD = -loping -lm
830 collectd_LDADD += "-dlopen" ping.la
831 collectd_DEPENDENCIES += ping.la
832 endif
834 if BUILD_PLUGIN_POSTGRESQL
835 pkglib_LTLIBRARIES += postgresql.la
836 postgresql_la_SOURCES = postgresql.c \
837                  utils_db_query.c utils_db_query.h
838 postgresql_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPQ_CPPFLAGS)
839 postgresql_la_LDFLAGS = -module -avoid-version \
840                 $(BUILD_WITH_LIBPQ_LDFLAGS)
841 postgresql_la_LIBADD = -lpq
842 collectd_LDADD += "-dlopen" postgresql.la
843 collectd_DEPENDENCIES += postgresql.la
844 endif
846 if BUILD_PLUGIN_POWERDNS
847 pkglib_LTLIBRARIES += powerdns.la
848 powerdns_la_SOURCES = powerdns.c
849 powerdns_la_LDFLAGS = -module -avoid-version
850 collectd_LDADD += "-dlopen" powerdns.la
851 collectd_DEPENDENCIES += powerdns.la
852 endif
854 if BUILD_PLUGIN_PYTHON
855 pkglib_LTLIBRARIES += python.la
856 python_la_SOURCES = python.c pyconfig.c pyvalues.c cpython.h
857 python_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_PYTHON_CPPFLAGS)
858 python_la_CFLAGS = $(AM_CFLAGS)
859 if COMPILER_IS_GCC
860 python_la_CFLAGS += -fno-strict-aliasing -Wno-strict-aliasing
861 endif
862 python_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_PYTHON_LDFLAGS)
863 python_la_LIBADD = $(BUILD_WITH_PYTHON_LIBS)
864 collectd_LDADD += "-dlopen" python.la
865 collectd_DEPENDENCIES += python.la
866 endif
868 if BUILD_PLUGIN_PROCESSES
869 pkglib_LTLIBRARIES += processes.la
870 processes_la_SOURCES = processes.c
871 processes_la_LDFLAGS = -module -avoid-version
872 processes_la_LIBADD =
873 collectd_LDADD += "-dlopen" processes.la
874 collectd_DEPENDENCIES += processes.la
875 if BUILD_WITH_LIBKVM_GETPROCS
876 processes_la_LIBADD += -lkvm
877 endif
878 endif
880 if BUILD_PLUGIN_PROTOCOLS
881 pkglib_LTLIBRARIES += protocols.la
882 protocols_la_SOURCES = protocols.c
883 protocols_la_LDFLAGS = -module -avoid-version
884 collectd_LDADD += "-dlopen" protocols.la
885 collectd_DEPENDENCIES += protocols.la
886 endif
888 if BUILD_PLUGIN_ROUTEROS
889 pkglib_LTLIBRARIES += routeros.la
890 routeros_la_SOURCES = routeros.c
891 routeros_la_CPPFLAGS = $(BUILD_WITH_LIBROUTEROS_CPPFLAGS)
892 routeros_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBROUTEROS_LDFLAGS)
893 routeros_la_LIBADD = -lrouteros
894 collectd_LDADD += "-dlopen" routeros.la
895 collectd_DEPENDENCIES += routeros.la
896 endif
898 if BUILD_PLUGIN_RRDCACHED
899 pkglib_LTLIBRARIES += rrdcached.la
900 rrdcached_la_SOURCES = rrdcached.c utils_rrdcreate.c utils_rrdcreate.h
901 rrdcached_la_LDFLAGS = -module -avoid-version
902 rrdcached_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
903 rrdcached_la_LIBADD = $(BUILD_WITH_LIBRRD_LDFLAGS)
904 collectd_LDADD += "-dlopen" rrdcached.la
905 collectd_DEPENDENCIES += rrdcached.la
906 endif
908 if BUILD_PLUGIN_RRDTOOL
909 pkglib_LTLIBRARIES += rrdtool.la
910 rrdtool_la_SOURCES = rrdtool.c utils_rrdcreate.c utils_rrdcreate.h
911 rrdtool_la_LDFLAGS = -module -avoid-version
912 rrdtool_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
913 rrdtool_la_LIBADD = $(BUILD_WITH_LIBRRD_LDFLAGS)
914 collectd_LDADD += "-dlopen" rrdtool.la
915 collectd_DEPENDENCIES += rrdtool.la
916 endif
918 if BUILD_PLUGIN_SENSORS
919 pkglib_LTLIBRARIES += sensors.la
920 sensors_la_SOURCES = sensors.c
921 sensors_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBSENSORS_CFLAGS)
922 sensors_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBSENSORS_LDFLAGS)
923 sensors_la_LIBADD = -lsensors
924 collectd_LDADD += "-dlopen" sensors.la
925 collectd_DEPENDENCIES += sensors.la
926 endif
928 if BUILD_PLUGIN_SERIAL
929 pkglib_LTLIBRARIES += serial.la
930 serial_la_SOURCES = serial.c
931 serial_la_LDFLAGS = -module -avoid-version
932 collectd_LDADD += "-dlopen" serial.la
933 collectd_DEPENDENCIES += serial.la
934 endif
936 if BUILD_PLUGIN_SNMP
937 pkglib_LTLIBRARIES += snmp.la
938 snmp_la_SOURCES = snmp.c
939 snmp_la_LDFLAGS = -module -avoid-version
940 snmp_la_CFLAGS = $(AM_CFLAGS)
941 snmp_la_LIBADD =
942 if BUILD_WITH_LIBNETSNMP
943 snmp_la_CFLAGS += $(BUILD_WITH_LIBSNMP_CFLAGS)
944 snmp_la_LIBADD += $(BUILD_WITH_LIBSNMP_LIBS)
945 endif
946 if BUILD_WITH_LIBPTHREAD
947 snmp_la_LIBADD += -lpthread
948 endif
949 collectd_LDADD += "-dlopen" snmp.la
950 collectd_DEPENDENCIES += snmp.la
951 endif
953 if BUILD_PLUGIN_SWAP
954 pkglib_LTLIBRARIES += swap.la
955 swap_la_SOURCES = swap.c
956 swap_la_CFLAGS = $(AM_CFLAGS)
957 swap_la_LDFLAGS = -module -avoid-version
958 swap_la_LIBADD =
959 collectd_LDADD += "-dlopen" swap.la
960 collectd_DEPENDENCIES += swap.la
961 if BUILD_WITH_LIBKSTAT
962 swap_la_LIBADD += -lkstat
963 endif
964 if BUILD_WITH_LIBDEVINFO
965 swap_la_LIBADD += -ldevinfo
966 endif
967 if BUILD_WITH_LIBKVM_GETSWAPINFO
968 swap_la_LIBADD += -lkvm
969 endif
970 if BUILD_WITH_LIBSTATGRAB
971 swap_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
972 swap_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
973 endif
974 if BUILD_WITH_PERFSTAT
975 swap_la_LIBADD += -lperfstat
976 endif
978 endif
980 if BUILD_PLUGIN_SYSLOG
981 pkglib_LTLIBRARIES += syslog.la
982 syslog_la_SOURCES = syslog.c
983 syslog_la_LDFLAGS = -module -avoid-version
984 collectd_LDADD += "-dlopen" syslog.la
985 collectd_DEPENDENCIES += syslog.la
986 endif
988 if BUILD_PLUGIN_TABLE
989 pkglib_LTLIBRARIES += table.la
990 table_la_SOURCES = table.c
991 table_la_LDFLAGS = -module -avoid-version
992 collectd_LDADD += "-dlopen" table.la
993 collectd_DEPENDENCIES += table.la
994 endif
996 if BUILD_PLUGIN_TAIL
997 pkglib_LTLIBRARIES += tail.la
998 tail_la_SOURCES = tail.c
999 tail_la_LDFLAGS = -module -avoid-version
1000 collectd_LDADD += "-dlopen" tail.la
1001 collectd_DEPENDENCIES += tail.la
1002 endif
1004 if BUILD_PLUGIN_TAPE
1005 pkglib_LTLIBRARIES += tape.la
1006 tape_la_SOURCES = tape.c
1007 tape_la_LDFLAGS = -module -avoid-version
1008 tape_la_LIBADD = -lkstat -ldevinfo
1009 collectd_LDADD += "-dlopen" tape.la
1010 collectd_DEPENDENCIES += tape.la
1011 endif
1013 if BUILD_PLUGIN_TARGET_NOTIFICATION
1014 pkglib_LTLIBRARIES += target_notification.la
1015 target_notification_la_SOURCES = target_notification.c
1016 target_notification_la_LDFLAGS = -module -avoid-version
1017 collectd_LDADD += "-dlopen" target_notification.la
1018 collectd_DEPENDENCIES += target_notification.la
1019 endif
1021 if BUILD_PLUGIN_TARGET_REPLACE
1022 pkglib_LTLIBRARIES += target_replace.la
1023 target_replace_la_SOURCES = target_replace.c
1024 target_replace_la_LDFLAGS = -module -avoid-version
1025 collectd_LDADD += "-dlopen" target_replace.la
1026 collectd_DEPENDENCIES += target_replace.la
1027 endif
1029 if BUILD_PLUGIN_TARGET_SCALE
1030 pkglib_LTLIBRARIES += target_scale.la
1031 target_scale_la_SOURCES = target_scale.c
1032 target_scale_la_LDFLAGS = -module -avoid-version
1033 collectd_LDADD += "-dlopen" target_scale.la
1034 collectd_DEPENDENCIES += target_scale.la
1035 endif
1037 if BUILD_PLUGIN_TARGET_SET
1038 pkglib_LTLIBRARIES += target_set.la
1039 target_set_la_SOURCES = target_set.c
1040 target_set_la_LDFLAGS = -module -avoid-version
1041 collectd_LDADD += "-dlopen" target_set.la
1042 collectd_DEPENDENCIES += target_set.la
1043 endif
1045 if BUILD_PLUGIN_TARGET_V5UPGRADE
1046 pkglib_LTLIBRARIES += target_v5upgrade.la
1047 target_v5upgrade_la_SOURCES = target_v5upgrade.c
1048 target_v5upgrade_la_LDFLAGS = -module -avoid-version
1049 collectd_LDADD += "-dlopen" target_v5upgrade.la
1050 collectd_DEPENDENCIES += target_v5upgrade.la
1051 endif
1053 if BUILD_PLUGIN_TCPCONNS
1054 pkglib_LTLIBRARIES += tcpconns.la
1055 tcpconns_la_SOURCES = tcpconns.c
1056 tcpconns_la_LDFLAGS = -module -avoid-version
1057 tcpconns_la_LIBADD =
1058 collectd_LDADD += "-dlopen" tcpconns.la
1059 collectd_DEPENDENCIES += tcpconns.la
1060 if BUILD_WITH_LIBKVM_NLIST
1061 tcpconns_la_LIBADD += -lkvm
1062 endif
1063 endif
1065 if BUILD_PLUGIN_TEAMSPEAK2
1066 pkglib_LTLIBRARIES += teamspeak2.la
1067 teamspeak2_la_SOURCES = teamspeak2.c
1068 teamspeak2_la_LDFLAGS = -module -avoid-version
1069 collectd_LDADD += "-dlopen" teamspeak2.la
1070 collectd_DEPENDENCIES += teamspeak2.la
1071 endif
1073 if BUILD_PLUGIN_TED
1074 pkglib_LTLIBRARIES += ted.la
1075 ted_la_SOURCES = ted.c
1076 ted_la_LDFLAGS = -module -avoid-version
1077 collectd_LDADD += "-dlopen" ted.la
1078 collectd_DEPENDENCIES += ted.la
1079 endif
1081 if BUILD_PLUGIN_THERMAL
1082 pkglib_LTLIBRARIES += thermal.la
1083 thermal_la_SOURCES = thermal.c
1084 thermal_la_LDFLAGS = -module -avoid-version
1085 collectd_LDADD += "-dlopen" thermal.la
1086 collectd_DEPENDENCIES += thermal.la
1087 endif
1089 if BUILD_PLUGIN_TOKYOTYRANT
1090 pkglib_LTLIBRARIES += tokyotyrant.la
1091 tokyotyrant_la_SOURCES = tokyotyrant.c
1092 tokyotyrant_la_CPPFLAGS  = $(AM_CPPFLAGS) $(BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS)
1093 tokyotyrant_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS)
1094 tokyotyrant_la_LIBADD  = $(BUILD_WITH_LIBTOKYOTYRANT_LIBS)
1095 if BUILD_WITH_LIBSOCKET
1096 tokyotyrant_la_LIBADD += -lsocket
1097 endif
1098 collectd_LDADD += "-dlopen" tokyotyrant.la
1099 collectd_DEPENDENCIES += tokyotyrant.la
1100 endif
1102 if BUILD_PLUGIN_UNIXSOCK
1103 pkglib_LTLIBRARIES += unixsock.la
1104 unixsock_la_SOURCES = unixsock.c \
1105                       utils_cmd_flush.h utils_cmd_flush.c \
1106                       utils_cmd_getval.h utils_cmd_getval.c \
1107                       utils_cmd_getthreshold.h utils_cmd_getthreshold.c \
1108                       utils_cmd_listval.h utils_cmd_listval.c \
1109                       utils_cmd_putval.h utils_cmd_putval.c \
1110                       utils_cmd_putnotif.h utils_cmd_putnotif.c
1111 unixsock_la_LDFLAGS = -module -avoid-version
1112 unixsock_la_LIBADD = -lpthread
1113 collectd_LDADD += "-dlopen" unixsock.la
1114 collectd_DEPENDENCIES += unixsock.la
1115 endif
1117 if BUILD_PLUGIN_UPTIME
1118 pkglib_LTLIBRARIES += uptime.la
1119 uptime_la_SOURCES = uptime.c
1120 uptime_la_CFLAGS = $(AM_CFLAGS)
1121 uptime_la_LDFLAGS = -module -avoid-version
1122 uptime_la_LIBADD =
1123 if BUILD_WITH_LIBKSTAT
1124 uptime_la_LIBADD += -lkstat
1125 endif
1126 collectd_LDADD += "-dlopen" uptime.la
1127 collectd_DEPENDENCIES += uptime.la
1128 endif
1130 if BUILD_PLUGIN_USERS
1131 pkglib_LTLIBRARIES += users.la
1132 users_la_SOURCES = users.c
1133 users_la_CFLAGS = $(AM_CFLAGS)
1134 users_la_LDFLAGS = -module -avoid-version
1135 users_la_LIBADD =
1136 if BUILD_WITH_LIBSTATGRAB
1137 users_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1138 users_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1139 endif
1140 collectd_LDADD += "-dlopen" users.la
1141 collectd_DEPENDENCIES += users.la
1142 endif
1144 if BUILD_PLUGIN_UUID
1145 pkglib_LTLIBRARIES += uuid.la
1146 uuid_la_SOURCES = uuid.c
1147 uuid_la_CFLAGS  = $(AM_CFLAGS) $(BUILD_WITH_LIBHAL_CFLAGS)
1148 uuid_la_LIBADD  = $(BUILD_WITH_LIBHAL_LIBS)
1149 uuid_la_LDFLAGS = -module -avoid-version
1150 collectd_LDADD += "-dlopen" uuid.la
1151 collectd_DEPENDENCIES += uuid.la
1152 endif
1154 if BUILD_PLUGIN_VARNISH
1155 pkglib_LTLIBRARIES += varnish.la
1156 varnish_la_SOURCES = varnish.c
1157 varnish_la_LDFLAGS = -module -avoid-version
1158 varnish_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBVARNISH_CFLAGS)
1159 varnish_la_LIBADD = $(BUILD_WITH_LIBVARNISH_LIBS)
1160 collectd_LDADD += "-dlopen" varnish.la
1161 collectd_DEPENDENCIES += varnish.la
1162 endif
1164 if BUILD_PLUGIN_VMEM
1165 pkglib_LTLIBRARIES += vmem.la
1166 vmem_la_SOURCES = vmem.c
1167 vmem_la_LDFLAGS = -module -avoid-version
1168 collectd_LDADD += "-dlopen" vmem.la
1169 collectd_DEPENDENCIES += vmem.la
1170 endif
1172 if BUILD_PLUGIN_VSERVER
1173 pkglib_LTLIBRARIES += vserver.la
1174 vserver_la_SOURCES = vserver.c
1175 vserver_la_LDFLAGS = -module -avoid-version
1176 collectd_LDADD += "-dlopen" vserver.la
1177 collectd_DEPENDENCIES += vserver.la
1178 endif
1180 if BUILD_PLUGIN_WIRELESS
1181 pkglib_LTLIBRARIES += wireless.la
1182 wireless_la_SOURCES = wireless.c
1183 wireless_la_LDFLAGS = -module -avoid-version
1184 collectd_LDADD += "-dlopen" wireless.la
1185 collectd_DEPENDENCIES += wireless.la
1186 endif
1188 if BUILD_PLUGIN_WRITE_HTTP
1189 pkglib_LTLIBRARIES += write_http.la
1190 write_http_la_SOURCES = write_http.c \
1191                         utils_format_json.c utils_format_json.h
1192 write_http_la_LDFLAGS = -module -avoid-version
1193 write_http_la_CFLAGS = $(AM_CFLAGS)
1194 write_http_la_LIBADD =
1195 collectd_LDADD += "-dlopen" write_http.la
1196 if BUILD_WITH_LIBCURL
1197 write_http_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
1198 write_http_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
1199 endif
1200 collectd_DEPENDENCIES += write_http.la
1201 endif
1203 if BUILD_PLUGIN_XMMS
1204 pkglib_LTLIBRARIES += xmms.la
1205 xmms_la_SOURCES = xmms.c
1206 xmms_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBXMMS_CFLAGS)
1207 xmms_la_LDFLAGS = -module -avoid-version
1208 xmms_la_LIBADD = $(BUILD_WITH_LIBXMMS_LIBS)
1209 collectd_LDADD += "-dlopen" xmms.la
1210 collectd_DEPENDENCIES += xmms.la
1211 endif
1213 if BUILD_PLUGIN_ZFS_ARC
1214 pkglib_LTLIBRARIES += zfs_arc.la
1215 zfs_arc_la_SOURCES = zfs_arc.c
1216 zfs_arc_la_CFLAGS = $(AM_CFLAGS)
1217 zfs_arc_la_LDFLAGS = -module -avoid-version
1218 zfs_arc_la_LIBADD = -lkstat
1219 collectd_LDADD += "-dlopen" zfs_arc.la
1220 collectd_DEPENDENCIES += zfs_arc.la
1221 endif
1223 dist_man_MANS = collectd.1 \
1224                 collectd.conf.5 \
1225                 collectd-email.5 \
1226                 collectd-exec.5 \
1227                 collectd-java.5 \
1228                 collectdmon.1 \
1229                 collectd-nagios.1 \
1230                 collectd-perl.5 \
1231                 collectd-python.5 \
1232                 collectd-snmp.5 \
1233                 collectd-unixsock.5 \
1234                 types.db.5
1236 #collectd_1_SOURCES = collectd.pod
1238 EXTRA_DIST = types.db pinba.proto
1240 EXTRA_DIST +=   collectd.conf.pod \
1241                 collectd-email.pod \
1242                 collectd-exec.pod \
1243                 collectd-java.pod \
1244                 collectdmon.pod \
1245                 collectd-nagios.pod \
1246                 collectd-perl.pod \
1247                 collectd-python.pod \
1248                 collectd.pod \
1249                 collectd-snmp.pod \
1250                 collectd-unixsock.pod \
1251                 postgresql_default.conf \
1252                 types.db.pod
1254 .pod.1:
1255         pod2man --release=$(VERSION) --center=$(PACKAGE) $< \
1256                 >.pod2man.tmp.$$$$ 2>/dev/null && mv -f .pod2man.tmp.$$$$ $@ || true
1257         @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
1258         then \
1259                 echo "$@ has some POD errors!"; false; \
1260         fi
1262 .pod.5:
1263         pod2man --section=5 --release=$(VERSION) --center=$(PACKAGE) $< \
1264                 >.pod2man.tmp.$$$$ 2>/dev/null && mv -f .pod2man.tmp.$$$$ $@ || true
1265         @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
1266         then \
1267                 echo "$@ has some POD errors!"; false; \
1268         fi
1270 pinba.pb-c.c pinba.pb-c.h: pinba.proto
1271         protoc-c --c_out $(builddir) pinba.proto
1273 install-exec-hook:
1274         $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
1275         if test -e $(DESTDIR)$(sysconfdir)/collectd.conf; \
1276         then \
1277                 $(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf.pkg-orig; \
1278         else \
1279                 $(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf; \
1280         fi; \
1281         $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
1282         $(INSTALL) -m 0644 $(srcdir)/types.db $(DESTDIR)$(pkgdatadir)/types.db;
1283         $(INSTALL) -m 0644 $(srcdir)/postgresql_default.conf \
1284                 $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;