aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--m4/check-os-options.m410
1 files changed, 9 insertions, 1 deletions
diff --git a/m4/check-os-options.m4 b/m4/check-os-options.m4
index f2ff57f..ed7320a 100644
--- a/m4/check-os-options.m4
+++ b/m4/check-os-options.m4
@@ -20,7 +20,15 @@ case $host_os in
20 # weak seed on failure to open /dev/random, based on latest 20 # weak seed on failure to open /dev/random, based on latest
21 # public source: 21 # public source:
22 # http://www.opensource.apple.com/source/Libc/Libc-997.90.3/gen/FreeBSD/arc4random.c 22 # http://www.opensource.apple.com/source/Libc/Libc-997.90.3/gen/FreeBSD/arc4random.c
23 USE_BUILTIN_ARC4RANDOM=yes 23 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
24#include <unistd.h>
25#include <sys/random.h>
26 ]], [[
27char buf[1]; getentropy(buf, 1);
28 ]])],
29 [ USE_BUILTIN_ARC4RANDOM=no ],
30 [ USE_BUILTIN_ARC4RANDOM=yes ]
31 )
24 # Not available on iOS 32 # Not available on iOS
25 AC_CHECK_HEADER([arpa/telnet.h], [], [BUILD_NC=no]) 33 AC_CHECK_HEADER([arpa/telnet.h], [], [BUILD_NC=no])
26 ;; 34 ;;