--- configure.in.orig	2010-07-25 08:19:30 UTC
+++ configure.in
@@ -116,6 +111,9 @@ AC_CHECK_LIB(ssl, SSL_new, ,
 	AC_WARN([OpenSSL library not found!!!  STARTTLS will be disabled.]),
 	-lcrypto)
 
+AC_CHECK_LIB(crypto, RAND_egd, 
+	AC_DEFINE(HAVE_RAND_EGD, 1, [Define if the libcrypto has RAND_egd])
+)
 
 dnl Check for curses
 save_LIBS="$LIBS"
