changeset 209:174130d3ddd0

Improved bootstrap script, though now using shell functions. Might only work in bash, YMMV. Will fix later if so.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 15 Dec 2004 10:25:05 +0000
parents 8ebef120d67f
children 5648f2ca3eb2
files bootstrap.sh
diffstat 1 files changed, 47 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/bootstrap.sh	Wed Dec 15 10:24:03 2004 +0000
+++ b/bootstrap.sh	Wed Dec 15 10:25:05 2004 +0000
@@ -1,23 +1,57 @@
 #! /bin/sh
+WANT_AM_VERSION=1.7
 
 echo "**"
 echo "** Now bootstrapping the package."
 echo "** This may take a while, please be patient ..."
 echo "**"
-echo "- aclocal     - 0%"
-aclocal
 
-echo "- autoconf    - 20%"
-autoconf
-
-echo "- autoheader  - 40%"
-autoheader
+ftest_am_package()
+{
+if test -x `which "$1-$WANT_AM_VERSION"`; then
+echo "** $1-$WANT_AM_VERSION $2"
+eval `$1-$WANT_AM_VERSION $2`
+else
+if test -x `which $1`; then
+echo "** $1 $2"
+eval `$1 $2`
+else
+echo "You do not have required GNU Autotools installed, please install"
+echo "recent version of GNU autoconf, automake and libtool packages."
+echo "(Could not find runnable '$1-$WANT_AM_VERSION' or '$1')"
+exit 1
+fi
+fi
+}
 
-echo "- automake    - 60%"
-automake -a -c
+ftest_ac_package()
+{
+if test -x `which $1`; then
+echo "** $1 $2"
+eval `$1 $2`
+else
+echo "You do not have required GNU Autotools installed, please install"
+echo "recent version of GNU autoconf, automake and libtool packages."
+echo "(Could not find runnable '$1')"
+exit 1
+fi
+}
 
-echo "- libtoolize  - 80%"
-libtoolize --automake --force
+ftest_package()
+{
+if test -x `which $1`; then
+echo "** $1 $2"
+eval `$1 $2`
+else
+echo "Could not find runnable '$1'."
+exit 1
+fi
+}
 
-echo "- glade       - 100%"
-glade -w xmms-sid.glade
+ftest_am_package "aclocal" "-I ."
+ftest_am_package "automake" "-a -c --foreign"
+ftest_ac_package "autoheader" ""
+ftest_ac_package "autoconf" ""
+ftest_ac_package "libtoolize" "--automake --force"
+ftest_package "glade" "-w xmms-sid.glade"
+