Code

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