package/stunnel: fix static build with openssl and atomic
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Thu, 11 Apr 2019 21:12:49 +0000 (23:12 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 14 Apr 2019 12:42:36 +0000 (14:42 +0200)
Use pkg-config to find openssl dependencies such as lz or latomic

Fixes:
 - http://autobuild.buildroot.org/results/28a466b98f813edb6402686cc4706766e73e1ff3

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/stunnel/stunnel.mk

index 4a5d2a0335ca5adc9cce7813d1d82520211cd3c0..9a81373a54f015a784b9efbbc183673a5c619761 100644 (file)
@@ -7,12 +7,12 @@
 STUNNEL_VERSION_MAJOR = 5
 STUNNEL_VERSION = $(STUNNEL_VERSION_MAJOR).44
 STUNNEL_SITE = http://www.usenix.org.uk/mirrors/stunnel/archive/$(STUNNEL_VERSION_MAJOR).x
-STUNNEL_DEPENDENCIES = openssl
+STUNNEL_DEPENDENCIES = host-pkgconf openssl
 STUNNEL_CONF_OPTS = --with-ssl=$(STAGING_DIR)/usr --with-threads=fork \
        --disable-libwrap
 STUNNEL_CONF_ENV = \
        ax_cv_check_cflags___fstack_protector=$(if $(BR2_TOOLCHAIN_HAS_SSP),yes,no) \
-       LIBS=$(if $(BR2_STATIC_LIBS),-lz)
+       LIBS=`$(PKG_CONFIG_HOST_BINARY) --libs openssl`
 STUNNEL_LICENSE = GPL-2.0+
 STUNNEL_LICENSE_FILES = COPYING COPYRIGHT.GPL