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