about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--.distfiles2
-rwxr-xr-x.preconfig7
-rw-r--r--INSTALL10
-rw-r--r--Util/.distfiles1
-rwxr-xr-xUtil/preconfig14
5 files changed, 33 insertions, 1 deletions
diff --git a/.distfiles b/.distfiles
index 84316b5e9..4de3338f9 100644
--- a/.distfiles
+++ b/.distfiles
@@ -1,5 +1,5 @@
 DISTFILES_SRC='
-    .cvsignore .distfiles Makefile.in
+    .cvsignore .distfiles .preconfig Makefile.in
     ChangeLog ChangeLog.3.0 INSTALL META-FAQ README
     acconfig.h aclocal.m4 aczsh.m4 configure.in
     configure config.h.in stamp-h.in
diff --git a/.preconfig b/.preconfig
new file mode 100755
index 000000000..f9729bd97
--- /dev/null
+++ b/.preconfig
@@ -0,0 +1,7 @@
+#! /bin/sh
+
+set -e
+
+autoconf
+autoheader
+echo > stamp-h.in
diff --git a/INSTALL b/INSTALL
index 5f4e2e82d..d2741ffdd 100644
--- a/INSTALL
+++ b/INSTALL
@@ -19,6 +19,16 @@ that zsh is known to compile on, as well as any special instructions
 for your particular architecture.  Most architectures will not require any
 special instructions.
 
+Pre-configuration
+-----------------
+
+If you are using a normal source release, skip this section.
+
+If the `configure' script does not already exist -- e.g., if you've got
+a snapshot of the bare sources just checked out from a CVS repository
+-- some things need to be built before the configuration can proceed.
+Run the script `./Util/preconfig' to do this.
+
 Configuring Zsh
 ---------------
 
diff --git a/Util/.distfiles b/Util/.distfiles
index a25812dc4..ac10d605f 100644
--- a/Util/.distfiles
+++ b/Util/.distfiles
@@ -1,4 +1,5 @@
 DISTFILES_SRC='
     .distfiles
     helpfiles mkdisttree.sh reporter
+    preconfig
 '
diff --git a/Util/preconfig b/Util/preconfig
new file mode 100755
index 000000000..469115a9d
--- /dev/null
+++ b/Util/preconfig
@@ -0,0 +1,14 @@
+#! /bin/sh
+
+find . \( -name '*.*' -prune \) -o \( -name .preconfig -print \) | (
+    while read pre; do
+	cmd=`echo $pre | sed 's,^,cd ,;s,/\([^/]*\)$, \&\& ./\1,'`
+	echo >&2 "$cmd"
+	if ( eval "$cmd" ); then :; else
+	    echo "$0: $pre failed (status $?)"
+	    exit 1
+	fi
+    done
+)
+
+exit 0