Merge pull request #2212 from maryamtahhan/ovs_events_scan_build
[collectd.git] / Makefile.am
1 ACLOCAL_AMFLAGS = -I m4
2 AM_YFLAGS = -d
3
4
5 BUILT_SOURCES = \
6         src/libcollectdclient/collectd/lcc_features.h \
7         src/liboconfig/parser.h \
8         $(dist_man_MANS)
9
10
11 CLEANFILES = \
12         .perl-directory-stamp \
13         bindings/buildperl/Collectd.pm \
14         bindings/buildperl/Collectd/Plugins/OpenVZ.pm \
15         bindings/buildperl/Collectd/Unixsock.pm \
16         bindings/buildperl/Makefile.PL \
17         collectd-api.jar \
18         collectd.grpc.pb.cc \
19         collectd.grpc.pb.h \
20         collectd.pb.cc \
21         collectd.pb.h \
22         generic-jmx.jar \
23         org/collectd/api/*.class \
24         org/collectd/java/*.class \
25         prometheus.pb-c.c \
26         prometheus.pb-c.h \
27         src/pinba.pb-c.c \
28         src/pinba.pb-c.h \
29         types.pb.cc \
30         types.pb.h
31
32
33 EXTRA_DIST = \
34         bindings/perl/Makefile.PL \
35         bindings/perl/lib/Collectd.pm \
36         bindings/perl/lib/Collectd/Plugins/Monitorus.pm \
37         bindings/perl/lib/Collectd/Plugins/OpenVZ.pm \
38         bindings/perl/lib/Collectd/Unixsock.pm \
39         bindings/perl/uninstall_mod.pl \
40         contrib \
41         proto/collectd.proto \
42         proto/prometheus.proto \
43         proto/types.proto \
44         src/collectd-email.pod \
45         src/collectd-exec.pod \
46         src/collectd-java.pod \
47         src/collectd-lua.pod \
48         src/collectd-nagios.pod \
49         src/collectd-perl.pod \
50         src/collectd-python.pod \
51         src/collectd-snmp.pod \
52         src/collectd-tg.pod \
53         src/collectd-threshold.pod \
54         src/collectd-unixsock.pod \
55         src/collectd.conf.pod \
56         src/collectd.pod \
57         src/collectdctl.pod \
58         src/collectdmon.pod \
59         src/pinba.proto \
60         src/postgresql_default.conf \
61         src/types.db \
62         src/types.db.pod \
63         src/valgrind.FreeBSD.suppress \
64         testwrapper.sh \
65         version-gen.sh
66
67
68 dist_man_MANS = \
69         src/collectd.1 \
70         src/collectd.conf.5 \
71         src/collectd-email.5 \
72         src/collectd-exec.5 \
73         src/collectdctl.1 \
74         src/collectd-java.5 \
75         src/collectd-lua.5 \
76         src/collectdmon.1 \
77         src/collectd-nagios.1 \
78         src/collectd-perl.5 \
79         src/collectd-python.5 \
80         src/collectd-snmp.5 \
81         src/collectd-tg.1 \
82         src/collectd-threshold.5 \
83         src/collectd-unixsock.5 \
84         src/types.db.5
85
86
87 nodist_pkgconfig_DATA = \
88         src/libcollectdclient/libcollectdclient.pc
89
90 pkginclude_HEADERS = \
91         src/libcollectdclient/collectd/client.h \
92         src/libcollectdclient/collectd/network.h \
93         src/libcollectdclient/collectd/network_buffer.h \
94         src/libcollectdclient/collectd/lcc_features.h
95
96 lib_LTLIBRARIES = libcollectdclient.la
97
98
99 sbin_PROGRAMS = \
100         collectd \
101         collectdmon
102
103
104 bin_PROGRAMS = \
105         collectd-nagios \
106         collectd-tg \
107         collectdctl
108
109
110 noinst_LTLIBRARIES = \
111         libavltree.la \
112         libcmds.la \
113         libcommon.la \
114         libformat_graphite.la \
115         libformat_json.la \
116         libheap.la \
117         liblatency.la \
118         liblookup.la \
119         libmetadata.la \
120         libmount.la \
121         liboconfig.la \
122         libplugin_mock.la
123
124
125 check_PROGRAMS = \
126         test_common \
127         test_format_graphite \
128         test_meta_data \
129         test_utils_avltree \
130         test_utils_cmds \
131         test_utils_heap \
132         test_utils_latency \
133         test_utils_mount \
134         test_utils_subst \
135         test_utils_time \
136         test_utils_vl_lookup
137
138
139 TESTS = $(check_PROGRAMS)
140
141 LOG_COMPILER = env VALGRIND="@VALGRIND@" $(abs_srcdir)/testwrapper.sh
142
143
144 jardir = $(pkgdatadir)/java
145
146 pkglib_LTLIBRARIES =
147
148
149 PLUGIN_LDFLAGS = \
150         -module \
151         -avoid-version \
152         -export-symbols-regex '\<module_register\>'
153
154
155 AM_CPPFLAGS = \
156         -I$(top_srcdir)/src -I$(top_srcdir)/src/daemon \
157         -DPREFIX='"${prefix}"' \
158         -DCONFIGFILE='"${sysconfdir}/${PACKAGE_NAME}.conf"' \
159         -DLOCALSTATEDIR='"${localstatedir}"' \
160         -DPKGLOCALSTATEDIR='"${localstatedir}/lib/${PACKAGE_NAME}"' \
161         -DPLUGINDIR='"${pkglibdir}"' \
162         -DPKGDATADIR='"${pkgdatadir}"'
163
164
165 # Link to these libraries..
166 COMMON_LIBS = $(PTHREAD_LIBS)
167 if BUILD_WITH_CAPABILITY
168 COMMON_LIBS += -lcap
169 endif
170 if BUILD_WITH_LIBRT
171 COMMON_LIBS += -lrt
172 endif
173 if BUILD_WITH_LIBPOSIX4
174 COMMON_LIBS += -lposix4
175 endif
176 if BUILD_WITH_LIBSOCKET
177 COMMON_LIBS += -lsocket
178 endif
179 if BUILD_WITH_LIBKSTAT
180 COMMON_LIBS += -lkstat
181 endif
182 if BUILD_WITH_LIBDEVINFO
183 COMMON_LIBS += -ldevinfo
184 endif
185
186
187 collectd_SOURCES = \
188         src/daemon/collectd.c \
189         src/daemon/collectd.h \
190         src/daemon/configfile.c \
191         src/daemon/configfile.h \
192         src/daemon/filter_chain.c \
193         src/daemon/filter_chain.h \
194         src/daemon/meta_data.c \
195         src/daemon/meta_data.h \
196         src/daemon/plugin.c \
197         src/daemon/plugin.h \
198         src/daemon/utils_cache.c \
199         src/daemon/utils_cache.h \
200         src/daemon/utils_complain.c \
201         src/daemon/utils_complain.h \
202         src/daemon/utils_ignorelist.c \
203         src/daemon/utils_ignorelist.h \
204         src/daemon/utils_llist.c \
205         src/daemon/utils_llist.h \
206         src/daemon/utils_random.c \
207         src/daemon/utils_random.h \
208         src/daemon/utils_subst.c \
209         src/daemon/utils_subst.h \
210         src/daemon/utils_time.c \
211         src/daemon/utils_time.h \
212         src/daemon/types_list.c \
213         src/daemon/types_list.h \
214         src/daemon/utils_threshold.c \
215         src/daemon/utils_threshold.h
216
217
218 collectd_CFLAGS = $(AM_CFLAGS)
219 collectd_CPPFLAGS = $(AM_CPPFLAGS)
220 collectd_LDFLAGS = -export-dynamic
221 collectd_LDADD = \
222         libavltree.la \
223         libcommon.la \
224         libheap.la \
225         liboconfig.la \
226         -lm \
227         $(COMMON_LIBS) \
228         $(DLOPEN_LIBS)
229
230 if BUILD_FEATURE_DAEMON
231 collectd_CPPFLAGS += -DPIDFILE='"${localstatedir}/run/${PACKAGE_NAME}.pid"'
232 endif
233
234 # The daemon needs to call sg_init, so we need to link it against libstatgrab,
235 # too. -octo
236 if BUILD_WITH_LIBSTATGRAB
237 collectd_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
238 collectd_LDADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
239 endif
240
241
242 collectdmon_SOURCES = src/collectdmon.c
243
244
245 collectd_nagios_SOURCES = src/collectd-nagios.c
246 collectd_nagios_CPPFLAGS = $(AM_CPPFLAGS) \
247         -I$(srcdir)/src/libcollectdclient/collectd \
248         -I$(top_builddir)/src/libcollectdclient/collectd
249 collectd_nagios_LDADD = libcollectdclient.la
250 if BUILD_WITH_LIBSOCKET
251 collectd_nagios_LDADD += -lsocket
252 endif
253 if BUILD_AIX
254 collectd_nagios_LDADD += -lm
255 endif
256
257
258 collectdctl_SOURCES = src/collectdctl.c
259 collectdctl_CPPFLAGS = $(AM_CPPFLAGS) \
260         -I$(srcdir)/src/libcollectdclient/collectd \
261         -I$(top_builddir)/src/libcollectdclient/collectd
262 collectdctl_LDADD = libcollectdclient.la
263 if BUILD_WITH_LIBSOCKET
264 collectdctl_LDADD += -lsocket
265 endif
266 if BUILD_AIX
267 collectdctl_LDADD += -lm
268 endif
269
270
271 collectd_tg_SOURCES = src/collectd-tg.c
272 collectd_tg_CPPFLAGS = $(AM_CPPFLAGS) \
273         -I$(srcdir)/src/libcollectdclient/collectd \
274         -I$(top_builddir)/src/libcollectdclient/collectd
275 collectd_tg_LDADD = \
276         $(PTHREAD_LIBS) \
277         libheap.la \
278         libcollectdclient.la
279 if BUILD_WITH_LIBSOCKET
280 collectd_tg_LDADD += -lsocket
281 endif
282 if BUILD_WITH_LIBRT
283 collectd_tg_LDADD += -lrt
284 endif
285 if BUILD_AIX
286 collectd_tg_LDADD += -lm
287 endif
288
289
290 test_common_SOURCES = \
291         src/daemon/common_test.c \
292         src/testing.h
293 test_common_LDADD = libplugin_mock.la
294
295 test_meta_data_SOURCES = \
296         src/daemon/meta_data_test.c \
297         src/testing.h
298 test_meta_data_LDADD = libmetadata.la libplugin_mock.la
299
300 test_utils_avltree_SOURCES = \
301         src/daemon/utils_avltree_test.c \
302         src/testing.h
303 test_utils_avltree_LDADD = libavltree.la $(COMMON_LIBS)
304
305 test_utils_heap_SOURCES = \
306         src/daemon/utils_heap_test.c \
307         src/testing.h
308 test_utils_heap_LDADD = libheap.la $(COMMON_LIBS)
309
310 test_utils_time_SOURCES = \
311         src/daemon/utils_time_test.c \
312         src/testing.h
313
314 test_utils_subst_SOURCES = \
315         src/daemon/utils_subst_test.c \
316         src/testing.h \
317         src/daemon/utils_subst.c \
318         src/daemon/utils_subst.h
319 test_utils_subst_LDADD = libplugin_mock.la
320
321 libavltree_la_SOURCES = \
322         src/daemon/utils_avltree.c \
323         src/daemon/utils_avltree.h
324
325 libcommon_la_SOURCES = \
326         src/daemon/common.c \
327         src/daemon/common.h
328 libcommon_la_LIBADD = $(COMMON_LIBS)
329
330 libheap_la_SOURCES = \
331         src/daemon/utils_heap.c \
332         src/daemon/utils_heap.h
333
334 libmetadata_la_SOURCES = \
335         src/daemon/meta_data.c \
336         src/daemon/meta_data.h
337
338 libplugin_mock_la_SOURCES = \
339         src/daemon/plugin_mock.c \
340         src/daemon/utils_cache_mock.c \
341         src/daemon/utils_complain.c \
342         src/daemon/utils_complain.h \
343         src/daemon/utils_ignorelist.c \
344         src/daemon/utils_ignorelist.h \
345         src/daemon/utils_time.c \
346         src/daemon/utils_time.h
347
348 libplugin_mock_la_CPPFLAGS = $(AM_CPPFLAGS) -DMOCK_TIME
349 libplugin_mock_la_LIBADD = libcommon.la $(COMMON_LIBS)
350
351 libformat_graphite_la_SOURCES = \
352         src/utils_format_graphite.c \
353         src/utils_format_graphite.h
354
355 test_format_graphite_SOURCES = \
356         src/utils_format_graphite_test.c \
357         src/testing.h
358 test_format_graphite_LDADD = \
359         libformat_graphite.la \
360         libmetadata.la \
361         libplugin_mock.la \
362         -lm
363
364 libformat_json_la_SOURCES = \
365         src/utils_format_json.c \
366         src/utils_format_json.h
367 libformat_json_la_CPPFLAGS  = $(AM_CPPFLAGS)
368 libformat_json_la_LDFLAGS   = $(AM_LDFLAGS)
369 libformat_json_la_LIBADD    =
370 if BUILD_WITH_LIBYAJL
371 libformat_json_la_CPPFLAGS += $(BUILD_WITH_LIBYAJL_CPPFLAGS)
372 libformat_json_la_LDFLAGS  += $(BUILD_WITH_LIBYAJL_LDFLAGS)
373 libformat_json_la_LIBADD   += $(BUILD_WITH_LIBYAJL_LIBS)
374
375 check_PROGRAMS += test_format_json
376
377 test_format_json_SOURCES = \
378         src/utils_format_json_test.c \
379         src/testing.h
380 test_format_json_LDADD = \
381         libformat_json.la \
382         libmetadata.la \
383         libplugin_mock.la \
384         -lm
385 endif
386
387 if BUILD_PLUGIN_CEPH
388 test_plugin_ceph_SOURCES = src/ceph_test.c
389 test_plugin_ceph_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
390 test_plugin_ceph_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
391 test_plugin_ceph_LDADD = libplugin_mock.la $(BUILD_WITH_LIBYAJL_LIBS)
392 check_PROGRAMS += test_plugin_ceph
393 endif
394
395 liblatency_la_SOURCES = \
396         src/utils_latency.c \
397         src/utils_latency.h \
398         src/utils_latency_config.c \
399         src/utils_latency_config.h
400 liblatency_la_LIBADD = \
401         libcommon.la \
402         -lm
403
404 test_utils_latency_SOURCES = \
405         src/utils_latency_test.c \
406         src/testing.h
407 test_utils_latency_LDADD = \
408         liblatency.la \
409         libplugin_mock.la \
410         -lm
411
412 libcmds_la_SOURCES = \
413         src/utils_cmds.c \
414         src/utils_cmds.h \
415         src/utils_cmd_flush.c \
416         src/utils_cmd_flush.h \
417         src/utils_cmd_getthreshold.c \
418         src/utils_cmd_getthreshold.h \
419         src/utils_cmd_getval.c \
420         src/utils_cmd_getval.h \
421         src/utils_cmd_listval.c \
422         src/utils_cmd_listval.h \
423         src/utils_cmd_putnotif.c \
424         src/utils_cmd_putnotif.h \
425         src/utils_cmd_putval.c \
426         src/utils_cmd_putval.h \
427         src/utils_parse_option.c \
428         src/utils_parse_option.h
429 libcmds_la_LIBADD = \
430         libcommon.la \
431         libmetadata.la \
432         -lm
433
434 test_utils_cmds_SOURCES = \
435         src/utils_cmds_test.c \
436         src/testing.h
437 test_utils_cmds_LDADD = \
438         libcmds.la \
439         libplugin_mock.la
440
441 liblookup_la_SOURCES = \
442         src/utils_vl_lookup.c \
443         src/utils_vl_lookup.h
444 liblookup_la_LIBADD = libavltree.la
445
446 test_utils_vl_lookup_SOURCES = \
447         src/utils_vl_lookup_test.c \
448         src/testing.h
449 test_utils_vl_lookup_LDADD = \
450         liblookup.la \
451         libplugin_mock.la
452 if BUILD_WITH_LIBKSTAT
453 test_utils_vl_lookup_LDADD += -lkstat
454 endif
455
456 libmount_la_SOURCES = \
457         src/utils_mount.c \
458         src/utils_mount.h
459
460 test_utils_mount_SOURCES = \
461         src/utils_mount_test.c \
462         src/testing.h
463 test_utils_mount_LDADD = \
464         libmount.la \
465         libplugin_mock.la
466 if BUILD_WITH_LIBKSTAT
467 test_utils_mount_LDADD += -lkstat
468 endif
469
470
471 libcollectdclient_la_SOURCES = \
472         src/libcollectdclient/client.c \
473         src/libcollectdclient/network.c \
474         src/libcollectdclient/network_buffer.c
475 libcollectdclient_la_CPPFLAGS = \
476         $(AM_CPPFLAGS) \
477         -I$(srcdir)/src/libcollectdclient/collectd \
478         -I$(top_builddir)/src/libcollectdclient/collectd \
479         -I$(srcdir)/src/daemon
480 libcollectdclient_la_LDFLAGS = -version-info 1:0:0
481 libcollectdclient_la_LIBADD = 
482 if BUILD_WITH_LIBGCRYPT
483 libcollectdclient_la_CPPFLAGS += $(GCRYPT_CPPFLAGS)
484 libcollectdclient_la_LDFLAGS += $(GCRYPT_LDFLAGS)
485 libcollectdclient_la_LIBADD += $(GCRYPT_LIBS)
486 endif
487
488
489 liboconfig_la_SOURCES = \
490         src/liboconfig/oconfig.c \
491         src/liboconfig/oconfig.h \
492         src/liboconfig/aux_types.h \
493         src/liboconfig/scanner.l \
494         src/liboconfig/parser.y
495 liboconfig_la_LDFLAGS = -avoid-version $(LEXLIB)
496
497
498 if BUILD_PLUGIN_AGGREGATION
499 pkglib_LTLIBRARIES += aggregation.la
500 aggregation_la_SOURCES = \
501         src/aggregation.c \
502         src/utils_vl_lookup.c \
503         src/utils_vl_lookup.h
504 aggregation_la_LDFLAGS = $(PLUGIN_LDFLAGS)
505 aggregation_la_LIBADD = -lm
506 endif
507
508 if BUILD_PLUGIN_AMQP
509 pkglib_LTLIBRARIES += amqp.la
510 amqp_la_SOURCES = src/amqp.c
511 amqp_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBRABBITMQ_CPPFLAGS)
512 amqp_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRABBITMQ_LDFLAGS)
513 amqp_la_LIBADD = \
514         $(BUILD_WITH_LIBRABBITMQ_LIBS) \
515         libcmds.la \
516         libformat_graphite.la \
517         libformat_json.la
518 endif
519
520 if BUILD_PLUGIN_APACHE
521 pkglib_LTLIBRARIES += apache.la
522 apache_la_SOURCES = src/apache.c
523 apache_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS)
524 apache_la_LDFLAGS = $(PLUGIN_LDFLAGS)
525 apache_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS)
526 endif
527
528
529 if BUILD_PLUGIN_APCUPS
530 pkglib_LTLIBRARIES += apcups.la
531 apcups_la_SOURCES = src/apcups.c
532 apcups_la_LDFLAGS = $(PLUGIN_LDFLAGS)
533 apcups_la_LIBADD =
534 if BUILD_WITH_LIBSOCKET
535 apcups_la_LIBADD += -lsocket
536 endif
537 endif
538
539 if BUILD_PLUGIN_APPLE_SENSORS
540 pkglib_LTLIBRARIES += apple_sensors.la
541 apple_sensors_la_SOURCES = src/apple_sensors.c
542 apple_sensors_la_LDFLAGS = $(PLUGIN_LDFLAGS) -framework IOKit
543 endif
544
545 if BUILD_PLUGIN_AQUAERO
546 pkglib_LTLIBRARIES += aquaero.la
547 aquaero_la_SOURCES = src/aquaero.c
548 aquaero_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBAQUAERO5_CFLAGS)
549 aquaero_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBAQUAERO5_LDFLAGS)
550 aquaero_la_LIBADD = -laquaero5
551 endif
552
553 if BUILD_PLUGIN_ASCENT
554 pkglib_LTLIBRARIES += ascent.la
555 ascent_la_SOURCES = src/ascent.c
556 ascent_la_CFLAGS = \
557         $(AM_CFLAGS) \
558         $(BUILD_WITH_LIBCURL_CFLAGS) \
559         $(BUILD_WITH_LIBXML2_CFLAGS)
560 ascent_la_LDFLAGS = $(PLUGIN_LDFLAGS)
561 ascent_la_LIBADD = \
562         $(BUILD_WITH_LIBCURL_LIBS) \
563         $(BUILD_WITH_LIBXML2_LIBS)
564 endif
565
566 if BUILD_PLUGIN_BAROMETER
567 pkglib_LTLIBRARIES += barometer.la
568 barometer_la_SOURCES = src/barometer.c
569 barometer_la_LDFLAGS = $(PLUGIN_LDFLAGS)
570 barometer_la_LIBADD = -lm
571 endif
572
573 if BUILD_PLUGIN_BATTERY
574 pkglib_LTLIBRARIES += battery.la
575 battery_la_SOURCES = \
576         src/battery.c \
577         src/battery_statefs.c
578 battery_la_LDFLAGS = $(PLUGIN_LDFLAGS)
579 if BUILD_WITH_LIBIOKIT
580 battery_la_LDFLAGS += -framework IOKit
581 endif
582 endif
583
584 if BUILD_PLUGIN_BIND
585 pkglib_LTLIBRARIES += bind.la
586 bind_la_SOURCES = src/bind.c
587 bind_la_CFLAGS = $(AM_CFLAGS) \
588         $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
589 bind_la_LDFLAGS = $(PLUGIN_LDFLAGS)
590 bind_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
591 endif
592
593 if BUILD_PLUGIN_CEPH
594 pkglib_LTLIBRARIES += ceph.la
595 ceph_la_SOURCES = src/ceph.c
596 ceph_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
597 ceph_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
598 ceph_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
599 endif
600
601 if BUILD_PLUGIN_CGROUPS
602 pkglib_LTLIBRARIES += cgroups.la
603 cgroups_la_SOURCES = src/cgroups.c
604 cgroups_la_LDFLAGS = $(PLUGIN_LDFLAGS)
605 cgroups_la_LIBADD = libmount.la
606 endif
607
608 if BUILD_PLUGIN_CHRONY
609 pkglib_LTLIBRARIES += chrony.la
610 chrony_la_SOURCES = src/chrony.c
611 chrony_la_LDFLAGS = $(PLUGIN_LDFLAGS)
612 chrony_la_LIBADD = -lm
613 endif
614
615 if BUILD_PLUGIN_CONNTRACK
616 pkglib_LTLIBRARIES += conntrack.la
617 conntrack_la_SOURCES = src/conntrack.c
618 conntrack_la_LDFLAGS = $(PLUGIN_LDFLAGS)
619 endif
620
621 if BUILD_PLUGIN_CONTEXTSWITCH
622 pkglib_LTLIBRARIES += contextswitch.la
623 contextswitch_la_SOURCES = src/contextswitch.c
624 contextswitch_la_LDFLAGS = $(PLUGIN_LDFLAGS)
625 contextswitch_la_LIBADD =
626 if BUILD_WITH_PERFSTAT
627 contextswitch_la_LIBADD += -lperfstat
628 endif
629 endif
630
631 if BUILD_PLUGIN_CPU
632 pkglib_LTLIBRARIES += cpu.la
633 cpu_la_SOURCES = src/cpu.c
634 cpu_la_CFLAGS = $(AM_CFLAGS)
635 cpu_la_LDFLAGS = $(PLUGIN_LDFLAGS)
636 cpu_la_LIBADD =
637 if BUILD_WITH_LIBKSTAT
638 cpu_la_LIBADD += -lkstat
639 endif
640 if BUILD_WITH_LIBDEVINFO
641 cpu_la_LIBADD += -ldevinfo
642 endif
643 if BUILD_WITH_LIBSTATGRAB
644 cpu_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
645 cpu_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
646 endif
647 if BUILD_WITH_PERFSTAT
648 cpu_la_LIBADD += -lperfstat
649 endif
650 endif
651
652 if BUILD_PLUGIN_CPUFREQ
653 pkglib_LTLIBRARIES += cpufreq.la
654 cpufreq_la_SOURCES = src/cpufreq.c
655 cpufreq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
656 endif
657
658 if BUILD_PLUGIN_CPUSLEEP
659 pkglib_LTLIBRARIES += cpusleep.la
660 cpusleep_la_SOURCES = src/cpusleep.c
661 cpusleep_la_LDFLAGS = $(PLUGIN_LDFLAGS)
662 endif
663
664 if BUILD_PLUGIN_CSV
665 pkglib_LTLIBRARIES += csv.la
666 csv_la_SOURCES = src/csv.c
667 csv_la_LDFLAGS = $(PLUGIN_LDFLAGS)
668 endif
669
670 if BUILD_PLUGIN_CURL
671 pkglib_LTLIBRARIES += curl.la
672 curl_la_SOURCES = \
673         src/curl.c \
674         src/utils_curl_stats.c \
675         src/utils_curl_stats.h \
676         src/utils_match.c \
677         src/utils_match.h
678 curl_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS)
679 curl_la_LDFLAGS = $(PLUGIN_LDFLAGS)
680 curl_la_LIBADD = liblatency.la $(BUILD_WITH_LIBCURL_LIBS)
681 endif
682
683 if BUILD_PLUGIN_CURL_JSON
684 pkglib_LTLIBRARIES += curl_json.la
685 curl_json_la_SOURCES = \
686         src/curl_json.c \
687         src/utils_curl_stats.c \
688         src/utils_curl_stats.h
689 curl_json_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS)
690 curl_json_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
691 curl_json_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
692 curl_json_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBYAJL_LIBS)
693 endif
694
695 if BUILD_PLUGIN_CURL_XML
696 pkglib_LTLIBRARIES += curl_xml.la
697 curl_xml_la_SOURCES = \
698         src/curl_xml.c \
699         src/utils_curl_stats.c \
700         src/utils_curl_stats.h
701 curl_xml_la_CFLAGS = $(AM_CFLAGS) \
702                 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
703 curl_xml_la_LDFLAGS = $(PLUGIN_LDFLAGS)
704 curl_xml_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
705 endif
706
707 if BUILD_PLUGIN_DBI
708 pkglib_LTLIBRARIES += dbi.la
709 dbi_la_SOURCES = \
710         src/dbi.c \
711         src/utils_db_query.c \
712         src/utils_db_query.h
713 dbi_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBDBI_CPPFLAGS)
714 dbi_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBDBI_LDFLAGS)
715 dbi_la_LIBADD = $(BUILD_WITH_LIBDBI_LIBS)
716 endif
717
718 if BUILD_PLUGIN_DF
719 pkglib_LTLIBRARIES += df.la
720 df_la_SOURCES = src/df.c
721 df_la_LDFLAGS = $(PLUGIN_LDFLAGS)
722 df_la_LIBADD = libmount.la
723 endif
724
725 if BUILD_PLUGIN_DISK
726 pkglib_LTLIBRARIES += disk.la
727 disk_la_SOURCES = src/disk.c
728 disk_la_CFLAGS = $(AM_CFLAGS)
729 disk_la_CPPFLAGS = $(AM_CPPFLAGS)
730 disk_la_LDFLAGS = $(PLUGIN_LDFLAGS)
731 disk_la_LIBADD =
732 if BUILD_WITH_LIBKSTAT
733 disk_la_LIBADD += -lkstat
734 endif
735 if BUILD_WITH_LIBDEVINFO
736 disk_la_LIBADD += -ldevinfo
737 endif
738 if BUILD_WITH_LIBIOKIT
739 disk_la_LDFLAGS += -framework IOKit
740 endif
741 if BUILD_WITH_LIBSTATGRAB
742 disk_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
743 disk_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
744 endif
745 if BUILD_WITH_LIBUDEV
746 disk_la_CPPFLAGS += $(BUILD_WITH_LIBUDEV_CPPFLAGS)
747 disk_la_LDFLAGS += $(BUILD_WITH_LIBUDEV_LDFLAGS)
748 disk_la_LIBADD += $(BUILD_WITH_LIBUDEV_LIBS)
749 endif
750 if BUILD_FREEBSD
751 disk_la_LIBADD += -ldevstat -lgeom
752 endif
753 if BUILD_WITH_PERFSTAT
754 disk_la_LIBADD += -lperfstat
755 endif
756 endif
757
758 if BUILD_PLUGIN_DNS
759 pkglib_LTLIBRARIES += dns.la
760 dns_la_SOURCES = \
761         src/dns.c \
762         src/utils_dns.c \
763         src/utils_dns.h
764 dns_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPCAP_CPPFLAGS)
765 dns_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBPCAP_LDFLAGS)
766 dns_la_LIBADD = $(BUILD_WITH_LIBPCAP_LIBS)
767 endif
768
769 if BUILD_PLUGIN_DPDKEVENTS
770 pkglib_LTLIBRARIES += dpdkevents.la
771 dpdkevents_la_SOURCES = src/dpdkevents.c src/utils_dpdk.c src/utils_dpdk.h
772 dpdkevents_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBDPDK_CPPFLAGS)
773 dpdkevents_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBDPDK_LDFLAGS)
774 dpdkevents_la_LIBADD = -ldpdk
775 endif
776
777 if BUILD_PLUGIN_DPDKSTAT
778 pkglib_LTLIBRARIES += dpdkstat.la
779 dpdkstat_la_SOURCES = src/dpdkstat.c src/utils_dpdk.c src/utils_dpdk.h
780 dpdkstat_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBDPDK_CPPFLAGS)
781 dpdkstat_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBDPDK_LDFLAGS)
782 dpdkstat_la_LIBADD = -ldpdk
783 endif
784
785 if BUILD_PLUGIN_DRBD
786 pkglib_LTLIBRARIES += drbd.la
787 drbd_la_SOURCES = src/drbd.c
788 drbd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
789 endif
790
791 if BUILD_PLUGIN_EMAIL
792 pkglib_LTLIBRARIES += email.la
793 email_la_SOURCES = src/email.c
794 email_la_LDFLAGS = $(PLUGIN_LDFLAGS)
795 endif
796
797 if BUILD_PLUGIN_ENTROPY
798 pkglib_LTLIBRARIES += entropy.la
799 entropy_la_SOURCES = src/entropy.c
800 entropy_la_LDFLAGS = $(PLUGIN_LDFLAGS)
801 endif
802
803 if BUILD_PLUGIN_EXEC
804 pkglib_LTLIBRARIES += exec.la
805 exec_la_SOURCES = src/exec.c
806 exec_la_LDFLAGS = $(PLUGIN_LDFLAGS)
807 exec_la_LIBADD = libcmds.la
808 endif
809
810 if BUILD_PLUGIN_ETHSTAT
811 pkglib_LTLIBRARIES += ethstat.la
812 ethstat_la_SOURCES = src/ethstat.c
813 ethstat_la_LDFLAGS = $(PLUGIN_LDFLAGS)
814 endif
815
816 if BUILD_PLUGIN_FHCOUNT
817 pkglib_LTLIBRARIES += fhcount.la
818 fhcount_la_SOURCES = src/fhcount.c
819 fhcount_la_LDFLAGS = $(PLUGIN_LDFLAGS)
820 endif
821
822 if BUILD_PLUGIN_FILECOUNT
823 pkglib_LTLIBRARIES += filecount.la
824 filecount_la_SOURCES = src/filecount.c
825 filecount_la_LDFLAGS = $(PLUGIN_LDFLAGS)
826 endif
827
828 if BUILD_PLUGIN_FSCACHE
829 pkglib_LTLIBRARIES += fscache.la
830 fscache_la_SOURCES = src/fscache.c
831 fscache_la_LDFLAGS = $(PLUGIN_LDFLAGS)
832 endif
833
834 if BUILD_PLUGIN_GMOND
835 pkglib_LTLIBRARIES += gmond.la
836 gmond_la_SOURCES = src/gmond.c
837 gmond_la_CPPFLAGS = $(AM_CPPFLAGS) $(GANGLIA_CPPFLAGS)
838 gmond_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(GANGLIA_LDFLAGS)
839 gmond_la_LIBADD = $(GANGLIA_LIBS)
840 endif
841
842 if BUILD_PLUGIN_GPS
843 pkglib_LTLIBRARIES += gps.la
844 gps_la_SOURCES = src/gps.c
845 gps_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBGPS_CFLAGS)
846 gps_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBGPS_LDFLAGS)
847 gps_la_LIBADD = -lpthread $(BUILD_WITH_LIBGPS_LIBS)
848 endif
849
850 if BUILD_PLUGIN_GRPC
851 pkglib_LTLIBRARIES += grpc.la
852 grpc_la_SOURCES = src/grpc.cc
853 nodist_grpc_la_SOURCES = \
854         collectd.grpc.pb.cc \
855         collectd.pb.cc \
856         types.pb.cc
857 grpc_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBGRPCPP_CPPFLAGS) $(BUILD_WITH_LIBPROTOBUF_CPPFLAGS)
858 grpc_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBGRPCPP_LDFLAGS) $(BUILD_WITH_LIBPROTOBUF_LDFLAGS)
859 grpc_la_LIBADD = $(BUILD_WITH_LIBGRPCPP_LIBS) $(BUILD_WITH_LIBPROTOBUF_LIBS)
860 endif
861
862 if BUILD_PLUGIN_HDDTEMP
863 pkglib_LTLIBRARIES += hddtemp.la
864 hddtemp_la_SOURCES = src/hddtemp.c
865 hddtemp_la_LDFLAGS = $(PLUGIN_LDFLAGS)
866 hddtemp_la_LIBADD =
867 if BUILD_WITH_LIBSOCKET
868 hddtemp_la_LIBADD += -lsocket
869 endif
870 endif
871
872 if BUILD_PLUGIN_HUGEPAGES
873 pkglib_LTLIBRARIES += hugepages.la
874 hugepages_la_SOURCES = src/hugepages.c
875 hugepages_la_LDFLAGS = $(PLUGIN_LDFLAGS)
876 endif
877
878 if BUILD_PLUGIN_INTEL_RDT
879 pkglib_LTLIBRARIES += intel_rdt.la
880 intel_rdt_la_SOURCES = src/intel_rdt.c
881 intel_rdt_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBPQOS_CPPFLAGS)
882 intel_rdt_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBPQOS_LDFLAGS)
883 intel_rdt_la_LIBADD = $(BUILD_WITH_LIBPQOS_LIBS)
884 endif
885
886 if BUILD_PLUGIN_INTERFACE
887 pkglib_LTLIBRARIES += interface.la
888 interface_la_SOURCES = src/interface.c
889 interface_la_CFLAGS = $(AM_CFLAGS)
890 interface_la_LDFLAGS = $(PLUGIN_LDFLAGS)
891 interface_la_LIBADD =
892 if BUILD_WITH_LIBSTATGRAB
893 interface_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
894 interface_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
895 else
896 if BUILD_WITH_LIBKSTAT
897 interface_la_LIBADD += -lkstat
898 endif
899 if BUILD_WITH_LIBDEVINFO
900 interface_la_LIBADD += -ldevinfo
901 endif # BUILD_WITH_LIBDEVINFO
902 endif # !BUILD_WITH_LIBSTATGRAB
903 if BUILD_WITH_PERFSTAT
904 interface_la_LIBADD += -lperfstat
905 endif
906 endif # BUILD_PLUGIN_INTERFACE
907
908 if BUILD_PLUGIN_IPC
909 pkglib_LTLIBRARIES += ipc.la
910 ipc_la_SOURCES = src/ipc.c
911 ipc_la_LDFLAGS = $(PLUGIN_LDFLAGS)
912 endif
913
914 if BUILD_PLUGIN_IPTABLES
915 pkglib_LTLIBRARIES += iptables.la
916 iptables_la_SOURCES = src/iptables.c
917 iptables_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBIPTC_CPPFLAGS)
918 iptables_la_LDFLAGS = $(PLUGIN_LDFLAGS)
919 iptables_la_LIBADD = $(BUILD_WITH_LIBIPTC_LDFLAGS)
920 endif
921
922 if BUILD_PLUGIN_IPMI
923 pkglib_LTLIBRARIES += ipmi.la
924 ipmi_la_SOURCES = src/ipmi.c
925 ipmi_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_OPENIPMI_CFLAGS)
926 ipmi_la_LDFLAGS = $(PLUGIN_LDFLAGS)
927 ipmi_la_LIBADD = $(BUILD_WITH_OPENIPMI_LIBS)
928 endif
929
930 if BUILD_PLUGIN_IPVS
931 pkglib_LTLIBRARIES += ipvs.la
932 ipvs_la_SOURCES = src/ipvs.c
933 ipvs_la_CFLAGS = $(AM_CFLAGS)
934 if IP_VS_H_NEEDS_KERNEL_CFLAGS
935 ipvs_la_CFLAGS += $(KERNEL_CFLAGS)
936 endif
937 ipvs_la_LDFLAGS = $(PLUGIN_LDFLAGS)
938 endif
939
940 if BUILD_PLUGIN_IRQ
941 pkglib_LTLIBRARIES += irq.la
942 irq_la_SOURCES = src/irq.c
943 irq_la_LDFLAGS = $(PLUGIN_LDFLAGS)
944 endif
945
946 if BUILD_PLUGIN_JAVA
947 pkglib_LTLIBRARIES += java.la
948 java_la_SOURCES = src/java.c
949 java_la_CPPFLAGS = $(AM_CPPFLAGS) $(JAVA_CPPFLAGS)
950 java_la_CFLAGS = $(AM_CFLAGS) $(JAVA_CFLAGS)
951 java_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(JAVA_LDFLAGS)
952 java_la_LIBADD = $(JAVA_LIBS)
953 endif
954
955 if BUILD_PLUGIN_LOAD
956 pkglib_LTLIBRARIES += load.la
957 load_la_SOURCES = src/load.c
958 load_la_CFLAGS = $(AM_CFLAGS)
959 load_la_LDFLAGS = $(PLUGIN_LDFLAGS)
960 load_la_LIBADD =
961 if BUILD_WITH_LIBSTATGRAB
962 load_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
963 load_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
964 endif # BUILD_WITH_LIBSTATGRAB
965 if BUILD_WITH_PERFSTAT
966 load_la_LIBADD += -lperfstat
967 endif
968 endif # BUILD_PLUGIN_LOAD
969
970 if BUILD_PLUGIN_LOGFILE
971 pkglib_LTLIBRARIES += logfile.la
972 logfile_la_SOURCES = src/logfile.c
973 logfile_la_LDFLAGS = $(PLUGIN_LDFLAGS)
974 endif
975
976 if BUILD_PLUGIN_LOG_LOGSTASH
977 pkglib_LTLIBRARIES += log_logstash.la
978 log_logstash_la_SOURCES = src/log_logstash.c
979 log_logstash_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
980 log_logstash_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
981 log_logstash_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
982 endif
983
984 if BUILD_PLUGIN_LPAR
985 pkglib_LTLIBRARIES += lpar.la
986 lpar_la_SOURCES = src/lpar.c
987 lpar_la_LDFLAGS = $(PLUGIN_LDFLAGS)
988 lpar_la_LIBADD = -lperfstat
989 endif
990
991 if BUILD_PLUGIN_LUA
992 pkglib_LTLIBRARIES += lua.la
993 lua_la_SOURCES = \
994         src/lua.c \
995         src/utils_lua.c \
996         src/utils_lua.h
997 lua_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBLUA_CFLAGS)
998 lua_la_LDFLAGS = $(PLUGIN_LDFLAGS)
999 lua_la_LIBADD = $(BUILD_WITH_LIBLUA_LIBS)
1000 endif
1001
1002 if BUILD_PLUGIN_LVM
1003 pkglib_LTLIBRARIES += lvm.la
1004 lvm_la_SOURCES = src/lvm.c
1005 lvm_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBLVM2APP_CPPFLAGS)
1006 lvm_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBLVM2APP_LDFLAGS)
1007 lvm_la_LIBADD = $(BUILD_WITH_LIBLVM2APP_LIBS)
1008 endif
1009
1010 if BUILD_PLUGIN_MADWIFI
1011 pkglib_LTLIBRARIES += madwifi.la
1012 madwifi_la_SOURCES = \
1013         src/madwifi.c \
1014         src/madwifi.h
1015 madwifi_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1016 endif
1017
1018 if BUILD_PLUGIN_MATCH_EMPTY_COUNTER
1019 pkglib_LTLIBRARIES += match_empty_counter.la
1020 match_empty_counter_la_SOURCES = src/match_empty_counter.c
1021 match_empty_counter_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1022 endif
1023
1024 if BUILD_PLUGIN_MATCH_HASHED
1025 pkglib_LTLIBRARIES += match_hashed.la
1026 match_hashed_la_SOURCES = src/match_hashed.c
1027 match_hashed_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1028 endif
1029
1030 if BUILD_PLUGIN_MATCH_REGEX
1031 pkglib_LTLIBRARIES += match_regex.la
1032 match_regex_la_SOURCES = src/match_regex.c
1033 match_regex_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1034 endif
1035
1036 if BUILD_PLUGIN_MATCH_TIMEDIFF
1037 pkglib_LTLIBRARIES += match_timediff.la
1038 match_timediff_la_SOURCES = src/match_timediff.c
1039 match_timediff_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1040 endif
1041
1042 if BUILD_PLUGIN_MATCH_VALUE
1043 pkglib_LTLIBRARIES += match_value.la
1044 match_value_la_SOURCES = src/match_value.c
1045 match_value_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1046 endif
1047
1048 if BUILD_PLUGIN_MBMON
1049 pkglib_LTLIBRARIES += mbmon.la
1050 mbmon_la_SOURCES = src/mbmon.c
1051 mbmon_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1052 mbmon_la_LIBADD =
1053 if BUILD_WITH_LIBSOCKET
1054 mbmon_la_LIBADD += -lsocket
1055 endif
1056 endif
1057
1058 if BUILD_PLUGIN_MCELOG
1059 pkglib_LTLIBRARIES += mcelog.la
1060 mcelog_la_SOURCES = src/mcelog.c
1061 mcelog_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1062 endif
1063
1064 if BUILD_PLUGIN_MD
1065 pkglib_LTLIBRARIES += md.la
1066 md_la_SOURCES = src/md.c
1067 md_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1068 endif
1069
1070 if BUILD_PLUGIN_MEMCACHEC
1071 pkglib_LTLIBRARIES += memcachec.la
1072 memcachec_la_SOURCES = \
1073         src/memcachec.c \
1074         src/utils_match.c \
1075         src/utils_match.h
1076 memcachec_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMEMCACHED_CPPFLAGS)
1077 memcachec_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMEMCACHED_LDFLAGS)
1078 memcachec_la_LIBADD = liblatency.la $(BUILD_WITH_LIBMEMCACHED_LIBS)
1079 endif
1080
1081 if BUILD_PLUGIN_MEMCACHED
1082 pkglib_LTLIBRARIES += memcached.la
1083 memcached_la_SOURCES = src/memcached.c
1084 memcached_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1085 memcached_la_LIBADD =
1086 if BUILD_WITH_LIBSOCKET
1087 memcached_la_LIBADD += -lsocket
1088 endif
1089 endif
1090
1091 if BUILD_PLUGIN_MEMORY
1092 pkglib_LTLIBRARIES += memory.la
1093 memory_la_SOURCES = src/memory.c
1094 memory_la_CFLAGS = $(AM_CFLAGS)
1095 memory_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1096 memory_la_LIBADD =
1097 if BUILD_WITH_LIBKSTAT
1098 memory_la_LIBADD += -lkstat
1099 endif
1100 if BUILD_WITH_LIBDEVINFO
1101 memory_la_LIBADD += -ldevinfo
1102 endif
1103 if BUILD_WITH_LIBSTATGRAB
1104 memory_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1105 memory_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1106 endif
1107 if BUILD_WITH_PERFSTAT
1108 memory_la_LIBADD += -lperfstat
1109 endif
1110 endif
1111
1112 if BUILD_PLUGIN_MIC
1113 pkglib_LTLIBRARIES += mic.la
1114 mic_la_SOURCES = src/mic.c
1115 mic_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_MIC_CPPFLAGS)
1116 mic_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_MIC_LDFLAGS)
1117 mic_la_LIBADD = $(BUILD_WITH_MIC_LIBS)
1118 endif
1119
1120 if BUILD_PLUGIN_MODBUS
1121 pkglib_LTLIBRARIES += modbus.la
1122 modbus_la_SOURCES = src/modbus.c
1123 modbus_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMODBUS_CFLAGS)
1124 modbus_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1125 modbus_la_LIBADD = $(BUILD_WITH_LIBMODBUS_LIBS)
1126 endif
1127
1128 if BUILD_PLUGIN_MQTT
1129 pkglib_LTLIBRARIES += mqtt.la
1130 mqtt_la_SOURCES = src/mqtt.c
1131 mqtt_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMOSQUITTO_CPPFLAGS)
1132 mqtt_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMOSQUITTO_LDFLAGS)
1133 mqtt_la_LIBADD = $(BUILD_WITH_LIBMOSQUITTO_LIBS)
1134 endif
1135
1136 if BUILD_PLUGIN_MULTIMETER
1137 pkglib_LTLIBRARIES += multimeter.la
1138 multimeter_la_SOURCES = src/multimeter.c
1139 multimeter_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1140 endif
1141
1142 if BUILD_PLUGIN_MYSQL
1143 pkglib_LTLIBRARIES += mysql.la
1144 mysql_la_SOURCES = src/mysql.c
1145 mysql_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMYSQL_CFLAGS)
1146 mysql_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1147 mysql_la_LIBADD = $(BUILD_WITH_LIBMYSQL_LIBS)
1148 endif
1149
1150 if BUILD_PLUGIN_NETAPP
1151 pkglib_LTLIBRARIES += netapp.la
1152 netapp_la_SOURCES = src/netapp.c
1153 netapp_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBNETAPP_CPPFLAGS)
1154 netapp_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBNETAPP_LDFLAGS)
1155 netapp_la_LIBADD = $(LIBNETAPP_LIBS)
1156 endif
1157
1158 if BUILD_PLUGIN_NETLINK
1159 pkglib_LTLIBRARIES += netlink.la
1160 netlink_la_SOURCES = src/netlink.c
1161 netlink_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMNL_CFLAGS)
1162 netlink_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1163 netlink_la_LIBADD = $(BUILD_WITH_LIBMNL_LIBS)
1164 endif
1165
1166 if BUILD_PLUGIN_NETWORK
1167 pkglib_LTLIBRARIES += network.la
1168 network_la_SOURCES = \
1169         src/network.c \
1170         src/network.h \
1171         src/utils_fbhash.c \
1172         src/utils_fbhash.h
1173 network_la_CPPFLAGS = $(AM_CPPFLAGS)
1174 network_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1175 network_la_LIBADD =
1176 if BUILD_WITH_LIBSOCKET
1177 network_la_LIBADD += -lsocket
1178 endif
1179 if BUILD_WITH_LIBGCRYPT
1180 network_la_CPPFLAGS += $(GCRYPT_CPPFLAGS)
1181 network_la_LDFLAGS += $(GCRYPT_LDFLAGS)
1182 network_la_LIBADD += $(GCRYPT_LIBS)
1183 endif
1184 endif
1185
1186 if BUILD_PLUGIN_NFS
1187 pkglib_LTLIBRARIES += nfs.la
1188 nfs_la_SOURCES = src/nfs.c
1189 nfs_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1190 endif
1191
1192 if BUILD_PLUGIN_NGINX
1193 pkglib_LTLIBRARIES += nginx.la
1194 nginx_la_SOURCES = src/nginx.c
1195 nginx_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS)
1196 nginx_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1197 nginx_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS)
1198 endif
1199
1200 if BUILD_PLUGIN_NOTIFY_DESKTOP
1201 pkglib_LTLIBRARIES += notify_desktop.la
1202 notify_desktop_la_SOURCES = src/notify_desktop.c
1203 notify_desktop_la_CFLAGS = $(AM_CFLAGS) $(LIBNOTIFY_CFLAGS)
1204 notify_desktop_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1205 notify_desktop_la_LIBADD = $(LIBNOTIFY_LIBS)
1206 endif
1207
1208 if BUILD_PLUGIN_NOTIFY_EMAIL
1209 pkglib_LTLIBRARIES += notify_email.la
1210 notify_email_la_SOURCES = src/notify_email.c
1211 notify_email_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBESMTP_CPPFLAGS)
1212 notify_email_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBESMTP_LDFLAGS)
1213 notify_email_la_LIBADD = $(BUILD_WITH_LIBESMTP_LIBS)
1214 endif
1215
1216 if BUILD_PLUGIN_NOTIFY_NAGIOS
1217 pkglib_LTLIBRARIES += notify_nagios.la
1218 notify_nagios_la_SOURCES = src/notify_nagios.c
1219 notify_nagios_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1220 endif
1221
1222 if BUILD_PLUGIN_NTPD
1223 pkglib_LTLIBRARIES += ntpd.la
1224 ntpd_la_SOURCES = src/ntpd.c
1225 ntpd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1226 ntpd_la_LIBADD =
1227 if BUILD_WITH_LIBSOCKET
1228 ntpd_la_LIBADD += -lsocket
1229 endif
1230 endif
1231
1232 if BUILD_PLUGIN_NUMA
1233 pkglib_LTLIBRARIES += numa.la
1234 numa_la_SOURCES = src/numa.c
1235 numa_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1236 endif
1237
1238 if BUILD_PLUGIN_NUT
1239 pkglib_LTLIBRARIES += nut.la
1240 nut_la_SOURCES = src/nut.c
1241 nut_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
1242 nut_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1243 nut_la_LIBADD = $(BUILD_WITH_LIBUPSCLIENT_LIBS)
1244 endif
1245
1246 if BUILD_PLUGIN_OLSRD
1247 pkglib_LTLIBRARIES += olsrd.la
1248 olsrd_la_SOURCES = src/olsrd.c
1249 olsrd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1250 olsrd_la_LIBADD =
1251 if BUILD_WITH_LIBSOCKET
1252 olsrd_la_LIBADD += -lsocket
1253 endif
1254 endif
1255
1256 if BUILD_PLUGIN_ONEWIRE
1257 pkglib_LTLIBRARIES += onewire.la
1258 onewire_la_SOURCES = src/onewire.c
1259 onewire_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
1260 onewire_la_LIBADD = $(BUILD_WITH_LIBOWCAPI_LIBS)
1261 onewire_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBOWCAPI_LDFLAGS)
1262 endif
1263
1264 if BUILD_PLUGIN_OPENLDAP
1265 pkglib_LTLIBRARIES += openldap.la
1266 openldap_la_SOURCES = src/openldap.c
1267 openldap_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBLDAP_CPPFLAGS)
1268 openldap_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBLDAP_LDFLAGS)
1269 openldap_la_LIBADD = -lldap
1270 endif
1271
1272 if BUILD_PLUGIN_OPENVPN
1273 pkglib_LTLIBRARIES += openvpn.la
1274 openvpn_la_SOURCES = src/openvpn.c
1275 openvpn_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1276 endif
1277
1278 if BUILD_PLUGIN_ORACLE
1279 pkglib_LTLIBRARIES += oracle.la
1280 oracle_la_SOURCES = \
1281         src/oracle.c \
1282         src/utils_db_query.c \
1283         src/utils_db_query.h
1284 oracle_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_ORACLE_CPPFLAGS)
1285 oracle_la_LIBADD = $(BUILD_WITH_ORACLE_LIBS)
1286 oracle_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1287 endif
1288
1289 if BUILD_PLUGIN_OVS_EVENTS
1290 pkglib_LTLIBRARIES += ovs_events.la
1291 ovs_events_la_SOURCES = \
1292         src/ovs_events.c \
1293         src/utils_ovs.c \
1294         src/utils_ovs.h
1295 ovs_events_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
1296 ovs_events_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
1297 ovs_events_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
1298 endif
1299
1300 if BUILD_PLUGIN_OVS_STATS
1301 pkglib_LTLIBRARIES += ovs_stats.la
1302 ovs_stats_la_SOURCES = \
1303         src/ovs_stats.c \
1304         src/utils_ovs.c \
1305         src/utils_ovs.h
1306 ovs_stats_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
1307 ovs_stats_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
1308 ovs_stats_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
1309 endif
1310
1311 if BUILD_PLUGIN_PERL
1312 pkglib_LTLIBRARIES += perl.la
1313 perl_la_SOURCES = src/perl.c
1314 # Despite C99 providing the "bool" type thru stdbool.h, Perl defines its own
1315 # version of that type if HAS_BOOL is not defined... *sigh*
1316 perl_la_CPPFLAGS = $(AM_CPPFLAGS) -DHAS_BOOL=1
1317 # Despite off_t being 64 bit wide on 64 bit platforms, Perl insist on using
1318 # off64_t which is only exposed when _LARGEFILE64_SOURCE is defined... *sigh*
1319 # On older platforms we also need _REENTRANT. _GNU_SOURCE sets both of these.
1320 perl_la_CPPFLAGS += -D_GNU_SOURCE
1321 perl_la_CFLAGS = $(AM_CFLAGS) \
1322         $(PERL_CFLAGS) \
1323         -DXS_VERSION=\"$(VERSION)\" -DVERSION=\"$(VERSION)\"
1324 perl_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(PERL_LDFLAGS)
1325 perl_la_LIBADD = $(PERL_LIBS)
1326 endif
1327
1328 if BUILD_PLUGIN_PF
1329 pkglib_LTLIBRARIES += pf.la
1330 pf_la_SOURCES = src/pf.c
1331 pf_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1332 endif
1333
1334 if BUILD_PLUGIN_PINBA
1335 pkglib_LTLIBRARIES += pinba.la
1336 pinba_la_SOURCES = src/pinba.c
1337 nodist_pinba_la_SOURCES = \
1338         src/pinba.pb-c.c \
1339         src/pinba.pb-c.h
1340 pinba_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPROTOBUF_C_CPPFLAGS)
1341 pinba_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBPROTOBUF_C_LDFLAGS)
1342 pinba_la_LIBADD = $(BUILD_WITH_LIBPROTOBUF_C_LIBS)
1343 endif
1344
1345 if BUILD_PLUGIN_PING
1346 pkglib_LTLIBRARIES += ping.la
1347 ping_la_SOURCES = src/ping.c
1348 ping_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOPING_CPPFLAGS)
1349 ping_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBOPING_LDFLAGS)
1350 ping_la_LIBADD = -loping -lm
1351 endif
1352
1353 if BUILD_PLUGIN_POSTGRESQL
1354 pkglib_LTLIBRARIES += postgresql.la
1355 postgresql_la_SOURCES = \
1356         src/postgresql.c \
1357         src/utils_db_query.c \
1358         src/utils_db_query.h
1359 postgresql_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPQ_CPPFLAGS)
1360 postgresql_la_LDFLAGS = $(PLUGIN_LDFLAGS) \
1361         $(BUILD_WITH_LIBPQ_LDFLAGS)
1362 postgresql_la_LIBADD = $(BUILD_WITH_LIBPQ_LIBS)
1363 endif
1364
1365 if BUILD_PLUGIN_POWERDNS
1366 pkglib_LTLIBRARIES += powerdns.la
1367 powerdns_la_SOURCES = src/powerdns.c
1368 powerdns_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1369 endif
1370
1371 if BUILD_PLUGIN_PYTHON
1372 pkglib_LTLIBRARIES += python.la
1373 python_la_SOURCES = \
1374         src/python.c \
1375         src/pyconfig.c \
1376         src/pyvalues.c \
1377         src/cpython.h
1378 python_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBPYTHON_CPPFLAGS)
1379 if COMPILER_IS_GCC
1380 python_la_CPPFLAGS += -fno-strict-aliasing -Wno-strict-aliasing
1381 endif
1382 python_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBPYTHON_LDFLAGS)
1383 endif
1384
1385 if BUILD_PLUGIN_PROCESSES
1386 pkglib_LTLIBRARIES += processes.la
1387 processes_la_SOURCES = src/processes.c
1388 processes_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1389 processes_la_LIBADD =
1390 if BUILD_WITH_LIBKVM_GETPROCS
1391 processes_la_LIBADD += -lkvm
1392 endif
1393 endif
1394
1395 if BUILD_PLUGIN_PROTOCOLS
1396 pkglib_LTLIBRARIES += protocols.la
1397 protocols_la_SOURCES = src/protocols.c
1398 protocols_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1399 endif
1400
1401 if BUILD_PLUGIN_REDIS
1402 pkglib_LTLIBRARIES += redis.la
1403 redis_la_SOURCES = src/redis.c
1404 redis_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBHIREDIS_CPPFLAGS)
1405 redis_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBHIREDIS_LDFLAGS)
1406 redis_la_LIBADD = -lhiredis
1407 endif
1408
1409 if BUILD_PLUGIN_ROUTEROS
1410 pkglib_LTLIBRARIES += routeros.la
1411 routeros_la_SOURCES = src/routeros.c
1412 routeros_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBROUTEROS_CPPFLAGS)
1413 routeros_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBROUTEROS_LDFLAGS)
1414 routeros_la_LIBADD = -lrouteros
1415 endif
1416
1417 if BUILD_PLUGIN_RRDCACHED
1418 pkglib_LTLIBRARIES += rrdcached.la
1419 rrdcached_la_SOURCES = \
1420         src/rrdcached.c \
1421         src/utils_rrdcreate.c \
1422         src/utils_rrdcreate.h
1423 rrdcached_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
1424 rrdcached_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRRD_LDFLAGS)
1425 rrdcached_la_LIBADD = $(BUILD_WITH_LIBRRD_LIBS)
1426 endif
1427
1428 if BUILD_PLUGIN_RRDTOOL
1429 pkglib_LTLIBRARIES += rrdtool.la
1430 rrdtool_la_SOURCES = \
1431         src/rrdtool.c \
1432         src/utils_rrdcreate.c \
1433         src/utils_rrdcreate.h
1434 rrdtool_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
1435 rrdtool_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRRD_LDFLAGS)
1436 rrdtool_la_LIBADD = $(BUILD_WITH_LIBRRD_LIBS)
1437 endif
1438
1439 if BUILD_PLUGIN_SENSORS
1440 pkglib_LTLIBRARIES += sensors.la
1441 sensors_la_SOURCES = src/sensors.c
1442 sensors_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBSENSORS_CPPFLAGS)
1443 sensors_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBSENSORS_LDFLAGS)
1444 sensors_la_LIBADD = $(BUILD_WITH_LIBSENSORS_LIBS)
1445 endif
1446
1447 if BUILD_PLUGIN_SERIAL
1448 pkglib_LTLIBRARIES += serial.la
1449 serial_la_SOURCES = src/serial.c
1450 serial_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1451 endif
1452
1453 if BUILD_PLUGIN_SIGROK
1454 pkglib_LTLIBRARIES += sigrok.la
1455 sigrok_la_SOURCES = src/sigrok.c
1456 sigrok_la_CFLAGS = $(AM_CFLAGS) $(LIBSIGROK_CFLAGS)
1457 sigrok_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1458 sigrok_la_LIBADD = $(LIBSIGROK_LIBS)
1459 endif
1460
1461 if BUILD_PLUGIN_SMART
1462 if BUILD_WITH_LIBUDEV
1463 pkglib_LTLIBRARIES += smart.la
1464 smart_la_SOURCES = src/smart.c
1465 smart_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBATASMART_CPPFLAGS) $(BUILD_WITH_LIBUDEV_CPPFLAGS)
1466 smart_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBATASMART_LDFLAGS) $(BUILD_WITH_LIBUDEV_LDFLAGS)
1467 smart_la_LIBADD = $(BUILD_WITH_LIBATASMART_LIBS) $(BUILD_WITH_LIBUDEV_LIBS)
1468 endif
1469 endif
1470
1471 if BUILD_PLUGIN_SNMP
1472 pkglib_LTLIBRARIES += snmp.la
1473 snmp_la_SOURCES = src/snmp.c
1474 snmp_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBNETSNMP_CPPFLAGS)
1475 snmp_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBNETSNMP_LDFLAGS)
1476 snmp_la_LIBADD = $(BUILD_WITH_LIBNETSNMP_LIBS)
1477 endif
1478
1479 if BUILD_PLUGIN_STATSD
1480 pkglib_LTLIBRARIES += statsd.la
1481 statsd_la_SOURCES = src/statsd.c
1482 statsd_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1483 statsd_la_LIBADD = liblatency.la
1484 endif
1485
1486 if BUILD_PLUGIN_SWAP
1487 pkglib_LTLIBRARIES += swap.la
1488 swap_la_SOURCES = src/swap.c
1489 swap_la_CFLAGS = $(AM_CFLAGS)
1490 swap_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1491 swap_la_LIBADD =
1492 if BUILD_WITH_LIBKSTAT
1493 swap_la_LIBADD += -lkstat
1494 endif
1495 if BUILD_WITH_LIBDEVINFO
1496 swap_la_LIBADD += -ldevinfo
1497 endif
1498 if BUILD_WITH_LIBKVM_GETSWAPINFO
1499 swap_la_LIBADD += -lkvm
1500 endif
1501 if BUILD_WITH_LIBSTATGRAB
1502 swap_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1503 swap_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1504 endif
1505 if BUILD_WITH_PERFSTAT
1506 swap_la_LIBADD += -lperfstat
1507 endif
1508
1509 endif
1510
1511 if BUILD_PLUGIN_SYSLOG
1512 pkglib_LTLIBRARIES += syslog.la
1513 syslog_la_SOURCES = src/syslog.c
1514 syslog_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1515 endif
1516
1517 if BUILD_PLUGIN_TABLE
1518 pkglib_LTLIBRARIES += table.la
1519 table_la_SOURCES = src/table.c
1520 table_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1521 endif
1522
1523 if BUILD_PLUGIN_TAIL
1524 pkglib_LTLIBRARIES += tail.la
1525 tail_la_SOURCES = \
1526         src/tail.c \
1527         src/utils_match.c \
1528         src/utils_match.h \
1529         src/utils_tail.c \
1530         src/utils_tail.h \
1531         src/utils_tail_match.c \
1532         src/utils_tail_match.h
1533 tail_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1534 tail_la_LIBADD = liblatency.la
1535 endif
1536
1537 if BUILD_PLUGIN_TAIL_CSV
1538 pkglib_LTLIBRARIES += tail_csv.la
1539 tail_csv_la_SOURCES = \
1540         src/tail_csv.c \
1541         src/utils_tail.c \
1542         src/utils_tail.h
1543 tail_csv_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1544 endif
1545
1546 if BUILD_PLUGIN_TAPE
1547 pkglib_LTLIBRARIES += tape.la
1548 tape_la_SOURCES = src/tape.c
1549 tape_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1550 tape_la_LIBADD = -lkstat -ldevinfo
1551 endif
1552
1553 if BUILD_PLUGIN_TARGET_NOTIFICATION
1554 pkglib_LTLIBRARIES += target_notification.la
1555 target_notification_la_SOURCES = src/target_notification.c
1556 target_notification_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1557 endif
1558
1559 if BUILD_PLUGIN_TARGET_REPLACE
1560 pkglib_LTLIBRARIES += target_replace.la
1561 target_replace_la_SOURCES = src/target_replace.c
1562 target_replace_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1563 endif
1564
1565 if BUILD_PLUGIN_TARGET_SCALE
1566 pkglib_LTLIBRARIES += target_scale.la
1567 target_scale_la_SOURCES = src/target_scale.c
1568 target_scale_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1569 endif
1570
1571 if BUILD_PLUGIN_TARGET_SET
1572 pkglib_LTLIBRARIES += target_set.la
1573 target_set_la_SOURCES = src/target_set.c
1574 target_set_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1575 endif
1576
1577 if BUILD_PLUGIN_TARGET_V5UPGRADE
1578 pkglib_LTLIBRARIES += target_v5upgrade.la
1579 target_v5upgrade_la_SOURCES = src/target_v5upgrade.c
1580 target_v5upgrade_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1581 endif
1582
1583 if BUILD_PLUGIN_TCPCONNS
1584 pkglib_LTLIBRARIES += tcpconns.la
1585 tcpconns_la_SOURCES = src/tcpconns.c
1586 tcpconns_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1587 tcpconns_la_LIBADD =
1588 if BUILD_WITH_LIBKVM_NLIST
1589 tcpconns_la_LIBADD += -lkvm
1590 endif
1591 endif
1592
1593 if BUILD_PLUGIN_TEAMSPEAK2
1594 pkglib_LTLIBRARIES += teamspeak2.la
1595 teamspeak2_la_SOURCES = src/teamspeak2.c
1596 teamspeak2_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1597 endif
1598
1599 if BUILD_PLUGIN_TED
1600 pkglib_LTLIBRARIES += ted.la
1601 ted_la_SOURCES = src/ted.c
1602 ted_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1603 endif
1604
1605 if BUILD_PLUGIN_THERMAL
1606 pkglib_LTLIBRARIES += thermal.la
1607 thermal_la_SOURCES = src/thermal.c
1608 thermal_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1609 endif
1610
1611 if BUILD_PLUGIN_THRESHOLD
1612 pkglib_LTLIBRARIES += threshold.la
1613 threshold_la_SOURCES = src/threshold.c
1614 threshold_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1615 endif
1616
1617 if BUILD_PLUGIN_TOKYOTYRANT
1618 pkglib_LTLIBRARIES += tokyotyrant.la
1619 tokyotyrant_la_SOURCES = src/tokyotyrant.c
1620 tokyotyrant_la_CPPFLAGS  = $(AM_CPPFLAGS) $(BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS)
1621 tokyotyrant_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS)
1622 tokyotyrant_la_LIBADD  = $(BUILD_WITH_LIBTOKYOTYRANT_LIBS)
1623 if BUILD_WITH_LIBSOCKET
1624 tokyotyrant_la_LIBADD += -lsocket
1625 endif
1626 endif
1627
1628 if BUILD_PLUGIN_TURBOSTAT
1629 pkglib_LTLIBRARIES += turbostat.la
1630 turbostat_la_SOURCES = src/turbostat.c
1631 turbostat_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1632 endif
1633
1634 if BUILD_PLUGIN_UNIXSOCK
1635 pkglib_LTLIBRARIES += unixsock.la
1636 unixsock_la_SOURCES = src/unixsock.c
1637 unixsock_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1638 unixsock_la_LIBADD = libcmds.la
1639 endif
1640
1641 if BUILD_PLUGIN_UPTIME
1642 pkglib_LTLIBRARIES += uptime.la
1643 uptime_la_SOURCES = src/uptime.c
1644 uptime_la_CFLAGS = $(AM_CFLAGS)
1645 uptime_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1646 uptime_la_LIBADD =
1647 if BUILD_WITH_LIBKSTAT
1648 uptime_la_LIBADD += -lkstat
1649 endif
1650 if BUILD_WITH_PERFSTAT
1651 uptime_la_LIBADD += -lperfstat
1652 endif
1653 endif
1654
1655 if BUILD_PLUGIN_USERS
1656 pkglib_LTLIBRARIES += users.la
1657 users_la_SOURCES = src/users.c
1658 users_la_CFLAGS = $(AM_CFLAGS)
1659 users_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1660 users_la_LIBADD =
1661 if BUILD_WITH_LIBSTATGRAB
1662 users_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1663 users_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1664 endif
1665 endif
1666
1667 if BUILD_PLUGIN_UUID
1668 pkglib_LTLIBRARIES += uuid.la
1669 uuid_la_SOURCES = src/uuid.c
1670 uuid_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1671 endif
1672
1673 if BUILD_PLUGIN_VARNISH
1674 pkglib_LTLIBRARIES += varnish.la
1675 varnish_la_SOURCES = src/varnish.c
1676 varnish_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBVARNISH_CFLAGS)
1677 varnish_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1678 varnish_la_LIBADD = $(BUILD_WITH_LIBVARNISH_LIBS)
1679 endif
1680
1681 if BUILD_PLUGIN_VIRT
1682 pkglib_LTLIBRARIES += virt.la
1683 virt_la_SOURCES = src/virt.c
1684 virt_la_CFLAGS = $(AM_CFLAGS) \
1685         $(BUILD_WITH_LIBVIRT_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
1686 virt_la_LIBADD = $(BUILD_WITH_LIBVIRT_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
1687 virt_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1688
1689 # TODO: enable once we support only modern libvirts which depends on libnl-3
1690 # the libvirt on wheezy is linked in libnl v1, and there is a small leak here,
1691 # triggered by the library initialization. There are no means to avoid it,
1692 # and libvirt switched to libnl3 anyway
1693 #test_plugin_virt_SOURCES = src/virt_test.c
1694 #test_plugin_virt_CPPFLAGS = $(AM_CPPFLAGS) \
1695 #       $(BUILD_WITH_LIBVIRT_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
1696 #test_plugin_virt_LDFLAGS = $(PLUGIN_LDFLAGS)
1697 #test_plugin_virt_LDADD = libplugin_mock.la \
1698 #       $(BUILD_WITH_LIBVIRT_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
1699 #check_PROGRAMS += test_plugin_virt
1700 #TESTS += test_plugin_virt
1701 endif
1702
1703 if BUILD_PLUGIN_VMEM
1704 pkglib_LTLIBRARIES += vmem.la
1705 vmem_la_SOURCES = src/vmem.c
1706 vmem_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1707 endif
1708
1709 if BUILD_PLUGIN_VSERVER
1710 pkglib_LTLIBRARIES += vserver.la
1711 vserver_la_SOURCES = src/vserver.c
1712 vserver_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1713 endif
1714
1715 if BUILD_PLUGIN_WIRELESS
1716 pkglib_LTLIBRARIES += wireless.la
1717 wireless_la_SOURCES = src/wireless.c
1718 wireless_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1719 endif
1720
1721 if BUILD_PLUGIN_WRITE_GRAPHITE
1722 pkglib_LTLIBRARIES += write_graphite.la
1723 write_graphite_la_SOURCES = src/write_graphite.c
1724 write_graphite_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1725 write_graphite_la_LIBADD = libformat_graphite.la
1726 endif
1727
1728 if BUILD_PLUGIN_WRITE_HTTP
1729 pkglib_LTLIBRARIES += write_http.la
1730 write_http_la_SOURCES = \
1731         src/write_http.c \
1732         src/utils_format_kairosdb.c \
1733         src/utils_format_kairosdb.h
1734 write_http_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS)
1735 write_http_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1736 write_http_la_LIBADD = libformat_json.la $(BUILD_WITH_LIBCURL_LIBS)
1737 endif
1738
1739 if BUILD_PLUGIN_WRITE_KAFKA
1740 pkglib_LTLIBRARIES += write_kafka.la
1741 write_kafka_la_SOURCES = src/write_kafka.c
1742 write_kafka_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBRDKAFKA_CPPFLAGS)
1743 write_kafka_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRDKAFKA_LDFLAGS)
1744 write_kafka_la_LIBADD = \
1745         libcmds.la \
1746         libformat_graphite.la \
1747         libformat_json.la \
1748         $(BUILD_WITH_LIBRDKAFKA_LIBS)
1749 endif
1750
1751 if BUILD_PLUGIN_WRITE_LOG
1752 pkglib_LTLIBRARIES += write_log.la
1753 write_log_la_SOURCES = src/write_log.c
1754 write_log_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1755 write_log_la_LIBADD = libformat_graphite.la libformat_json.la
1756 endif
1757
1758 if BUILD_PLUGIN_WRITE_MONGODB
1759 pkglib_LTLIBRARIES += write_mongodb.la
1760 write_mongodb_la_SOURCES = src/write_mongodb.c
1761 write_mongodb_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMONGOC_CPPFLAGS)
1762 write_mongodb_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMONGOC_LDFLAGS)
1763 write_mongodb_la_LIBADD = -lmongoc
1764 endif
1765
1766 if BUILD_PLUGIN_WRITE_PROMETHEUS
1767 pkglib_LTLIBRARIES += write_prometheus.la
1768 write_prometheus_la_SOURCES = src/write_prometheus.c
1769 nodist_write_prometheus_la_SOURCES = \
1770         prometheus.pb-c.c \
1771         prometheus.pb-c.h
1772 write_prometheus_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPROTOBUF_C_CPPFLAGS) $(BUILD_WITH_LIBMICROHTTPD_CPPFLAGS)
1773 write_prometheus_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBPROTOBUF_C_LDFLAGS) $(BUILD_WITH_LIBMICROHTTPD_LDFLAGS)
1774 write_prometheus_la_LIBADD = $(BUILD_WITH_LIBPROTOBUF_C_LIBS) $(BUILD_WITH_LIBMICROHTTPD_LIBS)
1775 endif
1776
1777 if BUILD_PLUGIN_WRITE_REDIS
1778 pkglib_LTLIBRARIES += write_redis.la
1779 write_redis_la_SOURCES = src/write_redis.c
1780 write_redis_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBHIREDIS_CPPFLAGS)
1781 write_redis_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBHIREDIS_LDFLAGS)
1782 write_redis_la_LIBADD = -lhiredis
1783 endif
1784
1785 if BUILD_PLUGIN_WRITE_RIEMANN
1786 pkglib_LTLIBRARIES += write_riemann.la
1787 write_riemann_la_SOURCES = \
1788         src/write_riemann.c \
1789         src/write_riemann_threshold.c \
1790         src/write_riemann_threshold.h
1791 write_riemann_la_CFLAGS = $(AM_CFLAGS) $(LIBRIEMANN_CLIENT_CFLAGS)
1792 write_riemann_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBRIEMANN_CLIENT_LIBS)
1793 endif
1794
1795 if BUILD_PLUGIN_WRITE_SENSU
1796 pkglib_LTLIBRARIES += write_sensu.la
1797 write_sensu_la_SOURCES = src/write_sensu.c
1798 write_sensu_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1799 endif
1800
1801 if BUILD_PLUGIN_WRITE_TSDB
1802 pkglib_LTLIBRARIES += write_tsdb.la
1803 write_tsdb_la_SOURCES = src/write_tsdb.c
1804 write_tsdb_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1805 endif
1806
1807 if BUILD_PLUGIN_XENCPU
1808 pkglib_LTLIBRARIES += xencpu.la
1809 xencpu_la_SOURCES = src/xencpu.c
1810 xencpu_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBXENCTL_CPPFLAGS)
1811 xencpu_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBXENCTL_LDFLAGS)
1812 xencpu_la_LIBADD = -lxenctrl
1813 endif
1814
1815 if BUILD_PLUGIN_XMMS
1816 pkglib_LTLIBRARIES += xmms.la
1817 xmms_la_SOURCES = src/xmms.c
1818 xmms_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBXMMS_CFLAGS)
1819 xmms_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1820 xmms_la_LIBADD = $(BUILD_WITH_LIBXMMS_LIBS)
1821 endif
1822
1823 if BUILD_PLUGIN_ZFS_ARC
1824 pkglib_LTLIBRARIES += zfs_arc.la
1825 zfs_arc_la_SOURCES = src/zfs_arc.c
1826 zfs_arc_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1827 if BUILD_FREEBSD
1828 zfs_arc_la_LIBADD = -lm
1829 endif
1830 if BUILD_SOLARIS
1831 zfs_arc_la_LIBADD = -lkstat
1832 endif
1833 endif
1834
1835 if BUILD_PLUGIN_ZOOKEEPER
1836 pkglib_LTLIBRARIES += zookeeper.la
1837 zookeeper_la_SOURCES = src/zookeeper.c
1838 zookeeper_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1839 endif
1840
1841 if BUILD_PLUGIN_ZONE
1842 pkglib_LTLIBRARIES += zone.la
1843 zone_la_SOURCES = src/zone.c
1844 zone_la_LDFLAGS = $(PLUGIN_LDFLAGS)
1845 endif
1846
1847 AM_V_POD2MAN_C = $(am__v_POD2MAN_C_@AM_V@)
1848 am__v_POD2MAN_C_ = $(am__v_POD2MAN_C_@AM_DEFAULT_V@)
1849 am__v_POD2MAN_C_0 = @echo "  POD2MAN " $@;
1850 am__v_POD2MAN_C_1 =
1851
1852 .pod.1:
1853         $(AM_V_POD2MAN_C)pod2man --release=$(VERSION) --center=$(PACKAGE) $< \
1854                 >.pod2man.tmp.$$$$ 2>/dev/null && mv -f .pod2man.tmp.$$$$ $@ || true
1855         @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
1856         then \
1857                 echo "$@ has some POD errors!"; false; \
1858         fi
1859
1860 .pod.5:
1861         $(AM_V_POD2MAN_C)pod2man --section=5 --release=$(VERSION) --center=$(PACKAGE) $< \
1862                 >.pod2man.tmp.$$$$ 2>/dev/null && mv -f .pod2man.tmp.$$$$ $@ || true
1863         @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
1864         then \
1865                 echo "$@ has some POD errors!"; false; \
1866         fi
1867
1868 V_PROTOC = $(v_protoc_@AM_V@)
1869 v_protoc_ = $(v_protoc_@AM_DEFAULT_V@)
1870 v_protoc_0 = @echo "  PROTOC  " $@;
1871
1872 AM_V_PROTOC_C = $(am__v_PROTOC_C_@AM_V@)
1873 am__v_PROTOC_C_ = $(am__v_PROTOC_C_@AM_DEFAULT_V@)
1874 am__v_PROTOC_C_0 = @echo "  PROTOC-C" $@;
1875 am__v_PROTOC_C_1 =
1876
1877 # Protocol buffer for the "pinba" plugin.
1878 if BUILD_PLUGIN_PINBA
1879 BUILT_SOURCES += src/pinba.pb-c.c src/pinba.pb-c.h
1880
1881 src/pinba.pb-c.c src/pinba.pb-c.h: $(srcdir)/src/pinba.proto
1882         $(AM_V_PROTOC_C)$(PROTOC_C) -I$(srcdir) --c_out . $(srcdir)/src/pinba.proto
1883 endif
1884
1885 # Protocol buffer for the "write_prometheus" plugin.
1886 if BUILD_PLUGIN_WRITE_PROMETHEUS
1887 BUILT_SOURCES += prometheus.pb-c.c prometheus.pb-c.h
1888
1889 prometheus.pb-c.c prometheus.pb-c.h: $(srcdir)/proto/prometheus.proto
1890         $(AM_V_PROTOC_C)$(PROTOC_C) -I$(srcdir)/proto --c_out=$(builddir) $(srcdir)/proto/prometheus.proto
1891 endif
1892
1893 if HAVE_PROTOC3
1894 if HAVE_GRPC_CPP
1895 BUILT_SOURCES += collectd.grpc.pb.cc collectd.pb.cc types.pb.cc
1896
1897 collectd.grpc.pb.cc: $(srcdir)/proto/collectd.proto $(srcdir)/proto/types.proto
1898         $(V_PROTOC)$(PROTOC) -I$(srcdir)/proto \
1899                 --grpc_out=$(builddir) --plugin=protoc-gen-grpc=$(GRPC_CPP_PLUGIN) $<
1900
1901 collectd.pb.cc: $(srcdir)/proto/collectd.proto $(srcdir)/proto/types.proto
1902         $(V_PROTOC)$(PROTOC) -I$(srcdir)/proto --cpp_out=$(builddir) $<
1903
1904 types.pb.cc: $(srcdir)/proto/types.proto
1905         $(V_PROTOC)$(PROTOC) -I$(srcdir)/proto --cpp_out=$(builddir) $<
1906 endif
1907 endif
1908
1909 install-exec-hook:
1910         $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run
1911         $(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/$(PACKAGE_NAME)
1912         $(mkinstalldirs) $(DESTDIR)$(localstatedir)/log
1913         $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
1914         if test -e $(DESTDIR)$(sysconfdir)/collectd.conf; \
1915         then \
1916                 $(INSTALL) -m 0640 $(srcdir)/src/collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf.pkg-orig; \
1917         else \
1918                 $(INSTALL) -m 0640 $(srcdir)/src/collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf; \
1919         fi; \
1920         $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
1921         $(INSTALL) -m 0644 $(srcdir)/src/types.db $(DESTDIR)$(pkgdatadir)/types.db;
1922         $(INSTALL) -m 0644 $(srcdir)/src/postgresql_default.conf \
1923                 $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;
1924
1925 uninstall-hook:
1926         rm -f $(DESTDIR)$(pkgdatadir)/types.db;
1927         rm -f $(DESTDIR)$(sysconfdir)/collectd.conf
1928         rm -f $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;
1929
1930 all-local: @PERL_BINDINGS@
1931
1932 install-exec-local:
1933         [ ! -f buildperl/Makefile ] || ( cd buildperl && $(MAKE) install )
1934
1935 # Perl 'make uninstall' does not work as well as wanted.
1936 # So we do the work here.
1937 uninstall-local:
1938         @PERL@ -I$(DESTDIR)$(prefix) $(srcdir)/bindings/perl/uninstall_mod.pl Collectd
1939         find $(DESTDIR)$(prefix) -name "perllocal.pod" -exec rm {} \;
1940
1941 clean-local:
1942         rm -rf buildperl
1943
1944 perl: buildperl/Makefile
1945         cd buildperl && $(MAKE)
1946
1947 buildperl/Makefile: .perl-directory-stamp buildperl/Makefile.PL \
1948         $(top_builddir)/config.status
1949         @# beautify the output a bit
1950         @echo 'cd buildperl && @PERL@ Makefile.PL @PERL_BINDINGS_OPTIONS@'
1951         @cd buildperl && ( if ! @PERL@ Makefile.PL @PERL_BINDINGS_OPTIONS@; then \
1952                         echo ""; \
1953                         echo 'Check whether you have set $$PERL_MM_OPT in your environment and try using ./configure --with-perl-bindings=""'; \
1954                         echo ""; \
1955                 fi )
1956
1957 buildperl/Makefile.PL: .perl-directory-stamp $(top_builddir)/config.status
1958
1959 .perl-directory-stamp:
1960         if test ! -d buildperl; then \
1961           mkdir -p buildperl/Collectd/Plugins; \
1962           cp $(srcdir)/bindings/perl/lib/Collectd.pm buildperl/; \
1963           cp $(srcdir)/bindings/perl/Makefile.PL buildperl/; \
1964           cp $(srcdir)/bindings/perl/lib/Collectd/Unixsock.pm buildperl/Collectd/; \
1965           cp $(srcdir)/bindings/perl/lib/Collectd/Plugins/OpenVZ.pm buildperl/Collectd/Plugins/; \
1966         fi
1967         touch $@
1968
1969 .PHONY: perl
1970
1971
1972 if BUILD_WITH_JAVA
1973 dist_noinst_JAVA = \
1974         bindings/java/org/collectd/api/Collectd.java \
1975         bindings/java/org/collectd/api/CollectdConfigInterface.java \
1976         bindings/java/org/collectd/api/CollectdFlushInterface.java \
1977         bindings/java/org/collectd/api/CollectdInitInterface.java \
1978         bindings/java/org/collectd/api/CollectdLogInterface.java \
1979         bindings/java/org/collectd/api/CollectdMatchFactoryInterface.java \
1980         bindings/java/org/collectd/api/CollectdMatchInterface.java \
1981         bindings/java/org/collectd/api/CollectdNotificationInterface.java \
1982         bindings/java/org/collectd/api/CollectdReadInterface.java \
1983         bindings/java/org/collectd/api/CollectdShutdownInterface.java \
1984         bindings/java/org/collectd/api/CollectdTargetFactoryInterface.java \
1985         bindings/java/org/collectd/api/CollectdTargetInterface.java \
1986         bindings/java/org/collectd/api/CollectdWriteInterface.java \
1987         bindings/java/org/collectd/api/DataSet.java \
1988         bindings/java/org/collectd/api/DataSource.java \
1989         bindings/java/org/collectd/api/Notification.java \
1990         bindings/java/org/collectd/api/OConfigItem.java \
1991         bindings/java/org/collectd/api/OConfigValue.java \
1992         bindings/java/org/collectd/api/PluginData.java \
1993         bindings/java/org/collectd/api/ValueList.java \
1994         bindings/java/org/collectd/java/GenericJMX.java \
1995         bindings/java/org/collectd/java/GenericJMXConfConnection.java \
1996         bindings/java/org/collectd/java/GenericJMXConfMBean.java \
1997         bindings/java/org/collectd/java/GenericJMXConfValue.java \
1998         bindings/java/org/collectd/java/JMXMemory.java
1999
2000 collectd-api.jar: classnoinst.stamp
2001         $(JAR) cf $(JARFLAGS) $@ org/collectd/api/*.class
2002
2003 generic-jmx.jar: classnoinst.stamp
2004         $(JAR) cf $(JARFLAGS) $@ org/collectd/java/*.class
2005
2006 jar_DATA = collectd-api.jar generic-jmx.jar
2007 endif