Merge pull request #3241 from ffontaine/master
authorMatthias Runge <mrunge@redhat.com>
Wed, 21 Aug 2019 09:15:57 +0000 (11:15 +0200)
committerGitHub <noreply@github.com>
Wed, 21 Aug 2019 09:15:57 +0000 (11:15 +0200)
configure.ac: fix activation of snmp_agent

configure.ac

index add1556..5ac33dc 100644 (file)
@@ -3950,7 +3950,13 @@ if test "x$with_libnetsnmpagent" = "xyes"; then
   )
 
   AC_CHECK_LIB([netsnmpagent], [init_agent],
-    [with_libnetsnmpagent="yes"],
+    [
+      # libnetsnmp can be built without without mib loading support
+      AC_CHECK_LIB([netsnmp], [get_tree],
+        [with_libnetsnmpagent="yes"],
+        [with_libnetsnmpagent="no (libnetsnmp doesn't support mib loading)"]
+      )
+    ],
     [with_libnetsnmpagent="no (libnetsnmpagent not found)"],
     [$libnetsnmphelpers]
   )