[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"
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