summaryrefslogtreecommitdiff
path: root/libstdc++-v3/configure
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2006-06-09 23:37:28 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2006-06-09 23:37:28 +0000
commit61edee22190ce29f51e9c58675732c732b37a7f7 (patch)
treeb0b35b54857630cba67404df1c6d5bb2c1d445fe /libstdc++-v3/configure
parentd77f260f5a8da7df9137839267784a357479b54a (diff)
downloadgcc-61edee22190ce29f51e9c58675732c732b37a7f7.tar.gz
2006-06-09 Paolo Carlini <pcarlini@suse.de>
* acinclude.m4 ([GLIBCXX_CHECK_RANDOM_TR1]): New, check for the availability of "/dev/random" and "/dev/urandom". * configure.ac: Use it. * include/tr1/random (random_device): Implement, a fall-back for systems not providing "/dev/random" and "/dev/urandom" included. * testsuite/tr1/5_numerical_facilities/random/random_device/ cons/default.cc: New. * testsuite/tr1/5_numerical_facilities/random/random_device/ cons/token.cc: Likewise. * testsuite/tr1/5_numerical_facilities/random/random_device/ requirements/typedefs.cc: Likewise. * config.h.in: Regenerate. * configure: Likewise. * testsuite/tr1/5_numerical_facilities/random/mersenne_twister/ cons/gen1.cc: Minor tweak, add bool test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114529 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/configure')
-rwxr-xr-xlibstdc++-v3/configure63
1 files changed, 63 insertions, 0 deletions
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 68e2f6c0d37..1c2698d3524 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -31113,6 +31113,69 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ # For dev/random and dev/urandom for TR1.
+
+
+ echo "$as_me:$LINENO: checking for \"dev/random\" and \"dev/urandom\" for TR1 random_device" >&5
+echo $ECHO_N "checking for \"dev/random\" and \"dev/urandom\" for TR1 random_device... $ECHO_C" >&6
+ if test "${ac_random_tr1+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test "$cross_compiling" = yes; then
+ ac_random_tr1=no
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdio.h>
+ int main()
+ {
+ return !(fopen("/dev/random", "r")
+ && fopen("/dev/urandom", "r"));
+ }
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_random_tr1=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_random_tr1=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+fi
+
+ echo "$as_me:$LINENO: result: $ac_random_tr1" >&5
+echo "${ECHO_T}$ac_random_tr1" >&6
+ if test x"$ac_random_tr1" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define _GLIBCXX_USE_RANDOM_TR1 1
+_ACEOF
+
+ fi
+
+
+
# For TLS support.
# Check whether --enable-tls or --disable-tls was given.