summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorylavic <ylavic@13f79535-47bb-0310-9956-ffa450edef68>2017-11-03 23:28:21 +0000
committerylavic <ylavic@13f79535-47bb-0310-9956-ffa450edef68>2017-11-03 23:28:21 +0000
commite8ab8180f4469c8fc06b64579cbfd4c95a0a50fa (patch)
treec3e446c9750398042bbc2d146b2b80e3fe576b19 /configure.in
parent39812422ed04d6a156f7aee7cb467fa79a056ee9 (diff)
downloadlibapr-e8ab8180f4469c8fc06b64579cbfd4c95a0a50fa.tar.gz
rand: add support for the arc4random API as an entropy source.
The arc4random API originates from OpenBSD where it supersedes random(3), rand(3), and files in the /dev filesystem. Use it for apr_generate_random_bytes(). Proposed by: Christian Weisgerber Reviewed by: ylavic git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1814239 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 11a8ff175..2c960c927 100644
--- a/configure.in
+++ b/configure.in
@@ -2453,6 +2453,8 @@ else
fi
dnl ----------------------------- Checking for /dev/random
+AC_CHECK_FUNCS(arc4random_buf)
+
AC_MSG_CHECKING(for entropy source)
why_no_rand=""
@@ -2471,6 +2473,13 @@ AC_ARG_WITH(egd,
])
if test "$rand" != "1"; then
+ if test "$ac_cv_func_arc4random_buf" = yes; then
+ AC_MSG_RESULT(arc4random)
+ rand="1"
+ fi
+fi
+
+if test "$rand" != "1"; then
AC_ARG_WITH(devrandom,
[ --with-devrandom[[=DEV]] use /dev/random or compatible [[searches by default]]],
[ apr_devrandom="$withval" ], [ apr_devrandom="yes" ])