diff configure.in @ 1335:5ad84c54eb7e HEAD

Support using OpenSSL's pseudo-random generator instead of /dev/urandom. If neither are found, allow dovecot-auth still to be started because currently only DIGEST-MD5 requires prng.
author Timo Sirainen <tss@iki.fi>
date Fri, 04 Apr 2003 17:40:13 +0300
parents 952bf533c2ea
children fe6f252a389f
line wrap: on
line diff
--- a/configure.in	Fri Apr 04 15:40:24 2003 +0300
+++ b/configure.in	Fri Apr 04 17:40:13 2003 +0300
@@ -464,6 +464,22 @@
   AC_DEFINE(HAVE_SOCKLEN_T,, Define to 'int' if you don't have socklen_t)
 fi
 
+dnl * find random source
+AC_MSG_CHECKING([for /dev/urandom])
+if test -e /dev/urandom; then
+  AC_MSG_RESULT(yes)
+  AC_DEFINE(HAVE_DEV_URANDOM,, Define if you have /dev/urandom)
+  have_random_source=yes
+else
+  AC_MSG_RESULT(no)
+
+  AC_CHECK_HEADER(openssl/rand.h, [
+    AC_DEFINE(HAVE_OPENSSL_RAND_H,, Define if you have openssl/rand.h)
+    RAND_LIBS=-lcrypto
+  ])
+fi
+AC_SUBST(RAND_LIBS)
+
 dnl * do we have tm_gmtoff
 AC_MSG_CHECKING([for tm_gmtoff])
 AC_CACHE_VAL(i_cv_field_tm_gmtoff,