Code

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