From: Harlan Stenn Date: Mon, 27 Apr 2015 10:48:48 +0000 (+0000) Subject: [Bug 2815] net-snmp before v5.4 has circular library dependencies X-Git-Tag: NTP_4_3_21~1^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa71e643bf5309103a4119b79ac6e2846def9d16;p=thirdparty%2Fntp.git [Bug 2815] net-snmp before v5.4 has circular library dependencies bk: 553e1410CrBSwQ14aWHkNiCwSmZ6IQ --- diff --git a/ChangeLog b/ChangeLog index 91ac1c7ac..cb5e12ab1 100644 --- 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 --- diff --git a/configure.ac b/configure.ac index dc5c7fcfd..a862d17e5 100644 --- a/configure.ac +++ b/configure.ac @@ -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`