* tests/demo-hardcode.test: Call ./libtool not libtool.
[libtool.git] / bootstrap
blob3f478021d54595c88fb69bf84640bc27f6c22b55
1 #! /bin/sh
3 # Helps bootstrapping libtool, when checked out from CVS
4 # requires at least GNU autoconf 2.58 and GNU automake 1.8.
6 # Upgrade caveat.
8 cat <<'EOF'
9 WARNING: If bootstrapping with this script fails, it may be due to an
10 WARNING: incompatible installed `libtool.m4' being pulled in to
11 WARNING: `aclocal.m4'. The best way to work around such a problem is to
12 WARNING: uninstall your system libtool files, or failing that, overwrite
13 WARNING: them with `libtool.m4' as shipped with this distribution.
14 WARNING: After that, retry this bootstrap.
15 EOF
17 rm -rf `find . \( -name autom4te.cache -o -name libtool \) -print`
19 fakes="config/ltmain.sh config/libtoolize libltdl/ltmain.sh"
20 if test -z "$reconfdirs"; then
21 reconfdirs=". `ls -1d tests/*demo tests/*demo[0-9]`"
24 for file in $fakes; do
25 cat > $file <<'EOF'
26 #! /bin/sh
27 # This is a dummy file for bootstrapping CVS libtool.
28 echo "$0: Bootstrap detected, no files installed." | sed 's,^.*/,,g'
29 exit 0
30 EOF
31 chmod 755 $file
32 done
34 # Running the installed `libtoolize' will trash the local (newer) libtool.m4
35 # among others. Call the dummy script we made earlier.
36 LIBTOOLIZE=`pwd`/config/libtoolize
37 export LIBTOOLIZE
39 for sub in $reconfdirs; do
40 autoreconf --force --verbose --install $sub
41 done
43 for file in $fakes; do
44 rm -f $file
45 done
47 # These files con cause an infinite configure loop if left behind.
48 rm -f Makefile libltdl/Makefile libtool
50 exit 0