Merge branch 'collectd-5.3' into collectd-5.4
[collectd.git] / src / Makefile.am
1 SUBDIRS = libcollectdclient
2 if BUILD_WITH_OWN_LIBOCONFIG
3 SUBDIRS += liboconfig
4 endif
5
6 if COMPILER_IS_GCC
7 AM_CFLAGS = -Wall -Werror
8 endif
9
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"'
16 endif
17 AM_CPPFLAGS += -DPLUGINDIR='"${pkglibdir}"'
18 AM_CPPFLAGS += -DPKGDATADIR='"${pkgdatadir}"'
19
20 sbin_PROGRAMS = collectd collectdmon
21 bin_PROGRAMS = collectd-nagios collectdctl collectd-tg
22
23 collectd_SOURCES = collectd.c collectd.h \
24                    common.c common.h \
25                    configfile.c configfile.h \
26                    filter_chain.c filter_chain.h \
27                    meta_data.c meta_data.h \
28                    plugin.c plugin.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
43
44 collectd_CPPFLAGS =  $(AM_CPPFLAGS) $(LTDLINCL)
45 collectd_CFLAGS = $(AM_CFLAGS)
46 collectd_LDFLAGS = -export-dynamic
47 collectd_LDADD = -lm
48 collectd_DEPENDENCIES =
49
50 # Link to these libraries..
51 if BUILD_WITH_LIBRT
52 collectd_LDADD += -lrt
53 endif
54 if BUILD_WITH_LIBPOSIX4
55 collectd_LDADD += -lposix4
56 endif
57 if BUILD_WITH_LIBSOCKET
58 collectd_LDADD += -lsocket
59 endif
60 if BUILD_WITH_LIBRESOLV
61 collectd_LDADD += -lresolv
62 endif
63 if BUILD_WITH_LIBPTHREAD
64 collectd_LDADD += -lpthread
65 endif
66 if BUILD_WITH_LIBKSTAT
67 collectd_LDADD += -lkstat
68 endif
69 if BUILD_WITH_LIBDEVINFO
70 collectd_LDADD += -ldevinfo
71 endif
72 if BUILD_AIX
73 collectd_LDFLAGS += -Wl,-bexpall,-brtllib
74 endif
75
76 # The daemon needs to call sg_init, so we need to link it against libstatgrab,
77 # too. -octo
78 if BUILD_WITH_LIBSTATGRAB
79 collectd_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
80 collectd_LDADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
81 endif
82
83 if BUILD_WITH_OWN_LIBOCONFIG
84 collectd_LDADD += $(LIBLTDL) liboconfig/liboconfig.la
85 collectd_DEPENDENCIES += liboconfig/liboconfig.la
86 else
87 collectd_LDADD += -loconfig
88 endif
89
90 collectdmon_SOURCES = collectdmon.c
91 collectdmon_CPPFLAGS = $(AM_CPPFLAGS)
92
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
98 endif
99 if BUILD_AIX
100 collectd_nagios_LDADD += -lm
101 endif
102
103 collectd_nagios_LDADD += libcollectdclient/libcollectdclient.la
104 collectd_nagios_DEPENDENCIES = libcollectdclient/libcollectdclient.la
105
106
107 collectdctl_SOURCES = collectdctl.c
108 collectdctl_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/src/libcollectdclient/collectd
109 collectdctl_LDADD =
110 if BUILD_WITH_LIBSOCKET
111 collectdctl_LDADD += -lsocket
112 endif
113 if BUILD_AIX
114 collectdctl_LDADD += -lm
115 endif
116 collectdctl_LDADD += libcollectdclient/libcollectdclient.la
117 collectdctl_DEPENDENCIES = libcollectdclient/libcollectdclient.la
118
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
122 collectd_tg_LDADD =
123 if BUILD_WITH_LIBSOCKET
124 collectd_tg_LDADD += -lsocket
125 endif
126 if BUILD_WITH_LIBRT
127 collectd_tg_LDADD += -lrt
128 endif
129 if BUILD_AIX
130 collectd_tg_LDADD += -lm
131 endif
132 collectd_tg_LDADD += libcollectdclient/libcollectdclient.la
133 collectd_tg_DEPENDENCIES = libcollectdclient/libcollectdclient.la
134
135
136 pkglib_LTLIBRARIES = 
137
138 BUILT_SOURCES = 
139 CLEANFILES =
140
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
149 endif
150
151 if BUILD_PLUGIN_AMQP
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
162 endif
163
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)
169 apache_la_LIBADD =
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)
174 endif
175 collectd_DEPENDENCIES += apache.la
176 endif
177
178 if BUILD_PLUGIN_APCUPS
179 pkglib_LTLIBRARIES += apcups.la
180 apcups_la_SOURCES = apcups.c
181 apcups_la_LDFLAGS = -module -avoid-version
182 apcups_la_LIBADD =
183 if BUILD_WITH_LIBSOCKET
184 apcups_la_LIBADD += -lsocket
185 endif
186 collectd_LDADD += "-dlopen" apcups.la
187 collectd_DEPENDENCIES += apcups.la
188 endif
189
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
197 endif
198
199 if BUILD_PLUGIN_AQUAERO
200 pkglib_LTLIBRARIES += aquaero.la
201 aquaero_la_SOURCES = aquaero.c
202 aquaero_la_LDFLAGS = -module -avoid-version
203 aquaero_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBAQUAERO5_CFLAGS)
204 aquaero_la_LIBADD = $(BUILD_WITH_LIBAQUAERO5_LDFLAGS) -laquaero5
205 collectd_LDADD += "-dlopen" aquaero.la
206 collectd_DEPENDENCIES += aquaero.la
207 endif
208
209 if BUILD_PLUGIN_ASCENT
210 pkglib_LTLIBRARIES += ascent.la
211 ascent_la_SOURCES = ascent.c
212 ascent_la_LDFLAGS = -module -avoid-version
213 ascent_la_CFLAGS = $(AM_CFLAGS) \
214                 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
215 ascent_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
216 collectd_LDADD += "-dlopen" ascent.la
217 collectd_DEPENDENCIES += ascent.la
218 endif
219
220 if BUILD_PLUGIN_BATTERY
221 pkglib_LTLIBRARIES += battery.la
222 battery_la_SOURCES = battery.c
223 battery_la_LDFLAGS = -module -avoid-version
224 battery_la_LIBADD =
225 if BUILD_WITH_LIBIOKIT
226 battery_la_LDFLAGS += -framework IOKit
227 endif
228 collectd_LDADD += "-dlopen" battery.la
229 collectd_DEPENDENCIES += battery.la
230 endif
231
232 if BUILD_PLUGIN_BIND
233 pkglib_LTLIBRARIES += bind.la
234 bind_la_SOURCES = bind.c
235 bind_la_LDFLAGS = -module -avoid-version
236 bind_la_CFLAGS = $(AM_CFLAGS) \
237                 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
238 bind_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
239 collectd_LDADD += "-dlopen" bind.la
240 collectd_DEPENDENCIES += bind.la
241 endif
242
243 if BUILD_PLUGIN_CGROUPS
244 pkglib_LTLIBRARIES += cgroups.la
245 cgroups_la_SOURCES = cgroups.c utils_mount.c utils_mount.h
246 cgroups_la_LDFLAGS = -module -avoid-version
247 collectd_LDADD += "-dlopen" cgroups.la
248 collectd_DEPENDENCIES += cgroups.la
249 endif
250
251 if BUILD_PLUGIN_CONNTRACK
252 pkglib_LTLIBRARIES += conntrack.la
253 conntrack_la_SOURCES = conntrack.c
254 conntrack_la_LDFLAGS = -module -avoid-version
255 collectd_LDADD += "-dlopen" conntrack.la
256 collectd_DEPENDENCIES += conntrack.la
257 endif
258
259 if BUILD_PLUGIN_CONTEXTSWITCH
260 pkglib_LTLIBRARIES += contextswitch.la
261 contextswitch_la_SOURCES = contextswitch.c
262 contextswitch_la_LDFLAGS = -module -avoid-version
263 contextswitch_la_LIBADD =
264 if BUILD_WITH_PERFSTAT
265 contextswitch_la_LIBADD += -lperfstat
266 endif
267 collectd_LDADD += "-dlopen" contextswitch.la
268 collectd_DEPENDENCIES += contextswitch.la
269 endif
270
271 if BUILD_PLUGIN_CPU
272 pkglib_LTLIBRARIES += cpu.la
273 cpu_la_SOURCES = cpu.c
274 cpu_la_CFLAGS = $(AM_CFLAGS)
275 cpu_la_LDFLAGS = -module -avoid-version
276 cpu_la_LIBADD = 
277 if BUILD_WITH_LIBKSTAT
278 cpu_la_LIBADD += -lkstat
279 endif
280 if BUILD_WITH_LIBDEVINFO
281 cpu_la_LIBADD += -ldevinfo
282 endif
283 if BUILD_WITH_LIBSTATGRAB
284 cpu_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
285 cpu_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
286 endif
287 if BUILD_WITH_PERFSTAT
288 cpu_la_LIBADD += -lperfstat
289 endif
290 collectd_LDADD += "-dlopen" cpu.la
291 collectd_DEPENDENCIES += cpu.la
292 endif
293
294 if BUILD_PLUGIN_CPUFREQ
295 pkglib_LTLIBRARIES += cpufreq.la
296 cpufreq_la_SOURCES = cpufreq.c
297 cpufreq_la_LDFLAGS = -module -avoid-version
298 collectd_LDADD += "-dlopen" cpufreq.la
299 collectd_DEPENDENCIES += cpufreq.la
300 endif
301
302 if BUILD_PLUGIN_CSV
303 pkglib_LTLIBRARIES += csv.la
304 csv_la_SOURCES = csv.c
305 csv_la_LDFLAGS = -module -avoid-version
306 collectd_LDADD += "-dlopen" csv.la
307 collectd_DEPENDENCIES += csv.la
308 endif
309
310 if BUILD_PLUGIN_CURL
311 pkglib_LTLIBRARIES += curl.la
312 curl_la_SOURCES = curl.c
313 curl_la_LDFLAGS = -module -avoid-version
314 curl_la_CFLAGS = $(AM_CFLAGS)
315 curl_la_LIBADD =
316 collectd_LDADD += "-dlopen" curl.la
317 if BUILD_WITH_LIBCURL
318 curl_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
319 curl_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
320 endif
321 collectd_DEPENDENCIES += curl.la
322 endif
323
324 if BUILD_PLUGIN_CURL_JSON
325 pkglib_LTLIBRARIES += curl_json.la
326 curl_json_la_SOURCES = curl_json.c
327 curl_json_la_CFLAGS = $(AM_CFLAGS)
328 curl_json_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBYAJL_LDFLAGS)
329 curl_json_la_CPPFLAGS = $(BUILD_WITH_LIBYAJL_CPPFLAGS)
330 curl_json_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
331 if BUILD_WITH_LIBCURL
332 curl_json_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
333 curl_json_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
334 endif
335 collectd_LDADD += "-dlopen" curl_json.la
336 collectd_DEPENDENCIES += curl_json.la
337 endif
338
339 if BUILD_PLUGIN_CURL_XML
340 pkglib_LTLIBRARIES += curl_xml.la
341 curl_xml_la_SOURCES = curl_xml.c
342 curl_xml_la_LDFLAGS = -module -avoid-version
343 curl_xml_la_CFLAGS = $(AM_CFLAGS) \
344                 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
345 curl_xml_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
346 collectd_LDADD += "-dlopen" curl_xml.la
347 collectd_DEPENDENCIES += curl_xml.la
348 endif
349
350 if BUILD_PLUGIN_DBI
351 pkglib_LTLIBRARIES += dbi.la
352 dbi_la_SOURCES = dbi.c \
353                  utils_db_query.c utils_db_query.h
354 dbi_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBDBI_CPPFLAGS)
355 dbi_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBDBI_LDFLAGS)
356 dbi_la_LIBADD = $(BUILD_WITH_LIBDBI_LIBS)
357 collectd_LDADD += "-dlopen" dbi.la
358 collectd_DEPENDENCIES += dbi.la
359 endif
360
361 if BUILD_PLUGIN_DF
362 pkglib_LTLIBRARIES += df.la
363 df_la_SOURCES = df.c utils_mount.c utils_mount.h
364 df_la_LDFLAGS = -module -avoid-version
365 collectd_LDADD += "-dlopen" df.la
366 collectd_DEPENDENCIES += df.la
367 endif
368
369 if BUILD_PLUGIN_DISK
370 pkglib_LTLIBRARIES += disk.la
371 disk_la_SOURCES = disk.c
372 disk_la_CFLAGS = $(AM_CFLAGS)
373 disk_la_LDFLAGS = -module -avoid-version
374 disk_la_LIBADD = 
375 if BUILD_WITH_LIBKSTAT
376 disk_la_LIBADD += -lkstat
377 endif
378 if BUILD_WITH_LIBDEVINFO
379 disk_la_LIBADD += -ldevinfo
380 endif
381 if BUILD_WITH_LIBIOKIT
382 disk_la_LDFLAGS += -framework IOKit
383 endif
384 if BUILD_WITH_LIBSTATGRAB
385 disk_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)  
386 disk_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
387 endif
388 if BUILD_WITH_PERFSTAT
389 disk_la_LIBADD += -lperfstat
390 endif
391 collectd_LDADD += "-dlopen" disk.la
392 collectd_DEPENDENCIES += disk.la
393 endif
394
395 if BUILD_PLUGIN_DNS
396 pkglib_LTLIBRARIES += dns.la
397 dns_la_SOURCES = dns.c utils_dns.c utils_dns.h
398 dns_la_LDFLAGS = -module -avoid-version
399 dns_la_LIBADD = -lpcap -lpthread
400 collectd_LDADD += "-dlopen" dns.la
401 collectd_DEPENDENCIES += dns.la
402 endif
403
404 if BUILD_PLUGIN_EMAIL
405 pkglib_LTLIBRARIES += email.la
406 email_la_SOURCES = email.c
407 email_la_LDFLAGS = -module -avoid-version
408 email_la_LIBADD = -lpthread
409 collectd_LDADD += "-dlopen" email.la
410 collectd_DEPENDENCIES += email.la
411 endif
412
413 if BUILD_PLUGIN_ENTROPY
414 pkglib_LTLIBRARIES += entropy.la
415 entropy_la_SOURCES = entropy.c
416 entropy_la_LDFLAGS = -module -avoid-version
417 collectd_LDADD += "-dlopen" entropy.la
418 collectd_DEPENDENCIES += entropy.la
419 endif
420
421 if BUILD_PLUGIN_EXEC
422 pkglib_LTLIBRARIES += exec.la
423 exec_la_SOURCES = exec.c \
424                   utils_cmd_putnotif.c utils_cmd_putnotif.h \
425                   utils_cmd_putval.c utils_cmd_putval.h
426 exec_la_LDFLAGS = -module -avoid-version
427 exec_la_LIBADD = -lpthread
428 collectd_LDADD += "-dlopen" exec.la
429 collectd_DEPENDENCIES += exec.la
430 endif
431
432 if BUILD_PLUGIN_ETHSTAT
433 pkglib_LTLIBRARIES += ethstat.la
434 ethstat_la_SOURCES = ethstat.c
435 ethstat_la_LDFLAGS = -module -avoid-version
436 collectd_LDADD += "-dlopen" ethstat.la
437 collectd_DEPENDENCIES += ethstat.la
438 endif
439
440 if BUILD_PLUGIN_FILECOUNT
441 pkglib_LTLIBRARIES += filecount.la
442 filecount_la_SOURCES = filecount.c
443 filecount_la_LDFLAGS = -module -avoid-version
444 collectd_LDADD += "-dlopen" filecount.la
445 collectd_DEPENDENCIES += filecount.la
446 endif
447
448 if BUILD_PLUGIN_GMOND
449 pkglib_LTLIBRARIES += gmond.la
450 gmond_la_SOURCES = gmond.c
451 gmond_la_CPPFLAGS = $(AM_CPPFLAGS) $(GANGLIA_CPPFLAGS)
452 gmond_la_LDFLAGS = -module -avoid-version $(GANGLIA_LDFLAGS)
453 gmond_la_LIBADD = $(GANGLIA_LIBS)
454 collectd_LDADD += "-dlopen" gmond.la
455 collectd_DEPENDENCIES += gmond.la
456 endif
457
458 if BUILD_PLUGIN_HDDTEMP
459 pkglib_LTLIBRARIES += hddtemp.la
460 hddtemp_la_SOURCES = hddtemp.c
461 hddtemp_la_LDFLAGS = -module -avoid-version
462 hddtemp_la_LIBADD =
463 if BUILD_WITH_LIBSOCKET
464 hddtemp_la_LIBADD += -lsocket
465 endif
466 collectd_LDADD += "-dlopen" hddtemp.la
467 collectd_DEPENDENCIES += hddtemp.la
468 endif
469
470 if BUILD_PLUGIN_INTERFACE
471 pkglib_LTLIBRARIES += interface.la
472 interface_la_SOURCES = interface.c
473 interface_la_CFLAGS = $(AM_CFLAGS)
474 interface_la_LDFLAGS = -module -avoid-version
475 interface_la_LIBADD =
476 collectd_LDADD += "-dlopen" interface.la
477 collectd_DEPENDENCIES += interface.la
478 if BUILD_WITH_LIBSTATGRAB
479 interface_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
480 interface_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
481 else
482 if BUILD_WITH_LIBKSTAT
483 interface_la_LIBADD += -lkstat
484 endif
485 if BUILD_WITH_LIBDEVINFO
486 interface_la_LIBADD += -ldevinfo
487 endif # BUILD_WITH_LIBDEVINFO
488 endif # !BUILD_WITH_LIBSTATGRAB
489 if BUILD_WITH_PERFSTAT
490 interface_la_LIBADD += -lperfstat
491 endif
492 endif # BUILD_PLUGIN_INTERFACE
493
494 if BUILD_PLUGIN_IPTABLES
495 pkglib_LTLIBRARIES += iptables.la
496 iptables_la_SOURCES = iptables.c
497 iptables_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBIPTC_CPPFLAGS)
498 iptables_la_LDFLAGS = -module -avoid-version
499 iptables_la_LIBADD = $(BUILD_WITH_LIBIPTC_LDFLAGS)
500 collectd_LDADD += "-dlopen" iptables.la
501 collectd_DEPENDENCIES += iptables.la
502 endif
503
504 if BUILD_PLUGIN_IPMI
505 pkglib_LTLIBRARIES += ipmi.la
506 ipmi_la_SOURCES = ipmi.c
507 ipmi_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_OPENIPMI_CFLAGS)
508 ipmi_la_LDFLAGS = -module -avoid-version
509 ipmi_la_LIBADD = $(BUILD_WITH_OPENIPMI_LIBS)
510 collectd_LDADD += "-dlopen" ipmi.la
511 collectd_DEPENDENCIES += ipmi.la
512 endif
513
514 if BUILD_PLUGIN_IPVS
515 pkglib_LTLIBRARIES += ipvs.la
516 ipvs_la_SOURCES = ipvs.c
517 if IP_VS_H_NEEDS_KERNEL_CFLAGS
518 ipvs_la_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS)
519 endif
520 ipvs_la_LDFLAGS = -module -avoid-version
521 collectd_LDADD += "-dlopen" ipvs.la
522 collectd_DEPENDENCIES += ipvs.la
523 endif
524
525 if BUILD_PLUGIN_IRQ
526 pkglib_LTLIBRARIES += irq.la
527 irq_la_SOURCES = irq.c
528 irq_la_LDFLAGS = -module -avoid-version
529 collectd_LDADD += "-dlopen" irq.la
530 collectd_DEPENDENCIES += irq.la
531 endif
532
533 if BUILD_PLUGIN_JAVA
534 pkglib_LTLIBRARIES += java.la
535 java_la_SOURCES = java.c
536 java_la_CPPFLAGS = $(AM_CPPFLAGS) $(JAVA_CPPFLAGS)
537 java_la_CFLAGS = $(AM_CFLAGS) $(JAVA_CFLAGS)
538 java_la_LDFLAGS = -module -avoid-version $(JAVA_LDFLAGS)
539 java_la_LIBADD = $(JAVA_LIBS)
540 collectd_LDADD += "-dlopen" java.la
541 collectd_DEPENDENCIES += java.la
542 endif
543
544 if BUILD_PLUGIN_LIBVIRT
545 pkglib_LTLIBRARIES += libvirt.la
546 libvirt_la_SOURCES = libvirt.c
547 libvirt_la_CFLAGS = $(AM_CFLAGS) \
548                 $(BUILD_WITH_LIBVIRT_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
549 libvirt_la_LIBADD = $(BUILD_WITH_LIBVIRT_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
550 libvirt_la_LDFLAGS = -module -avoid-version
551 collectd_LDADD += "-dlopen" libvirt.la
552 collectd_DEPENDENCIES += libvirt.la
553 endif
554
555 if BUILD_PLUGIN_LOAD
556 pkglib_LTLIBRARIES += load.la
557 load_la_SOURCES = load.c
558 load_la_CFLAGS = $(AM_CFLAGS)
559 load_la_LDFLAGS = -module -avoid-version
560 load_la_LIBADD =
561 collectd_LDADD += "-dlopen" load.la
562 collectd_DEPENDENCIES += load.la
563 if BUILD_WITH_LIBSTATGRAB
564 load_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
565 load_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
566 endif # BUILD_WITH_LIBSTATGRAB
567 if BUILD_WITH_PERFSTAT
568 load_la_LIBADD += -lperfstat
569 endif
570 endif # BUILD_PLUGIN_LOAD
571
572 if BUILD_PLUGIN_LOGFILE
573 pkglib_LTLIBRARIES += logfile.la
574 logfile_la_SOURCES = logfile.c
575 logfile_la_LDFLAGS = -module -avoid-version
576 collectd_LDADD += "-dlopen" logfile.la
577 collectd_DEPENDENCIES += logfile.la
578 endif
579
580 if BUILD_PLUGIN_LPAR
581 pkglib_LTLIBRARIES += lpar.la
582 lpar_la_SOURCES = lpar.c
583 lpar_la_LDFLAGS = -module -avoid-version
584 collectd_LDADD += "-dlopen" lpar.la
585 collectd_DEPENDENCIES += lpar.la
586 lpar_la_LIBADD = -lperfstat
587 endif
588
589 if BUILD_PLUGIN_LVM
590 pkglib_LTLIBRARIES += lvm.la
591 lvm_la_SOURCES = lvm.c
592 lvm_la_LDFLAGS = -module -avoid-version
593 lvm_la_LIBADD = $(BUILD_WITH_LIBLVM2APP_LIBS)
594 collectd_LDADD += "-dlopen" lvm.la
595 collectd_DEPENDENCIES += lvm.la
596 endif
597
598 if BUILD_PLUGIN_MADWIFI
599 pkglib_LTLIBRARIES += madwifi.la
600 madwifi_la_SOURCES = madwifi.c madwifi.h
601 madwifi_la_LDFLAGS = -module -avoid-version
602 collectd_LDADD += "-dlopen" madwifi.la
603 collectd_DEPENDENCIES += madwifi.la
604 endif
605
606 if BUILD_PLUGIN_MATCH_EMPTY_COUNTER
607 pkglib_LTLIBRARIES += match_empty_counter.la
608 match_empty_counter_la_SOURCES = match_empty_counter.c
609 match_empty_counter_la_LDFLAGS = -module -avoid-version
610 collectd_LDADD += "-dlopen" match_empty_counter.la
611 collectd_DEPENDENCIES += match_empty_counter.la
612 endif
613
614 if BUILD_PLUGIN_MATCH_HASHED
615 pkglib_LTLIBRARIES += match_hashed.la
616 match_hashed_la_SOURCES = match_hashed.c
617 match_hashed_la_LDFLAGS = -module -avoid-version
618 collectd_LDADD += "-dlopen" match_hashed.la
619 collectd_DEPENDENCIES += match_hashed.la
620 endif
621
622 if BUILD_PLUGIN_MATCH_REGEX
623 pkglib_LTLIBRARIES += match_regex.la
624 match_regex_la_SOURCES = match_regex.c
625 match_regex_la_LDFLAGS = -module -avoid-version
626 collectd_LDADD += "-dlopen" match_regex.la
627 collectd_DEPENDENCIES += match_regex.la
628 endif
629
630 if BUILD_PLUGIN_MATCH_TIMEDIFF
631 pkglib_LTLIBRARIES += match_timediff.la
632 match_timediff_la_SOURCES = match_timediff.c
633 match_timediff_la_LDFLAGS = -module -avoid-version
634 collectd_LDADD += "-dlopen" match_timediff.la
635 collectd_DEPENDENCIES += match_timediff.la
636 endif
637
638 if BUILD_PLUGIN_MATCH_VALUE
639 pkglib_LTLIBRARIES += match_value.la
640 match_value_la_SOURCES = match_value.c
641 match_value_la_LDFLAGS = -module -avoid-version
642 collectd_LDADD += "-dlopen" match_value.la
643 collectd_DEPENDENCIES += match_value.la
644 endif
645
646 if BUILD_PLUGIN_MBMON
647 pkglib_LTLIBRARIES += mbmon.la
648 mbmon_la_SOURCES = mbmon.c
649 mbmon_la_LDFLAGS = -module -avoid-version
650 mbmon_la_LIBADD =
651 if BUILD_WITH_LIBSOCKET
652 mbmon_la_LIBADD += -lsocket
653 endif
654 collectd_LDADD += "-dlopen" mbmon.la
655 collectd_DEPENDENCIES += mbmon.la
656 endif
657
658 if BUILD_PLUGIN_MD
659 pkglib_LTLIBRARIES += md.la
660 md_la_SOURCES = md.c
661 md_la_LDFLAGS = -module -avoid-version
662 collectd_LDADD += "-dlopen" md.la
663 collectd_DEPENDENCIES += md.la
664 endif
665
666 if BUILD_PLUGIN_MEMCACHEC
667 pkglib_LTLIBRARIES += memcachec.la
668 memcachec_la_SOURCES = memcachec.c
669 memcachec_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBMEMCACHED_LDFLAGS)
670 memcachec_la_CPPFLAGS = $(BUILD_WITH_LIBMEMCACHED_CPPFLAGS)
671 memcachec_la_LIBADD = $(BUILD_WITH_LIBMEMCACHED_LIBS)
672 collectd_LDADD += "-dlopen" memcachec.la
673 collectd_DEPENDENCIES += memcachec.la
674 endif
675
676 if BUILD_PLUGIN_MEMCACHED
677 pkglib_LTLIBRARIES += memcached.la
678 memcached_la_SOURCES = memcached.c
679 memcached_la_LDFLAGS = -module -avoid-version
680 memcached_la_LIBADD =
681 if BUILD_WITH_LIBSOCKET
682 memcached_la_LIBADD += -lsocket
683 endif
684 collectd_LDADD += "-dlopen" memcached.la
685 collectd_DEPENDENCIES += memcached.la
686 endif
687
688 if BUILD_PLUGIN_MEMORY
689 pkglib_LTLIBRARIES += memory.la
690 memory_la_SOURCES = memory.c
691 memory_la_CFLAGS = $(AM_CFLAGS)
692 memory_la_LDFLAGS = -module -avoid-version
693 memory_la_LIBADD =
694 collectd_LDADD += "-dlopen" memory.la
695 collectd_DEPENDENCIES += memory.la
696 if BUILD_WITH_LIBKSTAT
697 memory_la_LIBADD += -lkstat
698 endif
699 if BUILD_WITH_LIBDEVINFO
700 memory_la_LIBADD += -ldevinfo
701 endif
702 if BUILD_WITH_LIBSTATGRAB
703 memory_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
704 memory_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
705 endif
706 if BUILD_WITH_PERFSTAT
707 memory_la_LIBADD += -lperfstat
708 endif
709 endif
710
711 if BUILD_PLUGIN_MODBUS
712 pkglib_LTLIBRARIES += modbus.la
713 modbus_la_SOURCES = modbus.c
714 modbus_la_LDFLAGS = -module -avoid-version
715 modbus_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMODBUS_CFLAGS)
716 modbus_la_LIBADD = $(BUILD_WITH_LIBMODBUS_LIBS)
717 collectd_LDADD += "-dlopen" modbus.la
718 collectd_DEPENDENCIES += modbus.la
719 endif
720
721 if BUILD_PLUGIN_MULTIMETER
722 pkglib_LTLIBRARIES += multimeter.la
723 multimeter_la_SOURCES = multimeter.c
724 multimeter_la_LDFLAGS = -module -avoid-version
725 collectd_LDADD += "-dlopen" multimeter.la
726 collectd_DEPENDENCIES += multimeter.la
727 endif
728
729 if BUILD_PLUGIN_MYSQL
730 pkglib_LTLIBRARIES += mysql.la
731 mysql_la_SOURCES = mysql.c
732 mysql_la_LDFLAGS = -module -avoid-version
733 mysql_la_CFLAGS = $(AM_CFLAGS)
734 mysql_la_LIBADD =
735 collectd_LDADD += "-dlopen" mysql.la
736 if BUILD_WITH_LIBMYSQL
737 mysql_la_CFLAGS += $(BUILD_WITH_LIBMYSQL_CFLAGS)
738 mysql_la_LIBADD += $(BUILD_WITH_LIBMYSQL_LIBS)
739 endif
740 collectd_DEPENDENCIES += mysql.la
741 endif
742
743 if BUILD_PLUGIN_NETAPP
744 pkglib_LTLIBRARIES += netapp.la
745 netapp_la_SOURCES = netapp.c
746 netapp_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBNETAPP_CPPFLAGS)
747 netapp_la_LDFLAGS = -module -avoid-version $(LIBNETAPP_LDFLAGS)
748 netapp_la_LIBADD = $(LIBNETAPP_LIBS)
749 collectd_LDADD += "-dlopen" netapp.la
750 collectd_DEPENDENCIES += netapp.la
751 endif
752
753 if BUILD_PLUGIN_NETLINK
754 pkglib_LTLIBRARIES += netlink.la
755 netlink_la_SOURCES = netlink.c
756 netlink_la_LDFLAGS = -module -avoid-version
757 netlink_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMNL_CFLAGS)
758 netlink_la_LIBADD = $(BUILD_WITH_LIBMNL_LIBS)
759 collectd_LDADD += "-dlopen" netlink.la
760 collectd_DEPENDENCIES += netlink.la
761 endif
762
763 if BUILD_PLUGIN_NETWORK
764 pkglib_LTLIBRARIES += network.la
765 network_la_SOURCES = network.c network.h \
766                      utils_fbhash.c utils_fbhash.h
767 network_la_CPPFLAGS = $(AM_CPPFLAGS)
768 network_la_LDFLAGS = -module -avoid-version
769 network_la_LIBADD = -lpthread
770 if BUILD_WITH_LIBSOCKET
771 network_la_LIBADD += -lsocket
772 endif
773 if BUILD_WITH_LIBGCRYPT
774 network_la_CPPFLAGS += $(GCRYPT_CPPFLAGS)
775 network_la_LDFLAGS += $(GCRYPT_LDFLAGS)
776 network_la_LIBADD += $(GCRYPT_LIBS)
777 endif
778 collectd_LDADD += "-dlopen" network.la
779 collectd_DEPENDENCIES += network.la
780 endif
781
782 if BUILD_PLUGIN_NFS
783 pkglib_LTLIBRARIES += nfs.la
784 nfs_la_SOURCES = nfs.c
785 nfs_la_LDFLAGS = -module -avoid-version
786 collectd_LDADD += "-dlopen" nfs.la
787 collectd_DEPENDENCIES += nfs.la
788 endif
789
790 if BUILD_PLUGIN_FSCACHE
791 pkglib_LTLIBRARIES += fscache.la
792 fscache_la_SOURCES = fscache.c
793 fscache_la_LDFLAGS = -module -avoid-version
794 collectd_LDADD += "-dlopen" fscache.la
795 collectd_DEPENDENCIES += fscache.la
796 endif
797
798 if BUILD_PLUGIN_NGINX
799 pkglib_LTLIBRARIES += nginx.la
800 nginx_la_SOURCES = nginx.c
801 nginx_la_CFLAGS = $(AM_CFLAGS)
802 nginx_la_LIBADD =
803 nginx_la_LDFLAGS = -module -avoid-version
804 if BUILD_WITH_LIBCURL
805 nginx_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
806 nginx_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
807 endif
808 collectd_LDADD += "-dlopen" nginx.la
809 collectd_DEPENDENCIES += nginx.la
810 endif
811
812 if BUILD_PLUGIN_NOTIFY_DESKTOP
813 pkglib_LTLIBRARIES += notify_desktop.la
814 notify_desktop_la_SOURCES = notify_desktop.c
815 notify_desktop_la_CFLAGS = $(AM_CFLAGS) $(LIBNOTIFY_CFLAGS)
816 notify_desktop_la_LDFLAGS = -module -avoid-version
817 notify_desktop_la_LIBADD = $(LIBNOTIFY_LIBS)
818 collectd_LDADD += "-dlopen" notify_desktop.la
819 collectd_DEPENDENCIES += notify_desktop.la
820 endif
821
822 if BUILD_PLUGIN_NOTIFY_EMAIL
823 pkglib_LTLIBRARIES += notify_email.la
824 notify_email_la_SOURCES = notify_email.c
825 notify_email_la_LDFLAGS = -module -avoid-version
826 notify_email_la_LIBADD = -lesmtp -lssl -lcrypto -lpthread
827 collectd_LDADD += "-dlopen" notify_email.la
828 collectd_DEPENDENCIES += notify_email.la
829 endif
830
831 if BUILD_PLUGIN_NTPD
832 pkglib_LTLIBRARIES += ntpd.la
833 ntpd_la_SOURCES = ntpd.c
834 ntpd_la_LDFLAGS = -module -avoid-version
835 ntpd_la_LIBADD =
836 if BUILD_WITH_LIBSOCKET
837 ntpd_la_LIBADD += -lsocket
838 endif
839 collectd_LDADD += "-dlopen" ntpd.la
840 collectd_DEPENDENCIES += ntpd.la
841 endif
842
843 if BUILD_PLUGIN_NUMA
844 pkglib_LTLIBRARIES += numa.la
845 numa_la_SOURCES = numa.c
846 numa_la_LDFLAGS = -module -avoid-version
847 collectd_LDADD += "-dlopen" numa.la
848 collectd_DEPENDENCIES += numa.la
849 endif
850
851 if BUILD_PLUGIN_NUT
852 pkglib_LTLIBRARIES += nut.la
853 nut_la_SOURCES = nut.c
854 nut_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
855 nut_la_LDFLAGS = -module -avoid-version
856 nut_la_LIBADD = -lpthread $(BUILD_WITH_LIBUPSCLIENT_LIBS)
857 collectd_LDADD += "-dlopen" nut.la
858 collectd_DEPENDENCIES += nut.la
859 endif
860
861 if BUILD_PLUGIN_OLSRD
862 pkglib_LTLIBRARIES += olsrd.la
863 olsrd_la_SOURCES = olsrd.c
864 olsrd_la_LDFLAGS = -module -avoid-version
865 olsrd_la_LIBADD = 
866 if BUILD_WITH_LIBSOCKET
867 olsrd_la_LIBADD += -lsocket
868 endif
869 collectd_LDADD += "-dlopen" olsrd.la
870 collectd_DEPENDENCIES += olsrd.la
871 endif
872
873 if BUILD_PLUGIN_ONEWIRE
874 pkglib_LTLIBRARIES += onewire.la
875 onewire_la_SOURCES = onewire.c
876 onewire_la_CFLAGS = $(AM_CFLAGS)
877 onewire_la_CPPFLAGS = $(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
878 onewire_la_LIBADD = $(BUILD_WITH_LIBOWCAPI_LIBS)
879 onewire_la_LDFLAGS = -module -avoid-version
880 collectd_LDADD += "-dlopen" onewire.la
881 collectd_DEPENDENCIES += onewire.la
882 endif
883
884 if BUILD_PLUGIN_OPENVPN
885 pkglib_LTLIBRARIES += openvpn.la
886 openvpn_la_SOURCES = openvpn.c
887 openvpn_la_CFLAGS = $(AM_CFLAGS)
888 openvpn_la_LDFLAGS = -module -avoid-version
889 collectd_LDADD += "-dlopen" openvpn.la
890 collectd_DEPENDENCIES += openvpn.la
891 endif
892
893 if BUILD_PLUGIN_ORACLE
894 pkglib_LTLIBRARIES += oracle.la
895 oracle_la_SOURCES = oracle.c \
896         utils_db_query.c utils_db_query.h
897 oracle_la_CFLAGS = $(AM_CFLAGS)
898 oracle_la_CPPFLAGS = $(BUILD_WITH_ORACLE_CFLAGS)
899 oracle_la_LIBADD = $(BUILD_WITH_ORACLE_LIBS)
900 oracle_la_LDFLAGS = -module -avoid-version
901 collectd_LDADD += "-dlopen" oracle.la
902 collectd_DEPENDENCIES += oracle.la
903 endif
904
905 if BUILD_PLUGIN_PERL
906 pkglib_LTLIBRARIES += perl.la
907 perl_la_SOURCES = perl.c
908 # Despite C99 providing the "bool" type thru stdbool.h, Perl defines its own
909 # version of that type if HAS_BOOL is not defined... *sigh*
910 perl_la_CPPFLAGS = $(AM_CPPFLAGS) -DHAS_BOOL=1
911 perl_la_CFLAGS  = $(AM_CFLAGS) \
912                 $(PERL_CFLAGS) \
913                 -DXS_VERSION=\"$(VERSION)\" -DVERSION=\"$(VERSION)\"
914 # Work-around for issues #41 and #42 - Perl 5.10 incorrectly introduced
915 # __attribute__nonnull__(3) for Perl_load_module().
916 if HAVE_BROKEN_PERL_LOAD_MODULE
917 perl_la_CFLAGS += -Wno-nonnull
918 endif
919 perl_la_LDFLAGS = -module -avoid-version \
920                 $(PERL_LDFLAGS)
921 perl_la_LIBADD = $(PERL_LIBS)
922 collectd_LDADD += "-dlopen" perl.la
923 collectd_DEPENDENCIES += perl.la
924 endif
925
926 if BUILD_PLUGIN_PF
927 pkglib_LTLIBRARIES += pf.la
928 pf_la_SOURCES = pf.c
929 pf_la_LDFLAGS = -module -avoid-version
930 collectd_LDADD += "-dlopen" pf.la
931 collectd_DEPENDENCIES += pf.la
932 endif
933
934 if BUILD_PLUGIN_PINBA
935 pkglib_LTLIBRARIES += pinba.la
936 pinba_la_SOURCES = pinba.c
937 nodist_pinba_la_SOURCES = pinba.pb-c.c pinba.pb-c.h
938 pinba_la_LDFLAGS = -module -avoid-version
939 pinba_la_LIBADD = -lprotobuf-c
940 collectd_LDADD += "-dlopen" pinba.la
941 collectd_DEPENDENCIES += pinba.la
942 endif
943
944 if BUILD_PLUGIN_PING
945 pkglib_LTLIBRARIES += ping.la
946 ping_la_SOURCES = ping.c
947 ping_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOPING_CPPFLAGS)
948 ping_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBOPING_LDFLAGS)
949 ping_la_LIBADD = -loping -lm
950 collectd_LDADD += "-dlopen" ping.la
951 collectd_DEPENDENCIES += ping.la
952 endif
953
954 if BUILD_PLUGIN_POSTGRESQL
955 pkglib_LTLIBRARIES += postgresql.la
956 postgresql_la_SOURCES = postgresql.c \
957                  utils_db_query.c utils_db_query.h
958 postgresql_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPQ_CPPFLAGS)
959 postgresql_la_LDFLAGS = -module -avoid-version \
960                 $(BUILD_WITH_LIBPQ_LDFLAGS)
961 postgresql_la_LIBADD = -lpq
962 collectd_LDADD += "-dlopen" postgresql.la
963 collectd_DEPENDENCIES += postgresql.la
964 endif
965
966 if BUILD_PLUGIN_POWERDNS
967 pkglib_LTLIBRARIES += powerdns.la
968 powerdns_la_SOURCES = powerdns.c
969 powerdns_la_LDFLAGS = -module -avoid-version
970 collectd_LDADD += "-dlopen" powerdns.la
971 collectd_DEPENDENCIES += powerdns.la
972 endif
973
974 if BUILD_PLUGIN_PYTHON
975 pkglib_LTLIBRARIES += python.la
976 python_la_SOURCES = python.c pyconfig.c pyvalues.c cpython.h
977 python_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_PYTHON_CPPFLAGS)
978 python_la_CFLAGS = $(AM_CFLAGS)
979 if COMPILER_IS_GCC
980 python_la_CFLAGS += -fno-strict-aliasing -Wno-strict-aliasing
981 endif
982 python_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_PYTHON_LDFLAGS)
983 python_la_LIBADD = $(BUILD_WITH_PYTHON_LIBS)
984 collectd_LDADD += "-dlopen" python.la
985 collectd_DEPENDENCIES += python.la
986 endif
987
988 if BUILD_PLUGIN_PROCESSES
989 pkglib_LTLIBRARIES += processes.la
990 processes_la_SOURCES = processes.c
991 processes_la_LDFLAGS = -module -avoid-version
992 processes_la_LIBADD =
993 collectd_LDADD += "-dlopen" processes.la
994 collectd_DEPENDENCIES += processes.la
995 if BUILD_WITH_LIBKVM_GETPROCS
996 processes_la_LIBADD += -lkvm
997 endif
998 endif
999
1000 if BUILD_PLUGIN_PROTOCOLS
1001 pkglib_LTLIBRARIES += protocols.la
1002 protocols_la_SOURCES = protocols.c
1003 protocols_la_LDFLAGS = -module -avoid-version
1004 collectd_LDADD += "-dlopen" protocols.la
1005 collectd_DEPENDENCIES += protocols.la
1006 endif
1007
1008 if BUILD_PLUGIN_REDIS
1009 pkglib_LTLIBRARIES += redis.la
1010 redis_la_SOURCES = redis.c
1011 redis_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBCREDIS_LDFLAGS)
1012 redis_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCREDIS_CPPFLAGS)
1013 redis_la_LIBADD = -lcredis
1014 collectd_LDADD += "-dlopen" redis.la
1015 collectd_DEPENDENCIES += redis.la
1016 endif
1017
1018 if BUILD_PLUGIN_ROUTEROS
1019 pkglib_LTLIBRARIES += routeros.la
1020 routeros_la_SOURCES = routeros.c
1021 routeros_la_CPPFLAGS = $(BUILD_WITH_LIBROUTEROS_CPPFLAGS)
1022 routeros_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBROUTEROS_LDFLAGS)
1023 routeros_la_LIBADD = -lrouteros
1024 collectd_LDADD += "-dlopen" routeros.la
1025 collectd_DEPENDENCIES += routeros.la
1026 endif
1027
1028 if BUILD_PLUGIN_RRDCACHED
1029 pkglib_LTLIBRARIES += rrdcached.la
1030 rrdcached_la_SOURCES = rrdcached.c utils_rrdcreate.c utils_rrdcreate.h
1031 rrdcached_la_LDFLAGS = -module -avoid-version
1032 rrdcached_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
1033 rrdcached_la_LIBADD = $(BUILD_WITH_LIBRRD_LDFLAGS)
1034 collectd_LDADD += "-dlopen" rrdcached.la
1035 collectd_DEPENDENCIES += rrdcached.la
1036 endif
1037
1038 if BUILD_PLUGIN_RRDTOOL
1039 pkglib_LTLIBRARIES += rrdtool.la
1040 rrdtool_la_SOURCES = rrdtool.c utils_rrdcreate.c utils_rrdcreate.h
1041 rrdtool_la_LDFLAGS = -module -avoid-version
1042 rrdtool_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
1043 rrdtool_la_LIBADD = $(BUILD_WITH_LIBRRD_LDFLAGS)
1044 collectd_LDADD += "-dlopen" rrdtool.la
1045 collectd_DEPENDENCIES += rrdtool.la
1046 endif
1047
1048 if BUILD_PLUGIN_SENSORS
1049 pkglib_LTLIBRARIES += sensors.la
1050 sensors_la_SOURCES = sensors.c
1051 sensors_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBSENSORS_CFLAGS)
1052 sensors_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBSENSORS_LDFLAGS)
1053 sensors_la_LIBADD = -lsensors
1054 collectd_LDADD += "-dlopen" sensors.la
1055 collectd_DEPENDENCIES += sensors.la
1056 endif
1057
1058 if BUILD_PLUGIN_SERIAL
1059 pkglib_LTLIBRARIES += serial.la
1060 serial_la_SOURCES = serial.c
1061 serial_la_LDFLAGS = -module -avoid-version
1062 collectd_LDADD += "-dlopen" serial.la
1063 collectd_DEPENDENCIES += serial.la
1064 endif
1065
1066 if BUILD_PLUGIN_SIGROK
1067 pkglib_LTLIBRARIES += sigrok.la
1068 sigrok_la_SOURCES = sigrok.c
1069 sigrok_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBSIGROK_CFLAGS)
1070 sigrok_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBSIGROK_LDFLAGS)
1071 sigrok_la_LIBADD = -lsigrok
1072 collectd_LDADD += "-dlopen" sigrok.la
1073 collectd_DEPENDENCIES += sigrok.la
1074 endif
1075
1076 if BUILD_PLUGIN_SNMP
1077 pkglib_LTLIBRARIES += snmp.la
1078 snmp_la_SOURCES = snmp.c
1079 snmp_la_LDFLAGS = -module -avoid-version
1080 snmp_la_CFLAGS = $(AM_CFLAGS)
1081 snmp_la_LIBADD =
1082 if BUILD_WITH_LIBNETSNMP
1083 snmp_la_CFLAGS += $(BUILD_WITH_LIBSNMP_CFLAGS)
1084 snmp_la_LIBADD += $(BUILD_WITH_LIBSNMP_LIBS)
1085 endif
1086 if BUILD_WITH_LIBPTHREAD
1087 snmp_la_LIBADD += -lpthread
1088 endif
1089 collectd_LDADD += "-dlopen" snmp.la
1090 collectd_DEPENDENCIES += snmp.la
1091 endif
1092
1093 if BUILD_PLUGIN_STATSD
1094 pkglib_LTLIBRARIES += statsd.la
1095 statsd_la_SOURCES = statsd.c \
1096                     utils_latency.h utils_latency.c
1097 statsd_la_LDFLAGS = -module -avoid-version
1098 statsd_la_LIBADD = -lpthread
1099 collectd_LDADD += "-dlopen" statsd.la
1100 collectd_DEPENDENCIES += statsd.la
1101 endif
1102
1103 if BUILD_PLUGIN_SWAP
1104 pkglib_LTLIBRARIES += swap.la
1105 swap_la_SOURCES = swap.c
1106 swap_la_CFLAGS = $(AM_CFLAGS)
1107 swap_la_LDFLAGS = -module -avoid-version
1108 swap_la_LIBADD =
1109 collectd_LDADD += "-dlopen" swap.la
1110 collectd_DEPENDENCIES += swap.la
1111 if BUILD_WITH_LIBKSTAT
1112 swap_la_LIBADD += -lkstat
1113 endif
1114 if BUILD_WITH_LIBDEVINFO
1115 swap_la_LIBADD += -ldevinfo
1116 endif
1117 if BUILD_WITH_LIBKVM_GETSWAPINFO
1118 swap_la_LIBADD += -lkvm
1119 endif
1120 if BUILD_WITH_LIBSTATGRAB
1121 swap_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1122 swap_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1123 endif
1124 if BUILD_WITH_PERFSTAT
1125 swap_la_LIBADD += -lperfstat
1126 endif
1127
1128 endif
1129
1130 if BUILD_PLUGIN_SYSLOG
1131 pkglib_LTLIBRARIES += syslog.la
1132 syslog_la_SOURCES = syslog.c
1133 syslog_la_LDFLAGS = -module -avoid-version
1134 collectd_LDADD += "-dlopen" syslog.la
1135 collectd_DEPENDENCIES += syslog.la
1136 endif
1137
1138 if BUILD_PLUGIN_TABLE
1139 pkglib_LTLIBRARIES += table.la
1140 table_la_SOURCES = table.c
1141 table_la_LDFLAGS = -module -avoid-version
1142 collectd_LDADD += "-dlopen" table.la
1143 collectd_DEPENDENCIES += table.la
1144 endif
1145
1146 if BUILD_PLUGIN_TAIL
1147 pkglib_LTLIBRARIES += tail.la
1148 tail_la_SOURCES = tail.c
1149 tail_la_LDFLAGS = -module -avoid-version
1150 collectd_LDADD += "-dlopen" tail.la
1151 collectd_DEPENDENCIES += tail.la
1152 endif
1153
1154 if BUILD_PLUGIN_TAIL_CSV
1155 pkglib_LTLIBRARIES += tail_csv.la
1156 tail_csv_la_SOURCES = tail_csv.c
1157 tail_csv_la_LDFLAGS = -module -avoid-version
1158 collectd_LDADD += "-dlopen" tail_csv.la
1159 collectd_DEPENDENCIES += tail_csv.la
1160 endif
1161
1162 if BUILD_PLUGIN_TAPE
1163 pkglib_LTLIBRARIES += tape.la
1164 tape_la_SOURCES = tape.c
1165 tape_la_LDFLAGS = -module -avoid-version
1166 tape_la_LIBADD = -lkstat -ldevinfo
1167 collectd_LDADD += "-dlopen" tape.la
1168 collectd_DEPENDENCIES += tape.la
1169 endif
1170
1171 if BUILD_PLUGIN_TARGET_NOTIFICATION
1172 pkglib_LTLIBRARIES += target_notification.la
1173 target_notification_la_SOURCES = target_notification.c
1174 target_notification_la_LDFLAGS = -module -avoid-version
1175 collectd_LDADD += "-dlopen" target_notification.la
1176 collectd_DEPENDENCIES += target_notification.la
1177 endif
1178
1179 if BUILD_PLUGIN_TARGET_REPLACE
1180 pkglib_LTLIBRARIES += target_replace.la
1181 target_replace_la_SOURCES = target_replace.c
1182 target_replace_la_LDFLAGS = -module -avoid-version
1183 collectd_LDADD += "-dlopen" target_replace.la
1184 collectd_DEPENDENCIES += target_replace.la
1185 endif
1186
1187 if BUILD_PLUGIN_TARGET_SCALE
1188 pkglib_LTLIBRARIES += target_scale.la
1189 target_scale_la_SOURCES = target_scale.c
1190 target_scale_la_LDFLAGS = -module -avoid-version
1191 collectd_LDADD += "-dlopen" target_scale.la
1192 collectd_DEPENDENCIES += target_scale.la
1193 endif
1194
1195 if BUILD_PLUGIN_TARGET_SET
1196 pkglib_LTLIBRARIES += target_set.la
1197 target_set_la_SOURCES = target_set.c
1198 target_set_la_LDFLAGS = -module -avoid-version
1199 collectd_LDADD += "-dlopen" target_set.la
1200 collectd_DEPENDENCIES += target_set.la
1201 endif
1202
1203 if BUILD_PLUGIN_TARGET_V5UPGRADE
1204 pkglib_LTLIBRARIES += target_v5upgrade.la
1205 target_v5upgrade_la_SOURCES = target_v5upgrade.c
1206 target_v5upgrade_la_LDFLAGS = -module -avoid-version
1207 collectd_LDADD += "-dlopen" target_v5upgrade.la
1208 collectd_DEPENDENCIES += target_v5upgrade.la
1209 endif
1210
1211 if BUILD_PLUGIN_TCPCONNS
1212 pkglib_LTLIBRARIES += tcpconns.la
1213 tcpconns_la_SOURCES = tcpconns.c
1214 tcpconns_la_LDFLAGS = -module -avoid-version
1215 tcpconns_la_LIBADD =
1216 collectd_LDADD += "-dlopen" tcpconns.la
1217 collectd_DEPENDENCIES += tcpconns.la
1218 if BUILD_WITH_LIBKVM_NLIST
1219 tcpconns_la_LIBADD += -lkvm
1220 endif
1221 endif
1222
1223 if BUILD_PLUGIN_TEAMSPEAK2
1224 pkglib_LTLIBRARIES += teamspeak2.la
1225 teamspeak2_la_SOURCES = teamspeak2.c
1226 teamspeak2_la_LDFLAGS = -module -avoid-version
1227 collectd_LDADD += "-dlopen" teamspeak2.la
1228 collectd_DEPENDENCIES += teamspeak2.la
1229 endif
1230
1231 if BUILD_PLUGIN_TED
1232 pkglib_LTLIBRARIES += ted.la
1233 ted_la_SOURCES = ted.c
1234 ted_la_LDFLAGS = -module -avoid-version
1235 collectd_LDADD += "-dlopen" ted.la
1236 collectd_DEPENDENCIES += ted.la
1237 endif
1238
1239 if BUILD_PLUGIN_THERMAL
1240 pkglib_LTLIBRARIES += thermal.la
1241 thermal_la_SOURCES = thermal.c
1242 thermal_la_LDFLAGS = -module -avoid-version
1243 collectd_LDADD += "-dlopen" thermal.la
1244 collectd_DEPENDENCIES += thermal.la
1245 endif
1246
1247 if BUILD_PLUGIN_THRESHOLD
1248 pkglib_LTLIBRARIES += threshold.la
1249 threshold_la_SOURCES = threshold.c
1250 threshold_la_LDFLAGS = -module -avoid-version
1251 collectd_LDADD += "-dlopen" threshold.la
1252 collectd_DEPENDENCIES += threshold.la
1253 endif
1254
1255 if BUILD_PLUGIN_TOKYOTYRANT
1256 pkglib_LTLIBRARIES += tokyotyrant.la
1257 tokyotyrant_la_SOURCES = tokyotyrant.c
1258 tokyotyrant_la_CPPFLAGS  = $(AM_CPPFLAGS) $(BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS)
1259 tokyotyrant_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS)
1260 tokyotyrant_la_LIBADD  = $(BUILD_WITH_LIBTOKYOTYRANT_LIBS)
1261 if BUILD_WITH_LIBSOCKET
1262 tokyotyrant_la_LIBADD += -lsocket
1263 endif
1264 collectd_LDADD += "-dlopen" tokyotyrant.la
1265 collectd_DEPENDENCIES += tokyotyrant.la
1266 endif
1267
1268 if BUILD_PLUGIN_UNIXSOCK
1269 pkglib_LTLIBRARIES += unixsock.la
1270 unixsock_la_SOURCES = unixsock.c \
1271                       utils_cmd_flush.h utils_cmd_flush.c \
1272                       utils_cmd_getval.h utils_cmd_getval.c \
1273                       utils_cmd_listval.h utils_cmd_listval.c \
1274                       utils_cmd_putval.h utils_cmd_putval.c \
1275                       utils_cmd_putnotif.h utils_cmd_putnotif.c
1276 unixsock_la_LDFLAGS = -module -avoid-version
1277 unixsock_la_LIBADD = -lpthread
1278 collectd_LDADD += "-dlopen" unixsock.la
1279 collectd_DEPENDENCIES += unixsock.la
1280 endif
1281
1282 if BUILD_PLUGIN_UPTIME
1283 pkglib_LTLIBRARIES += uptime.la
1284 uptime_la_SOURCES = uptime.c
1285 uptime_la_CFLAGS = $(AM_CFLAGS)
1286 uptime_la_LDFLAGS = -module -avoid-version
1287 uptime_la_LIBADD =
1288 if BUILD_WITH_LIBKSTAT
1289 uptime_la_LIBADD += -lkstat
1290 endif
1291 if BUILD_WITH_PERFSTAT
1292 uptime_la_LIBADD += -lperfstat
1293 endif
1294 collectd_LDADD += "-dlopen" uptime.la
1295 collectd_DEPENDENCIES += uptime.la
1296 endif
1297
1298 if BUILD_PLUGIN_USERS
1299 pkglib_LTLIBRARIES += users.la
1300 users_la_SOURCES = users.c
1301 users_la_CFLAGS = $(AM_CFLAGS)
1302 users_la_LDFLAGS = -module -avoid-version
1303 users_la_LIBADD =
1304 if BUILD_WITH_LIBSTATGRAB
1305 users_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1306 users_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1307 endif
1308 collectd_LDADD += "-dlopen" users.la
1309 collectd_DEPENDENCIES += users.la
1310 endif
1311
1312 if BUILD_PLUGIN_UUID
1313 pkglib_LTLIBRARIES += uuid.la
1314 uuid_la_SOURCES = uuid.c
1315 uuid_la_CFLAGS  = $(AM_CFLAGS) $(BUILD_WITH_LIBHAL_CFLAGS)
1316 uuid_la_LIBADD  = $(BUILD_WITH_LIBHAL_LIBS)
1317 uuid_la_LDFLAGS = -module -avoid-version
1318 collectd_LDADD += "-dlopen" uuid.la
1319 collectd_DEPENDENCIES += uuid.la
1320 endif
1321
1322 if BUILD_PLUGIN_MIC
1323 pkglib_LTLIBRARIES += mic.la
1324 mic_la_SOURCES = mic.c
1325 mic_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_MIC_LIBPATH)
1326 mic_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_MIC_CPPFLAGS)
1327 mic_la_LIBADD = $(BUILD_WITH_MIC_LDADD)
1328 collectd_LDADD += "-dlopen" mic.la
1329 collectd_DEPENDENCIES += mic.la
1330 endif
1331
1332 if BUILD_PLUGIN_VARNISH
1333 pkglib_LTLIBRARIES += varnish.la
1334 varnish_la_SOURCES = varnish.c
1335 varnish_la_LDFLAGS = -module -avoid-version
1336 varnish_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBVARNISH_CFLAGS)
1337 varnish_la_LIBADD = $(BUILD_WITH_LIBVARNISH_LIBS)
1338 collectd_LDADD += "-dlopen" varnish.la
1339 collectd_DEPENDENCIES += varnish.la
1340 endif
1341
1342 if BUILD_PLUGIN_VMEM
1343 pkglib_LTLIBRARIES += vmem.la
1344 vmem_la_SOURCES = vmem.c
1345 vmem_la_LDFLAGS = -module -avoid-version
1346 collectd_LDADD += "-dlopen" vmem.la
1347 collectd_DEPENDENCIES += vmem.la
1348 endif
1349
1350 if BUILD_PLUGIN_VSERVER
1351 pkglib_LTLIBRARIES += vserver.la
1352 vserver_la_SOURCES = vserver.c
1353 vserver_la_LDFLAGS = -module -avoid-version
1354 collectd_LDADD += "-dlopen" vserver.la
1355 collectd_DEPENDENCIES += vserver.la
1356 endif
1357
1358 if BUILD_PLUGIN_WIRELESS
1359 pkglib_LTLIBRARIES += wireless.la
1360 wireless_la_SOURCES = wireless.c
1361 wireless_la_LDFLAGS = -module -avoid-version
1362 collectd_LDADD += "-dlopen" wireless.la
1363 collectd_DEPENDENCIES += wireless.la
1364 endif
1365
1366 if BUILD_PLUGIN_WRITE_GRAPHITE
1367 pkglib_LTLIBRARIES += write_graphite.la
1368 write_graphite_la_SOURCES = write_graphite.c \
1369                         utils_format_graphite.c utils_format_graphite.h \
1370                         utils_format_json.c utils_format_json.h
1371 write_graphite_la_LDFLAGS = -module -avoid-version
1372 collectd_LDADD += "-dlopen" write_graphite.la
1373 collectd_DEPENDENCIES += write_graphite.la
1374 endif
1375
1376 if BUILD_PLUGIN_WRITE_HTTP
1377 pkglib_LTLIBRARIES += write_http.la
1378 write_http_la_SOURCES = write_http.c \
1379                         utils_format_json.c utils_format_json.h
1380 write_http_la_LDFLAGS = -module -avoid-version
1381 write_http_la_CFLAGS = $(AM_CFLAGS)
1382 write_http_la_LIBADD =
1383 collectd_LDADD += "-dlopen" write_http.la
1384 if BUILD_WITH_LIBCURL
1385 write_http_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
1386 write_http_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
1387 endif
1388 collectd_DEPENDENCIES += write_http.la
1389 endif
1390
1391 if BUILD_PLUGIN_WRITE_MONGODB
1392 pkglib_LTLIBRARIES += write_mongodb.la
1393 write_mongodb_la_SOURCES = write_mongodb.c
1394 write_mongodb_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMONGOC_CPPFLAGS)
1395 write_mongodb_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBMONGOC_LDFLAGS)
1396 write_mongodb_la_LIBADD = -lmongoc
1397 collectd_LDADD += "-dlopen" write_mongodb.la
1398 collectd_DEPENDENCIES += write_mongodb.la
1399 endif
1400
1401 if BUILD_PLUGIN_WRITE_REDIS
1402 pkglib_LTLIBRARIES += write_redis.la
1403 write_redis_la_SOURCES = write_redis.c
1404 write_redis_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBCREDIS_LDFLAGS)
1405 write_redis_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCREDIS_CPPFLAGS)
1406 write_redis_la_LIBADD = -lcredis
1407 collectd_LDADD += "-dlopen" write_redis.la
1408 collectd_DEPENDENCIES += write_redis.la
1409 endif
1410
1411 if BUILD_PLUGIN_WRITE_RIEMANN
1412 pkglib_LTLIBRARIES += write_riemann.la
1413 write_riemann_la_SOURCES = write_riemann.c
1414 nodist_write_riemann_la_SOURCES = riemann.pb-c.c riemann.pb-c.h
1415 write_riemann_la_LDFLAGS = -module -avoid-version
1416 write_riemann_la_LIBADD = -lprotobuf-c
1417 collectd_LDADD += "-dlopen" write_riemann.la
1418 collectd_DEPENDENCIES += write_riemann.la
1419 endif
1420
1421 if BUILD_PLUGIN_XMMS
1422 pkglib_LTLIBRARIES += xmms.la
1423 xmms_la_SOURCES = xmms.c
1424 xmms_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBXMMS_CFLAGS)
1425 xmms_la_LDFLAGS = -module -avoid-version
1426 xmms_la_LIBADD = $(BUILD_WITH_LIBXMMS_LIBS)
1427 collectd_LDADD += "-dlopen" xmms.la
1428 collectd_DEPENDENCIES += xmms.la
1429 endif
1430
1431 if BUILD_PLUGIN_ZFS_ARC
1432 pkglib_LTLIBRARIES += zfs_arc.la
1433 zfs_arc_la_SOURCES = zfs_arc.c
1434 zfs_arc_la_CFLAGS = $(AM_CFLAGS)
1435 zfs_arc_la_LDFLAGS = -module -avoid-version
1436 if BUILD_FREEBSD
1437 zfs_arc_la_LIBADD = -lm
1438 else
1439 zfs_arc_la_LIBADD = -lkstat
1440 endif
1441 collectd_LDADD += "-dlopen" zfs_arc.la
1442 collectd_DEPENDENCIES += zfs_arc.la
1443 endif
1444
1445 BUILT_SOURCES += $(dist_man_MANS)
1446
1447 dist_man_MANS = collectd.1 \
1448                 collectd.conf.5 \
1449                 collectd-email.5 \
1450                 collectd-exec.5 \
1451                 collectdctl.1 \
1452                 collectd-java.5 \
1453                 collectdmon.1 \
1454                 collectd-nagios.1 \
1455                 collectd-perl.5 \
1456                 collectd-python.5 \
1457                 collectd-snmp.5 \
1458                 collectd-tg.1 \
1459                 collectd-threshold.5 \
1460                 collectd-unixsock.5 \
1461                 types.db.5
1462
1463 #collectd_1_SOURCES = collectd.pod
1464
1465 EXTRA_DIST = types.db
1466
1467 EXTRA_DIST +=   collectd.conf.pod \
1468                 collectd-email.pod \
1469                 collectd-exec.pod \
1470                 collectdctl.pod \
1471                 collectd-java.pod \
1472                 collectdmon.pod \
1473                 collectd-nagios.pod \
1474                 collectd-perl.pod \
1475                 collectd-python.pod \
1476                 collectd.pod \
1477                 collectd-snmp.pod \
1478                 collectd-tg.pod \
1479                 collectd-threshold.pod \
1480                 collectd-unixsock.pod \
1481                 postgresql_default.conf \
1482                 types.db.pod
1483
1484 .pod.1:
1485         pod2man --release=$(VERSION) --center=$(PACKAGE) $< \
1486                 >.pod2man.tmp.$$$$ 2>/dev/null && mv -f .pod2man.tmp.$$$$ $@ || true
1487         @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
1488         then \
1489                 echo "$@ has some POD errors!"; false; \
1490         fi
1491
1492 .pod.5:
1493         pod2man --section=5 --release=$(VERSION) --center=$(PACKAGE) $< \
1494                 >.pod2man.tmp.$$$$ 2>/dev/null && mv -f .pod2man.tmp.$$$$ $@ || true
1495         @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
1496         then \
1497                 echo "$@ has some POD errors!"; false; \
1498         fi
1499
1500 # Protocol buffer for the "pinba" plugin.
1501 EXTRA_DIST += pinba.proto
1502 if HAVE_PROTOC_C
1503 CLEANFILES += pinba.pb-c.c pinba.pb-c.h
1504 BUILT_SOURCES += pinba.pb-c.c pinba.pb-c.h
1505
1506 pinba.pb-c.c pinba.pb-c.h: pinba.proto
1507         protoc-c -I$(srcdir) --c_out . $(srcdir)/pinba.proto
1508 endif
1509
1510 # Protocol buffer for the "write_riemann" plugin.
1511 EXTRA_DIST += riemann.proto
1512 if HAVE_PROTOC_C
1513 CLEANFILES += riemann.pb-c.c riemann.pb-c.h
1514
1515 BUILT_SOURCES += riemann.pb-c.c riemann.pb-c.h
1516
1517 riemann.pb-c.c riemann.pb-c.h: riemann.proto
1518         protoc-c -I$(srcdir) --c_out . $(srcdir)/riemann.proto
1519 endif
1520
1521 install-exec-hook:
1522         $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
1523         if test -e $(DESTDIR)$(sysconfdir)/collectd.conf; \
1524         then \
1525                 $(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf.pkg-orig; \
1526         else \
1527                 $(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf; \
1528         fi; \
1529         $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
1530         $(INSTALL) -m 0644 $(srcdir)/types.db $(DESTDIR)$(pkgdatadir)/types.db;
1531         $(INSTALL) -m 0644 $(srcdir)/postgresql_default.conf \
1532                 $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;
1533
1534 uninstall-hook:
1535         rm -f $(DESTDIR)$(pkgdatadir)/types.db;
1536         rm -f $(DESTDIR)$(sysconfdir)/collectd.conf
1537         rm -f $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;
1538
1539 if BUILD_FEATURE_DEBUG
1540 bin_PROGRAMS += utils_vl_lookup_test
1541 utils_vl_lookup_test_SOURCES = utils_vl_lookup_test.c \
1542                                utils_vl_lookup.h utils_vl_lookup.c \
1543                                utils_avltree.c utils_avltree.h \
1544                                common.h
1545
1546 utils_vl_lookup_test_CPPFLAGS =  $(AM_CPPFLAGS) $(LTDLINCL) -DBUILD_TEST=1
1547 utils_vl_lookup_test_CFLAGS = $(AM_CFLAGS)
1548 utils_vl_lookup_test_LDFLAGS = -export-dynamic
1549 utils_vl_lookup_test_LDADD =
1550 endif