summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/autoconf/configure.ac2
-rwxr-xr-xllvm/cmake/config-ix.cmake1
-rwxr-xr-xllvm/configure3
-rw-r--r--llvm/include/llvm/Config/config.h.cmake3
-rw-r--r--llvm/include/llvm/Config/config.h.in3
5 files changed, 10 insertions, 2 deletions
diff --git a/llvm/autoconf/configure.ac b/llvm/autoconf/configure.ac
index 0118e8be37f..9d066ff1d74 100644
--- a/llvm/autoconf/configure.ac
+++ b/llvm/autoconf/configure.ac
@@ -1346,7 +1346,7 @@ AC_CHECK_FUNCS([powf fmodf strtof round ])
AC_CHECK_FUNCS([getpagesize getrusage getrlimit setrlimit gettimeofday ])
AC_CHECK_FUNCS([isatty mkdtemp mkstemp ])
AC_CHECK_FUNCS([mktemp posix_spawn pread realpath sbrk setrlimit strdup ])
-AC_CHECK_FUNCS([strerror strerror_r setenv ])
+AC_CHECK_FUNCS([strerror strerror_r setenv arc4random ])
AC_CHECK_FUNCS([strtoll strtoq sysconf malloc_zone_statistics ])
AC_CHECK_FUNCS([setjmp longjmp sigsetjmp siglongjmp writev])
AC_C_PRINTF_A
diff --git a/llvm/cmake/config-ix.cmake b/llvm/cmake/config-ix.cmake
index 37b36461802..51b64ac8bbf 100755
--- a/llvm/cmake/config-ix.cmake
+++ b/llvm/cmake/config-ix.cmake
@@ -91,6 +91,7 @@ if( NOT PURE_WINDOWS )
endif()
# function checks
+check_symbol_exists(arc4random "stdlib.h" HAVE_ARC4RANDOM)
check_symbol_exists(getpagesize unistd.h HAVE_GETPAGESIZE)
check_symbol_exists(getrusage sys/resource.h HAVE_GETRUSAGE)
check_symbol_exists(setrlimit sys/resource.h HAVE_SETRLIMIT)
diff --git a/llvm/configure b/llvm/configure
index 60e839f5c33..bc4c98449d5 100755
--- a/llvm/configure
+++ b/llvm/configure
@@ -17522,7 +17522,8 @@ done
-for ac_func in strerror strerror_r setenv
+
+for ac_func in strerror strerror_r setenv arc4random
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
diff --git a/llvm/include/llvm/Config/config.h.cmake b/llvm/include/llvm/Config/config.h.cmake
index 24f9c1f671e..4f909502bca 100644
--- a/llvm/include/llvm/Config/config.h.cmake
+++ b/llvm/include/llvm/Config/config.h.cmake
@@ -23,6 +23,9 @@
/* Define if timestamp information (e.g., __DATE___) is allowed */
#cmakedefine ENABLE_TIMESTAMPS ${ENABLE_TIMESTAMPS}
+/* Define to 1 if you have the `arc4random' function. */
+#cmakedefine HAVE_ARC4RANDOM
+
/* Define to 1 if you have the `argz_append' function. */
#cmakedefine HAVE_ARGZ_APPEND ${HAVE_ARGZ_APPEND}
diff --git a/llvm/include/llvm/Config/config.h.in b/llvm/include/llvm/Config/config.h.in
index 677bf2e40b8..0c288885fd0 100644
--- a/llvm/include/llvm/Config/config.h.in
+++ b/llvm/include/llvm/Config/config.h.in
@@ -24,6 +24,9 @@
/* Directory where gcc is installed. */
#undef GCC_INSTALL_PREFIX
+/* Define to 1 if you have the `arc4random' function. */
+#undef HAVE_ARC4RANDOM
+
/* Define to 1 if you have the `argz_append' function. */
#undef HAVE_ARGZ_APPEND
OpenPOWER on IntegriCloud