summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-12-03 10:22:29 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-12-03 10:22:29 +0000
commitdc0e93d89ed94fe5e01e2a25513f1e990dc35356 (patch)
tree1877bc752afcc79e8b3208b047e065f2eabf4189 /configure.ac
parent9c143e4444c290a71a9b5e5b645992531394a58c (diff)
downloadc-ares-dc0e93d89ed94fe5e01e2a25513f1e990dc35356.tar.gz
c-ares-dc0e93d89ed94fe5e01e2a25513f1e990dc35356.tar.bz2
c-ares-dc0e93d89ed94fe5e01e2a25513f1e990dc35356.zip
Brad Spencer fixed the configure script to assume that there's no
/dev/urandom when built cross-compiled as then the script cannot check for it.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 9 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 46ba266..f5adf73 100644
--- a/configure.ac
+++ b/configure.ac
@@ -828,8 +828,15 @@ AC_HELP_STRING([--with-random=FILE],
[read randomness from FILE (default=/dev/urandom)]),
[ RANDOM_FILE="$withval" ],
[
- dnl Check for random device
- AC_CHECK_FILE("/dev/urandom", [ RANDOM_FILE="/dev/urandom"] )
+ dnl Check for random device. If we're cross compiling, we can't
+ dnl check, and it's better to assume it doesn't exist than it is
+ dnl to fail on AC_CHECK_FILE or later.
+ if test "$cross_compiling" = "no"; then
+ AC_CHECK_FILE("/dev/urandom", [ RANDOM_FILE="/dev/urandom"] )
+ else
+ AC_MSG_WARN([cannot check for /dev/urandom while cross compiling; assuming none])
+ fi
+
]
)
if test -n "$RANDOM_FILE" && test X"$RANDOM_FILE" != Xno ; then