From 03d7a4f99041302a60ffc083db4debaa1fd443ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jere=20Lepp=C3=A4nen?= Date: Wed, 17 Nov 2021 20:24:50 +0200 Subject: configure: add option to disable openssl random MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add configure option --disable-openssl-rand, which disables the use of OpenSSL RAND_bytes() to generate basic random and crypto random data. Signed-off-by: Jere Leppänen Reviewed-by: Janne Peltonen --- configure.ac | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 19d0a84a8..1aa5a85c3 100644 --- a/configure.ac +++ b/configure.ac @@ -339,6 +339,21 @@ AM_CONDITIONAL([WITH_OPENSSL], [test x$with_openssl != xno]) AC_DEFINE_UNQUOTED([_ODP_OPENSSL], [$have_openssl], [Define to 1 to enable OpenSSL support]) +have_openssl_rand=1 +AC_ARG_ENABLE([openssl-rand], + [AS_HELP_STRING([--disable-openssl-rand], + [Disable OpenSSL random data (use arch-specific instead)] + [[default=enabled]])], + [if test "x$enableval" = "xno"; then + have_openssl_rand=0 + fi]) + +AS_IF([test "$have_openssl" != "1"], [have_openssl_rand=0]) +AS_IF([test "$have_openssl_rand" = "1"], [openssl_rand=yes], [openssl_rand=no]) + +AC_DEFINE_UNQUOTED([_ODP_OPENSSL_RAND], [$have_openssl_rand], + [Define to 1 to enable OpenSSL support]) + ########################################################################## # Include m4 files ########################################################################## @@ -523,6 +538,7 @@ AC_MSG_RESULT([ testdir: ${testdir} WITH_ARCH: ${WITH_ARCH} with_openssl: ${with_openssl} + openssl_rand: ${openssl_rand} cc: ${CC} cc version: ${CC_VERSION} -- cgit v1.2.3