libtool/bootstrap
2004-04-14 10:40:46 +00:00

76 lines
2.6 KiB
Bash
Executable File

#! /bin/sh
# bootstrap -- Helps bootstrapping libtool, when checked out from CVS.
#
# Copyright (C) 2003, 2004 Free Software Foundation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
# It is okay for the bootstrap process to require unreleased autoconf
# or automake, as long as any released libtool will work with at least
# the newest stable versions of each. Generally, newer versions offer
# better features, and configure.ac documents oldest version of each
# required for bootstrap (AC_PREREQ, and AM_INIT_AUTOMAKE).
# Upgrade caveat:
cat <<'EOF'
WARNING: If bootstrapping with this script fails, it may be due to an
WARNING: incompatible installed `libtool.m4' being pulled in to
WARNING: `aclocal.m4'. The best way to work around such a problem is to
WARNING: uninstall your system libtool files, or failing that, overwrite
WARNING: them with `libtool.m4' as shipped with this distribution.
WARNING: After that, retry this bootstrap.
EOF
rm -rf `find . -path './{arch}' -prune -o \( -name autom4te.cache -o -name libtool \) -print`
# Delete stale acinclude.m4 from previous libtool versions.
rm -f acinclude.m4
fakes="config/ltmain.sh config/libtoolize"
if test -z "$reconfdirs"; then
reconfdirs=". `ls -1d tests/*demo tests/*demo[0-9]`"
fi
make top_srcdir=. -f Makefile.am ./m4/ltversion.m4
for file in $fakes; do
cat > $file <<'EOF'
#! /bin/sh
# This is a dummy file for bootstrapping CVS libtool.
echo "$0: Bootstrap detected, no files installed." | sed 's,^.*/,,g'
exit 0
EOF
chmod 755 $file
done
# Running the installed `libtoolize' will trash the local (newer) libtool.m4
# among others. Call the dummy script we made earlier.
LIBTOOLIZE=`pwd`/config/libtoolize
export LIBTOOLIZE
for sub in $reconfdirs; do
autoreconf --force --verbose --install $sub
done
for file in $fakes; do
rm -f $file
done
# These files con cause an infinite configure loop if left behind.
rm -f Makefile libltdl/Makefile libtool vcl.tmp
exit 0