break;
fi
done
+ AC_CHECK_LIB(crypto, RAND_egd, AC_DEFINE(HAVE_RAND_EGD, 1, [Define if the libcrypto has RAND_egd]))
CFLAGS="$save_CFLAGS"
LIBS="$save_LIBS"
fi
entropy_p = 1;
}
#endif
-#ifndef NO_RAND_EGD_METHOD
+#if !defined(NO_RAND_EGD_METHOD) && defined(HAVE_RAND_EGD)
/*
* Only to get egd entropy if /dev/random or arc4rand failed since
* it can be horribly slow to generate new bits.
else if (strcasecmp(rand_method, "unix") == 0)
RAND_set_rand_method(RAND_unix_method());
#endif
-#ifndef NO_RAND_EGD_METHOD
+#if !defined(NO_RAND_EGD_METHOD) && defined(HAVE_RAND_EGD)
else if (strcasecmp(rand_method, "egd") == 0)
RAND_set_rand_method(RAND_egd_method());
#endif
/* Calling RAND_status() will try to use /dev/urandom if it exists so
we do not have to deal with it. */
if (RAND_status() != 1) {
-#ifndef NO_RAND_EGD_METHOD
+#if !defined(NO_RAND_EGD_METHOD) && defined(HAVE_RAND_EGD)
krb5_context context;
const char *p;