* m4/libtool.m4: Quote shrext as it is evaled in ltmain.
[libtool.git] / bootstrap
blob428cf6e25be8c8a4bf06bcdadcb1e29f9b2bf9d1
1 #! /bin/sh
2 # bootstrap -- Helps bootstrapping libtool, when checked out from CVS.
4 # Copyright (C) 2003 Free Software Foundation
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; see the file COPYING. If not, write to
18 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 # Boston, MA 02111-1307, USA.
21 # It is okay for the bootstrap process to require unreleased autoconf
22 # or automake, as long as any released libtool will work with at least
23 # the newest stable versions of each. Generally, newer versions offer
24 # better features, and configure.ac documents oldest version of each
25 # required for bootstrap (AC_PREREQ, and AM_INIT_AUTOMAKE).
27 # Upgrade caveat:
28 cat <<'EOF'
29 WARNING: If bootstrapping with this script fails, it may be due to an
30 WARNING: incompatible installed `libtool.m4' being pulled in to
31 WARNING: `aclocal.m4'. The best way to work around such a problem is to
32 WARNING: uninstall your system libtool files, or failing that, overwrite
33 WARNING: them with `libtool.m4' as shipped with this distribution.
34 WARNING: After that, retry this bootstrap.
35 EOF
37 rm -rf `find . \( -name autom4te.cache -o -name libtool \) -print`
39 fakes="config/ltmain.sh config/libtoolize"
40 if test -z "$reconfdirs"; then
41 reconfdirs=". `ls -1d tests/*demo tests/*demo[0-9]`"
44 for file in $fakes; do
45 cat > $file <<'EOF'
46 #! /bin/sh
47 # This is a dummy file for bootstrapping CVS libtool.
48 echo "$0: Bootstrap detected, no files installed." | sed 's,^.*/,,g'
49 exit 0
50 EOF
51 chmod 755 $file
52 done
54 # Running the installed `libtoolize' will trash the local (newer) libtool.m4
55 # among others. Call the dummy script we made earlier.
56 LIBTOOLIZE=`pwd`/config/libtoolize
57 export LIBTOOLIZE
59 for sub in $reconfdirs; do
60 autoreconf --force --verbose --install $sub
61 done
63 for file in $fakes; do
64 rm -f $file
65 done
67 # These files con cause an infinite configure loop if left behind.
68 rm -f Makefile libltdl/Makefile libtool
70 exit 0