X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fgc-random.m4;h=40e047106a8b5fd90f894d143425720b3cdc2afc;hb=901bc47c9a8db854db97bb28780352748020c81d;hp=516646e17c20e5ae72bb31ce69367fadfed14995;hpb=bc384c1f22669f79431a5917cf5c8b0bfb5da86e;p=gnulib.git diff --git a/m4/gc-random.m4 b/m4/gc-random.m4 index 516646e17..40e047106 100644 --- a/m4/gc-random.m4 +++ b/m4/gc-random.m4 @@ -41,30 +41,36 @@ AC_DEFUN([gl_GC_RANDOM], AC_ARG_ENABLE(random-device, AC_HELP_STRING([--enable-random-device], [device with (strong) randomness (for Nettle)]), - test "$enableval" != "no" && NAME_OF_RANDOM_DEVICE=$enableval) + NAME_OF_RANDOM_DEVICE=$enableval) AC_MSG_RESULT($NAME_OF_RANDOM_DEVICE) AC_MSG_CHECKING([device with pseudo random data...]) AC_ARG_ENABLE(pseudo-random-device, AC_HELP_STRING([--enable-pseudo-random-device], [device with pseudo randomness (for Nettle)]), - test "$enableval" != "no" && NAME_OF_PSEUDO_RANDOM_DEVICE=$enableval) + NAME_OF_PSEUDO_RANDOM_DEVICE=$enableval) AC_MSG_RESULT($NAME_OF_PSEUDO_RANDOM_DEVICE) AC_MSG_CHECKING([device with unpredictable data for nonces...]) AC_ARG_ENABLE(nonce-device, AC_HELP_STRING([--enable-nonce-device], [device with unpredictable nonces (for Nettle)]), - test "$enableval" != "no" && NAME_OF_NONCE_DEVICE=$enableval) + NAME_OF_NONCE_DEVICE=$enableval) AC_MSG_RESULT($NAME_OF_NONCE_DEVICE) if test "$cross_compiling" != yes; then - AC_CHECK_FILE($NAME_OF_RANDOM_DEVICE,, - AC_MSG_WARN([[device for (strong) random data `$NAME_OF_RANDOM_DEVICE' does not exist]])) - AC_CHECK_FILE($NAME_OF_PSEUDO_RANDOM_DEVICE,, - AC_MSG_WARN([[device for pseudo-random data `$NAME_OF_PSEUDO_RANDOM_DEVICE' does not exist]])) - AC_CHECK_FILE($NAME_OF_NONCE_DEVICE,, - AC_MSG_WARN([[device for unpredictable nonces `$NAME_OF_NONCE_DEVICE' does not exist]])) + if test "$NAME_OF_RANDOM_DEVICE" != "no"; then + AC_CHECK_FILE($NAME_OF_RANDOM_DEVICE,, + AC_MSG_WARN([[Device `$NAME_OF_RANDOM_DEVICE' does not exist, consider to use --enable-random-device]])) + fi + if test "$NAME_OF_PSEUDO_RANDOM_DEVICE" != "no"; then + AC_CHECK_FILE($NAME_OF_PSEUDO_RANDOM_DEVICE,, + AC_MSG_WARN([[Device `$NAME_OF_PSEUDO_RANDOM_DEVICE' does not exist, consider to use --enable-pseudo-random-device]])) + fi + if test "$NAME_OF_NONCE_DEVICE" != "no"; then + AC_CHECK_FILE($NAME_OF_NONCE_DEVICE,, + AC_MSG_WARN([[Device `$NAME_OF_NONCE_DEVICE' does not exist, consider to use --enable-nonce-device]])) + fi else AC_MSG_NOTICE([[Cross compiling, assuming random devices exists on the target host...]]) fi