comparison bootstrap.sh @ 337:75e3fb8d706d

Improved bootstrap script
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 22 Sep 2005 02:21:03 +0000
parents 5a390af358fc
children d1558ecb94f9
comparison
equal deleted inserted replaced
336:171b428ee806 337:75e3fb8d706d
1 #! /bin/sh 1 #! /bin/sh
2 WANT_AM_VERSION=1.7 2 WANT_AM_VERSION=z1.9
3 3
4 echo "***" 4 echo "***"
5 echo "*** Now bootstrapping the package." 5 echo "*** Now bootstrapping the package."
6 echo "*** This may take a while, please be patient ..." 6 echo "*** This may take a while, please be patient ..."
7 echo "***" 7 echo "***"
12 echo "(Could not find runnable $1)" 12 echo "(Could not find runnable $1)"
13 } 13 }
14 14
15 ftest_am_package() 15 ftest_am_package()
16 { 16 {
17 if test -x `which "$1-$WANT_AM_VERSION"`; then 17 PRG1=`which "$1-$WANT_AM_VERSION"`
18 PRG2=`which $1`
19 if test -n "$PRG1" && test -x "$PRG1"; then
18 echo "* $1-$WANT_AM_VERSION $2" 20 echo "* $1-$WANT_AM_VERSION $2"
19 eval `$1-$WANT_AM_VERSION $2` 21 eval `$1-$WANT_AM_VERSION $2`
20 else 22 else
21 if test -x `which $1`; then 23 if test -n "$PRG2" && test -x "$PRG2"; then
22 echo "* Warning! Could not find $1-$WANT_AM_VERSION!" 24 echo "* Warning! Could not find $1-$WANT_AM_VERSION!"
23 echo " Trying '$1', which may fail due to incompabilities." 25 echo " Trying '$1', which may fail due to incompabilities."
24 echo "* $1 $2" 26 echo "* $1 $2"
25 eval `$1 $2` 27 eval `$1 $2`
26 else 28 else
30 fi 32 fi
31 } 33 }
32 34
33 ftest_ac_package() 35 ftest_ac_package()
34 { 36 {
35 if test -x `which $1`; then 37 PRG1=`which $1`
38 if test -n "$PRG1" && test -x "$PRG1"; then
36 echo "* $1 $2" 39 echo "* $1 $2"
37 eval `$1 $2` 40 eval `$1 $2`
38 else 41 else
39 ftest_msg "'$1'" 42 ftest_msg "'$1'"
40 exit 1 43 exit 1
41 fi 44 fi
42 } 45 }
43 46
44 ftest_package() 47 ftest_package()
45 { 48 {
46 if test -x `which $1`; then 49 PRG1=`which $1`
50 if test -n "$PRG1" && test -x "$PRG1"; then
47 echo "* $1 $2" 51 echo "* $1 $2"
48 eval `$1 $2` 52 eval `$1 $2`
49 else 53 else
50 echo "Could not find runnable '$1', perhaps $3 package is not installed" 54 echo "Could not find runnable '$1', perhaps $3 package is not installed"
51 echo "or it is not in the PATH. Please install $4." 55 echo "or it is not in the PATH. Please install $4."
52 exit 1 56 exit 1
53 fi 57 fi
54 } 58 }
55 59
56 ftest_am_package "aclocal" "-I ." 60 ftest_am_package "aclocal" "-I . -I /usr/share/aclocal -I /usr/local/share/aclocal"
57 ftest_ac_package "libtoolize" "--automake --force" 61 ftest_ac_package "libtoolize" "--automake --force"
58 ftest_am_package "automake" "-a -c --foreign" 62 ftest_am_package "automake" "-a -c --foreign"
59 ftest_ac_package "autoconf" "" 63 ftest_ac_package "autoconf" ""
60 ftest_package "glade" "-w xmms-sid.glade" "Glade" "Glade for Gtk+1 applications (Glade v0.6.4)" 64 ftest_package "glade" "-w xmms-sid.glade" "Glade" "Glade for Gtk+1 applications (Glade v0.6.4)"