]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - configure.ac
New configure option: --enable-ubsan.
[paraslash.git] / configure.ac
index d993e526c8a30bdab55da1dd5a9df6f1ead5b320..850e814f21cbe3601441f3f625a712290b7d3015 100644 (file)
@@ -114,6 +114,15 @@ if test $HAVE_OPENSSL = yes; then
        test $HAVE_CRYPTO_CLEANUP_ALL_EX_DATA = yes &&
                AC_DEFINE([HAVE_CRYPTO_CLEANUP_ALL_EX_DATA], [1],
                        [not available on FreeBSD 12])
+       HAVE_OPENSSL_THREAD_STOP=yes
+       AC_CHECK_DECL([OPENSSL_thread_stop], [],
+               [HAVE_OPENSSL_THREAD_STOP=no],
+               [#include <openssl/crypto.h>])
+       AC_CHECK_LIB([crypto], [OPENSSL_thread_stop], [],
+               [HAVE_OPENSSL_THREAD_STOP=no])
+       test $HAVE_OPENSSL_THREAD_STOP = yes &&
+               AC_DEFINE([HAVE_OPENSSL_THREAD_STOP], [1],
+                       [not available on openssl-1.0])
 fi
 UNSTASH_FLAGS
 ######################################################################### gcrypt
@@ -364,6 +373,11 @@ AC_CHECK_HEADER(samplerate.h, [], HAVE_SAMPLERATE=no)
 AC_CHECK_LIB([samplerate], [src_process], [], HAVE_SAMPLERATE=no)
 LIB_SUBST_FLAGS(samplerate)
 UNSTASH_FLAGS
+######################################################################### ubsan
+AC_ARG_ENABLE([ubsan], [AS_HELP_STRING(--enable-ubsan,
+       [Detect and report undefined behaviour.])],
+       [ENABLE_UBSAN=yes], [ENABLE_UBSAN=no])
+AC_SUBST(ENABLE_UBSAN)
 ######################################################################### server
 if test -n "$CRYPTOLIB" && test $HAVE_OSL = yes && test -n "$BISON" && \
                test -n "$FLEX"; then