* calendar/todos.el (todos-archive-done-item): Fix archiving of
[bpt/emacs.git] / autogen.sh
index fb5917f..dc8d53e 100755 (executable)
 progs="autoconf automake"
 
 ## Minimum versions we need:
-autoconf_min=`sed -n 's/^ *AC_PREREQ(\([0-9\.]*\)).*/\1/p' configure.in`
+autoconf_min=`sed -n 's/^ *AC_PREREQ(\([0-9\.]*\)).*/\1/p' configure.ac`
 
-## FIXME how to determine this from the sources?
-automake_min=1.11
+## This will need improving if more options are ever added to the
+## AM_INIT_AUTOMAKE call.
+automake_min=`sed -n 's/^ *AM_INIT_AUTOMAKE(\([0-9\.]*\)).*/\1/p' configure.ac`
 
 
 ## $1 = program, eg "autoconf".
@@ -200,7 +201,7 @@ This is not recommended - see the comments in \`copy_autogen'.
 Please report any problems with this script to bug-gnu-emacs@gnu.org .
 EOF
 
-    exit 1
+    exit 101 # Exit status 101 means tools were missing.
 fi
 
 echo "Your system has the required tools, running autoreconf..."
@@ -209,6 +210,10 @@ echo "Your system has the required tools, running autoreconf..."
 ## Let autoreconf figure out what, if anything, needs doing.
 autoreconf -i -I m4 || exit $?
 
+## Create a timestamp, so that './autogen.sh; make' doesn't
+## cause 'make' to needlessly run 'autoheader'.
+echo timestamp > src/stamp-h.in || exit
+
 echo "You can now run \`./configure'."
 
 exit 0