author | Florian Forster <octo@noris.net> | |
Tue, 29 Apr 2008 14:52:08 +0000 (16:52 +0200) | ||
committer | Florian Forster <octo@noris.net> | |
Tue, 29 Apr 2008 14:52:08 +0000 (16:52 +0200) |
Conflicts:
src/Makefile.am
src/Makefile.am
1 | 2 | |||
---|---|---|---|---|
configure.in | patch | | diff1 | | diff2 | | blob | history |
src/Makefile.am | patch | | diff1 | | diff2 | | blob | history |
diff --cc configure.in
index 3eb17befc774a48a4690258a4a04a0d82ea6dc4c,cdd3e6cb3169a43c03c7a601025d0b84148704f3..75ac61534f37695c28fbb693f0ac99cf5898b2dc
--- 1/configure.in
--- 2/configure.in
+++ b/configure.in
[
if test "x$withval" != "xno" -a "x$withval" != "xyes"
then
- LDFLAGS="$LDFLAGS -L$withval/lib"
- CPPFLAGS="$CPPFLAGS -I$withval/include"
+ with_libstatgrab_cflags="-I$withval/include"
+ with_libstatgrab_ldflags="-L$withval/lib"
with_libstatgrab="yes"
+ else
+ with_libstatgrab="$withval"
fi
],
[
diff --cc src/Makefile.am
index 257cadc759d37fad5936ec2660ac68e7b798ce9d,974e558732fe63b5fd70200fe212a4b0803e31bb..02b85fcd1d7f438c718826f0c1957e2af0a5dc81
--- 1/src/Makefile.am
--- 2/src/Makefile.am
+++ b/src/Makefile.am
bin_PROGRAMS = collectd-nagios
collectd_SOURCES = collectd.c collectd.h \
- utils_avltree.c utils_avltree.h \
- utils_mount.c utils_mount.h \
- utils_llist.c utils_llist.h \
- utils_ignorelist.c utils_ignorelist.h \
common.c common.h \
- plugin.c plugin.h \
configfile.c configfile.h \
+ plugin.c plugin.h \
+ utils_avltree.c utils_avltree.h \
+ utils_cache.c utils_cache.h \
+ utils_ignorelist.c utils_ignorelist.h \
+ utils_llist.c utils_llist.h \
+ utils_mount.c utils_mount.h \
+ utils_threshold.c utils_threshold.h \
types_list.c types_list.h
- collectd_CPPFLAGS = $(LTDLINCL)
- collectd_CPPFLAGS += $(AM_CPPFLAGS)
- # Link to these libraries..
-collectd_CPPFLAGS = $(LTDLINCL)
++collectd_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL)
+ collectd_CFLAGS =
collectd_LDFLAGS = -export-dynamic
-collectd_CPPFLAGS += -DPREFIX='"${prefix}"'
-collectd_CPPFLAGS += -DCONFIGFILE='"${sysconfdir}/${PACKAGE_NAME}.conf"'
-collectd_CPPFLAGS += -DLOCALSTATEDIR='"${localstatedir}"'
-collectd_CPPFLAGS += -DPKGLOCALSTATEDIR='"${localstatedir}/lib/${PACKAGE_NAME}"'
-if BUILD_FEATURE_DAEMON
-collectd_CPPFLAGS += -DPIDFILE='"${localstatedir}/run/${PACKAGE_NAME}.pid"'
-endif
-collectd_CPPFLAGS += -DPLUGINDIR='"${pkglibdir}"'
-
+ collectd_LDADD =
+ collectd_DEPENDENCIES =
+
+ # Link to these libraries..
if BUILD_WITH_LIBRT
- collectd_LDFLAGS += -lrt
+ collectd_LDADD += -lrt
endif
if BUILD_WITH_LIBSOCKET
- collectd_LDFLAGS += -lsocket
+ collectd_LDADD += -lsocket
endif
if BUILD_WITH_LIBRESOLV
- collectd_LDFLAGS += -lresolv
+ collectd_LDADD += -lresolv
endif
if BUILD_WITH_LIBPTHREAD
- collectd_LDFLAGS += -lpthread
+ collectd_LDADD += -lpthread
endif
if BUILD_WITH_LIBKSTAT
- collectd_LDFLAGS += -lkstat
+ collectd_LDADD += -lkstat
endif
if BUILD_WITH_LIBDEVINFO
- collectd_LDFLAGS += -ldevinfo
+ collectd_LDADD += -ldevinfo
endif
+ # The daemon needs to call sg_init, so we need to link it against libstatgrab,
+ # too. -octo
if BUILD_WITH_LIBSTATGRAB
- if BUILD_WITH_LIBKVM
- collectd_LDFLAGS += -lkvm
- endif
- if BUILD_WITH_LIBDEVSTAT
- collectd_LDFLAGS += -ldevstat
- endif
- collectd_LDFLAGS += -lstatgrab
+ collectd_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)
+ collectd_LDADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
endif
-
- collectd_LDADD =
- collectd_DEPENDENCIES =
if BUILD_WITH_OWN_LIBOCONFIG
collectd_LDADD += $(LIBLTDL) liboconfig/liboconfig.la
collectd_DEPENDENCIES += $(LIBLTDL) liboconfig/liboconfig.la
else
- collectd_LDFLAGS += -loconfig
+ collectd_LDADD += -loconfig
endif
+collectdmon_SOURCES = collectdmon.c
+collectdmon_CPPFLAGS = $(AM_CPPFLAGS)
+
collectd_nagios_SOURCES = collectd-nagios.c
collectd_nagios_LDFLAGS =
if BUILD_WITH_LIBSOCKET