From a5679e1fea0273371ab5cb725d4944ae75c0b71b Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Sat, 27 Oct 2018 19:06:22 +0200 Subject: [PATCH] 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 --- configure.ac | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac index 54fc121430..559b8088ae 100755 --- a/configure.ac +++ b/configure.ac @@ -1489,6 +1489,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); -- 2.39.5