0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-20 12:12:15 +02:00

build: added MTLS_DIST setting

MTLS_DIST=path -- use user-specified mbedTLS distribution

Signed-off-by: James Yonan <james@openvpn.net>
This commit is contained in:
James Yonan 2019-06-22 22:41:54 -06:00
parent 4eaa46a879
commit 310766b270

View File

@ -35,6 +35,7 @@ if [ -z "$1" ]; then
echo " MTLS_SYS=1 -- use system mbedTLS"
echo " MTLS_PATH=path -- use user specified mbedTLS source folder"
echo " MTLS_LIBS=ldflags -- user specific mbedTLS LDFLAGS"
echo " MTLS_DIST=path -- use user-specified mbedTLS distribution"
echo " MA_HYBRID=1 -- use mbedTLS/AppleCrypto hybrid"
echo " OPENSSL_DIST=<dir> -- specify custom OpenSSL build"
echo " NOSSL=1 -- don't include OpenSSL"
@ -123,7 +124,12 @@ FLAGS="$FLAGS -Wno-sign-compare -Wno-unused-parameter"
#fi
# MbedTLS
if [ "$MTLS_SYS" = "1" ]; then
if [ -n "$MTLS_DIST" ]; then
CPPFLAGS="$CPPFLAGS -DUSE_MBEDTLS -I$MTLS_DIST/include"
LIBDIRS="$LIBDIRS -L$MTLS_DIST/library"
LIBS="$LIBS -lmbedtls -lmbedx509 -lmbedcrypto"
MTLS=1
elif [ "$MTLS_SYS" = "1" ]; then
CPPFLAGS="$CPPFLAGS -DUSE_MBEDTLS"
LIBS="$LIBS -lmbedtls -lmbedx509 -lmbedcrypto"
elif [ "$MTLS" = "1" ]; then