summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c39428a)
raw | patch | inline | side by side (parent: c39428a)
author | Florian Forster <octo@crystal.wlan.home.verplant.org> | |
Tue, 18 Sep 2007 18:51:38 +0000 (20:51 +0200) | ||
committer | Florian Forster <octo@crystal.wlan.home.verplant.org> | |
Tue, 18 Sep 2007 18:51:38 +0000 (20:51 +0200) |
configure.in | patch | blob | history | |
src/Makefile.am | patch | blob | history |
diff --git a/configure.in b/configure.in
index 16ffe1ad71d433eb7aa939a4d3a155adccace7db..51f26c3f40ccd4753ff0182850676d2004dc57dc 100644 (file)
--- a/configure.in
+++ b/configure.in
@@ -1250,7 +1250,7 @@ AC_ARG_WITH(libnetsnmp, [AS_HELP_STRING([--with-libnetsnmp@<:@=PREFIX@:>@], [Pat
[with_libnetsnmp="yes"])
if test "x$with_libnetsnmp" = "xyes"
then
- with_snmp_cflags=`$with_snmp_config --cflags >/dev/null`
+ with_snmp_cflags=`$with_snmp_config --cflags 2>/dev/null`
snmp_config_status=$?
if test $snmp_config_status -ne 0
fi
if test "x$with_libnetsnmp" = "xyes"
then
- with_snmp_libs=`$with_snmp_config --libs >/dev/null`
+ with_snmp_libs=`$with_snmp_config --libs 2>/dev/null`
snmp_config_status=$?
if test $snmp_config_status -ne 0
[$with_snmp_libs])
fi
fi
-if test "x$with_libsnmp" = "xyes"
+if test "x$with_libnetsnmp" = "xyes"
then
BUILD_WITH_LIBSNMP_CFLAGS="$with_snmp_cflags"
BUILD_WITH_LIBSNMP_LIBS="$with_snmp_libs"
diff --git a/src/Makefile.am b/src/Makefile.am
index 16094f7e3f904a52cc407f3696c093165a18e088..f988a0f0f30649ba154db4878c1bc3ce06905a0e 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
pkglib_LTLIBRARIES += snmp.la
snmp_la_SOURCES = snmp.c
snmp_la_LDFLAGS = -module -avoid-version
+snmp_la_CFLAGS =
+snmp_la_LIBADD =
if BUILD_WITH_LIBNETSNMP
-snmp_la_LDFLAGS += -lnetsnmp
+snmp_la_CFLAGS += $(BUILD_WITH_LIBSNMP_CFLAGS)
+snmp_la_LIBADD += $(BUILD_WITH_LIBSNMP_LIBS)
endif
if BUILD_WITH_LIBPTHREAD
-snmp_la_LDFLAGS += -lpthread
+snmp_la_LIBADD += -lpthread
endif
collectd_LDADD += "-dlopen" snmp.la
collectd_DEPENDENCIES += snmp.la