From: Alon Bar-Lev Date: Mon, 21 May 2012 14:04:14 +0300 Message-Id: <1337598254-32641-1-git-send-email-alon.barlev@...277...> Subject: [Openvpn-devel] [PATCH] build: check minimum polarssl version List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: openvpn-devel@lists.sourceforge.net Cc: Alon Bar-Lev Pre 1.1 is unsupported, API was changed. Signed-off-by: Alon Bar-Lev --- configure.ac | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index 4592727..5ace128 100644 --- a/configure.ac +++ b/configure.ac @@ -743,6 +743,27 @@ if test -z "${POLARSSL_LIBS}"; then ) fi +if test "${with_crypto_library}" = "polarssl" ; then + AC_MSG_CHECKING([polarssl version]) + old_CFLAGS="${CFLAGS}" + CFLAGS="${POLARSSL_CFLAGS} ${CFLAGS}" + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include + ]], + [[ +#if POLARSSL_VERSION_NUMBER <= 0x01010000 +#error invalid version +#endif + ]] + )], + [AC_MSG_RESULT([ok])], + [AC_MSG_ERROR([invalid polarssl version])] + ) + CFLAGS="${old_CFLAGS}" +fi + AC_ARG_VAR([LZO_CFLAGS], [C compiler flags for lzo]) AC_ARG_VAR([LZO_LIBS], [linker flags for lzo]) have_lzo="yes" -- 1.7.3.4