Commit 253e1543 authored by Simon Morlat's avatar Simon Morlat
Browse files

fix configure when detecting polarssl

parent 958ece7b
...@@ -42,13 +42,15 @@ if test "$polarssl_prefix" != "NONE" ; then ...@@ -42,13 +42,15 @@ if test "$polarssl_prefix" != "NONE" ; then
POLARSSL_LIBS="-L${polarssl_prefix}/lib" POLARSSL_LIBS="-L${polarssl_prefix}/lib"
fi fi
LIBS_save=$LIBS
LIBS="$LIBS $POLARSSL_LIBS"
AC_CHECK_LIB(mbedtls, ssl_init , [POLARSSL_LIBS="$POLARSSL_LIBS -lmbedtls"], AC_CHECK_LIB(mbedtls, ssl_init , [POLARSSL_LIBS="$POLARSSL_LIBS -lmbedtls"],
[ [
AC_CHECK_LIB(polarssl, ssl_init, [POLARSSL_LIBS="$POLARSSL_LIBS -lpolarssl"], AC_CHECK_LIB(polarssl, ssl_init, [POLARSSL_LIBS="$POLARSSL_LIBS -lpolarssl"],
[ AC_MSG_ERROR([Polarssl or mbedTLS library not found]) ] [ AC_MSG_ERROR([Polarssl or mbedTLS library not found]) ]
) )
]) ])
LIBS=$LIBS_save
AC_SUBST(POLARSSL_LIBS) AC_SUBST(POLARSSL_LIBS)
AC_SUBST(POLARSSL_CFLAGS) AC_SUBST(POLARSSL_CFLAGS)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment