d3e27f85884d505ed00e1c443d4b29e062ef3ab0
[collectd.git] / src / Makefile.am
1 SUBDIRS = libcollectdclient
2 if BUILD_WITH_OWN_LIBIPTC
3 SUBDIRS += libiptc
4 endif
5 if BUILD_WITH_OWN_LIBOCONFIG
6 SUBDIRS += liboconfig
7 endif
8
9 if COMPILER_IS_GCC
10 AM_CFLAGS = -Wall -Werror
11 endif
12
13 AM_CPPFLAGS = -DPREFIX='"${prefix}"'
14 AM_CPPFLAGS += -DCONFIGFILE='"${sysconfdir}/${PACKAGE_NAME}.conf"'
15 AM_CPPFLAGS += -DLOCALSTATEDIR='"${localstatedir}"'
16 AM_CPPFLAGS += -DPKGLOCALSTATEDIR='"${localstatedir}/lib/${PACKAGE_NAME}"'
17 if BUILD_FEATURE_DAEMON
18 AM_CPPFLAGS += -DPIDFILE='"${localstatedir}/run/${PACKAGE_NAME}.pid"'
19 endif
20 AM_CPPFLAGS += -DPLUGINDIR='"${pkglibdir}"'
21 AM_CPPFLAGS += -DPKGDATADIR='"${pkgdatadir}"'
22
23 sbin_PROGRAMS = collectd collectdmon
24 bin_PROGRAMS = collectd-nagios
25
26 collectd_SOURCES = collectd.c collectd.h \
27                    common.c common.h \
28                    configfile.c configfile.h \
29                    filter_chain.c filter_chain.h \
30                    meta_data.c meta_data.h \
31                    plugin.c plugin.h \
32                    utils_avltree.c utils_avltree.h \
33                    utils_cache.c utils_cache.h \
34                    utils_complain.c utils_complain.h \
35                    utils_heap.c utils_heap.h \
36                    utils_ignorelist.c utils_ignorelist.h \
37                    utils_llist.c utils_llist.h \
38                    utils_parse_option.c utils_parse_option.h \
39                    utils_tail_match.c utils_tail_match.h \
40                    utils_match.c utils_match.h \
41                    utils_subst.c utils_subst.h \
42                    utils_tail.c utils_tail.h \
43                    utils_threshold.c utils_threshold.h \
44                    types_list.c types_list.h
45
46 collectd_CPPFLAGS =  $(AM_CPPFLAGS) $(LTDLINCL)
47 collectd_CFLAGS = $(AM_CFLAGS)
48 collectd_LDFLAGS = -export-dynamic
49 collectd_LDADD =
50 collectd_DEPENDENCIES =
51
52 # Link to these libraries..
53 if BUILD_WITH_LIBRT
54 collectd_LDADD += -lrt
55 endif
56 if BUILD_WITH_LIBSOCKET
57 collectd_LDADD += -lsocket
58 endif
59 if BUILD_WITH_LIBRESOLV
60 collectd_LDADD += -lresolv
61 endif
62 if BUILD_WITH_LIBPTHREAD
63 collectd_LDADD += -lpthread
64 endif
65 if BUILD_WITH_LIBKSTAT
66 collectd_LDADD += -lkstat
67 endif
68 if BUILD_WITH_LIBDEVINFO
69 collectd_LDADD += -ldevinfo
70 endif
71
72 # The daemon needs to call sg_init, so we need to link it against libstatgrab,
73 # too. -octo
74 if BUILD_WITH_LIBSTATGRAB
75 collectd_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
76 collectd_LDADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
77 endif
78
79 if BUILD_WITH_OWN_LIBOCONFIG
80 collectd_LDADD += $(LIBLTDL) liboconfig/liboconfig.la
81 collectd_DEPENDENCIES += $(LIBLTDL) liboconfig/liboconfig.la
82 else
83 collectd_LDADD += -loconfig
84 endif
85
86 collectdmon_SOURCES = collectdmon.c
87 collectdmon_CPPFLAGS = $(AM_CPPFLAGS)
88
89 collectd_nagios_SOURCES = collectd-nagios.c
90 collectd_nagios_LDADD =
91 if BUILD_WITH_LIBSOCKET
92 collectd_nagios_LDADD += -lsocket
93 endif
94 collectd_nagios_LDADD += libcollectdclient/libcollectdclient.la
95 collectd_nagios_DEPENDENCIES = libcollectdclient/libcollectdclient.la
96
97 pkglib_LTLIBRARIES = 
98
99 if BUILD_PLUGIN_APACHE
100 pkglib_LTLIBRARIES += apache.la
101 apache_la_SOURCES = apache.c
102 apache_la_LDFLAGS = -module -avoid-version
103 apache_la_CFLAGS = $(AM_CFLAGS)
104 apache_la_LIBADD =
105 collectd_LDADD += "-dlopen" apache.la
106 if BUILD_WITH_LIBCURL
107 apache_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
108 apache_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
109 endif
110 collectd_DEPENDENCIES += apache.la
111 endif
112
113 if BUILD_PLUGIN_APCUPS
114 pkglib_LTLIBRARIES += apcups.la
115 apcups_la_SOURCES = apcups.c
116 apcups_la_LDFLAGS = -module -avoid-version
117 apcups_la_LIBADD =
118 if BUILD_WITH_LIBSOCKET
119 apcups_la_LIBADD += -lsocket
120 endif
121 collectd_LDADD += "-dlopen" apcups.la
122 collectd_DEPENDENCIES += apcups.la
123 endif
124
125 if BUILD_PLUGIN_APPLE_SENSORS
126 pkglib_LTLIBRARIES += apple_sensors.la
127 apple_sensors_la_SOURCES = apple_sensors.c
128 apple_sensors_la_LDFLAGS = -module -avoid-version
129 apple_sensors_la_LIBADD = -lIOKit
130 collectd_LDADD += "-dlopen" apple_sensors.la
131 collectd_DEPENDENCIES += apple_sensors.la
132 endif
133
134 if BUILD_PLUGIN_ASCENT
135 pkglib_LTLIBRARIES += ascent.la
136 ascent_la_SOURCES = ascent.c
137 ascent_la_LDFLAGS = -module -avoid-version
138 ascent_la_CFLAGS = $(AM_CFLAGS) \
139                 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
140 ascent_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
141 collectd_LDADD += "-dlopen" ascent.la
142 collectd_DEPENDENCIES += ascent.la
143 endif
144
145 if BUILD_PLUGIN_BATTERY
146 pkglib_LTLIBRARIES += battery.la
147 battery_la_SOURCES = battery.c
148 battery_la_LDFLAGS = -module -avoid-version
149 battery_la_LIBADD =
150 if BUILD_WITH_LIBIOKIT
151 battery_la_LIBADD += -lIOKit
152 endif
153 collectd_LDADD += "-dlopen" battery.la
154 collectd_DEPENDENCIES += battery.la
155 endif
156
157 if BUILD_PLUGIN_BIND
158 pkglib_LTLIBRARIES += bind.la
159 bind_la_SOURCES = bind.c
160 bind_la_LDFLAGS = -module -avoid-version
161 bind_la_CFLAGS = $(AM_CFLAGS) \
162                 $(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
163 bind_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
164 collectd_LDADD += "-dlopen" bind.la
165 collectd_DEPENDENCIES += bind.la
166 endif
167
168 if BUILD_PLUGIN_CONNTRACK
169 pkglib_LTLIBRARIES += conntrack.la
170 conntrack_la_SOURCES = conntrack.c
171 conntrack_la_LDFLAGS = -module -avoid-version
172 collectd_LDADD += "-dlopen" conntrack.la
173 collectd_DEPENDENCIES += conntrack.la
174 endif
175
176 if BUILD_PLUGIN_COUCHDB
177 pkglib_LTLIBRARIES += couchdb.la
178 couchdb_la_SOURCES = couchdb.c
179 couchdb_la_CFLAGS = $(AM_CFLAGS)
180 couchdb_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBYAJL_LDFLAGS)
181 couchdb_la_CPPFLAGS = $(BUILD_WITH_LIBYAJL_CPPFLAGS)
182 couchdb_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
183 if BUILD_WITH_LIBCURL
184 couchdb_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
185 couchdb_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
186 endif
187 collectd_LDADD += "-dlopen" couchdb.la
188 collectd_DEPENDENCIES += couchdb.la
189 endif
190
191 if BUILD_PLUGIN_CPU
192 pkglib_LTLIBRARIES += cpu.la
193 cpu_la_SOURCES = cpu.c
194 cpu_la_CFLAGS = $(AM_CFLAGS)
195 cpu_la_LDFLAGS = -module -avoid-version
196 cpu_la_LIBADD = 
197 if BUILD_WITH_LIBKSTAT
198 cpu_la_LIBADD += -lkstat
199 endif
200 if BUILD_WITH_LIBDEVINFO
201 cpu_la_LIBADD += -ldevinfo
202 endif
203 if BUILD_WITH_LIBSTATGRAB
204 cpu_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
205 cpu_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
206 endif
207 collectd_LDADD += "-dlopen" cpu.la
208 collectd_DEPENDENCIES += cpu.la
209 endif
210
211 if BUILD_PLUGIN_CPUFREQ
212 pkglib_LTLIBRARIES += cpufreq.la
213 cpufreq_la_SOURCES = cpufreq.c
214 cpufreq_la_LDFLAGS = -module -avoid-version
215 collectd_LDADD += "-dlopen" cpufreq.la
216 collectd_DEPENDENCIES += cpufreq.la
217 endif
218
219 if BUILD_PLUGIN_CSV
220 pkglib_LTLIBRARIES += csv.la
221 csv_la_SOURCES = csv.c
222 csv_la_LDFLAGS = -module -avoid-version
223 collectd_LDADD += "-dlopen" csv.la
224 collectd_DEPENDENCIES += csv.la
225 endif
226
227 if BUILD_PLUGIN_CURL
228 pkglib_LTLIBRARIES += curl.la
229 curl_la_SOURCES = curl.c
230 curl_la_LDFLAGS = -module -avoid-version
231 curl_la_CFLAGS = $(AM_CFLAGS)
232 curl_la_LIBADD =
233 collectd_LDADD += "-dlopen" curl.la
234 if BUILD_WITH_LIBCURL
235 curl_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
236 curl_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
237 endif
238 collectd_DEPENDENCIES += curl.la
239 endif
240
241 if BUILD_PLUGIN_DBI
242 pkglib_LTLIBRARIES += dbi.la
243 dbi_la_SOURCES = dbi.c \
244                  utils_db_query.c utils_db_query.h
245 dbi_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBDBI_CPPFLAGS)
246 dbi_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBDBI_LDFLAGS)
247 dbi_la_LIBADD = $(BUILD_WITH_LIBDBI_LIBS)
248 collectd_LDADD += "-dlopen" dbi.la
249 collectd_DEPENDENCIES += dbi.la
250 endif
251
252 if BUILD_PLUGIN_DF
253 pkglib_LTLIBRARIES += df.la
254 df_la_SOURCES = df.c utils_mount.c utils_mount.h
255 df_la_LDFLAGS = -module -avoid-version
256 collectd_LDADD += "-dlopen" df.la
257 collectd_DEPENDENCIES += df.la
258 endif
259
260 if BUILD_PLUGIN_DISK
261 pkglib_LTLIBRARIES += disk.la
262 disk_la_SOURCES = disk.c
263 disk_la_CFLAGS = $(AM_CFLAGS)
264 disk_la_LDFLAGS = -module -avoid-version
265 disk_la_LIBADD = 
266 if BUILD_WITH_LIBKSTAT
267 disk_la_LIBADD += -lkstat
268 endif
269 if BUILD_WITH_LIBDEVINFO
270 disk_la_LIBADD += -ldevinfo
271 endif
272 if BUILD_WITH_LIBIOKIT
273 disk_la_LIBADD += -lIOKit
274 endif
275 if BUILD_WITH_LIBSTATGRAB
276 disk_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)  
277 disk_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
278 endif
279 collectd_LDADD += "-dlopen" disk.la
280 collectd_DEPENDENCIES += disk.la
281 endif
282
283 if BUILD_PLUGIN_DNS
284 pkglib_LTLIBRARIES += dns.la
285 dns_la_SOURCES = dns.c utils_dns.c utils_dns.h
286 dns_la_LDFLAGS = -module -avoid-version
287 dns_la_LIBADD = -lpcap -lpthread
288 collectd_LDADD += "-dlopen" dns.la
289 collectd_DEPENDENCIES += dns.la
290 endif
291
292 if BUILD_PLUGIN_EMAIL
293 pkglib_LTLIBRARIES += email.la
294 email_la_SOURCES = email.c
295 email_la_LDFLAGS = -module -avoid-version
296 email_la_LIBADD = -lpthread
297 collectd_LDADD += "-dlopen" email.la
298 collectd_DEPENDENCIES += email.la
299 endif
300
301 if BUILD_PLUGIN_ENTROPY
302 pkglib_LTLIBRARIES += entropy.la
303 entropy_la_SOURCES = entropy.c
304 entropy_la_LDFLAGS = -module -avoid-version
305 collectd_LDADD += "-dlopen" entropy.la
306 collectd_DEPENDENCIES += entropy.la
307 endif
308
309 if BUILD_PLUGIN_EXEC
310 pkglib_LTLIBRARIES += exec.la
311 exec_la_SOURCES = exec.c \
312                   utils_cmd_putnotif.c utils_cmd_putnotif.h \
313                   utils_cmd_putval.c utils_cmd_putval.h
314 exec_la_LDFLAGS = -module -avoid-version
315 exec_la_LIBADD = -lpthread
316 collectd_LDADD += "-dlopen" exec.la
317 collectd_DEPENDENCIES += exec.la
318 endif
319
320 if BUILD_PLUGIN_FILECOUNT
321 pkglib_LTLIBRARIES += filecount.la
322 filecount_la_SOURCES = filecount.c
323 filecount_la_LDFLAGS = -module -avoid-version
324 collectd_LDADD += "-dlopen" filecount.la
325 collectd_DEPENDENCIES += filecount.la
326 endif
327
328 if BUILD_PLUGIN_GMOND
329 pkglib_LTLIBRARIES += gmond.la
330 gmond_la_SOURCES = gmond.c
331 gmond_la_CPPFLAGS = $(AM_CPPFLAGS) $(GANGLIA_CPPFLAGS)
332 gmond_la_LDFLAGS = -module -avoid-version $(GANGLIA_LDFLAGS)
333 gmond_la_LIBADD = $(GANGLIA_LIBS)
334 collectd_LDADD += "-dlopen" gmond.la
335 collectd_DEPENDENCIES += gmond.la
336 endif
337
338 if BUILD_PLUGIN_HDDTEMP
339 pkglib_LTLIBRARIES += hddtemp.la
340 hddtemp_la_SOURCES = hddtemp.c
341 hddtemp_la_LDFLAGS = -module -avoid-version
342 hddtemp_la_LIBADD =
343 if BUILD_WITH_LIBSOCKET
344 hddtemp_la_LIBADD += -lsocket
345 endif
346 collectd_LDADD += "-dlopen" hddtemp.la
347 collectd_DEPENDENCIES += hddtemp.la
348 endif
349
350 if BUILD_PLUGIN_HTTP
351 pkglib_LTLIBRARIES += http.la
352 http_la_SOURCES = http.c
353 http_la_LDFLAGS = -module -avoid-version
354 http_la_CFLAGS = $(AM_CFLAGS)
355 http_la_LIBADD =
356 collectd_LDADD += "-dlopen" http.la
357 if BUILD_WITH_LIBCURL
358 http_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
359 http_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
360 endif
361 collectd_DEPENDENCIES += http.la
362 endif
363
364 if BUILD_PLUGIN_INTERFACE
365 pkglib_LTLIBRARIES += interface.la
366 interface_la_SOURCES = interface.c
367 interface_la_CFLAGS = $(AM_CFLAGS)
368 interface_la_LDFLAGS = -module -avoid-version
369 interface_la_LIBADD =
370 collectd_LDADD += "-dlopen" interface.la
371 collectd_DEPENDENCIES += interface.la
372 if BUILD_WITH_LIBSTATGRAB
373 interface_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
374 interface_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
375 else
376 if BUILD_WITH_LIBKSTAT
377 interface_la_LIBADD += -lkstat
378 endif
379 if BUILD_WITH_LIBDEVINFO
380 interface_la_LIBADD += -ldevinfo
381 endif # BUILD_WITH_LIBDEVINFO
382 endif # !BUILD_WITH_LIBSTATGRAB
383 endif # BUILD_PLUGIN_INTERFACE
384
385 if BUILD_PLUGIN_IPTABLES
386 pkglib_LTLIBRARIES += iptables.la
387 iptables_la_SOURCES = iptables.c
388 iptables_la_LDFLAGS = -module -avoid-version
389 if BUILD_WITH_OWN_LIBIPTC
390 iptables_la_LIBADD  = libiptc/libiptc.la
391 iptables_la_DEPENDENCIES = libiptc/libiptc.la
392 else
393 iptables_la_LIBADD = -liptc
394 endif
395 collectd_LDADD += "-dlopen" iptables.la
396 collectd_DEPENDENCIES += iptables.la
397 endif
398
399 if BUILD_PLUGIN_IPMI
400 pkglib_LTLIBRARIES += ipmi.la
401 ipmi_la_SOURCES = ipmi.c
402 ipmi_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_OPENIPMI_CFLAGS)
403 ipmi_la_LDFLAGS = -module -avoid-version
404 ipmi_la_LIBADD = $(BUILD_WITH_OPENIPMI_LIBS)
405 collectd_LDADD += "-dlopen" ipmi.la
406 collectd_DEPENDENCIES += ipmi.la
407 endif
408
409 if BUILD_PLUGIN_IPVS
410 pkglib_LTLIBRARIES += ipvs.la
411 ipvs_la_SOURCES = ipvs.c
412 ipvs_la_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS)
413 ipvs_la_LDFLAGS = -module -avoid-version
414 collectd_LDADD += "-dlopen" ipvs.la
415 collectd_DEPENDENCIES += ipvs.la
416 endif
417
418 if BUILD_PLUGIN_IRQ
419 pkglib_LTLIBRARIES += irq.la
420 irq_la_SOURCES = irq.c
421 irq_la_LDFLAGS = -module -avoid-version
422 collectd_LDADD += "-dlopen" irq.la
423 collectd_DEPENDENCIES += irq.la
424 endif
425
426 if BUILD_PLUGIN_JAVA
427 pkglib_LTLIBRARIES += java.la
428 java_la_SOURCES = java.c
429 java_la_CPPFLAGS = $(AM_CPPFLAGS) $(JAVA_CPPFLAGS)
430 java_la_CFLAGS = $(AM_CFLAGS) $(JAVA_CFLAGS)
431 java_la_LDFLAGS = -module -avoid-version $(JAVA_LDFLAGS)
432 java_la_LIBADD = $(JAVA_LIBS)
433 collectd_LDADD += "-dlopen" java.la
434 collectd_DEPENDENCIES += java.la
435 endif
436
437 if BUILD_PLUGIN_LIBVIRT
438 pkglib_LTLIBRARIES += libvirt.la
439 libvirt_la_SOURCES = libvirt.c
440 libvirt_la_CFLAGS = $(AM_CFLAGS) \
441                 $(BUILD_WITH_LIBVIRT_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
442 libvirt_la_LIBADD = $(BUILD_WITH_LIBVIRT_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
443 libvirt_la_LDFLAGS = -module -avoid-version
444 collectd_LDADD += "-dlopen" libvirt.la
445 collectd_DEPENDENCIES += libvirt.la
446 endif
447
448 if BUILD_PLUGIN_LOAD
449 pkglib_LTLIBRARIES += load.la
450 load_la_SOURCES = load.c
451 load_la_CFLAGS = $(AM_CFLAGS)
452 load_la_LDFLAGS = -module -avoid-version
453 load_la_LIBADD =
454 collectd_LDADD += "-dlopen" load.la
455 collectd_DEPENDENCIES += load.la
456 if BUILD_WITH_LIBSTATGRAB
457 load_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
458 load_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
459 endif # BUILD_WITH_LIBSTATGRAB
460 endif # BUILD_PLUGIN_LOAD
461
462 if BUILD_PLUGIN_LOGFILE
463 pkglib_LTLIBRARIES += logfile.la
464 logfile_la_SOURCES = logfile.c
465 logfile_la_LDFLAGS = -module -avoid-version
466 collectd_LDADD += "-dlopen" logfile.la
467 collectd_DEPENDENCIES += logfile.la
468 endif
469
470 if BUILD_PLUGIN_MADWIFI
471 pkglib_LTLIBRARIES += madwifi.la
472 madwifi_la_SOURCES = madwifi.c madwifi.h
473 madwifi_la_LDFLAGS = -module -avoid-version
474 collectd_LDADD += "-dlopen" madwifi.la
475 collectd_DEPENDENCIES += madwifi.la
476 endif
477
478 if BUILD_PLUGIN_MATCH_EMPTY_COUNTER
479 pkglib_LTLIBRARIES += match_empty_counter.la
480 match_empty_counter_la_SOURCES = match_empty_counter.c
481 match_empty_counter_la_LDFLAGS = -module -avoid-version
482 collectd_LDADD += "-dlopen" match_empty_counter.la
483 collectd_DEPENDENCIES += match_empty_counter.la
484 endif
485
486 if BUILD_PLUGIN_MATCH_REGEX
487 pkglib_LTLIBRARIES += match_regex.la
488 match_regex_la_SOURCES = match_regex.c
489 match_regex_la_LDFLAGS = -module -avoid-version
490 collectd_LDADD += "-dlopen" match_regex.la
491 collectd_DEPENDENCIES += match_regex.la
492 endif
493
494 if BUILD_PLUGIN_MATCH_TIMEDIFF
495 pkglib_LTLIBRARIES += match_timediff.la
496 match_timediff_la_SOURCES = match_timediff.c
497 match_timediff_la_LDFLAGS = -module -avoid-version
498 collectd_LDADD += "-dlopen" match_timediff.la
499 collectd_DEPENDENCIES += match_timediff.la
500 endif
501
502 if BUILD_PLUGIN_MATCH_VALUE
503 pkglib_LTLIBRARIES += match_value.la
504 match_value_la_SOURCES = match_value.c
505 match_value_la_LDFLAGS = -module -avoid-version
506 collectd_LDADD += "-dlopen" match_value.la
507 collectd_DEPENDENCIES += match_value.la
508 endif
509
510 if BUILD_PLUGIN_MBMON
511 pkglib_LTLIBRARIES += mbmon.la
512 mbmon_la_SOURCES = mbmon.c
513 mbmon_la_LDFLAGS = -module -avoid-version
514 mbmon_la_LIBADD =
515 if BUILD_WITH_LIBSOCKET
516 mbmon_la_LIBADD += -lsocket
517 endif
518 collectd_LDADD += "-dlopen" mbmon.la
519 collectd_DEPENDENCIES += mbmon.la
520 endif
521
522 if BUILD_PLUGIN_MEMCACHEC
523 pkglib_LTLIBRARIES += memcachec.la
524 memcachec_la_SOURCES = memcachec.c
525 memcachec_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBMEMCACHED_LDFLAGS)
526 memcachec_la_CPPFLAGS = $(BUILD_WITH_LIBMEMCACHED_CPPFLAGS)
527 memcachec_la_LIBADD = $(BUILD_WITH_LIBMEMCACHED_LIBS)
528 collectd_LDADD += "-dlopen" memcachec.la
529 collectd_DEPENDENCIES += memcachec.la
530 endif
531
532 if BUILD_PLUGIN_MEMCACHED
533 pkglib_LTLIBRARIES += memcached.la
534 memcached_la_SOURCES = memcached.c
535 memcached_la_LDFLAGS = -module -avoid-version
536 memcached_la_LIBADD =
537 if BUILD_WITH_LIBSOCKET
538 memcached_la_LIBADD += -lsocket
539 endif
540 collectd_LDADD += "-dlopen" memcached.la
541 collectd_DEPENDENCIES += memcached.la
542 endif
543
544 if BUILD_PLUGIN_MEMORY
545 pkglib_LTLIBRARIES += memory.la
546 memory_la_SOURCES = memory.c
547 memory_la_CFLAGS = $(AM_CFLAGS)
548 memory_la_LDFLAGS = -module -avoid-version
549 memory_la_LIBADD =
550 collectd_LDADD += "-dlopen" memory.la
551 collectd_DEPENDENCIES += memory.la
552 if BUILD_WITH_LIBKSTAT
553 memory_la_LIBADD += -lkstat
554 endif
555 if BUILD_WITH_LIBDEVINFO
556 memory_la_LIBADD += -ldevinfo
557 endif
558 if BUILD_WITH_LIBSTATGRAB
559 memory_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
560 memory_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
561 endif
562 endif
563
564 if BUILD_PLUGIN_MULTIMETER
565 pkglib_LTLIBRARIES += multimeter.la
566 multimeter_la_SOURCES = multimeter.c
567 multimeter_la_LDFLAGS = -module -avoid-version
568 collectd_LDADD += "-dlopen" multimeter.la
569 collectd_DEPENDENCIES += multimeter.la
570 endif
571
572 if BUILD_PLUGIN_MYSQL
573 pkglib_LTLIBRARIES += mysql.la
574 mysql_la_SOURCES = mysql.c
575 mysql_la_LDFLAGS = -module -avoid-version
576 mysql_la_CFLAGS = $(AM_CFLAGS)
577 mysql_la_LIBADD =
578 collectd_LDADD += "-dlopen" mysql.la
579 if BUILD_WITH_LIBMYSQL
580 mysql_la_CFLAGS += $(BUILD_WITH_LIBMYSQL_CFLAGS)
581 mysql_la_LIBADD += $(BUILD_WITH_LIBMYSQL_LIBS)
582 endif
583 collectd_DEPENDENCIES += mysql.la
584 endif
585
586 if BUILD_PLUGIN_NETLINK
587 pkglib_LTLIBRARIES += netlink.la
588 netlink_la_SOURCES = netlink.c
589 netlink_la_LDFLAGS = -module -avoid-version
590 netlink_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBNETLINK_CFLAGS)
591 netlink_la_LIBADD = $(BUILD_WITH_LIBNETLINK_LIBS)
592 collectd_LDADD += "-dlopen" netlink.la
593 collectd_DEPENDENCIES += netlink.la
594 endif
595
596 if BUILD_PLUGIN_NETWORK
597 pkglib_LTLIBRARIES += network.la
598 network_la_SOURCES = network.c network.h \
599                      utils_fbhash.c utils_fbhash.h
600 network_la_CPPFLAGS = $(AM_CPPFLAGS)
601 network_la_LDFLAGS = -module -avoid-version
602 network_la_LIBADD = -lpthread
603 if BUILD_WITH_LIBSOCKET
604 network_la_LIBADD += -lsocket
605 endif
606 if BUILD_WITH_LIBGCRYPT
607 network_la_CPPFLAGS += $(GCRYPT_CPPFLAGS)
608 network_la_LDFLAGS += $(GCRYPT_LDFLAGS)
609 network_la_LIBADD += $(GCRYPT_LIBS)
610 endif
611 collectd_LDADD += "-dlopen" network.la
612 collectd_DEPENDENCIES += network.la
613 endif
614
615 if BUILD_PLUGIN_NFS
616 pkglib_LTLIBRARIES += nfs.la
617 nfs_la_SOURCES = nfs.c
618 nfs_la_LDFLAGS = -module -avoid-version
619 collectd_LDADD += "-dlopen" nfs.la
620 collectd_DEPENDENCIES += nfs.la
621 endif
622
623 if BUILD_PLUGIN_FSCACHE
624 pkglib_LTLIBRARIES += fscache.la
625 fscache_la_SOURCES = fscache.c
626 fscache_la_LDFLAGS = -module -avoid-version
627 collectd_LDADD += "-dlopen" fscache.la
628 collectd_DEPENDENCIES += fscache.la
629 endif
630
631 if BUILD_PLUGIN_NGINX
632 pkglib_LTLIBRARIES += nginx.la
633 nginx_la_SOURCES = nginx.c
634 nginx_la_CFLAGS = $(AM_CFLAGS)
635 nginx_la_LIBADD =
636 nginx_la_LDFLAGS = -module -avoid-version
637 if BUILD_WITH_LIBCURL
638 nginx_la_CFLAGS += $(BUILD_WITH_LIBCURL_CFLAGS)
639 nginx_la_LIBADD += $(BUILD_WITH_LIBCURL_LIBS)
640 endif
641 collectd_LDADD += "-dlopen" nginx.la
642 collectd_DEPENDENCIES += nginx.la
643 endif
644
645 if BUILD_PLUGIN_NOTIFY_DESKTOP
646 pkglib_LTLIBRARIES += notify_desktop.la
647 notify_desktop_la_SOURCES = notify_desktop.c
648 notify_desktop_la_CFLAGS = $(AM_CFLAGS) $(LIBNOTIFY_CFLAGS)
649 notify_desktop_la_LDFLAGS = -module -avoid-version
650 notify_desktop_la_LIBADD = $(LIBNOTIFY_LIBS)
651 collectd_LDADD += "-dlopen" notify_desktop.la
652 collectd_DEPENDENCIES += notify_desktop.la
653 endif
654
655 if BUILD_PLUGIN_NOTIFY_EMAIL
656 pkglib_LTLIBRARIES += notify_email.la
657 notify_email_la_SOURCES = notify_email.c
658 notify_email_la_LDFLAGS = -module -avoid-version
659 notify_email_la_LIBADD = -lesmtp -lssl -lcrypto -lpthread -ldl
660 collectd_LDADD += "-dlopen" notify_email.la
661 collectd_DEPENDENCIES += notify_email.la
662 endif
663
664 if BUILD_PLUGIN_NTPD
665 pkglib_LTLIBRARIES += ntpd.la
666 ntpd_la_SOURCES = ntpd.c
667 ntpd_la_LDFLAGS = -module -avoid-version
668 ntpd_la_LIBADD =
669 if BUILD_WITH_LIBSOCKET
670 ntpd_la_LIBADD += -lsocket
671 endif
672 collectd_LDADD += "-dlopen" ntpd.la
673 collectd_DEPENDENCIES += ntpd.la
674 endif
675
676 if BUILD_PLUGIN_NUT
677 pkglib_LTLIBRARIES += nut.la
678 nut_la_SOURCES = nut.c
679 nut_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
680 nut_la_LDFLAGS = -module -avoid-version
681 nut_la_LIBADD = -lpthread $(BUILD_WITH_LIBUPSCLIENT_LIBS)
682 collectd_LDADD += "-dlopen" nut.la
683 collectd_DEPENDENCIES += nut.la
684 endif
685
686 if BUILD_PLUGIN_OLSRD
687 pkglib_LTLIBRARIES += olsrd.la
688 olsrd_la_SOURCES = olsrd.c
689 olsrd_la_LDFLAGS = -module -avoid-version
690 olsrd_la_LIBADD = 
691 if BUILD_WITH_LIBSOCKET
692 olsrd_la_LIBADD += -lsocket
693 endif
694 collectd_LDADD += "-dlopen" olsrd.la
695 collectd_DEPENDENCIES += olsrd.la
696 endif
697
698 if BUILD_PLUGIN_ONEWIRE
699 pkglib_LTLIBRARIES += onewire.la
700 onewire_la_SOURCES = onewire.c
701 onewire_la_CFLAGS = $(AM_CFLAGS)
702 onewire_la_CPPFLAGS = $(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
703 onewire_la_LIBADD = $(BUILD_WITH_LIBOWCAPI_LIBS)
704 onewire_la_LDFLAGS = -module -avoid-version
705 collectd_LDADD += "-dlopen" onewire.la
706 collectd_DEPENDENCIES += onewire.la
707 endif
708
709 if BUILD_PLUGIN_OPENVPN
710 pkglib_LTLIBRARIES += openvpn.la
711 openvpn_la_SOURCES = openvpn.c
712 openvpn_la_CFLAGS = $(AM_CFLAGS)
713 openvpn_la_LDFLAGS = -module -avoid-version
714 collectd_LDADD += "-dlopen" openvpn.la
715 collectd_DEPENDENCIES += openvpn.la
716 endif
717
718 if BUILD_PLUGIN_ORACLE
719 pkglib_LTLIBRARIES += oracle.la
720 oracle_la_SOURCES = oracle.c \
721         utils_db_query.c utils_db_query.h
722 oracle_la_CFLAGS = $(AM_CFLAGS)
723 oracle_la_CPPFLAGS = $(BUILD_WITH_ORACLE_CFLAGS)
724 oracle_la_LIBADD = $(BUILD_WITH_ORACLE_LIBS)
725 oracle_la_LDFLAGS = -module -avoid-version
726 collectd_LDADD += "-dlopen" oracle.la
727 collectd_DEPENDENCIES += oracle.la
728 endif
729
730 if BUILD_PLUGIN_PERL
731 pkglib_LTLIBRARIES += perl.la
732 perl_la_SOURCES = perl.c
733 # Despite C99 providing the "bool" type thru stdbool.h, Perl defines its own
734 # version of that type if HAS_BOOL is not defined... *sigh*
735 perl_la_CPPFLAGS = $(AM_CPPFLAGS) -DHAS_BOOL=1
736 perl_la_CFLAGS  = $(AM_CFLAGS) \
737                 $(PERL_CFLAGS) \
738                 -DXS_VERSION=\"$(VERSION)\" -DVERSION=\"$(VERSION)\"
739 # Work-around for issues #41 and #42 - Perl 5.10 incorrectly introduced
740 # __attribute__nonnull__(3) for Perl_load_module().
741 if HAVE_BROKEN_PERL_LOAD_MODULE
742 perl_la_CFLAGS += -Wno-nonnull
743 endif
744 perl_la_LDFLAGS = -module -avoid-version \
745                 $(PERL_LDFLAGS)
746 collectd_LDADD += "-dlopen" perl.la
747 collectd_DEPENDENCIES += perl.la
748 endif
749
750 if BUILD_PLUGIN_PING
751 pkglib_LTLIBRARIES += ping.la
752 ping_la_SOURCES = ping.c
753 ping_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBOPING_CPPFLAGS)
754 ping_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBOPING_LDFLAGS)
755 ping_la_LIBADD = -loping -lm
756 collectd_LDADD += "-dlopen" ping.la
757 collectd_DEPENDENCIES += ping.la
758 endif
759
760 if BUILD_PLUGIN_POSTGRESQL
761 pkglib_LTLIBRARIES += postgresql.la
762 postgresql_la_SOURCES = postgresql.c \
763                  utils_db_query.c utils_db_query.h
764 postgresql_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPQ_CPPFLAGS)
765 postgresql_la_LDFLAGS = -module -avoid-version \
766                 $(BUILD_WITH_LIBPQ_LDFLAGS)
767 postgresql_la_LIBADD = -lpq
768 collectd_LDADD += "-dlopen" postgresql.la
769 collectd_DEPENDENCIES += postgresql.la
770 endif
771
772 if BUILD_PLUGIN_POWERDNS
773 pkglib_LTLIBRARIES += powerdns.la
774 powerdns_la_SOURCES = powerdns.c
775 powerdns_la_LDFLAGS = -module -avoid-version
776 collectd_LDADD += "-dlopen" powerdns.la
777 collectd_DEPENDENCIES += powerdns.la
778 endif
779
780 if BUILD_PLUGIN_PROCESSES
781 pkglib_LTLIBRARIES += processes.la
782 processes_la_SOURCES = processes.c
783 processes_la_LDFLAGS = -module -avoid-version
784 processes_la_LIBADD =
785 collectd_LDADD += "-dlopen" processes.la
786 collectd_DEPENDENCIES += processes.la
787 if BUILD_WITH_LIBKVM_GETPROCS
788 processes_la_LIBADD += -lkvm
789 endif
790 endif
791
792 if BUILD_PLUGIN_PROTOCOLS
793 pkglib_LTLIBRARIES += protocols.la
794 protocols_la_SOURCES = protocols.c
795 protocols_la_LDFLAGS = -module -avoid-version
796 collectd_LDADD += "-dlopen" protocols.la
797 collectd_DEPENDENCIES += protocols.la
798 endif
799
800 if BUILD_PLUGIN_RRDCACHED
801 pkglib_LTLIBRARIES += rrdcached.la
802 rrdcached_la_SOURCES = rrdcached.c utils_rrdcreate.c utils_rrdcreate.h
803 rrdcached_la_LDFLAGS = -module -avoid-version
804 rrdcached_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
805 rrdcached_la_LIBADD = $(BUILD_WITH_LIBRRD_LDFLAGS)
806 collectd_LDADD += "-dlopen" rrdcached.la
807 collectd_DEPENDENCIES += rrdcached.la
808 endif
809
810 if BUILD_PLUGIN_RRDTOOL
811 pkglib_LTLIBRARIES += rrdtool.la
812 rrdtool_la_SOURCES = rrdtool.c utils_rrdcreate.c utils_rrdcreate.h
813 rrdtool_la_LDFLAGS = -module -avoid-version
814 rrdtool_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
815 rrdtool_la_LIBADD = $(BUILD_WITH_LIBRRD_LDFLAGS)
816 collectd_LDADD += "-dlopen" rrdtool.la
817 collectd_DEPENDENCIES += rrdtool.la
818 endif
819
820 if BUILD_PLUGIN_SENSORS
821 pkglib_LTLIBRARIES += sensors.la
822 sensors_la_SOURCES = sensors.c
823 sensors_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBSENSORS_CFLAGS)
824 sensors_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBSENSORS_LDFLAGS)
825 sensors_la_LIBADD = -lsensors
826 collectd_LDADD += "-dlopen" sensors.la
827 collectd_DEPENDENCIES += sensors.la
828 endif
829
830 if BUILD_PLUGIN_SERIAL
831 pkglib_LTLIBRARIES += serial.la
832 serial_la_SOURCES = serial.c
833 serial_la_LDFLAGS = -module -avoid-version
834 collectd_LDADD += "-dlopen" serial.la
835 collectd_DEPENDENCIES += serial.la
836 endif
837
838 if BUILD_PLUGIN_SNMP
839 pkglib_LTLIBRARIES += snmp.la
840 snmp_la_SOURCES = snmp.c
841 snmp_la_LDFLAGS = -module -avoid-version
842 snmp_la_CFLAGS = $(AM_CFLAGS)
843 snmp_la_LIBADD =
844 if BUILD_WITH_LIBNETSNMP
845 snmp_la_CFLAGS += $(BUILD_WITH_LIBSNMP_CFLAGS)
846 snmp_la_LIBADD += $(BUILD_WITH_LIBSNMP_LIBS)
847 endif
848 if BUILD_WITH_LIBPTHREAD
849 snmp_la_LIBADD += -lpthread
850 endif
851 collectd_LDADD += "-dlopen" snmp.la
852 collectd_DEPENDENCIES += snmp.la
853 endif
854
855 if BUILD_PLUGIN_SWAP
856 pkglib_LTLIBRARIES += swap.la
857 swap_la_SOURCES = swap.c
858 swap_la_CFLAGS = $(AM_CFLAGS)
859 swap_la_LDFLAGS = -module -avoid-version
860 swap_la_LIBADD =
861 collectd_LDADD += "-dlopen" swap.la
862 collectd_DEPENDENCIES += swap.la
863 if BUILD_WITH_LIBKSTAT
864 swap_la_LIBADD += -lkstat
865 endif
866 if BUILD_WITH_LIBDEVINFO
867 swap_la_LIBADD += -ldevinfo
868 endif
869 if BUILD_WITH_LIBKVM_GETSWAPINFO
870 swap_la_LIBADD += -lkvm
871 endif
872 if BUILD_WITH_LIBSTATGRAB
873 swap_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
874 swap_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
875 endif
876 endif
877
878 if BUILD_PLUGIN_SYSLOG
879 pkglib_LTLIBRARIES += syslog.la
880 syslog_la_SOURCES = syslog.c
881 syslog_la_LDFLAGS = -module -avoid-version
882 collectd_LDADD += "-dlopen" syslog.la
883 collectd_DEPENDENCIES += syslog.la
884 endif
885
886 if BUILD_PLUGIN_TABLE
887 pkglib_LTLIBRARIES += table.la
888 table_la_SOURCES = table.c
889 table_la_LDFLAGS = -module -avoid-version
890 collectd_LDADD += "-dlopen" table.la
891 collectd_DEPENDENCIES += table.la
892 endif
893
894 if BUILD_PLUGIN_TAIL
895 pkglib_LTLIBRARIES += tail.la
896 tail_la_SOURCES = tail.c
897 tail_la_LDFLAGS = -module -avoid-version
898 collectd_LDADD += "-dlopen" tail.la
899 collectd_DEPENDENCIES += tail.la
900 endif
901
902 if BUILD_PLUGIN_TAPE
903 pkglib_LTLIBRARIES += tape.la
904 tape_la_SOURCES = tape.c
905 tape_la_LDFLAGS = -module -avoid-version
906 tape_la_LIBADD = -lkstat -ldevinfo
907 collectd_LDADD += "-dlopen" tape.la
908 collectd_DEPENDENCIES += tape.la
909 endif
910
911 if BUILD_PLUGIN_TARGET_NOTIFICATION
912 pkglib_LTLIBRARIES += target_notification.la
913 target_notification_la_SOURCES = target_notification.c
914 target_notification_la_LDFLAGS = -module -avoid-version
915 collectd_LDADD += "-dlopen" target_notification.la
916 collectd_DEPENDENCIES += target_notification.la
917 endif
918
919 if BUILD_PLUGIN_TARGET_REPLACE
920 pkglib_LTLIBRARIES += target_replace.la
921 target_replace_la_SOURCES = target_replace.c
922 target_replace_la_LDFLAGS = -module -avoid-version
923 collectd_LDADD += "-dlopen" target_replace.la
924 collectd_DEPENDENCIES += target_replace.la
925 endif
926
927 if BUILD_PLUGIN_TARGET_SET
928 pkglib_LTLIBRARIES += target_set.la
929 target_set_la_SOURCES = target_set.c
930 target_set_la_LDFLAGS = -module -avoid-version
931 collectd_LDADD += "-dlopen" target_set.la
932 collectd_DEPENDENCIES += target_set.la
933 endif
934
935 if BUILD_PLUGIN_TCPCONNS
936 pkglib_LTLIBRARIES += tcpconns.la
937 tcpconns_la_SOURCES = tcpconns.c
938 tcpconns_la_LDFLAGS = -module -avoid-version
939 tcpconns_la_LIBADD =
940 collectd_LDADD += "-dlopen" tcpconns.la
941 collectd_DEPENDENCIES += tcpconns.la
942 if BUILD_WITH_LIBKVM_NLIST
943 tcpconns_la_LIBADD += -lkvm
944 endif
945 endif
946
947 if BUILD_PLUGIN_TEAMSPEAK2
948 pkglib_LTLIBRARIES += teamspeak2.la
949 teamspeak2_la_SOURCES = teamspeak2.c
950 teamspeak2_la_LDFLAGS = -module -avoid-version
951 collectd_LDADD += "-dlopen" teamspeak2.la
952 collectd_DEPENDENCIES += teamspeak2.la
953 endif
954
955 if BUILD_PLUGIN_TED
956 pkglib_LTLIBRARIES += ted.la
957 ted_la_SOURCES = ted.c
958 ted_la_LDFLAGS = -module -avoid-version
959 collectd_LDADD += "-dlopen" ted.la
960 collectd_DEPENDENCIES += ted.la
961 endif
962
963 if BUILD_PLUGIN_THERMAL
964 pkglib_LTLIBRARIES += thermal.la
965 thermal_la_SOURCES = thermal.c
966 thermal_la_LDFLAGS = -module -avoid-version
967 collectd_LDADD += "-dlopen" thermal.la
968 collectd_DEPENDENCIES += thermal.la
969 endif
970
971 if BUILD_PLUGIN_TOKYOTYRANT
972 pkglib_LTLIBRARIES += tokyotyrant.la
973 tokyotyrant_la_SOURCES = tokyotyrant.c
974 tokyotyrant_la_CPPFLAGS  = $(AM_CPPFLAGS) $(BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS)
975 tokyotyrant_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS)
976 tokyotyrant_la_LIBADD  = $(BUILD_WITH_LIBTOKYOTYRANT_LIBS)
977 if BUILD_WITH_LIBSOCKET
978 tokyotyrant_la_LIBADD += -lsocket
979 endif
980 collectd_LDADD += "-dlopen" tokyotyrant.la
981 collectd_DEPENDENCIES += tokyotyrant.la
982 endif
983
984 if BUILD_PLUGIN_UNIXSOCK
985 pkglib_LTLIBRARIES += unixsock.la
986 unixsock_la_SOURCES = unixsock.c \
987                       utils_cmd_flush.h utils_cmd_flush.c \
988                       utils_cmd_getval.h utils_cmd_getval.c \
989                       utils_cmd_listval.h utils_cmd_listval.c \
990                       utils_cmd_putval.h utils_cmd_putval.c \
991                       utils_cmd_putnotif.h utils_cmd_putnotif.c
992 unixsock_la_LDFLAGS = -module -avoid-version
993 unixsock_la_LIBADD = -lpthread
994 collectd_LDADD += "-dlopen" unixsock.la
995 collectd_DEPENDENCIES += unixsock.la
996 endif
997
998 if BUILD_PLUGIN_UPTIME
999 pkglib_LTLIBRARIES += uptime.la
1000 uptime_la_SOURCES = uptime.c
1001 uptime_la_CFLAGS = $(AM_CFLAGS)
1002 uptime_la_LDFLAGS = -module -avoid-version
1003 uptime_la_LIBADD =
1004 if BUILD_WITH_LIBKSTAT
1005 uptime_la_LIBADD += -lkstat
1006 endif
1007 collectd_LDADD += "-dlopen" uptime.la
1008 collectd_DEPENDENCIES += uptime.la
1009 endif
1010
1011 if BUILD_PLUGIN_USERS
1012 pkglib_LTLIBRARIES += users.la
1013 users_la_SOURCES = users.c
1014 users_la_CFLAGS = $(AM_CFLAGS)
1015 users_la_LDFLAGS = -module -avoid-version
1016 users_la_LIBADD =
1017 if BUILD_WITH_LIBSTATGRAB
1018 users_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1019 users_la_LIBADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1020 endif
1021 collectd_LDADD += "-dlopen" users.la
1022 collectd_DEPENDENCIES += users.la
1023 endif
1024
1025 if BUILD_PLUGIN_UUID
1026 pkglib_LTLIBRARIES += uuid.la
1027 uuid_la_SOURCES = uuid.c
1028 uuid_la_CFLAGS  = $(AM_CFLAGS) $(BUILD_WITH_LIBHAL_CFLAGS)
1029 uuid_la_LIBADD  = $(BUILD_WITH_LIBHAL_LIBS)
1030 uuid_la_LDFLAGS = -module -avoid-version
1031 collectd_LDADD += "-dlopen" uuid.la
1032 collectd_DEPENDENCIES += uuid.la
1033 endif
1034
1035 if BUILD_PLUGIN_VMEM
1036 pkglib_LTLIBRARIES += vmem.la
1037 vmem_la_SOURCES = vmem.c
1038 vmem_la_LDFLAGS = -module -avoid-version
1039 collectd_LDADD += "-dlopen" vmem.la
1040 collectd_DEPENDENCIES += vmem.la
1041 endif
1042
1043 if BUILD_PLUGIN_VSERVER
1044 pkglib_LTLIBRARIES += vserver.la
1045 vserver_la_SOURCES = vserver.c
1046 vserver_la_LDFLAGS = -module -avoid-version
1047 collectd_LDADD += "-dlopen" vserver.la
1048 collectd_DEPENDENCIES += vserver.la
1049 endif
1050
1051 if BUILD_PLUGIN_WIRELESS
1052 pkglib_LTLIBRARIES += wireless.la
1053 wireless_la_SOURCES = wireless.c
1054 wireless_la_LDFLAGS = -module -avoid-version
1055 collectd_LDADD += "-dlopen" wireless.la
1056 collectd_DEPENDENCIES += wireless.la
1057 endif
1058
1059 if BUILD_PLUGIN_XMMS
1060 pkglib_LTLIBRARIES += xmms.la
1061 xmms_la_SOURCES = xmms.c
1062 xmms_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBXMMS_CFLAGS)
1063 xmms_la_LDFLAGS = -module -avoid-version
1064 xmms_la_LIBADD = $(BUILD_WITH_LIBXMMS_LIBS)
1065 collectd_LDADD += "-dlopen" xmms.la
1066 collectd_DEPENDENCIES += xmms.la
1067 endif
1068
1069
1070 dist_man_MANS = collectd.1 \
1071                 collectd.conf.5 \
1072                 collectd-email.5 \
1073                 collectd-exec.5 \
1074                 collectd-java.5 \
1075                 collectdmon.1 \
1076                 collectd-nagios.1 \
1077                 collectd-perl.5 \
1078                 collectd-snmp.5 \
1079                 collectd-unixsock.5 \
1080                 types.db.5
1081
1082 #collectd_1_SOURCES = collectd.pod
1083
1084 EXTRA_DIST = types.db
1085
1086 EXTRA_DIST +=   collectd.conf.pod \
1087                 collectd-email.pod \
1088                 collectd-exec.pod \
1089                 collectd-java.pod \
1090                 collectdmon.pod \
1091                 collectd-nagios.pod \
1092                 collectd-perl.pod \
1093                 collectd.pod \
1094                 collectd-snmp.pod \
1095                 collectd-unixsock.pod \
1096                 postgresql_default.conf \
1097                 types.db.pod
1098
1099 .pod.1:
1100         pod2man --release=$(VERSION) --center=$(PACKAGE) $< \
1101                 >.pod2man.tmp 2>/dev/null && mv -f .pod2man.tmp $@ || true
1102         @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
1103         then \
1104                 echo "$@ has some POD errors!"; false; \
1105         fi
1106
1107 .pod.5:
1108         pod2man --section=5 --release=$(VERSION) --center=$(PACKAGE) $< \
1109                 >.pod2man.tmp 2>/dev/null && mv -f .pod2man.tmp $@ || true
1110         @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
1111         then \
1112                 echo "$@ has some POD errors!"; false; \
1113         fi
1114
1115 install-exec-hook:
1116         $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
1117         if test -e $(DESTDIR)$(sysconfdir)/collectd.conf; \
1118         then \
1119                 $(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf.pkg-orig; \
1120         else \
1121                 $(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf; \
1122         fi; \
1123         $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
1124         $(INSTALL) -m 0644 $(srcdir)/types.db $(DESTDIR)$(pkgdatadir)/types.db;
1125         $(INSTALL) -m 0644 $(srcdir)/postgresql_default.conf \
1126                 $(DESTDIR)$(pkgdatadir)/postgresql_default.conf;