]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 2815] net-snmp before v5.4 has circular library dependencies
authorHarlan Stenn <stenn@ntp.org>
Mon, 27 Apr 2015 10:48:48 +0000 (10:48 +0000)
committerHarlan Stenn <stenn@ntp.org>
Mon, 27 Apr 2015 10:48:48 +0000 (10:48 +0000)
bk: 553e1410CrBSwQ14aWHkNiCwSmZ6IQ

ChangeLog
configure.ac

index 91ac1c7acf3a99688fd0a4500eaf31cb97c6e752..cb5e12ab11d29a6340887dd9620a6c6abcd71400 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,7 @@
   Various improvements, see http://bugs.ntp.org/2808 for details.
   Changed libjsmn to a more recent version.
 * [Bug 2813] HP-UX needs -D__STDC_VERSION__=199901L and limits.h.
+* [Bug 2815] net-snmp before v5.4 has circular library dependencies.
 * Improve the ntpq documentation around the controlkey keyid.
 * autogen-5.18.5
 ---
index dc5c7fcfd7035fff58c67b268a6e5af857486c71..a862d17e57ec9242bdef940ddcd6afe0dac4b4a5 100644 (file)
@@ -180,6 +180,15 @@ case "$PROG_NET_SNMP_CONFIG" in
 esac
 AC_MSG_RESULT([$PATH_NET_SNMP_CONFIG])
 
+case "$PATH_NET_SNMP_CONFIG" in
+ /*)   AC_CACHE_CHECK(
+           [for net-snmp version],
+           [ntp_cv_net_snmp_version],
+           [ntp_cv_net_snmp_version=`$PATH_NET_SNMP_CONFIG --version`]
+       )
+       ;;
+esac
+
 case "$host" in
  *-*-vxworks*)
     ac_link="$ac_link $VX_KERNEL"
@@ -3873,6 +3882,11 @@ case "$ans" in
     case "$PATH_NET_SNMP_CONFIG" in
      /*)
        SNMP_LIBS=`$PATH_NET_SNMP_CONFIG --agent-libs`
+       # Bug 2815.  This is a bit of a hack, but it works...
+       case "$ntp_cv_net_snmp_version" in
+        5.3*)  SNMP_LIBS=`echo $SNMP_LIBS | $SED -e 's/-lnetsnmpagent/-lnetsnmpagent -lnetsnmpmibs/'`
+               ;;
+       esac
        AC_SUBST([SNMP_LIBS])
        # HMS: we really want to separate CPPFLAGS and CFLAGS
        foo=`$PATH_NET_SNMP_CONFIG --cflags`