libpwquality: Link with zlib when required in static builds
authorStefan Sørensen <stefan.sorensen@spectralink.com>
Wed, 5 Jul 2017 10:45:18 +0000 (12:45 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 5 Jul 2017 14:34:35 +0000 (16:34 +0200)
Fixes:

  http://autobuild.buildroot.net/results/cfb3a591391d90762a326d91af3ec502a6161ac5

Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/libpwquality/libpwquality.mk

index 66b15d805b2225455b0b5e3a2a776009612b87f5..697af0b0b244f38997c69aaa9d9bed7f40af3505 100644 (file)
@@ -27,6 +27,11 @@ else
 LIBPWQUALITY_CONF_OPTS += --disable-pam
 endif
 
+# Static link with cracklib requires -lz if zlib is enabled
+ifeq ($(BR2_STATIC_LIBS)$(BR2_PACKAGE_ZLIB),yy)
+LIBPWQUALITY_CONF_ENV += LIBS="-lz"
+endif
+
 ifeq ($(BR2_PACKAGE_LIBPWQUALITY_TOOLS),)
 define LIBPWQUALITY_REMOVE_TOOLS
        rm -f $(TARGET_DIR)/usr/bin/pwmake