Mercurial > hg > xmms-sid
annotate bootstrap.sh @ 633:66037fba3d76
Ooops, forgot to const here.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 03 Sep 2007 04:23:01 +0000 |
parents | 94c531f0c0a4 |
children | 859011fe530b |
rev | line source |
---|---|
15
17947c69fcc9
Added script for bootstrapping from CVS
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
1 #! /bin/sh |
348 | 2 WANT_AM_VERSION=1.9 |
15
17947c69fcc9
Added script for bootstrapping from CVS
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
3 |
229 | 4 echo "***" |
5 echo "*** Now bootstrapping the package." | |
6 echo "*** This may take a while, please be patient ..." | |
7 echo "***" | |
8 ftest_msg() | |
9 { | |
10 echo "You do not have required GNU Autotools installed, please install" | |
11 echo "recent version of GNU autoconf, automake and libtool packages." | |
12 echo "(Could not find runnable $1)" | |
13 } | |
35 | 14 |
209
174130d3ddd0
Improved bootstrap script, though now using shell functions. Might only
Matti Hamalainen <ccr@tnsp.org>
parents:
156
diff
changeset
|
15 ftest_am_package() |
174130d3ddd0
Improved bootstrap script, though now using shell functions. Might only
Matti Hamalainen <ccr@tnsp.org>
parents:
156
diff
changeset
|
16 { |
337 | 17 PRG1=`which "$1-$WANT_AM_VERSION"` |
18 PRG2=`which $1` | |
19 if test -n "$PRG1" && test -x "$PRG1"; then | |
439 | 20 echo "* $1-$WANT_AM_VERSION $2" |
21 eval $1-$WANT_AM_VERSION $2 | |
209
174130d3ddd0
Improved bootstrap script, though now using shell functions. Might only
Matti Hamalainen <ccr@tnsp.org>
parents:
156
diff
changeset
|
22 else |
439 | 23 if test -n "$PRG2" && test -x "$PRG2"; then |
24 echo "* Warning! Could not find $1-$WANT_AM_VERSION!" | |
25 echo " Trying '$1', which may fail due to incompabilities." | |
26 echo "* $1 $2" | |
27 eval $1 $2 | |
28 else | |
29 ftest_msg "'$1-$WANT_AM_VERSION' or '$1'" | |
30 exit 1 | |
31 fi | |
209
174130d3ddd0
Improved bootstrap script, though now using shell functions. Might only
Matti Hamalainen <ccr@tnsp.org>
parents:
156
diff
changeset
|
32 fi |
174130d3ddd0
Improved bootstrap script, though now using shell functions. Might only
Matti Hamalainen <ccr@tnsp.org>
parents:
156
diff
changeset
|
33 } |
35 | 34 |
209
174130d3ddd0
Improved bootstrap script, though now using shell functions. Might only
Matti Hamalainen <ccr@tnsp.org>
parents:
156
diff
changeset
|
35 ftest_ac_package() |
174130d3ddd0
Improved bootstrap script, though now using shell functions. Might only
Matti Hamalainen <ccr@tnsp.org>
parents:
156
diff
changeset
|
36 { |
337 | 37 PRG1=`which $1` |
38 if test -n "$PRG1" && test -x "$PRG1"; then | |
439 | 39 echo "* $1 $2" |
40 eval $1 $2 | |
209
174130d3ddd0
Improved bootstrap script, though now using shell functions. Might only
Matti Hamalainen <ccr@tnsp.org>
parents:
156
diff
changeset
|
41 else |
439 | 42 ftest_msg "'$1'" |
43 exit 1 | |
209
174130d3ddd0
Improved bootstrap script, though now using shell functions. Might only
Matti Hamalainen <ccr@tnsp.org>
parents:
156
diff
changeset
|
44 fi |
174130d3ddd0
Improved bootstrap script, though now using shell functions. Might only
Matti Hamalainen <ccr@tnsp.org>
parents:
156
diff
changeset
|
45 } |
35 | 46 |
209
174130d3ddd0
Improved bootstrap script, though now using shell functions. Might only
Matti Hamalainen <ccr@tnsp.org>
parents:
156
diff
changeset
|
47 ftest_package() |
174130d3ddd0
Improved bootstrap script, though now using shell functions. Might only
Matti Hamalainen <ccr@tnsp.org>
parents:
156
diff
changeset
|
48 { |
337 | 49 PRG1=`which $1` |
50 if test -n "$PRG1" && test -x "$PRG1"; then | |
439 | 51 echo "* $1 $2" |
52 eval $1 $2 | |
209
174130d3ddd0
Improved bootstrap script, though now using shell functions. Might only
Matti Hamalainen <ccr@tnsp.org>
parents:
156
diff
changeset
|
53 else |
439 | 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." | |
56 exit 1 | |
209
174130d3ddd0
Improved bootstrap script, though now using shell functions. Might only
Matti Hamalainen <ccr@tnsp.org>
parents:
156
diff
changeset
|
57 fi |
174130d3ddd0
Improved bootstrap script, though now using shell functions. Might only
Matti Hamalainen <ccr@tnsp.org>
parents:
156
diff
changeset
|
58 } |
35 | 59 |
442 | 60 # Check available m4 macro paths |
61 aclocal_opts=$ACLOCAL_FLAGS | |
62 for i in /usr /usr/local /usr/sfw /opt/gnome; do | |
63 j="$i/share/aclocal" | |
64 if test -d "$j"; then | |
65 aclocal_opts="$aclocal_opts -I $j" | |
66 fi | |
67 done | |
68 | |
69 # Check if gettext is used | |
440
1b4221cb1145
Improved the bootstrapping script even further
Matti Hamalainen <ccr@tnsp.org>
parents:
439
diff
changeset
|
70 for i in configure.ac configure.in; do |
1b4221cb1145
Improved the bootstrapping script even further
Matti Hamalainen <ccr@tnsp.org>
parents:
439
diff
changeset
|
71 if test -e "$i"; then |
1b4221cb1145
Improved the bootstrapping script even further
Matti Hamalainen <ccr@tnsp.org>
parents:
439
diff
changeset
|
72 k=`grep AM_GNU_GETTEXT $i` |
1b4221cb1145
Improved the bootstrapping script even further
Matti Hamalainen <ccr@tnsp.org>
parents:
439
diff
changeset
|
73 fi |
1b4221cb1145
Improved the bootstrapping script even further
Matti Hamalainen <ccr@tnsp.org>
parents:
439
diff
changeset
|
74 done |
1b4221cb1145
Improved the bootstrapping script even further
Matti Hamalainen <ccr@tnsp.org>
parents:
439
diff
changeset
|
75 |
1b4221cb1145
Improved the bootstrapping script even further
Matti Hamalainen <ccr@tnsp.org>
parents:
439
diff
changeset
|
76 if test -n "$k"; then |
1b4221cb1145
Improved the bootstrapping script even further
Matti Hamalainen <ccr@tnsp.org>
parents:
439
diff
changeset
|
77 echo "* GNU gettext seems to be in use ..." |
1b4221cb1145
Improved the bootstrapping script even further
Matti Hamalainen <ccr@tnsp.org>
parents:
439
diff
changeset
|
78 ftest_package "autopoint" "-f" "gettext(-dev|-devel)" "GNU gettext 0.14.1 or later." |
1b4221cb1145
Improved the bootstrapping script even further
Matti Hamalainen <ccr@tnsp.org>
parents:
439
diff
changeset
|
79 else |
1b4221cb1145
Improved the bootstrapping script even further
Matti Hamalainen <ccr@tnsp.org>
parents:
439
diff
changeset
|
80 echo "* GNU gettext not used by the package, skipping." |
1b4221cb1145
Improved the bootstrapping script even further
Matti Hamalainen <ccr@tnsp.org>
parents:
439
diff
changeset
|
81 fi |
439 | 82 |
442 | 83 # Check and run autotools |
439 | 84 ftest_am_package "aclocal" "-I . $aclocal_opts" |
238
5a390af358fc
Run libtoolize before automake/conf
Matti Hamalainen <ccr@tnsp.org>
parents:
229
diff
changeset
|
85 ftest_ac_package "libtoolize" "--automake --force" |
382
3fe7f85dd39a
Force updating of automake parts.
Matti Hamalainen <ccr@tnsp.org>
parents:
348
diff
changeset
|
86 ftest_am_package "automake" "-a -c -f --foreign" |
209
174130d3ddd0
Improved bootstrap script, though now using shell functions. Might only
Matti Hamalainen <ccr@tnsp.org>
parents:
156
diff
changeset
|
87 ftest_ac_package "autoconf" "" |
440
1b4221cb1145
Improved the bootstrapping script even further
Matti Hamalainen <ccr@tnsp.org>
parents:
439
diff
changeset
|
88 |
442 | 89 # Check if Glade is used and run it for each file |
441
7a1e7fac56c0
Bugfixes to previous improvements. :)
Matti Hamalainen <ccr@tnsp.org>
parents:
440
diff
changeset
|
90 k=`echo *.glade` |
7a1e7fac56c0
Bugfixes to previous improvements. :)
Matti Hamalainen <ccr@tnsp.org>
parents:
440
diff
changeset
|
91 if test "x$k" != "x*.glade"; then |
7a1e7fac56c0
Bugfixes to previous improvements. :)
Matti Hamalainen <ccr@tnsp.org>
parents:
440
diff
changeset
|
92 echo "* Glade XML files found, processing ..." |
7a1e7fac56c0
Bugfixes to previous improvements. :)
Matti Hamalainen <ccr@tnsp.org>
parents:
440
diff
changeset
|
93 for i in *.glade; do |
7a1e7fac56c0
Bugfixes to previous improvements. :)
Matti Hamalainen <ccr@tnsp.org>
parents:
440
diff
changeset
|
94 ftest_package "glade" "-w $i" "Glade" "Glade for Gtk+1 applications (Glade v0.6.4)" |
7a1e7fac56c0
Bugfixes to previous improvements. :)
Matti Hamalainen <ccr@tnsp.org>
parents:
440
diff
changeset
|
95 done |
440
1b4221cb1145
Improved the bootstrapping script even further
Matti Hamalainen <ccr@tnsp.org>
parents:
439
diff
changeset
|
96 else |
1b4221cb1145
Improved the bootstrapping script even further
Matti Hamalainen <ccr@tnsp.org>
parents:
439
diff
changeset
|
97 echo "* No Glade files found, skipping." |
1b4221cb1145
Improved the bootstrapping script even further
Matti Hamalainen <ccr@tnsp.org>
parents:
439
diff
changeset
|
98 fi |
1b4221cb1145
Improved the bootstrapping script even further
Matti Hamalainen <ccr@tnsp.org>
parents:
439
diff
changeset
|
99 |