From c9d11d70a739fa521c2adaebd0ae5b88e643eb78 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Fri, 12 Oct 2018 09:22:14 -0400 Subject: Improve autofiles checksum check --- configure | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'configure') diff --git a/configure b/configure index ec5d9571..aa0a89cd 100755 --- a/configure +++ b/configure @@ -698,7 +698,7 @@ CPPFLAGS LDFLAGS CFLAGS CC -MD5SUM +SHA256SUM ACLOCAL AUTOHEADER AUTOCONF @@ -2564,15 +2564,15 @@ $as_echo "no" >&6; } fi -# Extract the first word of "md5sum", so it can be a program name with args. -set dummy md5sum; ac_word=$2 +# Extract the first word of "sha256sum", so it can be a program name with args. +set dummy sha256sum; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MD5SUM+:} false; then : +if ${ac_cv_prog_SHA256SUM+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$MD5SUM"; then - ac_cv_prog_MD5SUM="$MD5SUM" # Let the user override the test. + if test -n "$SHA256SUM"; then + ac_cv_prog_SHA256SUM="$SHA256SUM" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -2581,7 +2581,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_MD5SUM="1" + ac_cv_prog_SHA256SUM="1" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -2589,21 +2589,21 @@ done done IFS=$as_save_IFS - test -z "$ac_cv_prog_MD5SUM" && ac_cv_prog_MD5SUM="0" + test -z "$ac_cv_prog_SHA256SUM" && ac_cv_prog_SHA256SUM="0" fi fi -MD5SUM=$ac_cv_prog_MD5SUM -if test -n "$MD5SUM"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MD5SUM" >&5 -$as_echo "$MD5SUM" >&6; } +SHA256SUM=$ac_cv_prog_SHA256SUM +if test -n "$SHA256SUM"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHA256SUM" >&5 +$as_echo "$SHA256SUM" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -if test "$AUTOCONF$AUTOHEADER$ACLOCAL$MD5SUM" = "1111"; then - if ! md5sum configure.ac m4/* | diff -w - autofiles.sums; then +if test "$AUTOCONF$AUTOHEADER$ACLOCAL$SHA256SUM" = "1111"; then + if ! sha256sum -c autofiles.sums; then as_fn_error $? "autofiles are autodated; rerun autogen.sh" "$LINENO" 5 fi fi -- cgit v1.2.3-54-g00ecf