diff --git a/src/Makefile.am b/src/Makefile.am
index 9cafbbf50c3bbd88522fc1b28fa72a907a69860b..4ea3be0ed985c034df363a56b9f31cc2f1503e50 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
SUBDIRS = libconfig
SUBDIRS = libconfig
-if BUILD_MODULE_PING
+if BUILD_WITH_OWN_LIBOPING
SUBDIRS += liboping
endif
SUBDIRS += liboping
endif
collectd_SOURCES = collectd.c collectd.h \
utils_debug.c utils_debug.h \
utils_mount.c utils_mount.h \
collectd_SOURCES = collectd.c collectd.h \
utils_debug.c utils_debug.h \
utils_mount.c utils_mount.h \
+ utils_llist.c utils_llist.h \
+ utils_ignorelist.c utils_ignorelist.h \
common.c common.h \
common.c common.h \
- network.c network.h \
plugin.c plugin.h \
configfile.c configfile.h
collectd_CPPFLAGS = $(LTDLINCL)
plugin.c plugin.h \
configfile.c configfile.h
collectd_CPPFLAGS = $(LTDLINCL)
# Link to these libraries..
collectd_LDFLAGS = -export-dynamic
# Link to these libraries..
collectd_LDFLAGS = -export-dynamic
-if BUILD_WITH_RRDTOOL
-collectd_LDFLAGS += -lm -lrrd
-endif
if BUILD_WITH_LIBRT
collectd_LDFLAGS += -lrt
endif
if BUILD_WITH_LIBRT
collectd_LDFLAGS += -lrt
endif
collectd_LDFLAGS += -ldevinfo
endif
collectd_LDFLAGS += -ldevinfo
endif
+if BUILD_WITH_LIBSTATGRAB
+if BUILD_WITH_LIBKVM
+collectd_LDFLAGS += -lkvm
+endif
+if BUILD_WITH_LIBDEVSTAT
+collectd_LDFLAGS += -ldevstat
+endif
+collectd_LDFLAGS += -lstatgrab
+endif
+
+
collectd_LDADD = $(LIBLTDL) libconfig/libconfig.la "-dlopen" self
collectd_DEPENDENCIES = $(LIBLTDL) libconfig/libconfig.la
collectd_LDADD = $(LIBLTDL) libconfig/libconfig.la "-dlopen" self
collectd_DEPENDENCIES = $(LIBLTDL) libconfig/libconfig.la
collectd_DEPENDENCIES += apache.la
endif
collectd_DEPENDENCIES += apache.la
endif
+if BUILD_MODULE_APCUPS
+pkglib_LTLIBRARIES += apcups.la
+apcups_la_SOURCES = apcups.c
+apcups_la_LDFLAGS = -module -avoid-version
+if BUILD_WITH_LIBSOCKET
+apcups_la_LDFLAGS += -lsocket
+endif
+collectd_LDADD += "-dlopen" apcups.la
+collectd_DEPENDENCIES += apcups.la
+endif
+
if BUILD_MODULE_APPLE_SENSORS
pkglib_LTLIBRARIES += apple_sensors.la
apple_sensors_la_SOURCES = apple_sensors.c
if BUILD_MODULE_APPLE_SENSORS
pkglib_LTLIBRARIES += apple_sensors.la
apple_sensors_la_SOURCES = apple_sensors.c
if BUILD_WITH_LIBDEVINFO
disk_la_LDFLAGS += -ldevinfo
endif
if BUILD_WITH_LIBDEVINFO
disk_la_LDFLAGS += -ldevinfo
endif
+if BUILD_WITH_LIBIOKIT
+disk_la_LDFLAGS += -lIOKit
+endif
collectd_LDADD += "-dlopen" disk.la
collectd_DEPENDENCIES += disk.la
endif
collectd_LDADD += "-dlopen" disk.la
collectd_DEPENDENCIES += disk.la
endif
+if BUILD_MODULE_DNS
+pkglib_LTLIBRARIES += dns.la
+dns_la_SOURCES = dns.c utils_dns.c utils_dns.h
+dns_la_LDFLAGS = -module -avoid-version
+if BUILD_WITH_LIBPCAP
+dns_la_LDFLAGS += -lpcap
+endif
+if BUILD_WITH_LIBPTHREAD
+dns_la_LDFLAGS += -lpthread
+endif
+collectd_LDADD += "-dlopen" dns.la
+collectd_DEPENDENCIES += dns.la
+endif
+
+if BUILD_MODULE_EMAIL
+pkglib_LTLIBRARIES += email.la
+email_la_SOURCES = email.c
+email_la_LDFLAGS = -module -avoid-version
+if BUILD_WITH_LIBPTHREAD
+email_la_LDFLAGS += -lpthread
+endif
+collectd_LDADD += "-dlopen" email.la
+collectd_DEPENDENCIES += email.la
+endif
+
#if BUILD_MODULE_QUOTA
#pkglib_LTLIBRARIES += quota.la
#quota_la_SOURCES = quota_plugin.c quota_plugin.h
#if BUILD_MODULE_QUOTA
#pkglib_LTLIBRARIES += quota.la
#quota_la_SOURCES = quota_plugin.c quota_plugin.h
load_la_LDFLAGS = -module -avoid-version
collectd_LDADD += "-dlopen" load.la
collectd_DEPENDENCIES += load.la
load_la_LDFLAGS = -module -avoid-version
collectd_LDADD += "-dlopen" load.la
collectd_DEPENDENCIES += load.la
+if BUILD_WITH_LIBSTATGRAB
+if BUILD_WITH_LIBKVM
+load_la_LDFLAGS += -lkvm
+endif
+if BUILD_WITH_LIBDEVSTAT
+load_la_LDFLAGS += -ldevstat
+endif
+load_la_LDFLAGS += -lstatgrab
+endif
+endif
+
+if BUILD_MODULE_MBMON
+pkglib_LTLIBRARIES += mbmon.la
+mbmon_la_SOURCES = mbmon.c
+mbmon_la_LDFLAGS = -module -avoid-version
+if BUILD_WITH_LIBSOCKET
+mbmon_la_LDFLAGS += -lsocket
+endif
+collectd_LDADD += "-dlopen" mbmon.la
+collectd_DEPENDENCIES += mbmon.la
endif
if BUILD_MODULE_MEMORY
pkglib_LTLIBRARIES += memory.la
memory_la_SOURCES = memory.c
memory_la_LDFLAGS = -module -avoid-version
endif
if BUILD_MODULE_MEMORY
pkglib_LTLIBRARIES += memory.la
memory_la_SOURCES = memory.c
memory_la_LDFLAGS = -module -avoid-version
+collectd_LDADD += "-dlopen" memory.la
+collectd_DEPENDENCIES += memory.la
if BUILD_WITH_LIBKSTAT
memory_la_LDFLAGS += -lkstat
endif
if BUILD_WITH_LIBDEVINFO
memory_la_LDFLAGS += -ldevinfo
endif
if BUILD_WITH_LIBKSTAT
memory_la_LDFLAGS += -lkstat
endif
if BUILD_WITH_LIBDEVINFO
memory_la_LDFLAGS += -ldevinfo
endif
-collectd_LDADD += "-dlopen" memory.la
-collectd_DEPENDENCIES += memory.la
+if BUILD_WITH_LIBSTATGRAB
+if BUILD_WITH_LIBKVM
+memory_la_LDFLAGS += -lkvm
+endif
+if BUILD_WITH_LIBDEVSTAT
+memory_la_LDFLAGS += -ldevstat
+endif
+memory_la_LDFLAGS += -lstatgrab
+endif
+endif
+
+if BUILD_MODULE_MULTIMETER
+pkglib_LTLIBRARIES += multimeter.la
+multimeter_la_SOURCES = multimeter.c
+multimeter_la_LDFLAGS = -module -avoid-version
+collectd_LDADD += "-dlopen" multimeter.la
+collectd_DEPENDENCIES += multimeter.la
endif
if BUILD_MODULE_MYSQL
endif
if BUILD_MODULE_MYSQL
collectd_DEPENDENCIES += mysql.la
endif
collectd_DEPENDENCIES += mysql.la
endif
+if BUILD_MODULE_NETWORK
+pkglib_LTLIBRARIES += network.la
+network_la_SOURCES = network.c
+network_la_LDFLAGS = -module -avoid-version
+if BUILD_WITH_LIBSOCKET
+network_la_LDFLAGS += -lsocket
+endif
+if BUILD_WITH_LIBPTHREAD
+network_la_LDFLAGS += -lpthread
+endif
+collectd_LDADD += "-dlopen" network.la
+collectd_DEPENDENCIES += network.la
+endif
+
if BUILD_MODULE_NFS
pkglib_LTLIBRARIES += nfs.la
nfs_la_SOURCES = nfs.c
if BUILD_MODULE_NFS
pkglib_LTLIBRARIES += nfs.la
nfs_la_SOURCES = nfs.c
collectd_DEPENDENCIES += nfs.la
endif
collectd_DEPENDENCIES += nfs.la
endif
+if BUILD_MODULE_NTPD
+pkglib_LTLIBRARIES += ntpd.la
+ntpd_la_SOURCES = ntpd.c
+ntpd_la_LDFLAGS = -module -avoid-version
+if BUILD_WITH_LIBSOCKET
+ntpd_la_LDFLAGS += -lsocket
+endif
+collectd_LDADD += "-dlopen" ntpd.la
+collectd_DEPENDENCIES += ntpd.la
+endif
+
if BUILD_MODULE_PING
pkglib_LTLIBRARIES += ping.la
ping_la_SOURCES = ping.c
ping_la_LDFLAGS = -module -avoid-version
if BUILD_MODULE_PING
pkglib_LTLIBRARIES += ping.la
ping_la_SOURCES = ping.c
ping_la_LDFLAGS = -module -avoid-version
+if BUILD_WITH_LIBOPING
+if BUILD_WITH_OWN_LIBOPING
ping_la_LIBADD = liboping/liboping.la
ping_la_DEPENDENCIES = liboping/liboping.la
ping_la_LIBADD = liboping/liboping.la
ping_la_DEPENDENCIES = liboping/liboping.la
+else
+ping_la_LDFLAGS += -loping
+endif
+endif
collectd_LDADD += "-dlopen" ping.la
collectd_DEPENDENCIES += ping.la
endif
collectd_LDADD += "-dlopen" ping.la
collectd_DEPENDENCIES += ping.la
endif
collectd_DEPENDENCIES += processes.la
endif
collectd_DEPENDENCIES += processes.la
endif
+if BUILD_WITH_RRDTOOL
+pkglib_LTLIBRARIES += rrdtool.la
+rrdtool_la_SOURCES = rrdtool.c
+rrdtool_la_LDFLAGS = -module -avoid-version -lrrd
+collectd_LDADD += "-dlopen" rrdtool.la
+collectd_DEPENDENCIES += rrdtool.la
+endif
+
if BUILD_MODULE_SENSORS
pkglib_LTLIBRARIES += sensors.la
sensors_la_SOURCES = sensors.c
if BUILD_MODULE_SENSORS
pkglib_LTLIBRARIES += sensors.la
sensors_la_SOURCES = sensors.c
pkglib_LTLIBRARIES += swap.la
swap_la_SOURCES = swap.c
swap_la_LDFLAGS = -module -avoid-version
pkglib_LTLIBRARIES += swap.la
swap_la_SOURCES = swap.c
swap_la_LDFLAGS = -module -avoid-version
+collectd_LDADD += "-dlopen" swap.la
+collectd_DEPENDENCIES += swap.la
if BUILD_WITH_LIBKSTAT
swap_la_LDFLAGS += -lkstat
endif
if BUILD_WITH_LIBDEVINFO
swap_la_LDFLAGS += -ldevinfo
endif
if BUILD_WITH_LIBKSTAT
swap_la_LDFLAGS += -lkstat
endif
if BUILD_WITH_LIBDEVINFO
swap_la_LDFLAGS += -ldevinfo
endif
-collectd_LDADD += "-dlopen" swap.la
-collectd_DEPENDENCIES += swap.la
+if BUILD_WITH_LIBKVM
+swap_la_LDFLAGS += -lkvm
+endif
+if BUILD_WITH_LIBSTATGRAB
+if BUILD_WITH_LIBDEVSTAT
+swap_la_LDFLAGS += -ldevstat
+endif
+swap_la_LDFLAGS += -lstatgrab
+endif
endif
if BUILD_MODULE_TAPE
endif
if BUILD_MODULE_TAPE
pkglib_LTLIBRARIES += traffic.la
traffic_la_SOURCES = traffic.c
traffic_la_LDFLAGS = -module -avoid-version
pkglib_LTLIBRARIES += traffic.la
traffic_la_SOURCES = traffic.c
traffic_la_LDFLAGS = -module -avoid-version
+collectd_LDADD += "-dlopen" traffic.la
+collectd_DEPENDENCIES += traffic.la
if BUILD_WITH_LIBKSTAT
traffic_la_LDFLAGS += -lkstat
endif
if BUILD_WITH_LIBDEVINFO
traffic_la_LDFLAGS += -ldevinfo
endif
if BUILD_WITH_LIBKSTAT
traffic_la_LDFLAGS += -lkstat
endif
if BUILD_WITH_LIBDEVINFO
traffic_la_LDFLAGS += -ldevinfo
endif
-collectd_LDADD += "-dlopen" traffic.la
-collectd_DEPENDENCIES += traffic.la
+if BUILD_WITH_LIBSTATGRAB
+if BUILD_WITH_LIBKVM
+traffic_la_LDFLAGS += -lkvm
+endif
+if BUILD_WITH_LIBDEVSTAT
+traffic_la_LDFLAGS += -ldevstat
+endif
+traffic_la_LDFLAGS += -lstatgrab
+endif
endif
if BUILD_MODULE_USERS
endif
if BUILD_MODULE_USERS
collectd_DEPENDENCIES += wireless.la
endif
collectd_DEPENDENCIES += wireless.la
endif
-man_MANS = collectd.1 collectd.conf.5
+dist_man_MANS = collectd.1 collectd.conf.5
#collectd_1_SOURCES = collectd.pod
#collectd_1_SOURCES = collectd.pod
-EXTRA_DIST = $(man_MANS)
+#EXTRA_DIST = $(man_MANS)
.pod.1:
pod2man --release=$(VERSION) --center=$(PACKAGE) $< >$@
.pod.5:
pod2man --section=5 --release=$(VERSION) --center=$(PACKAGE) $< >$@
.pod.1:
pod2man --release=$(VERSION) --center=$(PACKAGE) $< >$@
.pod.5:
pod2man --section=5 --release=$(VERSION) --center=$(PACKAGE) $< >$@
+
+install-exec-hook:
+ $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
+ if test -e $(DESTDIR)$(sysconfdir)/collectd.conf; \
+ then \
+ $(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf.pkg-orig; \
+ else \
+ $(INSTALL) -m 0640 collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf; \
+ fi