aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJere Leppänen <jere.leppanen@nokia.com>2021-11-17 20:24:50 +0200
committerPetri Savolainen <petri.savolainen@nokia.com>2021-11-25 15:29:11 +0200
commit03d7a4f99041302a60ffc083db4debaa1fd443ac (patch)
tree6077803876f7ecf00212db6fd3991ef341ef54cf /configure.ac
parentf4f65975085b40b9153fc5f14bfe28265843070c (diff)
configure: add option to disable openssl random
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 <jere.leppanen@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 16 insertions, 0 deletions
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}