Mercurial > hg > xmms-sid
comparison bootstrap.sh @ 439:f707bee41d0e
Improved bootstrapping
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 05 Jan 2007 16:08:01 +0000 |
parents | 4cad402fea71 |
children | 1b4221cb1145 |
comparison
equal
deleted
inserted
replaced
438:4cad402fea71 | 439:f707bee41d0e |
---|---|
15 ftest_am_package() | 15 ftest_am_package() |
16 { | 16 { |
17 PRG1=`which "$1-$WANT_AM_VERSION"` | 17 PRG1=`which "$1-$WANT_AM_VERSION"` |
18 PRG2=`which $1` | 18 PRG2=`which $1` |
19 if test -n "$PRG1" && test -x "$PRG1"; then | 19 if test -n "$PRG1" && test -x "$PRG1"; then |
20 echo "* $1-$WANT_AM_VERSION $2" | 20 echo "* $1-$WANT_AM_VERSION $2" |
21 eval $1-$WANT_AM_VERSION $2 | 21 eval $1-$WANT_AM_VERSION $2 |
22 else | 22 else |
23 if test -n "$PRG2" && test -x "$PRG2"; then | 23 if test -n "$PRG2" && test -x "$PRG2"; then |
24 echo "* Warning! Could not find $1-$WANT_AM_VERSION!" | 24 echo "* Warning! Could not find $1-$WANT_AM_VERSION!" |
25 echo " Trying '$1', which may fail due to incompabilities." | 25 echo " Trying '$1', which may fail due to incompabilities." |
26 echo "* $1 $2" | 26 echo "* $1 $2" |
27 eval $1 $2 | 27 eval $1 $2 |
28 else | 28 else |
29 ftest_msg "'$1-$WANT_AM_VERSION' or '$1'" | 29 ftest_msg "'$1-$WANT_AM_VERSION' or '$1'" |
30 exit 1 | 30 exit 1 |
31 fi | 31 fi |
32 fi | 32 fi |
33 } | 33 } |
34 | 34 |
35 ftest_ac_package() | 35 ftest_ac_package() |
36 { | 36 { |
37 PRG1=`which $1` | 37 PRG1=`which $1` |
38 if test -n "$PRG1" && test -x "$PRG1"; then | 38 if test -n "$PRG1" && test -x "$PRG1"; then |
39 echo "* $1 $2" | 39 echo "* $1 $2" |
40 eval $1 $2 | 40 eval $1 $2 |
41 else | 41 else |
42 ftest_msg "'$1'" | 42 ftest_msg "'$1'" |
43 exit 1 | 43 exit 1 |
44 fi | 44 fi |
45 } | 45 } |
46 | 46 |
47 ftest_package() | 47 ftest_package() |
48 { | 48 { |
49 PRG1=`which $1` | 49 PRG1=`which $1` |
50 if test -n "$PRG1" && test -x "$PRG1"; then | 50 if test -n "$PRG1" && test -x "$PRG1"; then |
51 echo "* $1 $2" | 51 echo "* $1 $2" |
52 eval $1 $2 | 52 eval $1 $2 |
53 else | 53 else |
54 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" |
55 echo "or it is not in the PATH. Please install $4." | 55 echo "or it is not in the PATH. Please install $4." |
56 exit 1 | 56 exit 1 |
57 fi | 57 fi |
58 } | 58 } |
59 | 59 |
60 # Check and run autotools | |
60 ftest_package "autopoint" "-f" "gettext(-dev|-devel)" "GNU gettext 0.14.1 or later." | 61 ftest_package "autopoint" "-f" "gettext(-dev|-devel)" "GNU gettext 0.14.1 or later." |
61 ftest_am_package "aclocal" "-I . -I /usr/share/aclocal -I /usr/local/share/aclocal" | 62 |
63 aclocal_opts="" | |
64 for i in /usr/share/aclocal /usr/local/share/aclocal; do | |
65 if test -d "$i"; then | |
66 aclocal_opts="$aclocal_opts -I $i" | |
67 fi | |
68 done | |
69 | |
70 ftest_am_package "aclocal" "-I . $aclocal_opts" | |
62 ftest_ac_package "libtoolize" "--automake --force" | 71 ftest_ac_package "libtoolize" "--automake --force" |
63 ftest_am_package "automake" "-a -c -f --foreign" | 72 ftest_am_package "automake" "-a -c -f --foreign" |
64 ftest_ac_package "autoconf" "" | 73 ftest_ac_package "autoconf" "" |
65 ftest_package "glade" "-w xmms-sid.glade" "Glade" "Glade for Gtk+1 applications (Glade v0.6.4)" | 74 ftest_package "glade" "-w xmms-sid.glade" "Glade" "Glade for Gtk+1 applications (Glade v0.6.4)" |