tweak to random device detection
This commit is contained in:
parent
f3e3308968
commit
e52b84518c
18
config.h.in
18
config.h.in
|
@ -27,15 +27,6 @@
|
||||||
/* Define to 1 if you have the <CommonCrypto/CommonDigest.h> header file. */
|
/* Define to 1 if you have the <CommonCrypto/CommonDigest.h> header file. */
|
||||||
#undef HAVE_COMMONCRYPTO_COMMONDIGEST_H
|
#undef HAVE_COMMONCRYPTO_COMMONDIGEST_H
|
||||||
|
|
||||||
/* Has /dev/arandom */
|
|
||||||
#undef HAVE_DEV_ARANDOM
|
|
||||||
|
|
||||||
/* Has /dev/random */
|
|
||||||
#undef HAVE_DEV_RANDOM
|
|
||||||
|
|
||||||
/* Has /dev/urandom */
|
|
||||||
#undef HAVE_DEV_URANDOM
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `door_create' function. */
|
/* Define to 1 if you have the `door_create' function. */
|
||||||
#undef HAVE_DOOR_CREATE
|
#undef HAVE_DOOR_CREATE
|
||||||
|
|
||||||
|
@ -243,6 +234,15 @@
|
||||||
/* Define to 1 if you have the <wchar.h> header file. */
|
/* Define to 1 if you have the <wchar.h> header file. */
|
||||||
#undef HAVE_WCHAR_H
|
#undef HAVE_WCHAR_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the file `/dev/arandom'. */
|
||||||
|
#undef HAVE__DEV_ARANDOM
|
||||||
|
|
||||||
|
/* Define to 1 if you have the file `/dev/random'. */
|
||||||
|
#undef HAVE__DEV_RANDOM
|
||||||
|
|
||||||
|
/* Define to 1 if you have the file `/dev/urandom'. */
|
||||||
|
#undef HAVE__DEV_URANDOM
|
||||||
|
|
||||||
/* Is byte aligned */
|
/* Is byte aligned */
|
||||||
#undef IS_BYTE_ALIGNED
|
#undef IS_BYTE_ALIGNED
|
||||||
|
|
||||||
|
|
|
@ -6502,15 +6502,15 @@ fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
if [ "${host_os}" == "darwin" ]; then
|
|
||||||
# Check whether --enable-commoncrypto was given.
|
# Check whether --enable-commoncrypto was given.
|
||||||
if test "${enable_commoncrypto+set}" = set; then :
|
if test "${enable_commoncrypto+set}" = set; then :
|
||||||
enableval=$enable_commoncrypto;
|
enableval=$enable_commoncrypto;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if test "x${enable_commoncrypto}" != "xno"
|
if test "x${enable_commoncrypto}" != "xno"
|
||||||
then
|
then
|
||||||
for ac_header in CommonCrypto/CommonDigest.h
|
for ac_header in CommonCrypto/CommonDigest.h
|
||||||
do :
|
do :
|
||||||
ac_fn_cxx_check_header_mongrel "$LINENO" "CommonCrypto/CommonDigest.h" "ac_cv_header_CommonCrypto_CommonDigest_h" "$ac_includes_default"
|
ac_fn_cxx_check_header_mongrel "$LINENO" "CommonCrypto/CommonDigest.h" "ac_cv_header_CommonCrypto_CommonDigest_h" "$ac_includes_default"
|
||||||
|
@ -6523,11 +6523,9 @@ fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${host_os}" == solaris* ]; then
|
for ac_header in door.h
|
||||||
for ac_header in door.h
|
|
||||||
do :
|
do :
|
||||||
ac_fn_cxx_check_header_mongrel "$LINENO" "door.h" "ac_cv_header_door_h" "$ac_includes_default"
|
ac_fn_cxx_check_header_mongrel "$LINENO" "door.h" "ac_cv_header_door_h" "$ac_includes_default"
|
||||||
if test "x$ac_cv_header_door_h" = xyes; then :
|
if test "x$ac_cv_header_door_h" = xyes; then :
|
||||||
|
@ -6549,7 +6547,7 @@ fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
for ac_header in port.h
|
for ac_header in port.h
|
||||||
do :
|
do :
|
||||||
ac_fn_cxx_check_header_mongrel "$LINENO" "port.h" "ac_cv_header_port_h" "$ac_includes_default"
|
ac_fn_cxx_check_header_mongrel "$LINENO" "port.h" "ac_cv_header_port_h" "$ac_includes_default"
|
||||||
if test "x$ac_cv_header_port_h" = xyes; then :
|
if test "x$ac_cv_header_port_h" = xyes; then :
|
||||||
|
@ -6571,7 +6569,7 @@ fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
|
||||||
$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
|
$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
|
||||||
|
@ -6646,27 +6644,79 @@ fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if [ "${host_os}" != "aros" ]; then
|
case $host_os in
|
||||||
|
aros*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/random" >&5
|
||||||
|
$as_echo_n "checking for /dev/random... " >&6; }
|
||||||
|
if ${ac_cv_file__dev_random+:} false; then :
|
||||||
|
$as_echo_n "(cached) " >&6
|
||||||
|
else
|
||||||
|
test "$cross_compiling" = yes &&
|
||||||
|
as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
|
||||||
|
if test -r "/dev/random"; then
|
||||||
|
ac_cv_file__dev_random=yes
|
||||||
|
else
|
||||||
|
ac_cv_file__dev_random=no
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_random" >&5
|
||||||
|
$as_echo "$ac_cv_file__dev_random" >&6; }
|
||||||
|
if test "x$ac_cv_file__dev_random" = xyes; then :
|
||||||
|
|
||||||
if test -c "/dev/random"; then
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define HAVE__DEV_RANDOM 1
|
||||||
$as_echo "#define HAVE_DEV_RANDOM 1" >>confdefs.h
|
_ACEOF
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -c "/dev/urandom"; then
|
|
||||||
|
|
||||||
$as_echo "#define HAVE_DEV_URANDOM 1" >>confdefs.h
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -c "/dev/arandom"; then
|
|
||||||
|
|
||||||
$as_echo "#define HAVE_DEV_ARANDOM 1" >>confdefs.h
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
|
||||||
|
$as_echo_n "checking for /dev/urandom... " >&6; }
|
||||||
|
if ${ac_cv_file__dev_urandom+:} false; then :
|
||||||
|
$as_echo_n "(cached) " >&6
|
||||||
|
else
|
||||||
|
test "$cross_compiling" = yes &&
|
||||||
|
as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
|
||||||
|
if test -r "/dev/urandom"; then
|
||||||
|
ac_cv_file__dev_urandom=yes
|
||||||
|
else
|
||||||
|
ac_cv_file__dev_urandom=no
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
|
||||||
|
$as_echo "$ac_cv_file__dev_urandom" >&6; }
|
||||||
|
if test "x$ac_cv_file__dev_urandom" = xyes; then :
|
||||||
|
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define HAVE__DEV_URANDOM 1
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
fi
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/arandom" >&5
|
||||||
|
$as_echo_n "checking for /dev/arandom... " >&6; }
|
||||||
|
if ${ac_cv_file__dev_arandom+:} false; then :
|
||||||
|
$as_echo_n "(cached) " >&6
|
||||||
|
else
|
||||||
|
test "$cross_compiling" = yes &&
|
||||||
|
as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
|
||||||
|
if test -r "/dev/arandom"; then
|
||||||
|
ac_cv_file__dev_arandom=yes
|
||||||
|
else
|
||||||
|
ac_cv_file__dev_arandom=no
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_arandom" >&5
|
||||||
|
$as_echo "$ac_cv_file__dev_arandom" >&6; }
|
||||||
|
if test "x$ac_cv_file__dev_arandom" = xyes; then :
|
||||||
|
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define HAVE__DEV_ARANDOM 1
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lc" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lc" >&5
|
||||||
|
|
44
configure.ac
44
configure.ac
|
@ -246,23 +246,21 @@ AC_CHECK_FUNCS(readlinkat readlink)
|
||||||
dnl check for posix_fadvise
|
dnl check for posix_fadvise
|
||||||
AC_CHECK_HEADERS(fcntl.h, [AC_CHECK_FUNCS(posix_fadvise)])
|
AC_CHECK_HEADERS(fcntl.h, [AC_CHECK_FUNCS(posix_fadvise)])
|
||||||
|
|
||||||
if [[ "${host_os}" == "darwin" ]]; then
|
|
||||||
dnl check for OSX builtin hash algorithms
|
dnl check for OSX builtin hash algorithms
|
||||||
AC_ARG_ENABLE(commoncrypto,
|
AC_ARG_ENABLE(commoncrypto,
|
||||||
[ --disable-commoncrypto Don't use CommonCrypto hash implementations (OSX only)])
|
[ --disable-commoncrypto Don't use CommonCrypto hash implementations (OSX only)])
|
||||||
|
|
||||||
if test "x${enable_commoncrypto}" != "xno"
|
if test "x${enable_commoncrypto}" != "xno"
|
||||||
then
|
then
|
||||||
AC_CHECK_HEADERS(CommonCrypto/CommonDigest.h)
|
AC_CHECK_HEADERS(CommonCrypto/CommonDigest.h)
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${host_os}" == solaris* ]]; then
|
dnl check for door support (Solaris)
|
||||||
dnl check for door support (Solaris)
|
AC_CHECK_HEADERS(door.h, [AC_CHECK_FUNCS(door_create)])
|
||||||
AC_CHECK_HEADERS(door.h, [AC_CHECK_FUNCS(door_create)])
|
dnl check for event port support (Solaris)
|
||||||
dnl check for event port support (Solaris)
|
AC_CHECK_HEADERS(port.h, [AC_CHECK_FUNCS(port_create)])
|
||||||
AC_CHECK_HEADERS(port.h, [AC_CHECK_FUNCS(port_create)])
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl check for existence of fseeko() as well as ftello()
|
dnl check for existence of fseeko() as well as ftello()
|
||||||
AC_FUNC_FSEEKO
|
AC_FUNC_FSEEKO
|
||||||
|
@ -279,21 +277,13 @@ dnl if script looks for devices (which don't exist)
|
||||||
dnl so don't even try looking.
|
dnl so don't even try looking.
|
||||||
dnl ##############################################
|
dnl ##############################################
|
||||||
|
|
||||||
if [[ "${host_os}" != "aros" ]]; then
|
case $host_os in
|
||||||
|
aros*)
|
||||||
if test -c "/dev/random"; then
|
;;
|
||||||
AC_DEFINE(HAVE_DEV_RANDOM, [1], [Has /dev/random])
|
*)
|
||||||
fi
|
AC_CHECK_FILES(/dev/random /dev/urandom /dev/arandom)
|
||||||
|
;;
|
||||||
if test -c "/dev/urandom"; then
|
esac
|
||||||
AC_DEFINE(HAVE_DEV_URANDOM, [1], [Has /dev/urandom])
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -c "/dev/arandom"; then
|
|
||||||
AC_DEFINE(HAVE_DEV_ARANDOM, [1], [Has /dev/arandom])
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl ##############################################
|
dnl ##############################################
|
||||||
dnl Checks for various platform specific libraries
|
dnl Checks for various platform specific libraries
|
||||||
|
|
Loading…
Reference in New Issue