From de663031eba07b594d2c40ad06ad48b4b851dfab Mon Sep 17 00:00:00 2001 From: Sam Leffler Date: Sat, 10 Nov 2007 20:26:08 +0000 Subject: [PATCH] fix building w/ WITHOUT_WPA_SUPPLICANT_EAPOL MFC after: 1 week --- usr.sbin/wpa/wpa_supplicant/Makefile | 31 +++++++++++++++++++--------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/usr.sbin/wpa/wpa_supplicant/Makefile b/usr.sbin/wpa/wpa_supplicant/Makefile index f6b18d5b2473..9dd95362c7dc 100644 --- a/usr.sbin/wpa/wpa_supplicant/Makefile +++ b/usr.sbin/wpa/wpa_supplicant/Makefile @@ -102,25 +102,36 @@ SRCS+= eap_pax.c eap_pax_common.c SRCS+= eap_sake.c eap_sake_common.c .endif -.if defined(NEED_SHA256) -CFLAGS+=-DINTERNAL_SHA256 -SRCS+= sha256.c -.endif - # NB: requires patch to openssl #CFLAGS+= -DEAP_FAST #SRCS+= eap_fast.c -DPADD+= ${LIBSSL} ${LIBCRYPTO} -LDADD+= -lssl -lcrypto +NEED_LIBSSL= true .else CFLAGS+= -DEAP_TLS_NONE -CFLAGS+= -DINTERNAL_AES -CFLAGS+= -DINTERNAL_SHA1 -CFLAGS+= -DINTERNAL_MD5 SRCS+= tls_none.c .endif .endif +# +# Configure crypto/cipher support. +# +# EAPOL support requires openssl in which case we use their +# cipher code. Otherwise we use our internal versions. +# +.if !defined(NEED_LIBSSL) +CFLAGS+= -DINTERNAL_AES +CFLAGS+= -DINTERNAL_SHA1 +CFLAGS+= -DINTERNAL_MD5 +.else +DPADD+= ${LIBSSL} ${LIBCRYPTO} +LDADD+= -lssl -lcrypto +.endif + +.if defined(NEED_SHA256) +CFLAGS+=-DINTERNAL_SHA256 +SRCS+= sha256.c +.endif + .include