annotate bootstrap.sh @ 957:0e60e5d56fdd

Change how the backend emulator library is initialized for libSIDPlay2 and FP, as it seems the engine configuration has some persistence despite reconfiguration between loaded files if same engine object is retained. This caused, for example, 2SID stereo tunes being played "mono" if played after a normal 1-SID tune. Duh.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 20 Nov 2012 22:13:48 +0200
parents 8312acdb7b15
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15
17947c69fcc9 Added script for bootstrapping from CVS
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 #! /bin/sh
732
8312acdb7b15 Bump autotools version requirement.
Matti Hamalainen <ccr@tnsp.org>
parents: 688
diff changeset
2 WANT_AM_VERSION=1.11
15
17947c69fcc9 Added script for bootstrapping from CVS
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3
229
7bb9e20e3092 Few more adjustments.
Matti Hamalainen <ccr@tnsp.org>
parents: 209
diff changeset
4 echo "***"
7bb9e20e3092 Few more adjustments.
Matti Hamalainen <ccr@tnsp.org>
parents: 209
diff changeset
5 echo "*** Now bootstrapping the package."
7bb9e20e3092 Few more adjustments.
Matti Hamalainen <ccr@tnsp.org>
parents: 209
diff changeset
6 echo "*** This may take a while, please be patient ..."
7bb9e20e3092 Few more adjustments.
Matti Hamalainen <ccr@tnsp.org>
parents: 209
diff changeset
7 echo "***"
7bb9e20e3092 Few more adjustments.
Matti Hamalainen <ccr@tnsp.org>
parents: 209
diff changeset
8 ftest_msg()
7bb9e20e3092 Few more adjustments.
Matti Hamalainen <ccr@tnsp.org>
parents: 209
diff changeset
9 {
7bb9e20e3092 Few more adjustments.
Matti Hamalainen <ccr@tnsp.org>
parents: 209
diff changeset
10 echo "You do not have required GNU Autotools installed, please install"
7bb9e20e3092 Few more adjustments.
Matti Hamalainen <ccr@tnsp.org>
parents: 209
diff changeset
11 echo "recent version of GNU autoconf, automake and libtool packages."
7bb9e20e3092 Few more adjustments.
Matti Hamalainen <ccr@tnsp.org>
parents: 209
diff changeset
12 echo "(Could not find runnable $1)"
7bb9e20e3092 Few more adjustments.
Matti Hamalainen <ccr@tnsp.org>
parents: 209
diff changeset
13 }
35
3fcc147b253a Updates towards 0.8beta0
Matti Hamalainen <ccr@tnsp.org>
parents: 17
diff changeset
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
75e3fb8d706d Improved bootstrap script
Matti Hamalainen <ccr@tnsp.org>
parents: 238
diff changeset
17 PRG1=`which "$1-$WANT_AM_VERSION"`
75e3fb8d706d Improved bootstrap script
Matti Hamalainen <ccr@tnsp.org>
parents: 238
diff changeset
18 PRG2=`which $1`
75e3fb8d706d Improved bootstrap script
Matti Hamalainen <ccr@tnsp.org>
parents: 238
diff changeset
19 if test -n "$PRG1" && test -x "$PRG1"; then
439
f707bee41d0e Improved bootstrapping
Matti Hamalainen <ccr@tnsp.org>
parents: 438
diff changeset
20 echo "* $1-$WANT_AM_VERSION $2"
f707bee41d0e Improved bootstrapping
Matti Hamalainen <ccr@tnsp.org>
parents: 438
diff changeset
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
f707bee41d0e Improved bootstrapping
Matti Hamalainen <ccr@tnsp.org>
parents: 438
diff changeset
23 if test -n "$PRG2" && test -x "$PRG2"; then
f707bee41d0e Improved bootstrapping
Matti Hamalainen <ccr@tnsp.org>
parents: 438
diff changeset
24 echo "* Warning! Could not find $1-$WANT_AM_VERSION!"
f707bee41d0e Improved bootstrapping
Matti Hamalainen <ccr@tnsp.org>
parents: 438
diff changeset
25 echo " Trying '$1', which may fail due to incompabilities."
f707bee41d0e Improved bootstrapping
Matti Hamalainen <ccr@tnsp.org>
parents: 438
diff changeset
26 echo "* $1 $2"
f707bee41d0e Improved bootstrapping
Matti Hamalainen <ccr@tnsp.org>
parents: 438
diff changeset
27 eval $1 $2
f707bee41d0e Improved bootstrapping
Matti Hamalainen <ccr@tnsp.org>
parents: 438
diff changeset
28 else
f707bee41d0e Improved bootstrapping
Matti Hamalainen <ccr@tnsp.org>
parents: 438
diff changeset
29 ftest_msg "'$1-$WANT_AM_VERSION' or '$1'"
f707bee41d0e Improved bootstrapping
Matti Hamalainen <ccr@tnsp.org>
parents: 438
diff changeset
30 exit 1
f707bee41d0e Improved bootstrapping
Matti Hamalainen <ccr@tnsp.org>
parents: 438
diff changeset
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
3fcc147b253a Updates towards 0.8beta0
Matti Hamalainen <ccr@tnsp.org>
parents: 17
diff changeset
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
75e3fb8d706d Improved bootstrap script
Matti Hamalainen <ccr@tnsp.org>
parents: 238
diff changeset
37 PRG1=`which $1`
75e3fb8d706d Improved bootstrap script
Matti Hamalainen <ccr@tnsp.org>
parents: 238
diff changeset
38 if test -n "$PRG1" && test -x "$PRG1"; then
439
f707bee41d0e Improved bootstrapping
Matti Hamalainen <ccr@tnsp.org>
parents: 438
diff changeset
39 echo "* $1 $2"
f707bee41d0e Improved bootstrapping
Matti Hamalainen <ccr@tnsp.org>
parents: 438
diff changeset
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
f707bee41d0e Improved bootstrapping
Matti Hamalainen <ccr@tnsp.org>
parents: 438
diff changeset
42 ftest_msg "'$1'"
f707bee41d0e Improved bootstrapping
Matti Hamalainen <ccr@tnsp.org>
parents: 438
diff changeset
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
3fcc147b253a Updates towards 0.8beta0
Matti Hamalainen <ccr@tnsp.org>
parents: 17
diff changeset
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
75e3fb8d706d Improved bootstrap script
Matti Hamalainen <ccr@tnsp.org>
parents: 238
diff changeset
49 PRG1=`which $1`
75e3fb8d706d Improved bootstrap script
Matti Hamalainen <ccr@tnsp.org>
parents: 238
diff changeset
50 if test -n "$PRG1" && test -x "$PRG1"; then
439
f707bee41d0e Improved bootstrapping
Matti Hamalainen <ccr@tnsp.org>
parents: 438
diff changeset
51 echo "* $1 $2"
f707bee41d0e Improved bootstrapping
Matti Hamalainen <ccr@tnsp.org>
parents: 438
diff changeset
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
f707bee41d0e Improved bootstrapping
Matti Hamalainen <ccr@tnsp.org>
parents: 438
diff changeset
54 echo "Could not find runnable '$1', perhaps $3 package is not installed"
f707bee41d0e Improved bootstrapping
Matti Hamalainen <ccr@tnsp.org>
parents: 438
diff changeset
55 echo "or it is not in the PATH. Please install $4."
f707bee41d0e Improved bootstrapping
Matti Hamalainen <ccr@tnsp.org>
parents: 438
diff changeset
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
3fcc147b253a Updates towards 0.8beta0
Matti Hamalainen <ccr@tnsp.org>
parents: 17
diff changeset
59
442
94c531f0c0a4 .. and more fixes. :|
Matti Hamalainen <ccr@tnsp.org>
parents: 441
diff changeset
60 # Check available m4 macro paths
94c531f0c0a4 .. and more fixes. :|
Matti Hamalainen <ccr@tnsp.org>
parents: 441
diff changeset
61 aclocal_opts=$ACLOCAL_FLAGS
94c531f0c0a4 .. and more fixes. :|
Matti Hamalainen <ccr@tnsp.org>
parents: 441
diff changeset
62 for i in /usr /usr/local /usr/sfw /opt/gnome; do
94c531f0c0a4 .. and more fixes. :|
Matti Hamalainen <ccr@tnsp.org>
parents: 441
diff changeset
63 j="$i/share/aclocal"
94c531f0c0a4 .. and more fixes. :|
Matti Hamalainen <ccr@tnsp.org>
parents: 441
diff changeset
64 if test -d "$j"; then
94c531f0c0a4 .. and more fixes. :|
Matti Hamalainen <ccr@tnsp.org>
parents: 441
diff changeset
65 aclocal_opts="$aclocal_opts -I $j"
94c531f0c0a4 .. and more fixes. :|
Matti Hamalainen <ccr@tnsp.org>
parents: 441
diff changeset
66 fi
94c531f0c0a4 .. and more fixes. :|
Matti Hamalainen <ccr@tnsp.org>
parents: 441
diff changeset
67 done
94c531f0c0a4 .. and more fixes. :|
Matti Hamalainen <ccr@tnsp.org>
parents: 441
diff changeset
68
688
Matti Hamalainen <ccr@tnsp.org>
parents: 650
diff changeset
69 for i in m4 unix; do
Matti Hamalainen <ccr@tnsp.org>
parents: 650
diff changeset
70 if test -d "$i"; then
Matti Hamalainen <ccr@tnsp.org>
parents: 650
diff changeset
71 aclocal_opts="$aclocal_opts -I $i"
Matti Hamalainen <ccr@tnsp.org>
parents: 650
diff changeset
72 fi
Matti Hamalainen <ccr@tnsp.org>
parents: 650
diff changeset
73 done
Matti Hamalainen <ccr@tnsp.org>
parents: 650
diff changeset
74
442
94c531f0c0a4 .. and more fixes. :|
Matti Hamalainen <ccr@tnsp.org>
parents: 441
diff changeset
75 # Check if gettext is used
440
1b4221cb1145 Improved the bootstrapping script even further
Matti Hamalainen <ccr@tnsp.org>
parents: 439
diff changeset
76 for i in configure.ac configure.in; do
650
859011fe530b "test -e" does not exist in /bin/sh of some systems, use "test -f" instead.
Matti Hamalainen <ccr@tnsp.org>
parents: 442
diff changeset
77 if test -f "$i"; then
440
1b4221cb1145 Improved the bootstrapping script even further
Matti Hamalainen <ccr@tnsp.org>
parents: 439
diff changeset
78 k=`grep AM_GNU_GETTEXT $i`
1b4221cb1145 Improved the bootstrapping script even further
Matti Hamalainen <ccr@tnsp.org>
parents: 439
diff changeset
79 fi
1b4221cb1145 Improved the bootstrapping script even further
Matti Hamalainen <ccr@tnsp.org>
parents: 439
diff changeset
80 done
1b4221cb1145 Improved the bootstrapping script even further
Matti Hamalainen <ccr@tnsp.org>
parents: 439
diff changeset
81
1b4221cb1145 Improved the bootstrapping script even further
Matti Hamalainen <ccr@tnsp.org>
parents: 439
diff changeset
82 if test -n "$k"; then
1b4221cb1145 Improved the bootstrapping script even further
Matti Hamalainen <ccr@tnsp.org>
parents: 439
diff changeset
83 echo "* GNU gettext seems to be in use ..."
1b4221cb1145 Improved the bootstrapping script even further
Matti Hamalainen <ccr@tnsp.org>
parents: 439
diff changeset
84 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
85 else
1b4221cb1145 Improved the bootstrapping script even further
Matti Hamalainen <ccr@tnsp.org>
parents: 439
diff changeset
86 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
87 fi
439
f707bee41d0e Improved bootstrapping
Matti Hamalainen <ccr@tnsp.org>
parents: 438
diff changeset
88
442
94c531f0c0a4 .. and more fixes. :|
Matti Hamalainen <ccr@tnsp.org>
parents: 441
diff changeset
89 # Check and run autotools
439
f707bee41d0e Improved bootstrapping
Matti Hamalainen <ccr@tnsp.org>
parents: 438
diff changeset
90 ftest_am_package "aclocal" "-I . $aclocal_opts"
238
5a390af358fc Run libtoolize before automake/conf
Matti Hamalainen <ccr@tnsp.org>
parents: 229
diff changeset
91 ftest_ac_package "libtoolize" "--automake --force"
382
3fe7f85dd39a Force updating of automake parts.
Matti Hamalainen <ccr@tnsp.org>
parents: 348
diff changeset
92 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
93 ftest_ac_package "autoconf" ""
440
1b4221cb1145 Improved the bootstrapping script even further
Matti Hamalainen <ccr@tnsp.org>
parents: 439
diff changeset
94
442
94c531f0c0a4 .. and more fixes. :|
Matti Hamalainen <ccr@tnsp.org>
parents: 441
diff changeset
95 # 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
96 k=`echo *.glade`
7a1e7fac56c0 Bugfixes to previous improvements. :)
Matti Hamalainen <ccr@tnsp.org>
parents: 440
diff changeset
97 if test "x$k" != "x*.glade"; then
7a1e7fac56c0 Bugfixes to previous improvements. :)
Matti Hamalainen <ccr@tnsp.org>
parents: 440
diff changeset
98 echo "* Glade XML files found, processing ..."
7a1e7fac56c0 Bugfixes to previous improvements. :)
Matti Hamalainen <ccr@tnsp.org>
parents: 440
diff changeset
99 for i in *.glade; do
7a1e7fac56c0 Bugfixes to previous improvements. :)
Matti Hamalainen <ccr@tnsp.org>
parents: 440
diff changeset
100 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
101 done
440
1b4221cb1145 Improved the bootstrapping script even further
Matti Hamalainen <ccr@tnsp.org>
parents: 439
diff changeset
102 else
1b4221cb1145 Improved the bootstrapping script even further
Matti Hamalainen <ccr@tnsp.org>
parents: 439
diff changeset
103 echo "* No Glade files found, skipping."
1b4221cb1145 Improved the bootstrapping script even further
Matti Hamalainen <ccr@tnsp.org>
parents: 439
diff changeset
104 fi
1b4221cb1145 Improved the bootstrapping script even further
Matti Hamalainen <ccr@tnsp.org>
parents: 439
diff changeset
105