aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in34
1 files changed, 28 insertions, 6 deletions
diff --git a/configure.in b/configure.in
index d0c8fcf99..245f91e05 100644
--- a/configure.in
+++ b/configure.in
@@ -27,9 +27,13 @@ AC_SUBST(PACKAGE)
AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
+AC_ARG_ENABLE(dev-random,
+[ --disable-dev-random disable the use of dev random],
+ try_dev_random=$enableval, try_dev_random=yes)
+
AC_MSG_CHECKING([whether memory debugging is requested])
AC_ARG_ENABLE(m-debug,
-[ --enable-m-debug enable debugging of memory allocation],
+[ --enable-m-debug enable debugging of memory allocation],
use_m_debug=$enableval, use_m_debug=no)
AC_MSG_RESULT($use_m_debug)
if test "$use_m_debug" = yes; then
@@ -81,16 +85,28 @@ case "${target}" in
CPP="i386--mingw32-gcc -E"
RANLIB="i386--mingw32-ranlib"
ac_cv_have_dev_random=no
- PRINTABLE_OS_NAME="MingW32"
+ AC_DEFINE(USE_RAND_W32)
;;
*)
AC_PROG_RANLIB
AC_PROG_INSTALL
AC_PROG_CC
AC_PROG_CPP
- PRINTABLE_OS_NAME=`uname -s || echo "Unknown"`
+ AC_DEFINE(USE_RAND_UNIX)
;;
esac
+
+case "${target}" in
+ i386--mingw32)
+ PRINTABLE_OS_NAME="MingW32"
+ ;;
+ *-linux*)
+ PRINTABLE_OS_NAME="GNU/Linux"
+ ;;
+ *)
+ PRINTABLE_OS_NAME=`uname -s || echo "Unknown"`
+ ;;
+esac
AC_DEFINE_UNQUOTED(PRINTABLE_OS_NAME, "$PRINTABLE_OS_NAME")
dnl Checks for libraries.
@@ -132,18 +148,24 @@ fi
dnl Checks for library functions.
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(strerror stpcpy strlwr tcgetattr rand strtoul mlock mmap)
-AC_CHECK_FUNCS(gettimeofday getrusage)
-
-
+AC_CHECK_FUNCS(memmove gettimeofday getrusage gethrtime)
dnl check whether we have a random device
+if test "$try_dev_random" = yes ; then
AC_CACHE_CHECK(for random device, ac_cv_have_dev_random,
[if test -c /dev/random && test -c /dev/urandom ; then
ac_cv_have_dev_random=yes; else ac_cv_have_dev_random=no; fi])
if test "$ac_cv_have_dev_random" = yes; then
AC_DEFINE(HAVE_DEV_RANDOM)
fi
+else
+ AC_MSG_CHECKING(for random device)
+ ac_cv_have_dev_random=no
+ AC_MSG_RESULT(has been disabled)
+fi
+
+
dnl setup assembler stuff