-dnl
-dnl check whether we have a random device
-dnl
-if test "$try_dev_random" = yes ; then
- AC_CACHE_CHECK(for random device, ac_cv_have_dev_random,
- [if test -c "$NAME_OF_DEV_RANDOM" && test -c "$NAME_OF_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
-dnl and whether this device supports ioctl
-dnl (Note, that we should do a real test here)
-dnl
-if test "$ac_cv_have_dev_random" = yes ; then
- AC_CHECK_HEADERS(linux/random.h)
- AC_CACHE_CHECK(for random device ioctl, ac_cv_have_dev_random_ioctl,
- [ if test "$ac_cv_header_linux_random_h" = yes ; then
- ac_cv_have_dev_random_ioctl=yes;
- else
- ac_cv_have_dev_random_ioctl=no;
- fi
- ])
- if test "$ac_cv_have_dev_random_ioctl" = yes; then
- AC_DEFINE(HAVE_DEV_RANDOM_IOCTL)
- fi
-fi
-
-
-dnl
-dnl Figure out the default linkage mode for cipher modules
-dnl
-dnl (We always need a static rmd160)
-print_egd_notice=no
-static_modules="$static_modules rmd160"
-if test "$use_static_rnd" = default; then
- if test "$ac_cv_have_dev_random" = yes; then
- static_modules="$static_modules rndlinux"
- else
- case "${target}" in
- *-*-mingw32)
- static_modules="$static_modules rndw32"
- AC_DEFINE(USE_STATIC_RNDW32)
- ;;
- i?86-emx-os2|i?86-*-os2*emx)
- static_modules="$static_modules rndos2"
- ;;
- m68k-atari-mint)
- static_modules="$static_modules rndatari"
- ;;
- i?86-*-msdosdjgpp*)
- static_modules="$static_modules"
- ;;
- *)
- static_modules="$static_modules rndunix"
- print_egd_notice=yes
- ;;
- esac
- fi
-else
- if test "$use_static_rnd" = none; then
- :
- else
- static_modules="$static_modules rnd$use_static_rnd"
- if test "$use_static_rnd" = "unix"; then
- print_egd_notice=yes
- fi
- fi
-fi
-
-
-if test "$print_egd_notice" = "yes"; then
- AC_MSG_WARN([[
-***
-*** The performance of the UNIX random gatherer module is not very good
-*** and it does not keep the entropy pool over multiple invocations of
-*** GnuPG. The suggested way to overcome this problem is to use the
-***
-*** Entropy Gathering Daemon (EGD)
-***
-*** which provides a entropy source for the whole system. It is written
-*** in Perl and available at the GnuPG FTP servers. For more information
-*** consult the GnuPG webpages:
-***
-*** http://www.gnupg.org/download.html#egd
-***
-*** You may want to run ./configure with --enable-static-rnd=none to be
-*** able to load the EGD client code dynamically; this way you can choose
-*** between RNDUNIX and RNDEGD without recompilation.
-***]])
-fi