diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 683b239f..9b53403b 100644 --- a/configure.ac +++ b/configure.ac @@ -26,11 +26,26 @@ AC_ARG_ENABLE(insecure-random, fi], [qpdf_INSECURE_RANDOM=0]) if test "$qpdf_INSECURE_RANDOM" = "1"; then AC_MSG_RESULT(yes) - AC_DEFINE([USE_INSECURE_RANDOM], [1], [Whether to use inscure random numbers]) + AC_DEFINE([USE_INSECURE_RANDOM], [1], [Whether to use insecure random numbers]) else AC_MSG_RESULT(no) fi +AC_ARG_ENABLE(os-secure-random, + AS_HELP_STRING([--enable-os-secure-random], + [whether to try to use OS-provided secure random numbers (default is yes)]), + [if test "$enableval" = "yes"; then + qpdf_OS_SECURE_RANDOM=1; + else + qpdf_OS_SECURE_RANDOM=0; + fi], [qpdf_OS_SECURE_RANDOM=1]) +if test "$qpdf_OS_SECURE_RANDOM" = "1"; then + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) + AC_DEFINE([SKIP_OS_SECURE_RANDOM], [1], [Whether to suppres use of OS-provided secure random numbers]) +fi + AX_RANDOM_DEVICE USE_EXTERNAL_LIBS=0 @@ -71,7 +86,7 @@ if test "$BUILD_INTERNAL_LIBS" = "0"; then AC_SEARCH_LIBS(pcre_compile,pcre,,[MISSING_PCRE=1; MISSING_ANY=1]) fi -if test "x$qpdf_INSECURE_RANDOM" != "x1"; then +if test "x$qpdf_OS_SECURE_RANDOM" = "x1"; then OLIBS=$LIBS LIBS="$LIBS Advapi32.lib" AC_MSG_CHECKING(for Advapi32 library) |