hostapd: fix static linking
authorGustavo Zacarias <gustavo@zacarias.com.ar>
Tue, 4 Mar 2014 13:35:11 +0000 (10:35 -0300)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 4 Mar 2014 18:34:15 +0000 (19:34 +0100)
A rebase of Samuel Martin's http://patchwork.ozlabs.org/patch/312320/
hostapd doesn't use pkg-config and upstream likely wouldn't take a patch
to do so (hostapd/wpa_supplicant are used in android builds, and it
doesn't use any auto* stuff either) so pass it in LIBS since we
always build openssl with libz support.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/hostapd/hostapd.mk

index 37de60d9535ecd629697a2aca35492577d314265..5b7dd77483ad98a110852ae58fede34272b9e0b8 100644 (file)
@@ -43,6 +43,7 @@ endif
 # Try to use openssl if it's already available
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
        HOSTAPD_DEPENDENCIES += openssl
+       HOSTAPD_LIBS += $(if $(BR2_PREFER_STATIC_LIB),-lcrypto -lz)
        HOSTAPD_CONFIG_EDITS += 's/\#\(CONFIG_TLS=openssl\)/\1/'
 else
        HOSTAPD_CONFIG_DISABLE += CONFIG_EAP_PWD