msmtp: fix static linking with openssl
authorPeter Korsgaard <jacmet@sunsite.dk>
Sun, 1 Jul 2012 21:59:44 +0000 (23:59 +0200)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sun, 1 Jul 2012 21:59:44 +0000 (23:59 +0200)
Openssl depends on zlib, so we need to explicitly link with
zlib as well when statically linking.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/msmtp/msmtp.mk

index 2c712293d3d0d91a8fb3247329f5b0b18318aca0..d5e6a31234de5b468070a929b47861855050262d 100644 (file)
@@ -13,6 +13,10 @@ MSMTP_DEPENDENCIES += host-pkg-config
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 MSMTP_CONF_OPT += --with-ssl=openssl
 MSMTP_DEPENDENCIES += openssl
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
+# openssl uses zlib, so we need to explicitly link with it when static
+MSMTP_CONF_ENV += LIBS=-lz
+endif
 else ifeq ($(BR2_PACKAGE_GNUTLS),y)
 MSMTP_CONF_OPT += --with-ssl=gnutls
 MSMTP_DEPENDENCIES += gnutls