@ -850,22 +850,22 @@ dnl Check for user-specified random device
AC_ARG_WITH(random,
AC_ARG_WITH(random,
AC_HELP_STRING([--with-random=FILE],
AC_HELP_STRING([--with-random=FILE],
[read randomness from FILE (default=/dev/urandom)]),
[read randomness from FILE (default=/dev/urandom)]),
[ RANDOM_FILE="$withval" ],
[ CARES_ RANDOM_FILE="$withval" ],
[
[
dnl Check for random device. If we're cross compiling, we can't
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 check, and it's better to assume it doesn't exist than it is
dnl to fail on AC_CHECK_FILE or later.
dnl to fail on AC_CHECK_FILE or later.
if test "$cross_compiling" = "no"; then
if test "$cross_compiling" = "no"; then
AC_CHECK_FILE("/dev/urandom", [ RANDOM_FILE="/dev/urandom"] )
AC_CHECK_FILE("/dev/urandom", [ CARES_ RANDOM_FILE="/dev/urandom"] )
else
else
AC_MSG_WARN([cannot check for /dev/urandom while cross compiling; assuming none])
AC_MSG_WARN([cannot check for /dev/urandom while cross compiling; assuming none])
fi
fi
]
]
)
)
if test -n "$RANDOM_FILE" && test X"$RANDOM_FILE" != Xno ; then
if test -n "$CARES_ RANDOM_FILE" && test X"$CARES_ RANDOM_FILE" != Xno ; then
AC_SUBST(RANDOM_FILE)
AC_SUBST(CARES_ RANDOM_FILE)
AC_DEFINE_UNQUOTED(RANDOM_FILE, "$RANDOM_FILE",
AC_DEFINE_UNQUOTED(CARES_ RANDOM_FILE, "$CARES_ RANDOM_FILE",
[a suitable file/device to read random data from])
[a suitable file/device to read random data from])
fi
fi