aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-21 14:39:52 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-21 14:39:52 +0000
commit712969305d814a0e17e2caee39034ab3a6d08845 (patch)
tree3dd28cfae26b84eddc5a655e4ed87151396fcbd9 /configure
parent704310b6672d869217479c9c94fd55301035ea31 (diff)
Add support for using /dev/urandom to get random numbers on systems that support it.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76296 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure40
1 files changed, 35 insertions, 5 deletions
diff --git a/configure b/configure
index 17cf8779b..3856370bf 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.ac Revision: 74575 .
+# From configure.ac Revision: 75259 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61.
#
@@ -12127,11 +12127,13 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <stdio.h>
+#include <sys/types.h> /* for off_t */
+ #include <stdio.h>
int
main ()
{
-return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
+int (*fp) (FILE *, off_t, int) = fseeko;
+ return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
;
return 0;
}
@@ -12171,11 +12173,13 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#define _LARGEFILE_SOURCE 1
-#include <stdio.h>
+#include <sys/types.h> /* for off_t */
+ #include <stdio.h>
int
main ()
{
-return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
+int (*fp) (FILE *, off_t, int) = fseeko;
+ return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
;
return 0;
}
@@ -15110,6 +15114,32 @@ fi
done
+{ echo "$as_me:$LINENO: checking for /dev/urandom" >&5
+echo $ECHO_N "checking for /dev/urandom... $ECHO_C" >&6; }
+if test "${ac_cv_file__dev_urandom+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ test "$cross_compiling" = yes &&
+ { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
+if test -r "/dev/urandom"; then
+ ac_cv_file__dev_urandom=yes
+else
+ ac_cv_file__dev_urandom=no
+fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_file__dev_urandom" >&5
+echo "${ECHO_T}$ac_cv_file__dev_urandom" >&6; }
+if test $ac_cv_file__dev_urandom = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DEV_URANDOM 1
+_ACEOF
+
+fi
+
+
if test "x${PBX_PTHREAD_RWLOCK_INITIALIZER}" != "x1" -a "${USE_PTHREAD_RWLOCK_INITIALIZER}" != "no"; then
{ echo "$as_me:$LINENO: checking for PTHREAD_RWLOCK_INITIALIZER in pthread.h" >&5