summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bc86428)
raw | patch | inline | side by side (parent: bc86428)
Changed `configure.in' and `src/Makefile.am' so the plugins are NOT linked against... collectd-3.7.0
author | octo <octo> | |
Mon, 30 Jan 2006 21:59:13 +0000 (21:59 +0000) | ||
committer | octo <octo> | |
Mon, 30 Jan 2006 21:59:13 +0000 (21:59 +0000) |
configure.in | patch | blob | history | |
src/Makefile.am | patch | blob | history |
diff --git a/configure.in b/configure.in
index 368494689eb0dd0140f95f8f36481af0a5cfa3b6..4e9c1563787045d9edfcb008a2e1c2a2bbd36991 100644 (file)
--- a/configure.in
+++ b/configure.in
esac
AC_MSG_RESULT([$ac_system])
-dnl Checks for libraries.
-# FIXME don't link all plugins against these libraries!
-AC_CHECK_LIB(socket, socket)
-AC_CHECK_LIB(resolv, res_search)
+with_libsocket="yes"
+AC_CHECK_LIB(socket, socket,
+[
+ AC_DEFINE(HAVE_LIBSOCKET, 1, [Define to 1 if you have the 'socket' library (-lsocket).])
+],
+[with_libsocket="no"])
+AM_CONDITIONAL(BUILD_WITH_LIBSOCKET, test "x$with_libsocket" = "xyes")
+
+with_libresolv="yes"
+AC_CHECK_LIB(resolv, res_search,
+[
+ AC_DEFINE(HAVE_LIBRESOLV, 1, [Define to 1 if you have the 'resolv' library (-lresolv).])
+],
+[with_libresolv="no"])
+AM_CONDITIONAL(BUILD_WITH_LIBRESOLV, test "x$with_libresolv" = "xyes")
m4_divert_once([HELP_WITH], [
collectd additional packages:])
@@ -206,7 +217,11 @@ AC_ARG_WITH(rrdtool, [AS_HELP_STRING([--with-rrdtool@<:@=PREFIX@:>@], [Path to r
], [with_rrdtool="yes"])
if test "x$with_rrdtool" = "xyes"
then
- AC_CHECK_LIB(rrd, rrd_update,, [with_rrdtool="no (librrd not found)"], [-lm])
+ AC_CHECK_LIB(rrd, rrd_update,
+ [
+ AC_DEFINE(HAVE_LIBRRD, 1, [Define to 1 if you have the rrd library (-lrrd).])
+ ],
+ [with_rrdtool="no (librrd not found)"], [-lm])
fi
if test "x$with_rrdtool" = "xyes"
then
diff --git a/src/Makefile.am b/src/Makefile.am
index 1669338b8c440b8a7946815da5762876023e3029..73d29b05e6d15d370c168672e63b8cc94d4bc43e 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
network.c network.h \
plugin.c plugin.h \
configfile.c configfile.h
-#collectd_CFLAGS = -DPLUGINDIR='"$(pkglibdir)"'
collectd_CPPFLAGS = $(LTDLINCL)
collectd_CPPFLAGS += -DCONFIGFILE='"${sysconfdir}/${PACKAGE_NAME}.conf"'
collectd_CPPFLAGS += -DPKGLOCALSTATEDIR='"${localstatedir}/lib/${PACKAGE_NAME}"'
if BUILD_FEATURE_DEBUG
collectd_CPPFLAGS += -DLOGFILE='"${localstatedir}/log/${PACKAGE_NAME}/collectd.log"'
endif
+
+# Link to these libraries..
collectd_LDFLAGS = -export-dynamic
+if BUILD_WITH_RRDTOOL
+collectd_LDFLAGS += -lm -lrrd
+endif
+if BUILD_WITH_LIBSOCKET
+collectd_LDFLAGS += -lsocket
+endif
+if BUILD_WITH_LIBRESOLV
+collectd_LDFLAGS += -lresolv
+endif
+
collectd_LDADD = $(LIBLTDL) libconfig/libconfig.la "-dlopen" self
collectd_DEPENDENCIES = $(LIBLTDL) libconfig/libconfig.la