summaryrefslogtreecommitdiff
path: root/m4/sanity.m4
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>1996-11-08 22:57:04 +0000
committerTom Tromey <tromey@redhat.com>1996-11-08 22:57:04 +0000
commitc7f27ed5f5e40f768876c63d6380795c4436e935 (patch)
tree6fb294dc002a1919f30cd58cb0fbcf9c86083ad8 /m4/sanity.m4
parent637af7c25f2afd3f6809d61ac13c7f2e90b3faea (diff)
downloadautomake-c7f27ed5f5e40f768876c63d6380795c4436e935.tar.gz
Added sanity check macro
Diffstat (limited to 'm4/sanity.m4')
-rw-r--r--m4/sanity.m419
1 files changed, 19 insertions, 0 deletions
diff --git a/m4/sanity.m4 b/m4/sanity.m4
new file mode 100644
index 000000000..7c8abee26
--- /dev/null
+++ b/m4/sanity.m4
@@ -0,0 +1,19 @@
+#
+# Check to make sure that the build environment is sane.
+#
+
+AC_DEFUN(AM_SANITY_CHECK,
+[AC_MSG_CHECKING([whether build environment is sane])
+echo timestamp > conftestfile
+# Do this in a subshell so we don't clobber the current shell's
+# arguments. FIXME: maybe try `-L' hack like GETLOADAVG test?
+if (set X `ls -t $srcdir/configure conftestfile`; test "$2" = conftestfile)
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([configuration problem: newly created file is older than distributed files!
+Check your system clock])
+fi
+rm -f conftest*
+AC_MSG_RESULT(yes)])