From: David Lamparter Date: Sat, 27 Oct 2018 17:06:22 +0000 (+0200) Subject: build: crop excessive net-snmp library list X-Git-Tag: frr-7.1-dev~234^2~2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=e5563f877811c1e8ef68990e27a590c4483d06ca;p=matthieu%2Ffrr.git build: crop excessive net-snmp library list This fixes the longstanding GPL vs. OpenSSL licensing issue in our SNMP code (and cuts down on its other dependencies a wee bit.) In a way, net-snmp is really buggy here in what it says that we should link against, but I don't know their application scenarios well enough to say it should be changed at their end. Signed-off-by: David Lamparter --- diff --git a/configure.ac b/configure.ac index 5ebe188c19..706b954d6f 100755 --- a/configure.ac +++ b/configure.ac @@ -1535,6 +1535,11 @@ if test "${enable_snmp}" != "" -a "${enable_snmp}" != "no"; then fi SNMP_LIBS="`${NETSNMP_CONFIG} --agent-libs`" SNMP_CFLAGS="`${NETSNMP_CONFIG} --base-cflags`" + # net-snmp lists all of its own dependencies. we absolutely do not want that + # among other things we avoid a GPL vs. OpenSSL license conflict here + for removelib in crypto ssl sensors pci wrap; do + SNMP_LIBS="`echo $SNMP_LIBS | sed -e 's/\(^\|\s\)-l'$removelib'\b/ /g' -e 's/\(^\|\s\)\([^\s]*\/\)\?lib'$removelib'\.[^\s]\+\b/ /g'`" + done AC_MSG_CHECKING([whether we can link to Net-SNMP]) AC_LINK_IFELSE_FLAGS([$SNMP_CFLAGS], [$SNMP_LIBS], [AC_LANG_PROGRAM([ int main(void);