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

Fix static build on sparc v8 (even if there is no autobuilder failures
yet)

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

index 867227253841762c02588c0dfffa144ebe0eeace..7ac6b5cb22c5e1c562e1ee389fe26e9fea661b72 100644 (file)
@@ -9,17 +9,14 @@ IPSEC_TOOLS_SOURCE = ipsec-tools-$(IPSEC_TOOLS_VERSION).tar.bz2
 IPSEC_TOOLS_SITE = http://sourceforge.net/projects/ipsec-tools/files/ipsec-tools/$(IPSEC_TOOLS_VERSION)
 IPSEC_TOOLS_INSTALL_STAGING = YES
 IPSEC_TOOLS_MAKE = $(MAKE1)
-IPSEC_TOOLS_DEPENDENCIES = openssl flex host-flex host-bison
+IPSEC_TOOLS_DEPENDENCIES = openssl flex host-pkgconf host-flex host-bison
 # we patch configure.ac
 IPSEC_TOOLS_AUTORECONF = YES
 
 # configure hardcodes -Werror, so override CFLAGS on make invocation
 IPSEC_TOOLS_MAKE_OPTS = CFLAGS='$(TARGET_CFLAGS)'
 
-# openssl uses zlib, so we need to explicitly link with it when static
-ifeq ($(BR2_STATIC_LIBS),y)
-IPSEC_TOOLS_CONF_ENV += LIBS=-lz
-endif
+IPSEC_TOOLS_CONF_ENV = LIBS=`$(PKG_CONFIG_HOST_BINARY) --libs openssl`
 
 IPSEC_TOOLS_CONF_OPTS = \
          --without-libpam \