aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2018-10-11 23:23:31 +0200
committerJay Berkenbilt <ejb@ql.org>2018-10-11 23:27:54 +0200
commitaa864d214249bc16b93a56dbdc1cac91fa276a46 (patch)
treef7f9753040607b5ebe9a5c465b6ea45a68694933 /configure.ac
parentd1368a38516726e0891660696e86585ad37bf55e (diff)
downloadqpdf-aa864d214249bc16b93a56dbdc1cac91fa276a46.tar.zst
Automatically detect outdated generated files
Update documentation to reflect that automatically generated files are committed. Detect when they are outdated if we have the ability to regenerate them.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 199feeed..afef1958 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,6 +11,22 @@ AC_CONFIG_FILES([libqpdf.pc])
AC_CONFIG_FILES([libqpdf.map])
AC_CONFIG_HEADERS([libqpdf/qpdf/qpdf-config.h])
+# Check to see if automatically generated files are outdated and if we
+# can update them.
+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 - autofiles.sums; then
+ AC_MSG_ERROR(autofiles are autodated; rerun autogen.sh)
+ fi
+fi
+
+if md5sum configure.ac m4/* | diff -q - autofiles.sums; then
+ echo "Automatically generated files are stale; rerun autogen.sh"
+fi
+
AC_PROG_CC
AC_PROG_CC_C99
AC_PROG_CXX