mirror of
https://github.com/OpenVPN/openvpn.git
synced 2026-02-03 20:39:40 -05: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_LIBS], [linker flags for polarssl])
|
||||
|
||||
saved_CFLAGS="${CFLAGS}"
|
||||
saved_LIBS="${LIBS}"
|
||||
|
||||
if test -z "${POLARSSL_CFLAGS}" -a -z "${POLARSSL_LIBS}"; then
|
||||
# if the user did not explicitly specify flags, try to autodetect
|
||||
AC_SEARCH_LIBS(
|
||||
[ssl_init],
|
||||
[mbedtls],
|
||||
[POLARSSL_LIBS=-lmbedtls]
|
||||
[mbedtls polarssl],
|
||||
[
|
||||
AC_SEARCH_LIBS(
|
||||
[ssl_init],
|
||||
[polarssl],
|
||||
[POLARSSL_LIBS=-lpolarssl]
|
||||
[],
|
||||
[${PKCS11_HELPER_LIBS}]
|
||||
)
|
||||
if test "${ac_cv_search_ssl_init}" != "none required"; then
|
||||
POLARSSL_LIBS=${ac_cv_search_ssl_init}
|
||||
fi
|
||||
],
|
||||
[AC_MSG_ERROR([Could not find PolarSSL/mbed TLS.])],
|
||||
[${PKCS11_HELPER_LIBS}]
|
||||
)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([polarssl version])
|
||||
saved_CFLAGS="${CFLAGS}"
|
||||
saved_LIBS="${LIBS}"
|
||||
CFLAGS="${POLARSSL_CFLAGS} ${PKCS11_HELPER_CFLAGS} ${CFLAGS}"
|
||||
LIBS="${POLARSSL_LIBS} ${PKCS11_HELPER_LIBS} ${LIBS}"
|
||||
|
||||
AC_MSG_CHECKING([polarssl version])
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[
|
||||
|
|
|
|||
Loading…
Reference in a new issue