vsftpd: use pkg-config to get OpenSSL link flags
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 12 May 2015 21:07:04 +0000 (23:07 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Wed, 13 May 2015 08:02:58 +0000 (10:02 +0200)
Instead of hardcoding -lssl -lcrypto as the linker flags to link with
OpenSSL, use pkg-config to fetch those flags. This allows to behave
properly when doing static linking, since pkg-config returns the
entire set of libraries we should link against.

Fixes:

  http://autobuild.buildroot.org/results/d71/d710ecfa9ed0a8e3f97d2010d3dabb372485c7f2/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Gergely Imreh <imrehg@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/vsftpd/vsftpd.mk

index b94328da8402258afc133657b85af49278c844f6..ed15f00dff26162d3cfa2c8998b9b43d959905c7 100644 (file)
@@ -23,8 +23,8 @@ VSFTPD_POST_CONFIGURE_HOOKS += VSFTPD_DISABLE_UTMPX
 endif
 
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
-VSFTPD_DEPENDENCIES += openssl
-VSFTPD_LIBS += -lssl -lcrypto
+VSFTPD_DEPENDENCIES += openssl host-pkgconf
+VSFTPD_LIBS += $(shell $(PKG_CONFIG_HOST_BINARY) --libs libssl)
 VSFTPD_POST_CONFIGURE_HOOKS += VSFTPD_ENABLE_SSL
 endif