mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-22 02:49:00 +00:00
Improve autofiles checksum check
This commit is contained in:
parent
cd7c0bf368
commit
c9d11d70a7
@ -1,7 +1,7 @@
|
||||
778da79a0593929b27db80016877d550 configure.ac
|
||||
d16a8e8947744745887520e331e59e39 m4/ax_random_device.m4
|
||||
2cc70ef55adb11e355f6e8c30dcab090 m4/libtool.m4
|
||||
064af1799febaa676203302bbf359180 m4/ltoptions.m4
|
||||
fa2891f9060865871cbbaa1c6e2d96f4 m4/ltsugar.m4
|
||||
d936fd6b2025c9b5322f826117d7f30c m4/ltversion.m4
|
||||
22aa295bf5320aec7fba6756ff11058a m4/lt~obsolete.m4
|
||||
9e7830c08cda9f1ffcbc6e6cce79e58dd6d8de5f6b9a889067c816b23f463025 configure.ac
|
||||
35bc5c645dc42d47f2daeea06f8f3e767c8a1aee6a35eb2b4854fd2ce66c3413 m4/ax_random_device.m4
|
||||
37f8897d5f68d7d484e5457832a8f190ddb7507fa2a467cb7ee2be40a4364643 m4/libtool.m4
|
||||
e77ebba8361b36f14b4d0927173a034b98c5d05049697a9ded84d85eb99a7990 m4/ltoptions.m4
|
||||
5a6735cda60e0ba0d1b706c0ef648f5d096298da46daefd9cdecdb6a0f4584d3 m4/ltsugar.m4
|
||||
a27b754709de61575197bf5a980696c98ae49da3f92f0de8ee7f42dd543b7465 m4/ltversion.m4
|
||||
26fa3285c35dd6ab00ed1e466ba92a17e4655e01897731ec18a587a4cf5e4f8d m4/lt~obsolete.m4
|
||||
|
@ -3,4 +3,4 @@ set -e
|
||||
aclocal -I m4
|
||||
autoheader
|
||||
autoconf
|
||||
md5sum configure.ac m4/* >| autofiles.sums
|
||||
sha256sum configure.ac m4/* >| autofiles.sums
|
||||
|
28
configure
vendored
28
configure
vendored
@ -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
|
||||
|
@ -16,9 +16,9 @@ AC_CONFIG_HEADERS([libqpdf/qpdf/qpdf-config.h])
|
||||
AC_CHECK_PROG(AUTOCONF,autoconf,1,0)
|
||||
AC_CHECK_PROG(AUTOHEADER,autoheader,1,0)
|
||||
AC_CHECK_PROG(ACLOCAL,aclocal,1,0)
|
||||
AC_CHECK_PROG(MD5SUM,md5sum,1,0)
|
||||
if test "$AUTOCONF$AUTOHEADER$ACLOCAL$MD5SUM" = "1111"; then
|
||||
if ! md5sum configure.ac m4/* | diff -w - autofiles.sums; then
|
||||
AC_CHECK_PROG(SHA256SUM,sha256sum,1,0)
|
||||
if test "$AUTOCONF$AUTOHEADER$ACLOCAL$SHA256SUM" = "1111"; then
|
||||
if ! sha256sum -c autofiles.sums; then
|
||||
AC_MSG_ERROR(autofiles are autodated; rerun autogen.sh)
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user