summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorMichael Jennings <mej@kainx.org>2004-03-03 20:43:57 +0000
committerMichael Jennings <mej@kainx.org>2004-03-03 20:43:57 +0000
commitff3931327736915f81ca5a1482f9c57f1ff546f8 (patch)
tree86ed1c1ac079c43eb0bbd3f2dd3e292621346594 /autogen.sh
parente8d4086a4b1e25919a5b9ad16a4115551d0cf445 (diff)
downloadeterm-ff3931327736915f81ca5a1482f9c57f1ff546f8.tar.gz
Wed Mar 3 15:50:17 2004 Michael Jennings (mej)
Ported over the autogen.sh changes from LibAST and fixed configure.in. SVN revision: 9219
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh79
1 files changed, 45 insertions, 34 deletions
diff --git a/autogen.sh b/autogen.sh
index d23b125..5c0a096 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -2,49 +2,60 @@
# Run this to generate all the initial makefiles, etc.
# $Id$
+broken() {
+ echo
+ echo "You need libtool, autoconf, and automake. Install them"
+ echo "and try again. Get source at ftp://ftp.gnu.org/pub/gnu/"
+ echo "ERROR: $1 not found."
+ exit -1
+}
+
DIE=0
echo "Generating configuration files for Eterm, please wait...."
-(autoconf --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "You must have autoconf installed to compile Eterm."
- echo "Download the appropriate package for your distribution,"
- echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
- DIE=1
-}
+LIBTOOLIZE_CHOICES="$LIBTOOLIZE libtoolize"
+AUTOHEADER_CHOICES="$AUTOHEADER autoheader213 autoheader-2.13 autoheader"
+ACLOCAL_CHOICES="$ACLOCAL aclocal14 aclocal-1.4 aclocal"
+AUTOMAKE_CHOICES="$AUTOMAKE automake14 automake-1.4 automake"
+AUTOCONF_CHOICES="$AUTOCONF autoconf213 autoconf-2.13 autoconf"
-(libtool --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "You must have libtool installed to compile Eterm."
- echo "Download the appropriate package for your distribution,"
- echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
- DIE=1
-}
+for i in $LIBTOOLIZE_CHOICES ; do
+ $i --version </dev/null >/dev/null 2>&1 && LIBTOOLIZE=$i && break
+done
+[ "x$LIBTOOLIZE" = "x" ] && broken libtool
-(automake --version) < /dev/null > /dev/null 2>&1 || {
- echo
- echo "You must have automake installed to compile Eterm."
- echo "Download the appropriate package for your distribution,"
- echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
- DIE=1
-}
+for i in $AUTOHEADER_CHOICES ; do
+ $i --version </dev/null >/dev/null 2>&1 && AUTOHEADER=$i && break
+done
+[ "x$AUTOHEADER" = "x" ] && broken autoconf
-if test "$DIE" -eq 1; then
- exit 1
-fi
+for i in $ACLOCAL_CHOICES ; do
+ $i --version </dev/null >/dev/null 2>&1 && ACLOCAL=$i && break
+done
+[ "x$ACLOCAL" = "x" ] && broken automake
+
+for i in $AUTOMAKE_CHOICES ; do
+ $i --version </dev/null >/dev/null 2>&1 && AUTOMAKE=$i && break
+done
+[ "x$AUTOMAKE" = "x" ] && broken automake
+
+for i in $AUTOCONF_CHOICES ; do
+ $i --version </dev/null >/dev/null 2>&1 && AUTOCONF=$i && break
+done
+[ "x$AUTOCONF" = "x" ] && broken autoconf
+
+# Export them so configure can AC_SUBST() them.
+export LIBTOOLIZE AUTOHEADER ACLOCAL AUTOMAKE AUTOCONF
-echo " libtoolize -c -f"
-libtoolize -c -f
-echo " aclocal -I . $ACLOCAL_FLAGS"
-aclocal -I . $ACLOCAL_FLAGS
-echo " autoconf"
-autoconf
-echo " autoheader"
-autoheader
-echo " automake -a -c"
-automake -a -c
+# Run the stuff.
+(set -x && $LIBTOOLIZE -c -f)
+(set -x && $AUTOHEADER)
+(set -x && $ACLOCAL $ACLOCAL_FLAGS)
+(set -x && $AUTOMAKE -a -c)
+(set -x && $AUTOCONF)
+# Run configure.
./configure "$@"
if [ -f cvs.motd ]; then