Commit 2d0336d8626da47e8e820682fe067a6f8ce88243

Authored by Jay Berkenbilt
1 parent e6f1e547

Add --disable-check-autofiles to configure

ChangeLog
... ... @@ -2,6 +2,12 @@
2 2  
3 3 * 8.3.0: release
4 4  
  5 + * Add configure flag --enable-check-autofiles, which is on by
  6 + default. Packagers whose packaging systems automatically refresh
  7 + autoconf or libtool files should pass --disable-check-autofiles to
  8 + ./configure to suppress warnings about automatically generated
  9 + files being outdated.
  10 +
5 11 2019-01-06 Jay Berkenbilt <ejb@ql.org>
6 12  
7 13 * Remove the restriction in most cases that the source QPDF used
... ...
autofiles.sums
1   -17b7466a112e85278a43dee35f0aa61aa093476b8886929634db9f2b6b298f19 configure.ac
  1 +b544741ebe32e6bf555703b4cbedcaef62553da29e3230df4ccb8351900e2378 configure.ac
2 2 35bc5c645dc42d47f2daeea06f8f3e767c8a1aee6a35eb2b4854fd2ce66c3413 m4/ax_random_device.m4
3 3 37f8897d5f68d7d484e5457832a8f190ddb7507fa2a467cb7ee2be40a4364643 m4/libtool.m4
4 4 e77ebba8361b36f14b4d0927173a034b98c5d05049697a9ded84d85eb99a7990 m4/ltoptions.m4
... ...
configure
... ... @@ -744,6 +744,7 @@ SHELL&#39;
744 744 ac_subst_files=''
745 745 ac_user_opts='
746 746 enable_option_checking
  747 +enable_check_autofiles
747 748 enable_shared
748 749 enable_static
749 750 with_pic
... ... @@ -1409,6 +1410,10 @@ Optional Features:
1409 1410 --disable-option-checking ignore unrecognized --enable/--with options
1410 1411 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1411 1412 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
  1413 + --enable-check-autofiles
  1414 + if specified, verify checksums on automatically
  1415 + generated files (default=yes); package maintainers
  1416 + may want to disable this
1412 1417 --enable-shared[=PKGS] build shared libraries [default=yes]
1413 1418 --enable-static[=PKGS] build static libraries [default=yes]
1414 1419 --enable-fast-install[=PKGS]
... ... @@ -2448,6 +2453,18 @@ ac_config_files=&quot;$ac_config_files libqpdf.map&quot;
2448 2453 ac_config_headers="$ac_config_headers libqpdf/qpdf/qpdf-config.h"
2449 2454  
2450 2455  
  2456 +# Check whether --enable-check-autofiles was given.
  2457 +if test "${enable_check_autofiles+set}" = set; then :
  2458 + enableval=$enable_check_autofiles; if test "$enableval" = "no"; then
  2459 + CHECK_AUTOFILES=0
  2460 + else
  2461 + CHECK_AUTOFILES=1
  2462 + fi
  2463 +else
  2464 + CHECK_AUTOFILES=1
  2465 +fi
  2466 +
  2467 +
2451 2468 # Check to see if automatically generated files are outdated and if we
2452 2469 # can update them.
2453 2470 # Extract the first word of "autoconf", so it can be a program name with args.
... ... @@ -2602,7 +2619,7 @@ $as_echo &quot;no&quot; &gt;&amp;6; }
2602 2619 fi
2603 2620  
2604 2621  
2605   -if test "$AUTOCONF$AUTOHEADER$ACLOCAL$SHA256SUM" = "1111"; then
  2622 +if test "$CHECK_AUTOFILES$AUTOCONF$AUTOHEADER$ACLOCAL$SHA256SUM" = "11111"; then
2606 2623 if ! sha256sum -c autofiles.sums; then
2607 2624 as_fn_error $? "autofiles are autodated; rerun autogen.sh" "$LINENO" 5
2608 2625 fi
... ...
configure.ac
... ... @@ -11,13 +11,23 @@ AC_CONFIG_FILES([libqpdf.pc])
11 11 AC_CONFIG_FILES([libqpdf.map])
12 12 AC_CONFIG_HEADERS([libqpdf/qpdf/qpdf-config.h])
13 13  
  14 +AC_ARG_ENABLE(check-autofiles,
  15 + AS_HELP_STRING([--enable-check-autofiles],
  16 + [if specified, verify checksums on automatically generated files (default=yes); package maintainers may want to disable this]),
  17 + [if test "$enableval" = "no"; then
  18 + CHECK_AUTOFILES=0
  19 + else
  20 + CHECK_AUTOFILES=1
  21 + fi],
  22 + [CHECK_AUTOFILES=1])
  23 +
14 24 # Check to see if automatically generated files are outdated and if we
15 25 # can update them.
16 26 AC_CHECK_PROG(AUTOCONF,autoconf,1,0)
17 27 AC_CHECK_PROG(AUTOHEADER,autoheader,1,0)
18 28 AC_CHECK_PROG(ACLOCAL,aclocal,1,0)
19 29 AC_CHECK_PROG(SHA256SUM,sha256sum,1,0)
20   -if test "$AUTOCONF$AUTOHEADER$ACLOCAL$SHA256SUM" = "1111"; then
  30 +if test "$CHECK_AUTOFILES$AUTOCONF$AUTOHEADER$ACLOCAL$SHA256SUM" = "11111"; then
21 31 if ! sha256sum -c autofiles.sums; then
22 32 AC_MSG_ERROR(autofiles are autodated; rerun autogen.sh)
23 33 fi
... ...