mirror of
https://github.com/OpenVPN/openvpn.git
synced 2026-05-28 04:03:29 -04:00
configure.ac: fix polarssl autodetection
A missing , in the previous configure.ac patch caused the autodetection to
fail. While fixing that, I noticed I can simplify the check by using the
documented ${ac_cv_search_function} cache variable instead of the nested
AC_SEARCH_LIBS.
Signed-off-by: Steffan Karger <steffan@karger.me>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1453150181-21453-1-git-send-email-steffan@karger.me>
URL: http://article.gmane.org/gmane.network.openvpn.devel/11010
Signed-off-by: Gert Doering <gert@greenie.muc.de>
This commit is contained in:
parent
31b0bebef6
commit
417fe4a72c
1 changed files with 10 additions and 12 deletions
22
configure.ac
22
configure.ac
|
|
@ -832,30 +832,28 @@ elif test "${with_crypto_library}" = "polarssl"; then
|
||||||
AC_ARG_VAR([POLARSSL_CFLAGS], [C compiler flags for polarssl])
|
AC_ARG_VAR([POLARSSL_CFLAGS], [C compiler flags for polarssl])
|
||||||
AC_ARG_VAR([POLARSSL_LIBS], [linker flags for polarssl])
|
AC_ARG_VAR([POLARSSL_LIBS], [linker flags for polarssl])
|
||||||
|
|
||||||
|
saved_CFLAGS="${CFLAGS}"
|
||||||
|
saved_LIBS="${LIBS}"
|
||||||
|
|
||||||
if test -z "${POLARSSL_CFLAGS}" -a -z "${POLARSSL_LIBS}"; then
|
if test -z "${POLARSSL_CFLAGS}" -a -z "${POLARSSL_LIBS}"; then
|
||||||
# if the user did not explicitly specify flags, try to autodetect
|
# if the user did not explicitly specify flags, try to autodetect
|
||||||
AC_SEARCH_LIBS(
|
AC_SEARCH_LIBS(
|
||||||
[ssl_init],
|
[ssl_init],
|
||||||
[mbedtls],
|
[mbedtls polarssl],
|
||||||
[POLARSSL_LIBS=-lmbedtls]
|
|
||||||
[
|
[
|
||||||
AC_SEARCH_LIBS(
|
if test "${ac_cv_search_ssl_init}" != "none required"; then
|
||||||
[ssl_init],
|
POLARSSL_LIBS=${ac_cv_search_ssl_init}
|
||||||
[polarssl],
|
fi
|
||||||
[POLARSSL_LIBS=-lpolarssl]
|
|
||||||
[],
|
|
||||||
[${PKCS11_HELPER_LIBS}]
|
|
||||||
)
|
|
||||||
],
|
],
|
||||||
|
[AC_MSG_ERROR([Could not find PolarSSL/mbed TLS.])],
|
||||||
[${PKCS11_HELPER_LIBS}]
|
[${PKCS11_HELPER_LIBS}]
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_MSG_CHECKING([polarssl version])
|
|
||||||
saved_CFLAGS="${CFLAGS}"
|
|
||||||
saved_LIBS="${LIBS}"
|
|
||||||
CFLAGS="${POLARSSL_CFLAGS} ${PKCS11_HELPER_CFLAGS} ${CFLAGS}"
|
CFLAGS="${POLARSSL_CFLAGS} ${PKCS11_HELPER_CFLAGS} ${CFLAGS}"
|
||||||
LIBS="${POLARSSL_LIBS} ${PKCS11_HELPER_LIBS} ${LIBS}"
|
LIBS="${POLARSSL_LIBS} ${PKCS11_HELPER_LIBS} ${LIBS}"
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([polarssl version])
|
||||||
AC_COMPILE_IFELSE(
|
AC_COMPILE_IFELSE(
|
||||||
[AC_LANG_PROGRAM(
|
[AC_LANG_PROGRAM(
|
||||||
[[
|
[[
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue