summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac45
1 files changed, 36 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index 50d2545..88d1e09 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ dnl session authentication and key exchange,
dnl packet encryption, packet authentication, and
dnl packet compression.
dnl
-dnl Copyright (C) 2002-2017 OpenVPN Technologies, Inc. <sales@openvpn.net>
+dnl Copyright (C) 2002-2018 OpenVPN Inc <sales@openvpn.net>
dnl Copyright (C) 2006-2012 Alon Bar-Lev <alon.barlev@gmail.com>
dnl
dnl This program is free software; you can redistribute it and/or modify
@@ -879,6 +879,13 @@ if test "${enable_crypto}" = "yes" -a "${with_crypto_library}" = "openssl"; then
,
[have_openssl_engine="no"; break]
)
+ if test "${have_openssl_engine}" = "no"; then
+ AC_CHECK_DECL( [ENGINE_cleanup], [have_openssl_engine="yes"],,
+ [[
+ #include <openssl/engine.h>
+ ]]
+ )
+ fi
if test "${have_openssl_engine}" = "yes"; then
AC_DEFINE([HAVE_OPENSSL_ENGINE], [1], [OpenSSL engine support available])
fi
@@ -900,6 +907,7 @@ if test "${enable_crypto}" = "yes" -a "${with_crypto_library}" = "openssl"; then
EVP_MD_CTX_reset \
SSL_CTX_get_default_passwd_cb \
SSL_CTX_get_default_passwd_cb_userdata \
+ SSL_CTX_set_security_level \
X509_get0_pubkey \
X509_STORE_get0_objects \
X509_OBJECT_free \
@@ -923,6 +931,7 @@ if test "${enable_crypto}" = "yes" -a "${with_crypto_library}" = "openssl"; then
RSA_meth_set_init \
RSA_meth_set_finish \
RSA_meth_set0_app_data \
+ RSA_meth_get0_app_data \
EC_GROUP_order_bits
]
)
@@ -1071,9 +1080,11 @@ if test "$enable_lz4" = "yes" && test "$enable_comp_stub" = "no"; then
if test -z "${LZ4_CFLAGS}" -a -z "${LZ4_LIBS}"; then
# if the user did not explicitly specify flags, try to autodetect
PKG_CHECK_MODULES([LZ4],
- [liblz4 >= 1.7.1],
+ [liblz4 >= 1.7.1 liblz4 < 100],
[have_lz4="yes"],
- [] # If this fails, we will do another test next
+ [LZ4_LIBS="-llz4"] # If this fails, we will do another test next.
+ # We also add set LZ4_LIBS otherwise the
+ # linker will not know about the lz4 library
)
fi
@@ -1111,16 +1122,20 @@ if test "$enable_lz4" = "yes" && test "$enable_comp_stub" = "no"; then
fi
fi
- # if LZ4_LIBS is set, we assume it will work, otherwise test
- if test -z "${LZ4_LIBS}"; then
+ # Double check we have a few needed functions
+ if test "${have_lz4}" = "yes" ; then
AC_CHECK_LIB([lz4],
- [LZ4_compress],
- [LZ4_LIBS="-llz4"],
+ [LZ4_compress_default],
+ [],
+ [have_lz4="no"])
+ AC_CHECK_LIB([lz4],
+ [LZ4_decompress_safe],
+ [],
[have_lz4="no"])
fi
if test "${have_lz4}" != "yes" ; then
- AC_MSG_RESULT([ usuable LZ4 library or header not found, using version in src/compat/compat-lz4.*])
+ AC_MSG_RESULT([ usable LZ4 library or header not found, using version in src/compat/compat-lz4.*])
AC_DEFINE([NEED_COMPAT_LZ4], [1], [use copy of LZ4 source in compat/])
LZ4_LIBS=""
fi
@@ -1271,13 +1286,25 @@ if test "${enable_pkcs11}" = "yes"; then
)
fi
+AC_DEFUN([ACL_CHECK_ADD_COMPILE_FLAGS], [
+ old_cflags="$CFLAGS"
+ CFLAGS="$1 $CFLAGS"
+ AC_MSG_CHECKING([whether the compiler acceppts $1])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no]); CFLAGS="$old_cflags"])]
+)
+
+ACL_CHECK_ADD_COMPILE_FLAGS([-Wno-unused-function])
+ACL_CHECK_ADD_COMPILE_FLAGS([-Wno-unused-parameter])
+ACL_CHECK_ADD_COMPILE_FLAGS([-Wall])
+
if test "${enable_pedantic}" = "yes"; then
enable_strict="yes"
CFLAGS="${CFLAGS} -pedantic"
AC_DEFINE([PEDANTIC], [1], [Enable pedantic mode])
fi
if test "${enable_strict}" = "yes"; then
- CFLAGS="${CFLAGS} -Wall -Wno-unused-parameter -Wno-unused-function"
+ CFLAGS="${CFLAGS} -Wsign-compare -Wuninitialized"
fi
if test "${enable_werror}" = "yes"; then
CFLAGS="${CFLAGS} -Werror"