package/netsnmp: fix static build with openssl
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Sat, 13 Apr 2019 08:57:41 +0000 (10:57 +0200)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Sat, 13 Apr 2019 14:57:56 +0000 (16:57 +0200)
Use pkg-config to find openssl dependencies such as lz or latomic

Fixes:
 - http://autobuild.buildroot.org/results/8f6fdbf8a21967363b737bc771252bcded4278a9

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
package/netsnmp/netsnmp.mk

index 4bd65ef17a691e6fa7e516ece294441cb421fb44..ed573c51e3f6267b035b6f433f827de714cc1d9f 100644 (file)
@@ -53,15 +53,12 @@ endif
 
 # OpenSSL
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
-NETSNMP_DEPENDENCIES += openssl
+NETSNMP_DEPENDENCIES += host-pkgconf openssl
 NETSNMP_CONF_OPTS += \
        --with-openssl=$(STAGING_DIR)/usr/include/openssl \
        --with-security-modules="tsm,usm" \
        --with-transports="DTLSUDP,TLSTCP"
-ifeq ($(BR2_STATIC_LIBS),y)
-# openssl uses zlib, so we need to explicitly link with it when static
-NETSNMP_CONF_ENV += LIBS=-lz
-endif
+NETSNMP_CONF_ENV += LIBS=`$(PKG_CONFIG_HOST_BINARY) --libs openssl`
 else ifeq ($(BR2_PACKAGE_NETSNMP_OPENSSL_INTERNAL),y)
 NETSNMP_CONF_OPTS += --with-openssl=internal
 else