ipsec-tools: fix static linking
authorGustavo Zacarias <gustavo@zacarias.com.ar>
Mon, 10 Mar 2014 20:26:25 +0000 (17:26 -0300)
committerPeter Korsgaard <peter@korsgaard.com>
Tue, 11 Mar 2014 22:02:13 +0000 (23:02 +0100)
As with other packages that use openssl and don't use pkg-config to
pick up the deps it fails to build for static scenarios.
So fix it by adding the zlib link option to LIBS.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/ipsec-tools/ipsec-tools.mk

index d5521acc1e239b729ef1f1611d2bf23ff23811d1..44c33808e0373966c6de045f212975d51bae0632 100644 (file)
@@ -15,6 +15,11 @@ IPSEC_TOOLS_DEPENDENCIES = openssl flex host-flex
 # configure hardcodes -Werror, so override CFLAGS on make invocation
 IPSEC_TOOLS_MAKE_OPT = CFLAGS='$(TARGET_CFLAGS)'
 
+# openssl uses zlib, so we need to explicitly link with it when static
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
+IPSEC_TOOLS_CONF_ENV += LIBS=-lz
+endif
+
 IPSEC_TOOLS_CONF_OPT = \
          --disable-hybrid \
          --without-libpam \