{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf320 {\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fnil\fcharset0 Menlo-Regular;} {\colortbl;\red255\green255\blue255;\red108\green108\blue108;\red0\green0\blue0;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural \f0\b\fs24 \cf2 From: \b0 \cf3 "Gary V. Vaughan" \ \b \cf2 Date: \b0 \cf3 31 August 2010 17:08:41 GMT+07:00\ \b \cf2 To: \b0 \cf3 Libtool Patches List \ \b \cf2 Cc: \b0 \cf3 "Gary V. Vaughan" \ \b \cf2 Subject: \cf3 [PATCH v2 4/6] Rewrite bootstrap script for consistency with our other shell code.\ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural \b0 \cf3 \ \pard\pardeftab720\ql\qnatural \f1 \cf3 From: Gary V. Vaughan \ \ And then, soon after posting that series, I thought that we shouldn't\ need to maintain 2 copies of the option parse loop support functions,\ especially as we have a perfectly good mechanism in place to generate\ that code already...\ \ ...I've included a diff of `bootstrap' proper, since it will need to\ be committed, although you can mostly ignore it here and look at\ (the MUCH shorter) bootstrap.m4sh file to see what's going on.\ \ This supercedes the previous post.\ \ Okay to push?\ \ \ * libltdl/config/bootstrap.m4sh: Add a proper option parsing loop.\ Reformat header comments to work with `func_help' and\ `func_version'.\ (my_sed_traces): With help from Autoconf quadrigraphs, expand to\ extract all parameters from `configure.ac', without additional\ shell munging.\ * Makefile.maint (bootstrap): New rule to generate the `bootstrap'\ scripts from `ltdl/config/bootstrap.m4sh'.\ * bootstrap: Regenerated.\ \ Signed-off-by: Gary V. Vaughan \ ---\ ChangeLog \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0| \'a0\'a013 +\ Makefile.maint \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0| \'a0\'a0\'a07 +\ bootstrap \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0| 1308 +++++++++++++++++++++++++++++++++++++----\ libltdl/config/bootstrap.m4sh | \'a0276 +++++++++\ 4 files changed, 1490 insertions(+), 114 deletions(-)\ create mode 100755 libltdl/config/bootstrap.m4sh\ \ diff --git a/ChangeLog b/ChangeLog\ index f73d431..74a7972 100644\ --- a/ChangeLog\ +++ b/ChangeLog\ @@ -1,3 +1,16 @@\ +2010-08-30 \'a0Gary V. Vaughan \ +\ + Rewrite bootstrap script for consistency with our other shell code.\ + * libltdl/config/bootstrap.m4sh: Add a proper option parsing loop.\ + Reformat header comments to work with `func_help' and\ + `func_version'.\ + (my_sed_traces): With help from Autoconf quadrigraphs, expand to\ + extract all parameters from `configure.ac', without additional\ + shell munging.\ + * Makefile.maint (bootstrap): New rule to generate the `bootstrap'\ + scripts from `ltdl/config/bootstrap.m4sh'.\ + * bootstrap: Regenerated.\ +\ 2010-08-29 \'a0Gary V. Vaughan \'a0\ \ Support missing detached signatures, like gnulib implementation.\ diff --git a/Makefile.maint b/Makefile.maint\ index e2fa628..90ca0e5 100644\ --- a/Makefile.maint\ +++ b/Makefile.maint\ @@ -75,6 +75,13 @@ $(srcdir)/$(auxdir)/mailnotify: $(auxdir)/mailnotify.m4sh\ mv -f mailnotify.tmp mailnotify; \\\ rm -f mailnotify.in\ \ +$(srcdir)/bootstrap: $(auxdir)/bootstrap.m4sh\ + rm -f $@ address@hidden + $(M4SH) -B $(srcdir)/$(auxdir) $< \\\ + \'a0\'a0\'a0| $(edit) -e "s,@^I@, ,g" > address@hidden + chmod 555 address@hidden + mv -f address@hidden address@hidden +\ .PHONY: git-release\ git-release: version-check prev-tarball check-news fetch git-commit git-dist diffs web-manual\ @tarname="$(PACKAGE)-$(VERSION).tar.gz"; \\\ diff --git a/bootstrap b/bootstrap\ index 7ad0979..5f6e19d 100755\ --- a/bootstrap\ +++ b/bootstrap\ @@ -1,16 +1,17 @@\ #! /bin/sh\ -# bootstrap -- Helps bootstrapping libtool, when checked out from repository.\ -#\ -# \'a0\'a0Copyright (C) 2003, 2004, 2005, 2006, 2009, 2010 Free Software\ -# \'a0\'a0Foundation, Inc,\ -# \'a0\'a0Mritten by Gary V. Vaughan, 2003\ -#\ -# \'a0\'a0This file is part of GNU Libtool.\ -#\ -# GNU Libtool 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.\ +# Generated from ../libltdl/config/bootstrap.m4sh by GNU Autoconf 2.67.\ +\ +# bootstrap (GNU Libtool) version 2010-08-30\ +# Written by Gary V. Vaughan, 2010\ +\ +# Copyright (C) 2010 Free Software Foundation, Inc.\ +# This is free software; see the source for copying conditions. \'a0There is NO\ +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\ +\ +# GNU Libtool 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.\ #\ # GNU Libtool is distributed in the hope that it will be useful,\ # but WITHOUT ANY WARRANTY; without even the implied warranty of\ @@ -22,10 +23,26 @@\ # can be downloaded from \'a0http://www.gnu.org/licenses/gpl.html,\ # or obtained by writing to the Free Software Foundation, Inc.,\ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\ -####\ \ -# Exit upon failure.\ -set -e\ +# Usage: $progname [OPTION]...\ +\ +# \'a0\'a0\'a0\'a0\'a0\'a0--debug \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0enable verbose shell tracing\ +# \'a0\'a0-n, --dry-run \'a0\'a0\'a0\'a0\'a0\'a0print commands rather than running them\ +# \'a0\'a0-f, --force \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0bootstrap even when sources are not from git\ +# \'a0\'a0-r, --reconf-dirs=DIR1,DIR2,...\ +# \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0limit the directories to be bootstrapped to the\ +# \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0comma delimited list of DIR1,DIR2,....\ +# \'a0\'a0-v, --verbose \'a0\'a0\'a0\'a0\'a0\'a0verbosely report processing\ +# \'a0\'a0\'a0\'a0\'a0\'a0--version \'a0\'a0\'a0\'a0\'a0\'a0print version information and exit\ +# \'a0\'a0-h, --help \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0print short or long help message\ +\ +# You can also set the following variables to help $progname\ +# locate the right tools:\ +# \'a0\'a0AUTORECONF, AUTOCONF, AUTOMAKE, AUTOM4TE, CONFIG_SHELL,\ +# \'a0\'a0EGREP, FGREP, GREP, LN_S, M4, MAKE, MAKEINFO, RM, SED\ +\ +# This script bootstraps a git checkout of GNU Libtool by correctly calling\ +# out to parts of the GNU Build Platform.\ \ # It is okay for the bootstrap process to require unreleased autoconf\ # or automake, as long as any released libtool will work with at least\ @@ -33,137 +50,1190 @@ set -e\ # better features, and configure.ac documents oldest version of each\ # required for bootstrap (AC_PREREQ, and AM_INIT_AUTOMAKE).\ \ -SHELL=$\{CONFIG_SHELL-/bin/sh\}\ -export SHELL\ +# Report bugs to \ +\ : $\{AUTORECONF=autoreconf\}\ : $\{AUTOCONF=autoconf\}\ : $\{AUTOMAKE=automake\}\ : $\{AUTOM4TE=autom4te\}\ : $\{MAKE=make\}\ -: $\{GREP=grep\}\ -: $\{EGREP=egrep\}\ -: $\{FGREP=fgrep\}\ -: $\{SED=sed\}\ -: $\{LN_S='ln -s'\}\ : $\{MAKEINFO=makeinfo\}\ \ -case $1 in\ ---help|-h*)\ - \'a0cat <&2\ + \'a0\'a0\'a0\'a0\'a0exit $EXIT_FAILURE\ + \'a0\'a0\'a0\}\ +\ + \'a0\'a0\'a0test -z "$vcs_only_file" || test -r "$vcs_only_file" || \{\ + \'a0\'a0\'a0\'a0\'a0echo 'bootstrap: Bootstrapping from a non-version-control distribution is risky.' >&2\ + \'a0\'a0\'a0\'a0\'a0exit $EXIT_FAILURE\ + \'a0\'a0\'a0\}\ +\}\ +\ +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh\ +# is ksh but when the shell is invoked as "sh" and the current value of\ +# the _XPG environment variable is not equal to 1 (one), the special\ +# positional parameter $0, within a function call, is the name of the\ +# function.\ +progpath="$0"\ +\ +## -------------------- ##\ +## M4sh Initialization. ##\ +## -------------------- ##\ +\ +# Be more Bourne compatible\ +DUALCASE=1; export DUALCASE # for MKS sh\ +if test -n "$\{ZSH_VERSION+set\}" && (emulate sh) >/dev/null 2>&1; then :\ + \'a0emulate sh\ + \'a0NULLCMD=:\ + \'a0# Pre-4.2 versions of Zsh do word splitting on $\{1+"$@"\}, which\ + \'a0# is contrary to our usage. \'a0Disable this feature.\ + \'a0alias -g '$\{1+"$@"\}'='"$@"'\ + \'a0setopt NO_GLOB_SUBST\ +else\ + \'a0case `(set -o) 2>/dev/null` in #(\ + \'a0*posix*) :\ + \'a0\'a0\'a0set -o posix ;; #(\ + \'a0*) :\ + \'a0\'a0\'a0\'a0;;\ esac\ +fi\ +\ +\ +as_nl='\ +'\ +export as_nl\ +# Printing a long string crashes Solaris 7 /usr/bin/printf.\ +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'\ +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo\ +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo\ +# Prefer a ksh shell builtin over an external printf program on Solaris,\ +# but without wasting forks for bash or zsh.\ +if test -z "$BASH_VERSION$ZSH_VERSION" \\\ + \'a0\'a0\'a0&& (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then\ + \'a0as_echo='print -r --'\ + \'a0as_echo_n='print -rn --'\ +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then\ + \'a0as_echo='printf %s\\n'\ + \'a0as_echo_n='printf %s'\ +else\ + \'a0if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then\ + \'a0\'a0\'a0as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'\ + \'a0\'a0\'a0as_echo_n='/usr/ucb/echo -n'\ + \'a0else\ + \'a0\'a0\'a0as_echo_body='eval expr "X$1" : "X\\\\(.*\\\\)"'\ + \'a0\'a0\'a0as_echo_n_body='eval\ + \'a0\'a0\'a0\'a0\'a0arg=$1;\ + \'a0\'a0\'a0\'a0\'a0case $arg in #(\ + \'a0\'a0\'a0\'a0\'a0*"$as_nl"*)\ + expr "X$arg" : "X\\\\(.*\\\\)$as_nl";\ + arg=`expr "X$arg" : ".*$as_nl\\\\(.*\\\\)"`;;\ + \'a0\'a0\'a0\'a0\'a0esac;\ + \'a0\'a0\'a0\'a0\'a0expr "X$arg" : "X\\\\(.*\\\\)" | tr -d "$as_nl"\ + \'a0\'a0\'a0'\ + \'a0\'a0\'a0export as_echo_n_body\ + \'a0\'a0\'a0as_echo_n='sh -c $as_echo_n_body as_echo'\ + \'a0fi\ + \'a0export as_echo_body\ + \'a0as_echo='sh -c $as_echo_body as_echo'\ +fi\ +\ +# The user is always right.\ +if test "$\{PATH_SEPARATOR+set\}" != set; then\ + \'a0PATH_SEPARATOR=:\ + \'a0(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && \{\ + \'a0\'a0\'a0(PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||\ + \'a0\'a0\'a0\'a0\'a0PATH_SEPARATOR=';'\ + \'a0\}\ +fi\ +\ +\ +# IFS\ +# We need space, tab and new line, in precisely that order. \'a0Quoting is\ +# there to prevent editors from complaining about space-tab.\ +# (If _AS_PATH_WALK were called with IFS unset, it would disable word\ +# splitting by setting IFS to empty value.)\ +IFS=" "" $as_nl"\ +\ +# Find who we are. \'a0Look in the path if we contain no directory separator.\ +case $0 in #((\ + \'a0*[\\\\/]* ) as_myself=$0 ;;\ + \'a0*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\ +for as_dir in $PATH\ +do\ + \'a0IFS=$as_save_IFS\ + \'a0test -z "$as_dir" && as_dir=.\ + \'a0\'a0\'a0test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break\ + \'a0done\ +IFS=$as_save_IFS\ \ -test -f ./configure.ac || \{\ - \'a0echo "bootstrap: can't find ./configure.ac, please rerun from top_srcdir"\ + \'a0\'a0\'a0\'a0;;\ +esac\ +# We did not find ourselves, most probably we were run as `sh COMMAND'\ +# in which case we are not to be found in the path.\ +if test "x$as_myself" = x; then\ + \'a0as_myself=$0\ +fi\ +if test ! -f "$as_myself"; then\ + \'a0$as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2\ \'a0\'a0exit 1\ -\}\ +fi\ \ +# Unset variables that we do not need and which cause bugs (e.g. in\ +# pre-3.0 UWIN ksh). \'a0But do not cause bugs in bash 2.01; the "|| exit 1"\ +# suppresses any "Segmentation fault" message there. \'a0'((' could\ +# trigger a bug in pdksh 5.2.14.\ +for as_var in BASH_ENV ENV MAIL MAILPATH\ +do eval test x\\$\{$as_var+set\} = xset \\\ + \'a0&& ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :\ +done\ +PS1='$ '\ +PS2='> '\ +PS4='+ '\ \ -# Extract auxdir and m4dir from configure.ac:\ -lt_tab=' '\ -my_sed_traces='s,#.*$,,; s,^dnl .*$,,; s, dnl .*$,,;\ - /AC_CONFIG_AUX_DIR[^_]/ \'a0\{\ - \'a0\'a0\'a0s,^.*AC_CONFIG_AUX_DIR([[ '"$lt_tab"']*\\([^])]*\\).*$,auxdir=\\1,; p;\ - \};\ - /AC_CONFIG_MACRO_DIR/ \'a0\'a0\{\ - \'a0\'a0\'a0s,^.*AC_CONFIG_MACRO_DIR([[ '"$lt_tab"']*\\([^])]*\\).*$,m4dir=\\1,; p;\ - \};\ - d;'\ -eval `cat configure.ac 2>/dev/null | $SED "$my_sed_traces"`\ -\ -\ -# 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'. \'a0The best way to work around such a problem is to\ -WARNING: uninstall your system libtool files, or failing that, overwrite\ -WARNING: them with all m4 file as shipped with this distribution (except\ -WARNING: `lt~obsolete.m4'). \'a0After that, retry this bootstrap.\ -EOF\ +# NLS nuisances.\ +LC_ALL=C\ +export LC_ALL\ +LANGUAGE=C\ +export LANGUAGE\ \ -find . -depth \\( -name autom4te.cache -o -name libtool \\) -print \\\ - \'a0| grep -v '\{arch\}' \\\ - \'a0| xargs rm -rf\ +# CDPATH.\ +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH\ \ -# Delete stale files from previous libtool versions.\ -rm -f acinclude.m4 libltdl/config.h\ +if test "x$CONFIG_SHELL" = x; then\ + \'a0as_bourne_compatible="if test -n \\"\\$\{ZSH_VERSION+set\}\\" && (emulate sh) >/dev/null 2>&1; then :\ + \'a0emulate sh\ + \'a0NULLCMD=:\ + \'a0# Pre-4.2 versions of Zsh do word splitting on \\$\{1+\\"address@hidden"\}, which\ + \'a0# is contrary to our usage. \'a0Disable this feature.\ + \'a0alias -g '\\$\{1+\\"address@hidden"\}'='\\"address@hidden"'\ + \'a0setopt NO_GLOB_SUBST\ +else\ + \'a0case \\`(set -o) 2>/dev/null\\` in #(\ + \'a0*posix*) :\ + \'a0\'a0\'a0set -o posix ;; #(\ + \'a0*) :\ + \'a0\'a0\'a0\'a0;;\ +esac\ +fi\ +"\ + \'a0as_required="as_fn_return () \{ (exit \\$1); \}\ +as_fn_success () \{ as_fn_return 0; \}\ +as_fn_failure () \{ as_fn_return 1; \}\ +as_fn_ret_success () \{ return 0; \}\ +as_fn_ret_failure () \{ return 1; \}\ +\ +exitcode=0\ +as_fn_success || \{ exitcode=1; echo as_fn_success failed.; \}\ +as_fn_failure && \{ exitcode=1; echo as_fn_failure succeeded.; \}\ +as_fn_ret_success || \{ exitcode=1; echo as_fn_ret_success failed.; \}\ +as_fn_ret_failure && \{ exitcode=1; echo as_fn_ret_failure succeeded.; \}\ +if ( set x; as_fn_ret_success y && test x = \\"\\$1\\" ); then :\ \ -for file in argz.c lt__dirent.c lt__strl.c; do\ - \'a0rm -f $file\ +else\ + \'a0exitcode=1; echo positional parameters were not saved.\ +fi\ +test x\\$exitcode = x0 || exit 1"\ + \'a0as_suggested=""\ + \'a0if (eval "$as_required") 2>/dev/null; then :\ + \'a0as_have_required=yes\ +else\ + \'a0as_have_required=no\ +fi\ + \'a0if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :\ +\ +else\ + \'a0as_save_IFS=$IFS; IFS=$PATH_SEPARATOR\ +as_found=false\ +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH\ +do\ + \'a0IFS=$as_save_IFS\ + \'a0test -z "$as_dir" && as_dir=.\ + \'a0as_found=:\ + \'a0case $as_dir in #(\ + /*)\ + \'a0\'a0for as_base in sh bash ksh sh5; do\ + \'a0\'a0\'a0\'a0# Try only shells that exist, to save several forks.\ + \'a0\'a0\'a0\'a0as_shell=$as_dir/$as_base\ + \'a0\'a0\'a0\'a0if \{ test -f "$as_shell" || test -f "$as_shell.exe"; \} &&\ + \'a0\'a0\'a0\{ $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; \} 2>/dev/null; then :\ + \'a0CONFIG_SHELL=$as_shell as_have_required=yes\ + \'a0\'a0break 2\ +fi\ + \'a0\'a0done;;\ + \'a0\'a0\'a0\'a0\'a0\'a0esac\ + \'a0as_found=false\ done\ +$as_found || \{ if \{ test -f "$SHELL" || test -f "$SHELL.exe"; \} &&\ + \'a0\'a0\'a0\'a0\'a0\{ $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; \} 2>/dev/null; then :\ + \'a0CONFIG_SHELL=$SHELL as_have_required=yes\ +fi; \}\ +IFS=$as_save_IFS\ +\ \ -if test -z "$reconfdirs"; then\ - \'a0reconfdirs=". libltdl `ls -1d tests/*demo tests/*demo[0-9]`"\ + \'a0\'a0\'a0\'a0\'a0if test "x$CONFIG_SHELL" != x; then :\ + \'a0# We cannot yet assume a decent shell, so we have to provide a\ + # neutralization value for shells without unset; and this also\ + # works around shells that cannot unset nonexistent variables.\ + BASH_ENV=/dev/null\ + ENV=/dev/null\ + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV\ + export CONFIG_SHELL\ + exec "$CONFIG_SHELL" "$as_myself" $\{1+"$@"\}\ fi\ \ -# Extract the package name and version number from configure.ac:\ -set dummy `$SED -n '\ - \'a0\'a0\'a0/AC_INIT/\{\ - s/[][,()]/ /g\ - s/ GNU / /\ - p\ - \'a0\'a0\'a0\}' configure.ac`\ -shift\ -PACKAGE=`echo "$2" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`\ -PACKAGE_NAME=$2\ -PACKAGE_URL=\ -if grep 'AC_INIT.*GNU' configure.ac >/dev/null; then\ - \'a0PACKAGE_NAME="GNU $PACKAGE_NAME"\ - \'a0PACKAGE_URL="http://www.gnu.org/software/$PACKAGE/"\ + \'a0\'a0\'a0if test x$as_have_required = xno; then :\ + \'a0$as_echo "$0: This script requires a shell more modern than all"\ + \'a0$as_echo "$0: the shells that I found on your system."\ + \'a0if test x$\{ZSH_VERSION+set\} = xset ; then\ + \'a0\'a0\'a0$as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"\ + \'a0\'a0\'a0$as_echo "$0: be upgraded to zsh 4.3.4 or later."\ + \'a0else\ + \'a0\'a0\'a0$as_echo "$0: Please tell address@hidden about your system,\ +$0: including any error possibly output before this\ +$0: message. Then install a modern shell, or manually run\ +$0: the script under such a shell if you do have one."\ + \'a0fi\ + \'a0exit 1\ +fi\ fi\ -VERSION=$3\ +fi\ +SHELL=$\{CONFIG_SHELL-/bin/sh\}\ +export SHELL\ +# Unset more variables known to interfere with behavior of common tools.\ +CLICOLOR_FORCE= GREP_OPTIONS=\ +unset CLICOLOR_FORCE GREP_OPTIONS\ +\ +## --------------------- ##\ +## M4sh Shell Functions. ##\ +## --------------------- ##\ +# as_fn_unset VAR\ +# ---------------\ +# Portably unset VAR.\ +as_fn_unset ()\ +\{\ + \'a0\{ eval $1=; unset $1;\}\ +\}\ +as_unset=as_fn_unset\ +## -------------------- ##\ +## Main body of script. ##\ +## -------------------- ##\ +\ +\ +\ +\ +: $\{CP="cp -f"\}\ +test "$\{ECHO+set\}" = set || ECHO=$\{as_echo-'printf %s\\n'\}\ +: $\{EGREP="/usr/bin/grep -E"\}\ +: $\{FGREP="/usr/bin/grep -F"\}\ +: $\{GREP="/usr/bin/grep"\}\ +: $\{LN_S="ln -s"\}\ +: $\{MAKE="make"\}\ +: $\{MKDIR="mkdir"\}\ +: $\{MV="mv -f"\}\ +: $\{RM="rm -f"\}\ +: $\{SED="/opt/local/bin/gsed"\}\ +: $\{SHELL="$\{CONFIG_SHELL-/bin/sh\}"\}\ +: $\{Xsed="$SED -e 1s/^X//"\}\ +\ +# Global variables:\ +EXIT_SUCCESS=0\ +EXIT_FAILURE=1\ +EXIT_MISMATCH=63 \'a0# $? = 63 is used to indicate version mismatch to missing.\ +EXIT_SKIP=77 \'a0# $? = 77 is used to indicate a skipped test to automake.\ +\ +exit_status=$EXIT_SUCCESS\ +\ +# Make sure IFS has a sensible default\ +lt_nl='\ +'\ +IFS=" $lt_nl"\ +\ +dirname="s,/[^/]*$,,"\ +basename="s,^.*/,,"\ +\ +# func_dirname file append nondir_replacement\ +# Compute the dirname of FILE. \'a0If nonempty, add APPEND to the result,\ +# otherwise set result to NONDIR_REPLACEMENT.\ +func_dirname ()\ +\{\ + \'a0\'a0\'a0func_dirname_result=`$ECHO "$\{1\}" | $SED "$dirname"`\ + \'a0\'a0\'a0if test "X$func_dirname_result" = "X$\{1\}"; then\ + \'a0\'a0\'a0\'a0\'a0func_dirname_result="$\{3\}"\ + \'a0\'a0\'a0else\ + \'a0\'a0\'a0\'a0\'a0func_dirname_result="$func_dirname_result$\{2\}"\ + \'a0\'a0\'a0fi\ +\} # func_dirname may be replaced by extended shell implementation\ +\ +\ +# func_basename file\ +func_basename ()\ +\{\ + \'a0\'a0\'a0func_basename_result=`$ECHO "$\{1\}" | $SED "$basename"`\ +\} # func_basename may be replaced by extended shell implementation\ +\ +\ +# func_dirname_and_basename file append nondir_replacement\ +# perform func_basename and func_dirname in a single function\ +# call:\ +# \'a0\'a0dirname: \'a0Compute the dirname of FILE. \'a0If nonempty,\ +# \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0add APPEND to the result, otherwise set result\ +# \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0to NONDIR_REPLACEMENT.\ +# \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0value returned in "$func_dirname_result"\ +# \'a0\'a0basename: Compute filename of FILE.\ +# \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0value retuned in "$func_basename_result"\ +# Implementation must be kept synchronized with func_dirname\ +# and func_basename. For efficiency, we do not delegate to\ +# those functions but instead duplicate the functionality here.\ +func_dirname_and_basename ()\ +\{\ + \'a0\'a0\'a0# Extract subdirectory from the argument.\ + \'a0\'a0\'a0func_dirname_result=`$ECHO "$\{1\}" | $SED -e "$dirname"`\ + \'a0\'a0\'a0if test "X$func_dirname_result" = "X$\{1\}"; then\ + \'a0\'a0\'a0\'a0\'a0func_dirname_result="$\{3\}"\ + \'a0\'a0\'a0else\ + \'a0\'a0\'a0\'a0\'a0func_dirname_result="$func_dirname_result$\{2\}"\ + \'a0\'a0\'a0fi\ + \'a0\'a0\'a0func_basename_result=`$ECHO "$\{1\}" | $SED -e "$basename"`\ +\} # func_dirname_and_basename may be replaced by extended shell implementation\ +\ +\ +# func_stripname prefix suffix name\ +# strip PREFIX and SUFFIX off of NAME.\ +# PREFIX and SUFFIX must not contain globbing or regex special\ +# characters, hashes, percent signs, but SUFFIX may contain a leading\ +# dot (in which case that matches only a dot).\ +# func_strip_suffix prefix name\ +func_stripname ()\ +\{\ + \'a0\'a0\'a0case $\{2\} in\ + \'a0\'a0\'a0\'a0\'a0.*) func_stripname_result=`$ECHO "$\{3\}" | $SED "s%^$\{1\}%%; s%\\\\\\\\$\{2\}\\$%%"`;;\ + \'a0\'a0\'a0\'a0\'a0*) \'a0func_stripname_result=`$ECHO "$\{3\}" | $SED "s%^$\{1\}%%; s%$\{2\}\\$%%"`;;\ + \'a0\'a0\'a0esac\ +\} # func_stripname may be replaced by extended shell implementation\ +\ +\ +# These SED scripts presuppose an absolute path with a trailing slash.\ +pathcar='s,^/\\([^/]*\\).*$,\\1,'\ +pathcdr='s,^/[^/]*,,'\ +removedotparts=':dotsl\ + s@/\\./@/@g\ + t dotsl\ + s,/\\.$,/,'\ +collapseslashes='s@/\\\{1,\\\}@/@g'\ +finalslash='s,/*$,/,'\ +\ +# func_normal_abspath PATH\ +# Remove doubled-up and trailing slashes, "." path components,\ +# and cancel out any ".." path components in PATH after making\ +# it an absolute path.\ +# \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0value returned in "$func_normal_abspath_result"\ +func_normal_abspath ()\ +\{\ + \'a0# Start from root dir and reassemble the path.\ + \'a0func_normal_abspath_result=\ + \'a0func_normal_abspath_tpath=$1\ + \'a0func_normal_abspath_altnamespace=\ + \'a0case $func_normal_abspath_tpath in\ + \'a0\'a0\'a0"")\ + \'a0\'a0\'a0\'a0\'a0# Empty path, that just means $cwd.\ + \'a0\'a0\'a0\'a0\'a0func_stripname '' '/' "`pwd`"\ + \'a0\'a0\'a0\'a0\'a0func_normal_abspath_result=$func_stripname_result\ + \'a0\'a0\'a0\'a0\'a0return\ + \'a0\'a0\'a0;;\ + \'a0\'a0\'a0# The next three entries are used to spot a run of precisely\ + \'a0\'a0\'a0# two leading slashes without using negated character classes;\ + \'a0\'a0\'a0# we take advantage of case's first-match behaviour.\ + \'a0\'a0\'a0///*)\ + \'a0\'a0\'a0\'a0\'a0# Unusual form of absolute path, do nothing.\ + \'a0\'a0\'a0;;\ + \'a0\'a0\'a0//*)\ + \'a0\'a0\'a0\'a0\'a0# Not necessarily an ordinary path; POSIX reserves leading '//'\ + \'a0\'a0\'a0\'a0\'a0# and for example Cygwin uses it to access remote file shares\ + \'a0\'a0\'a0\'a0\'a0# over CIFS/SMB, so we conserve a leading double slash if found.\ + \'a0\'a0\'a0\'a0\'a0func_normal_abspath_altnamespace=/\ + \'a0\'a0\'a0;;\ + \'a0\'a0\'a0/*)\ + \'a0\'a0\'a0\'a0\'a0# Absolute path, do nothing.\ + \'a0\'a0\'a0;;\ + \'a0\'a0\'a0*)\ + \'a0\'a0\'a0\'a0\'a0# Relative path, prepend $cwd.\ + \'a0\'a0\'a0\'a0\'a0func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath\ + \'a0\'a0\'a0;;\ + \'a0esac\ + \'a0# Cancel out all the simple stuff to save iterations. \'a0We also want\ + \'a0# the path to end with a slash for ease of parsing, so make sure\ + \'a0# there is one (and only one) here.\ + \'a0func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \\\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0-e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`\ + \'a0while :; do\ + \'a0\'a0\'a0# Processed it all yet?\ + \'a0\'a0\'a0if test "$func_normal_abspath_tpath" = / ; then\ + \'a0\'a0\'a0\'a0\'a0# If we ascended to the root using ".." the result may be empty now.\ + \'a0\'a0\'a0\'a0\'a0if test -z "$func_normal_abspath_result" ; then\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0func_normal_abspath_result=/\ + \'a0\'a0\'a0\'a0\'a0fi\ + \'a0\'a0\'a0\'a0\'a0break\ + \'a0\'a0\'a0fi\ + \'a0\'a0\'a0func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \\\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0-e "$pathcar"`\ + \'a0\'a0\'a0func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \\\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0-e "$pathcdr"`\ + \'a0\'a0\'a0# Figure out what to do with it\ + \'a0\'a0\'a0case $func_normal_abspath_tcomponent in\ + \'a0\'a0\'a0\'a0\'a0"")\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0# Trailing empty path component, ignore it.\ + \'a0\'a0\'a0\'a0\'a0;;\ + \'a0\'a0\'a0\'a0\'a0..)\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0# Parent dir; strip last assembled component from result.\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0func_dirname "$func_normal_abspath_result"\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0func_normal_abspath_result=$func_dirname_result\ + \'a0\'a0\'a0\'a0\'a0;;\ + \'a0\'a0\'a0\'a0\'a0*)\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0# Actual path component, append it.\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent\ + \'a0\'a0\'a0\'a0\'a0;;\ + \'a0\'a0\'a0esac\ + \'a0done\ + \'a0# Restore leading double-slash if one was found on entry.\ + \'a0func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result\ +\}\ +\ +# func_relative_path SRCDIR DSTDIR\ +# generates a relative path from SRCDIR to DSTDIR, with a trailing\ +# slash if non-empty, suitable for immediately appending a filename\ +# without needing to append a separator.\ +# \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0value returned in "$func_relative_path_result"\ +func_relative_path ()\ +\{\ + \'a0func_relative_path_result=\ + \'a0func_normal_abspath "$1"\ + \'a0func_relative_path_tlibdir=$func_normal_abspath_result\ + \'a0func_normal_abspath "$2"\ + \'a0func_relative_path_tbindir=$func_normal_abspath_result\ +\ + \'a0# Ascend the tree starting from libdir\ + \'a0while :; do\ + \'a0\'a0\'a0# check if we have found a prefix of bindir\ + \'a0\'a0\'a0case $func_relative_path_tbindir in\ + \'a0\'a0\'a0\'a0\'a0$func_relative_path_tlibdir)\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0# found an exact match\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0func_relative_path_tcancelled=\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0break\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0;;\ + \'a0\'a0\'a0\'a0\'a0$func_relative_path_tlibdir*)\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0# found a matching prefix\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0func_relative_path_tcancelled=$func_stripname_result\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0if test -z "$func_relative_path_result"; then\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0func_relative_path_result=.\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0fi\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0break\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0;;\ + \'a0\'a0\'a0\'a0\'a0*)\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0func_dirname $func_relative_path_tlibdir\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0func_relative_path_tlibdir=$\{func_dirname_result\}\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0if test "x$func_relative_path_tlibdir" = x ; then\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0# Have to descend all the way to the root!\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0func_relative_path_result=../$func_relative_path_result\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0func_relative_path_tcancelled=$func_relative_path_tbindir\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0break\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0fi\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0func_relative_path_result=../$func_relative_path_result\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0;;\ + \'a0\'a0\'a0esac\ + \'a0done\ +\ + \'a0# Now calculate path; take care to avoid doubling-up slashes.\ + \'a0func_stripname '' '/' "$func_relative_path_result"\ + \'a0func_relative_path_result=$func_stripname_result\ + \'a0func_stripname '/' '/' "$func_relative_path_tcancelled"\ + \'a0if test "x$func_stripname_result" != x ; then\ + \'a0\'a0\'a0func_relative_path_result=$\{func_relative_path_result\}/$\{func_stripname_result\}\ + \'a0fi\ +\ + \'a0# Normalisation. If bindir is libdir, return empty string,\ + \'a0# else relative path ending with a slash; either way, target\ + \'a0# file name can be directly appended.\ + \'a0if test ! -z "$func_relative_path_result"; then\ + \'a0\'a0\'a0func_stripname './' '' "$func_relative_path_result/"\ + \'a0\'a0\'a0func_relative_path_result=$func_stripname_result\ + \'a0fi\ +\}\ +\ +# The name of this program:\ +func_dirname_and_basename "$progpath"\ +progname=$func_basename_result\ +\ +# Make sure we have an absolute path for reexecution:\ +case $progpath in\ + \'a0[\\\\/]*|[A-Za-z]:\\\\*) ;;\ + \'a0*[\\\\/]*)\ + \'a0\'a0\'a0\'a0progdir=$func_dirname_result\ + \'a0\'a0\'a0\'a0progdir=`cd "$progdir" && pwd`\ + \'a0\'a0\'a0\'a0progpath="$progdir/$progname"\ + \'a0\'a0\'a0\'a0;;\ + \'a0*)\ + \'a0\'a0\'a0\'a0save_IFS="$IFS"\ + \'a0\'a0\'a0\'a0IFS=:\ + \'a0\'a0\'a0\'a0for progdir in $PATH; do\ + \'a0\'a0\'a0\'a0\'a0\'a0IFS="$save_IFS"\ + \'a0\'a0\'a0\'a0\'a0\'a0test -x "$progdir/$progname" && break\ + \'a0\'a0\'a0\'a0done\ + \'a0\'a0\'a0\'a0IFS="$save_IFS"\ + \'a0\'a0\'a0\'a0test -n "$progdir" || progdir=`pwd`\ + \'a0\'a0\'a0\'a0progpath="$progdir/$progname"\ + \'a0\'a0\'a0\'a0;;\ +esac\ +\ +# Sed substitution that helps us do robust quoting. \'a0It backslashifies\ +# metacharacters that are still active within double-quoted strings.\ +Xsed="$\{SED\}"' -e 1s/^X//'\ +sed_quote_subst='s/\\([`"$\\\\]\\)/\\\\\\1/g'\ +\ +# Same as above, but do not quote variable references.\ +double_quote_subst='s/\\(["`\\\\]\\)/\\\\\\1/g'\ +\ +# Sed substitution that turns a string into a regex matching for the\ +# string literally.\ +sed_make_literal_regex='s,[].[^$\\\\*\\/],\\\\&,g'\ +\ +# Sed substitution that converts a w32 file name or path\ +# which contains forward slashes, into one that contains\ +# (escaped) backslashes. \'a0A very naive implementation.\ +lt_sed_naive_backslashify='s|\\\\\\\\*|\\\\|g;s|/|\\\\|g;s|\\\\|\\\\\\\\|g'\ +\ +# Re-`\\' parameter expansions in output of double_quote_subst that were\ +# `\\'-ed in input to the same. \'a0If an odd number of `\\' preceded a '$'\ +# in input to double_quote_subst, that '$' was protected from expansion.\ +# Since each input `\\' is now two `\\'s, look for any number of runs of\ +# four `\\'s followed by two `\\'s and then a '$'. \'a0`\\' that '$'.\ +bs='\\\\'\ +bs2='\\\\\\\\'\ +bs4='\\\\\\\\\\\\\\\\'\ +dollar='\\$'\ +sed_double_backslash="\\\ + \'a0s/$bs4/&\\\\\ +/g\ + \'a0s/^$bs2$dollar/$bs&/\ + \'a0s/\\\\([^$bs]\\\\)$bs2$dollar/\\\\1$bs2$bs$dollar/g\ + \'a0s/\\n//g"\ +\ +# Standard options:\ +opt_dry_run=false\ +opt_help=false\ +opt_quiet=false\ +opt_verbose=false\ +opt_warning=:\ +\ +# func_echo arg...\ +# Echo program name prefixed message, along with the current mode\ +# name if it has been set yet.\ +func_echo ()\ +\{\ + \'a0\'a0\'a0$ECHO "$progname: $\{opt_mode+$opt_mode: \}$*"\ +\}\ +\ +# func_verbose arg...\ +# Echo program name prefixed message in verbose mode only.\ +func_verbose ()\ +\{\ + \'a0\'a0\'a0$opt_verbose && func_echo $\{1+"$@"\}\ +\ + \'a0\'a0\'a0# A bug in bash halts the script if the last line of a function\ + \'a0\'a0\'a0# fails when set -e is in force, so we need another command to\ + \'a0\'a0\'a0# work around that:\ + \'a0\'a0\'a0:\ +\}\ +\ +# func_echo_all arg...\ +# Invoke $ECHO with all args, space-separated.\ +func_echo_all ()\ +\{\ + \'a0\'a0\'a0$ECHO "$*"\ +\}\ +\ +# func_error arg...\ +# Echo program name prefixed message to standard error.\ +func_error ()\ +\{\ + \'a0\'a0\'a0$ECHO "$progname: $\{opt_mode+$opt_mode: \}"$\{1+"$@"\} 1>&2\ +\}\ +\ +# func_warning arg...\ +# Echo program name prefixed warning message to standard error.\ +func_warning ()\ +\{\ + \'a0\'a0\'a0$opt_warning && $ECHO "$progname: $\{opt_mode+$opt_mode: \}warning: "$\{1+"$@"\} 1>&2\ +\ + \'a0\'a0\'a0# bash bug again:\ + \'a0\'a0\'a0:\ +\}\ +\ +# func_fatal_error arg...\ +# Echo program name prefixed message to standard error, and exit.\ +func_fatal_error ()\ +\{\ + \'a0\'a0\'a0func_error $\{1+"$@"\}\ + \'a0\'a0\'a0exit $EXIT_FAILURE\ +\}\ +\ +# func_fatal_help arg...\ +# Echo program name prefixed message to standard error, followed by\ +# a help hint, and exit.\ +func_fatal_help ()\ +\{\ + \'a0\'a0\'a0func_error $\{1+"$@"\}\ + \'a0\'a0\'a0func_fatal_error "$help"\ +\}\ +help="Try \\`$progname --help' for more information." \'a0## default\ +\ +\ +# func_grep expression filename\ +# Check whether EXPRESSION matches any line of FILENAME, without output.\ +func_grep ()\ +\{\ + \'a0\'a0\'a0$GREP "$1" "$2" >/dev/null 2>&1\ +\}\ +\ +\ +# func_mkdir_p directory-path\ +# Make sure the entire path to DIRECTORY-PATH is available.\ +func_mkdir_p ()\ +\{\ + \'a0\'a0\'a0my_directory_path="$1"\ + \'a0\'a0\'a0my_dir_list=\ +\ + \'a0\'a0\'a0if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then\ +\ + \'a0\'a0\'a0\'a0\'a0# Protect directory names starting with `-'\ + \'a0\'a0\'a0\'a0\'a0case $my_directory_path in\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0-*) my_directory_path="./$my_directory_path" ;;\ + \'a0\'a0\'a0\'a0\'a0esac\ +\ + \'a0\'a0\'a0\'a0\'a0# While some portion of DIR does not yet exist...\ + \'a0\'a0\'a0\'a0\'a0while test ! -d "$my_directory_path"; do\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0# ...make a list in topmost first order. \'a0Use a colon delimited\ + # list incase some portion of path contains whitespace.\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0my_dir_list="$my_directory_path:$my_dir_list"\ +\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0# If the last portion added has no slash in it, the list is done\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0case $my_directory_path in */*) ;; *) break ;; esac\ +\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0# ...otherwise throw away the child directory and loop\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`\ + \'a0\'a0\'a0\'a0\'a0done\ + \'a0\'a0\'a0\'a0\'a0my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`\ +\ + \'a0\'a0\'a0\'a0\'a0save_mkdir_p_IFS="$IFS"; IFS=':'\ + \'a0\'a0\'a0\'a0\'a0for my_dir in $my_dir_list; do\ + IFS="$save_mkdir_p_IFS"\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0# mkdir can fail with a `File exist' error if two processes\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0# try to create one of the directories concurrently. \'a0Don't\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0# stop in that case!\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0$MKDIR "$my_dir" 2>/dev/null || :\ + \'a0\'a0\'a0\'a0\'a0done\ + \'a0\'a0\'a0\'a0\'a0IFS="$save_mkdir_p_IFS"\ +\ + \'a0\'a0\'a0\'a0\'a0# Bail out if we (or some other process) failed to create a directory.\ + \'a0\'a0\'a0\'a0\'a0test -d "$my_directory_path" || \\\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0func_fatal_error "Failed to create \\`$1'"\ + \'a0\'a0\'a0fi\ +\}\ +\ +\ +# func_mktempdir [string]\ +# Make a temporary directory that won't clash with other running\ +# libtool processes, and avoids race conditions if possible. \'a0If\ +# given, STRING is the basename for that directory.\ +func_mktempdir ()\ +\{\ + \'a0\'a0\'a0my_template="$\{TMPDIR-/tmp\}/$\{1-$progname\}"\ +\ + \'a0\'a0\'a0if test "$opt_dry_run" = ":"; then\ + \'a0\'a0\'a0\'a0\'a0# Return a directory name, but don't create it in dry-run mode\ + \'a0\'a0\'a0\'a0\'a0my_tmpdir="$\{my_template\}-$$"\ + \'a0\'a0\'a0else\ +\ + \'a0\'a0\'a0\'a0\'a0# If mktemp works, use that first and foremost\ + \'a0\'a0\'a0\'a0\'a0my_tmpdir=`mktemp -d "$\{my_template\}-XXXXXXXX" 2>/dev/null`\ +\ + \'a0\'a0\'a0\'a0\'a0if test ! -d "$my_tmpdir"; then\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0# Failing that, at least try and use $RANDOM to avoid a race\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0my_tmpdir="$\{my_template\}-$\{RANDOM-0\}$$"\ +\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0save_mktempdir_umask=`umask`\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0umask 0077\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0$MKDIR "$my_tmpdir"\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0umask $save_mktempdir_umask\ + \'a0\'a0\'a0\'a0\'a0fi\ +\ + \'a0\'a0\'a0\'a0\'a0# If we're not in dry-run mode, bomb out on failure\ + \'a0\'a0\'a0\'a0\'a0test -d "$my_tmpdir" || \\\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0func_fatal_error "cannot create temporary directory \\`$my_tmpdir'"\ + \'a0\'a0\'a0fi\ +\ + \'a0\'a0\'a0$ECHO "$my_tmpdir"\ +\}\ +\ +\ +# func_quote_for_eval arg\ +# Aesthetically quote ARG to be evaled later.\ +# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT\ +# is double-quoted, suitable for a subsequent eval, whereas\ +# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters\ +# which are still active within double quotes backslashified.\ +func_quote_for_eval ()\ +\{\ + \'a0\'a0\'a0case $1 in\ + \'a0\'a0\'a0\'a0\'a0*[\\\\\\`\\"\\$]*)\ + func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;\ + \'a0\'a0\'a0\'a0\'a0*)\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0func_quote_for_eval_unquoted_result="$1" ;;\ + \'a0\'a0\'a0esac\ +\ + \'a0\'a0\'a0case $func_quote_for_eval_unquoted_result in\ + \'a0\'a0\'a0\'a0\'a0# Double-quote args containing shell metacharacters to delay\ + \'a0\'a0\'a0\'a0\'a0# word splitting, command substitution and and variable\ + \'a0\'a0\'a0\'a0\'a0# expansion for a subsequent eval.\ + \'a0\'a0\'a0\'a0\'a0# Many Bourne shells cannot handle close brackets correctly\ + \'a0\'a0\'a0\'a0\'a0# in scan sets, so we specify it separately.\ + \'a0\'a0\'a0\'a0\'a0*[\\[\\~\\#\\^\\&\\*\\(\\)\\\{\\\}\\|\\;\\<\\>\\?\\'\\ \\ ]*|*]*|"")\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0func_quote_for_eval_result="\\"$func_quote_for_eval_unquoted_result\\""\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0;;\ + \'a0\'a0\'a0\'a0\'a0*)\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"\ + \'a0\'a0\'a0esac\ +\}\ +\ +\ +# func_quote_for_expand arg\ +# Aesthetically quote ARG to be evaled later; same as above,\ +# but do not quote variable references.\ +func_quote_for_expand ()\ +\{\ + \'a0\'a0\'a0case $1 in\ + \'a0\'a0\'a0\'a0\'a0*[\\\\\\`\\"]*)\ + my_arg=`$ECHO "$1" | $SED \\\ + \'a0\'a0\'a0-e "$double_quote_subst" -e "$sed_double_backslash"` ;;\ + \'a0\'a0\'a0\'a0\'a0*)\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0my_arg="$1" ;;\ + \'a0\'a0\'a0esac\ +\ + \'a0\'a0\'a0case $my_arg in\ + \'a0\'a0\'a0\'a0\'a0# Double-quote args containing shell metacharacters to delay\ + \'a0\'a0\'a0\'a0\'a0# word splitting and command substitution for a subsequent eval.\ + \'a0\'a0\'a0\'a0\'a0# Many Bourne shells cannot handle close brackets correctly\ + \'a0\'a0\'a0\'a0\'a0# in scan sets, so we specify it separately.\ + \'a0\'a0\'a0\'a0\'a0*[\\[\\~\\#\\^\\&\\*\\(\\)\\\{\\\}\\|\\;\\<\\>\\?\\'\\ \\ ]*|*]*|"")\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0my_arg="\\"$my_arg\\""\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0;;\ + \'a0\'a0\'a0esac\ +\ + \'a0\'a0\'a0func_quote_for_expand_result="$my_arg"\ +\}\ +\ +\ +# func_show_eval cmd [fail_exp]\ +# Unless opt_silent is true, then output CMD. \'a0Then, if opt_dryrun is\ +# not true, evaluate CMD. \'a0If the evaluation of CMD fails, and FAIL_EXP\ +# is given, then evaluate it.\ +func_show_eval ()\ +\{\ + \'a0\'a0\'a0my_cmd="$1"\ + \'a0\'a0\'a0my_fail_exp="$\{2-:\}"\ +\ + \'a0\'a0\'a0$\{opt_silent-false\} || \{\ + \'a0\'a0\'a0\'a0\'a0func_quote_for_expand "$my_cmd"\ + \'a0\'a0\'a0\'a0\'a0eval "func_echo $func_quote_for_expand_result"\ + \'a0\'a0\'a0\}\ +\ + \'a0\'a0\'a0if $\{opt_dry_run-false\}; then :; else\ + \'a0\'a0\'a0\'a0\'a0eval "$my_cmd"\ + \'a0\'a0\'a0\'a0\'a0my_status=$?\ + \'a0\'a0\'a0\'a0\'a0if test "$my_status" -eq 0; then :; else\ + eval "(exit $my_status); $my_fail_exp"\ + \'a0\'a0\'a0\'a0\'a0fi\ + \'a0\'a0\'a0fi\ +\}\ +\ +\ +# func_show_eval_locale cmd [fail_exp]\ +# Unless opt_silent is true, then output CMD. \'a0Then, if opt_dryrun is\ +# not true, evaluate CMD. \'a0If the evaluation of CMD fails, and FAIL_EXP\ +# is given, then evaluate it. \'a0Use the saved locale for evaluation.\ +func_show_eval_locale ()\ +\{\ + \'a0\'a0\'a0my_cmd="$1"\ + \'a0\'a0\'a0my_fail_exp="$\{2-:\}"\ +\ + \'a0\'a0\'a0$\{opt_silent-false\} || \{\ + \'a0\'a0\'a0\'a0\'a0func_quote_for_expand "$my_cmd"\ + \'a0\'a0\'a0\'a0\'a0eval "func_echo $func_quote_for_expand_result"\ + \'a0\'a0\'a0\}\ +\ + \'a0\'a0\'a0if $\{opt_dry_run-false\}; then :; else\ + \'a0\'a0\'a0\'a0\'a0eval "$lt_user_locale\ + \'a0\'a0\'a0$my_cmd"\ + \'a0\'a0\'a0\'a0\'a0my_status=$?\ + \'a0\'a0\'a0\'a0\'a0eval "$lt_safe_locale"\ + \'a0\'a0\'a0\'a0\'a0if test "$my_status" -eq 0; then :; else\ + eval "(exit $my_status); $my_fail_exp"\ + \'a0\'a0\'a0\'a0\'a0fi\ + \'a0\'a0\'a0fi\ +\}\ +\ +# func_tr_sh\ +# Turn $1 into a string suitable for a shell variable name.\ +# Result is stored in $func_tr_sh_result. \'a0All characters\ +# not in the set a-zA-Z0-9_ are replaced with '_'. Further,\ +# if $1 begins with a digit, a '_' is prepended as well.\ +func_tr_sh ()\ +\{\ + \'a0case $1 in\ + \'a0[0-9]* | *[!a-zA-Z0-9_]*)\ + \'a0\'a0\'a0func_tr_sh_result=`$ECHO "$1" | $SED 's/^\\([0-9]\\)/_\\1/; s/[^a-zA-Z0-9_]/_/g'`\ + \'a0\'a0\'a0;;\ + \'a0* )\ + \'a0\'a0\'a0func_tr_sh_result=$1\ + \'a0\'a0\'a0;;\ + \'a0esac\ +\}\ +\ +\ +# func_version\ +# Echo version message to standard output and exit.\ +func_version ()\ +\{\ + \'a0\'a0\'a0$opt_debug\ +\ + \'a0\'a0\'a0$SED -n '/(C)/!b go\ + :more\ + /\\./!\{\ + \'a0N\ + \'a0s/\\n# / /\ + \'a0b more\ + \}\ + :go\ + /^# '$PROGRAM' (GNU /,/# warranty; / \{\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0s/^# //\ + s/^# *$//\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0s/\\((C)\\)[ 0-9,-]*\\( [1-9][0-9]*\\)/\\1\\2/\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0p\ + \'a0\'a0\'a0\'a0\}' < "$progpath"\ + \'a0\'a0\'a0\'a0exit $?\ +\}\ +\ +# func_usage\ +# Echo short help message to standard output and exit.\ +func_usage ()\ +\{\ + \'a0\'a0\'a0$opt_debug\ +\ + \'a0\'a0\'a0$SED -n '/^# Usage:/,/^# \'a0*.*--help/ \{\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0s/^# //\ + s/^# *$//\ + s/\\$progname/'$progname'/\ + p\ + \'a0\'a0\'a0\}' < "$progpath"\ + \'a0\'a0\'a0echo\ + \'a0\'a0\'a0$ECHO "run \\`$progname --help | more' for full usage"\ + \'a0\'a0\'a0exit $?\ +\}\ +\ +# func_help [NOEXIT]\ +# Echo long help message to standard output and exit,\ +# unless 'noexit' is passed as argument.\ +func_help ()\ +\{\ + \'a0\'a0\'a0$opt_debug\ +\ + \'a0\'a0\'a0$SED -n '/^# Usage:/,/# Report bugs to/ \{\ + :print\ + \'a0\'a0\'a0\'a0\'a0\'a0\'a0s/^# //\ + s/^# *$//\ + s*\\$progname*'$progname'*\ + s*\\$host*'"$host"'*\ + s*\\$SHELL*'"$SHELL"'*\ + s*\\$LTCC*'"$LTCC"'*\ + s*\\$LTCFLAGS*'"$LTCFLAGS"'*\ + s*\\$LD*'"$LD"'*\ + s/\\$with_gnu_ld/'"$with_gnu_ld"'/\ + s/\\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/\ + s/\\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/\ + p\ + d\ + \'a0\'a0\'a0\'a0\}\ + \'a0\'a0\'a0\'a0/^# .* home page:/b print\ + \'a0\'a0\'a0\'a0/^# General help using/b print\ + \'a0\'a0\'a0\'a0' < "$progpath"\ + \'a0\'a0\'a0ret=$?\ + \'a0\'a0\'a0if test -z "$1"; then\ + \'a0\'a0\'a0\'a0\'a0exit $ret\ + \'a0\'a0\'a0fi\ +\}\ +\ +# func_missing_arg argname\ +# Echo program name prefixed message to standard error and set global\ +# exit_cmd.\ +func_missing_arg ()\ +\{\ + \'a0\'a0\'a0$opt_debug\ +\ + \'a0\'a0\'a0func_error "missing argument for $1."\ + \'a0\'a0\'a0exit_cmd=exit\ +\}\ +\ +\ +# func_split_short_opt shortopt\ +# Set func_split_short_opt_name and func_split_short_opt_arg shell\ +# variables after splitting SHORTOPT after the 2nd character.\ +func_split_short_opt ()\ +\{\ + \'a0\'a0\'a0my_sed_short_opt='1s/^\\(..\\).*$/\\1/;q'\ + \'a0\'a0\'a0my_sed_short_rest='1s/^..\\(.*\\)$/\\1/;q'\ +\ + \'a0\'a0\'a0func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`\ + \'a0\'a0\'a0func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`\ +\} # func_split_short_opt may be replaced by extended shell implementation\ +\ +\ +# func_split_long_opt longopt\ +# Set func_split_long_opt_name and func_split_long_opt_arg shell\ +# variables after splitting LONGOPT at the `=' sign.\ +func_split_long_opt ()\ +\{\ + \'a0\'a0\'a0my_sed_long_opt='1s/^\\(--[^=]*\\)=.*/\\1/;q'\ + \'a0\'a0\'a0my_sed_long_arg='1s/^--[^=]*=//'\ +\ + \'a0\'a0\'a0func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`\ + \'a0\'a0\'a0func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`\ +\} # func_split_long_opt may be replaced by extended shell implementation\ +\ +exit_cmd=:\ +\ +\ +\ +\ +\ +ltdldir=libltdl\ +config_aux_dir=$ltdldir/config\ +config_macro_dir=$ltdldir/m4\ +\ +# This is converted to a comma-delimited opt_ setting below, when\ +# no option is given to override it.\ +test -n "$reconfdirs" \\\ + \'a0|| reconfdirs=". libltdl `ls -1d tests/*demo tests/*demo[0-9]`"\ +\ +# Detect whether this is a version control system checkout or a tarball\ +vcs_only_file=\ +\ +\ +\ +# Option defaults:\ +opt_debug=:\ +opt_dry_run=false\ +opt_force=false\ +opt_verbose=false\ +\ +\ +# Parse options once, thoroughly. \'a0This comes as soon as possible in the\ +# script to make things like `--version' happen as quickly as we can.\ +\{\ + \'a0# this just eases exit handling\ + \'a0while test $# -gt 0; do\ + \'a0\'a0\'a0opt="$1"\ + \'a0\'a0\'a0shift\ + \'a0\'a0\'a0case $opt in\ + \'a0\'a0\'a0\'a0\'a0--debug|-x) opt_debug='set -x'\ + func_echo "enabling shell trace mode"\ + $opt_debug\ + ;;\ + \'a0\'a0\'a0\'a0\'a0--dry-run|--dryrun|-n)\ + opt_dry_run=:\ + ;;\ + \'a0\'a0\'a0\'a0\'a0--force|-f)\ + opt_force=:\ + ;;\ + \'a0\'a0\'a0\'a0\'a0--reconf-dirs|--reconfdirs|--reconf|-r)\ + test $# = 0 && func_missing_arg $opt && break\ + optarg="$1"\ + opt_reconf_dirs="$optarg"\ +# squash spaces so that delimiter is just `,' and nothing else\ +opt_reconf_dirs=`echo "$optarg" |$SED 's|, \'a0*|,|g'`\ + shift\ + ;;\ + \'a0\'a0\'a0\'a0\'a0--verbose|-v)\ + opt_verbose=:\ + ;;\ +\ + \'a0\'a0\'a0\'a0\'a0-\\?|-h) func_usage ;;\ + \'a0\'a0\'a0\'a0\'a0--help) func_help ;;\ + \'a0\'a0\'a0\'a0\'a0--version) func_version ;;\ +\ + \'a0\'a0\'a0\'a0\'a0# Separate optargs to long options:\ + \'a0\'a0\'a0\'a0\'a0--*=*)\ + func_split_long_opt "$opt"\ + set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" $\{1+"$@"\}\ + shift\ + ;;\ +\ + \'a0\'a0\'a0\'a0\'a0# Separate optargs to short options:\ + \'a0\'a0\'a0\'a0\'a0-r*)\ + func_split_short_opt "$opt"\ + set dummy "$func_split_short_opt_name" "$func_split_short_opt_arg" $\{1+"$@"\}\ + shift\ + ;;\ +\ + \'a0\'a0\'a0\'a0\'a0# Separate non-argument short options:\ + \'a0\'a0\'a0\'a0\'a0-\\?*|-h*|-n*|-f*|-v*)\ + func_split_short_opt "$opt"\ + set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" $\{1+"$@"\}\ + shift\ + ;;\ +\ + \'a0\'a0\'a0\'a0\'a0--) break ;;\ + \'a0\'a0\'a0\'a0\'a0-*) func_fatal_help "unrecognized option \\`$opt'" ;;\ + \'a0\'a0\'a0\'a0\'a0*) set dummy "$opt" $\{1+"$@"\}; shift; break \'a0;;\ + \'a0\'a0\'a0esac\ + \'a0done\ +\ + \'a0# Validate options:\ +\ + \'a0# Validate options\ + \'a0test 0 -gt 0 \\\ + \'a0\'a0\'a0&& func_fatal_help "too many arguments: "\ +\ + \'a0# support the old interface too: `reconfdirs='. libltdl' ./bootstrap'\ + \'a0test -n "$opt_reconf_dirs" \\\ + \'a0\'a0\'a0|| opt_reconf_dirs=`echo $reconfdirs |$SED 's| \'a0*|,|g'`\ +\ + \'a0# validate $opt_reconf_dirs\ + \'a0save_IFS="$IFS"\ + \'a0IFS=,\ + \'a0for reconfdir in $opt_reconf_dirs; do\ + \'a0\'a0\'a0IFS="$save_IFS"\ + \'a0\'a0\'a0test -d "$reconfdir" || \{\ + \'a0\'a0\'a0\'a0\'a0func_error "bad reconf directory \\`$reconfdir': directory does not exist"\ + \'a0\'a0\'a0\'a0\'a0exit_cmd=exit\ + \'a0\'a0\'a0\}\ + \'a0done\ + \'a0IFS="$save_IFS"\ +\ + \'a0# Bail if the options were screwed\ + \'a0$exit_cmd $EXIT_FAILURE\ +\}\ +\ +\ +\ +# Bail out on command errors!\ +set -e\ +\ +test $opt_dry_run || \{\ + \'a0\'a0# Delete stale cache files\ + \'a0\'a0# XXX it's bad to take advantage of internal knowledge about autom4te...\ + \'a0\'a0find . -depth \\( -name autom4te.cache -o -name libtool \\) -print \\\ + \'a0\'a0\'a0\'a0| grep -v '\{arch\}' \\\ + \'a0\'a0\'a0\'a0| xargs rm -rf\ +\ + \'a0# Delete stale files from previous libtool versions.\ + \'a0$RM acinclude.m4 libltdl/config.h\ +\}\ +\ +\ +## -------------------------------- ##\ +## Generate bootstrap dependencies. ##\ +## -------------------------------- ##\ \ # Whip up a dirty Makefile:\ makes='Makefile.am libltdl/Makefile.inc'\ -rm -f Makefile\ +$RM Makefile\ $SED '/^if /,/^endif$/d;/^else$/,/^endif$/d;/^include /d' $makes > Makefile\ \ +# Extract values from configure.ac for make invocation, below:\ +my_sed_traces='s,#.*$,,; s,^dnl .*$,,; s, dnl .*$,,;\ + /AC_INIT(/ \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\{\ + \'a0\'a0\'a0s|^.*AC_INIT([[ ]*||\ + \'a0\'a0\'a0s|^\\([^],]*\\)[][ ]*,|package="\\1"; package_name="\\1",|\ + \'a0\'a0\'a0s|,[] ]*\\([^],]*\\)[][ ]*,|; version="\\1",|\ + \'a0\'a0\'a0s|,[] ]*\\([^])]*\\).*$|; package_bugreport="\\1"|\ + \'a0\'a0\'a0s|^package="GNU |package="|\ + \'a0\'a0\'a0h\ + \'a0\'a0\'a0s|;.*$||\ + \'a0\'a0\'a0y|ABCDEFGHIJKLMNOPQRSTUVWXYZ|abcdefghijklmnopqrstuvwxyz|\ + \'a0\'a0\'a0x\ + \'a0\'a0\'a0s|^[^;]*; ||\ + \'a0\'a0\'a0G\ + \'a0\'a0\'a0p\ + \}\ + /AC_SUBST([[]*PACKAGE_URL/\{\ + \'a0\'a0\'a0s|.*AC_SUBST([[ ]*PACKAGE_URL[[ ]*,[[ ]*|package_url="|\ + \'a0\'a0\'a0s|[]) ]*$|"|\ + \'a0\'a0\'a0p\ + \}\ + /AC_CONFIG_AUX_DIR(/ \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\{\ + \'a0\'a0\'a0s|^.*AC_CONFIG_AUX_DIR([[ ]*\\([^])]*\\).*$|config_aux_dir=\\1|\ + \'a0\'a0\'a0p\ + \}\ + /AC_CONFIG_MACRO_DIR(/ \'a0\'a0\'a0\'a0\'a0\'a0\{\ + \'a0\'a0\'a0s|^.*AC_CONFIG_MACRO_DIR([[ ]*\\([^])]*\\).*$|config_macro_dir=\\1|\ + \'a0\'a0\'a0p\ + \}'\ +eval `$SED -n "$my_sed_traces" configure.ac 2>/dev/null`\ +\ # Building distributed files from configure is bad for automake, so we\ # generate them here, and have Makefile rules to keep them up to date.\ # We don't have all the substitution values to build ltmain.sh from this\ # script yet, but we need config/ltmain.sh for the libtool commands in\ # configure, and ltversion.m4 to generate configure in the first place:\ -rm -f $auxdir/ltmain.sh $m4dir/ltversion.m4\ +$RM $config_aux_dir/ltmain.sh $config_macro_dir/ltversion.m4\ \ -$MAKE ./$auxdir/ltmain.sh ./$m4dir/ltversion.m4 \\\ +$MAKE ./$config_aux_dir/ltmain.sh ./$config_macro_dir/ltversion.m4 \\\ \'a0\'a0\'a0\'a0./libtoolize.in ./tests/defs.in ./tests/package.m4 \\\ \'a0\'a0\'a0\'a0./tests/testsuite ./libltdl/Makefile.am ./doc/notes.txt \\\ - \'a0\'a0\'a0srcdir=. top_srcdir=. PACKAGE="$PACKAGE" VERSION="$VERSION" \\\ - \'a0\'a0\'a0PACKAGE_NAME="$PACKAGE_NAME" PACKAGE_URL="$PACKAGE_URL" \\\ - \'a0\'a0\'a0PACKAGE_BUGREPORT="address@hidden" M4SH="$AUTOM4TE --language=m4sh" \\\ + \'a0\'a0\'a0srcdir=. top_srcdir=. PACKAGE="$package" VERSION="$version" \\\ + \'a0\'a0\'a0PACKAGE_NAME="$package_name" PACKAGE_URL="$package_url" \\\ + \'a0\'a0\'a0PACKAGE_BUGREPORT="$package_bugreport" M4SH="$AUTOM4TE --language=m4sh" \\\ \'a0\'a0\'a0\'a0AUTOTEST="$AUTOM4TE --language=autotest" SED="$SED" MAKEINFO="$MAKEINFO" \\\ \'a0\'a0\'a0\'a0GREP="$GREP" FGREP="$FGREP" EGREP="$EGREP" LN_S="$LN_S"\ \ test -f clcommit.m4sh && $MAKE -f Makefile.maint ./commit \\\ - \'a0\'a0\'a0srcdir=. top_srcdir=. PACKAGE="$PACKAGE" VERSION="$VERSION" \\\ + \'a0\'a0\'a0srcdir=. top_srcdir=. PACKAGE="$package" VERSION="$version" \\\ \'a0\'a0\'a0\'a0M4SH="$AUTOM4TE -l m4sh" \\\ \'a0\'a0\'a0\'a0SED="$SED" GREP="$GREP" FGREP="$FGREP" EGREP="$EGREP" LN_S="$LN_S"\ \ -rm -f Makefile\ +$RM Makefile\ +\ +\ +## ----------- ##\ +## Autoreconf. ##\ +## ----------- ##\ \ # Make a dummy libtoolize script for autoreconf:\ -cat > $auxdir/libtoolize <<'EOF'\ +cat > $config_aux_dir/libtoolize <<'EOF'\ #! /bin/sh\ # This is a dummy file for bootstrapping libtool.\ echo "$0: Bootstrap detected, no files installed." | sed 's,^.*/,,g'\ exit 0\ EOF\ -chmod 755 $auxdir/libtoolize\ +chmod 755 $config_aux_dir/libtoolize\ \ # Running the installed `libtoolize' will trash the local (newer) libtool.m4\ # among others. \'a0Call the dummy script we made earlier.\ -LIBTOOLIZE=`pwd`/$auxdir/libtoolize\ +LIBTOOLIZE=`pwd`/$config_aux_dir/libtoolize\ export LIBTOOLIZE\ \ -for sub in $reconfdirs; do\ - \'a0$AUTORECONF --force --verbose --install $sub\ +save_IFS="$IFS"\ +IFS=,\ +for reconfdir in $opt_reconf_dirs; do\ + \'a0IFS="$save_IFS"\ + \'a0func_show_eval "$AUTORECONF --force --verbose --install $reconfdir"\ done\ +IFS="$save_IFS"\ \ # Autoheader valiantly tries to prevent needless reconfigurations by\ # not changing the timestamp of config-h.in unless the file contents\ @@ -173,32 +1243,42 @@ done\ # have it! \'a0Fudge the timestamp to prevent that:\ sleep 2 && touch libltdl/config-h.in\ \ -# Remove our dummy libtoolize\ -rm -f $auxdir/libtoolize\ +# Remove our dummy files\ +$RM $config_aux_dir/libtoolize\ \ # These files can cause an infinite configure loop if left behind.\ -rm -f Makefile libltdl/Makefile libtool vcl.tmp\ +$RM libltdl/Makefile libtool vcl.tmp\ +\ \ -# This file is misgenerated earlier in bootstrap to satisfy automake 1.9.1\ -# and earlier, but has a new enough timestamp to not be updated. \'a0Force it\ -# to be regenerated at make-time with proper substitutions in place:\ -touch $auxdir/ltmain.m4sh\ +## ------- ##\ +## Wrapup. ##\ +## ------- ##\ \ +# Ensure aclocal didn't pull external libtool macros into aclocal.m4\ for macro in LT_INIT AC_PROG_LIBTOOL AM_PROG_LIBTOOL; do\ - \'a0if grep $macro aclocal.m4 libltdl/aclocal.m4; then\ - \'a0\'a0\'a0echo "Bogus $macro macro contents in an aclocal.m4 file." >&2\ - \'a0\'a0\'a0exit 1\ - \'a0else :; fi\ -done\ + \'a0grep $macro aclocal.m4 libltdl/aclocal.m4 && \{\ + \'a0\'a0\'a0func_error "Bogus $macro macro contents in an aclocal.m4 file."\ \ -# Commit script caveat:\ -cat <\ +\ +: $\{AUTORECONF=autoreconf\}\ +: $\{AUTOCONF=autoconf\}\ +: $\{AUTOMAKE=automake\}\ +: $\{AUTOM4TE=autom4te\}\ +: $\{MAKE=make\}\ +: $\{MAKEINFO=makeinfo\}\ +\ +## -------------------------- ##\ +## Early failure diagnostics. ##\ +## -------------------------- ##\ +\{\ + \'a0\'a0\'a0test -f ./configure.ac || \{\ + \'a0\'a0\'a0\'a0\'a0echo "bootstrap: Can't find \\`./configure.ac', please rerun from top_srcdir." >&2\ + \'a0\'a0\'a0\'a0\'a0exit $EXIT_FAILURE\ + \'a0\'a0\'a0\}\ +\ + \'a0\'a0\'a0test -z "$vcs_only_file" || test -r "$vcs_only_file" || \{\ + \'a0\'a0\'a0\'a0\'a0echo 'bootstrap: Bootstrapping from a non-version-control distribution is risky.' >&2\ + \'a0\'a0\'a0\'a0\'a0exit $EXIT_FAILURE\ + \'a0\'a0\'a0\}\ +\}\ +\ +m4_divert_pop\ +m4_include([getopt.m4sh])\ +\ +M4SH_VERBATIM([[\ +ltdldir=libltdl\ +config_aux_dir=$ltdldir/config\ +config_macro_dir=$ltdldir/m4\ +\ +# This is converted to a comma-delimited opt_ setting below, when\ +# no option is given to override it.\ +test -n "$reconfdirs" \\\ + \'a0|| reconfdirs=". libltdl `ls -1d tests/*demo tests/*demo[0-9]`"\ +\ +# Detect whether this is a version control system checkout or a tarball\ +vcs_only_file=\ +]])\ +\ +dnl SHORT \'a0\'a0LONG \'a0\'a0\'a0\'a0\'a0\'a0DEFAULT \'a0\'a0\'a0\'a0\'a0INIT\ +dnl ----------------------------------------------------------------------\ +M4SH_GETOPTS(\ + \'a0[n], [--dry-run|--dryrun], [], [],\ + \'a0[f], [--force], [], [],\ + \'a0[r!], [--reconf-dirs|--reconfdirs|--reconf], [], [\ + # squash spaces so that delimiter is just `,' and nothing else\ + opt_reconf_dirs=`echo "$optarg" |$SED 's|, \'a0*|,|g'`],\ + \'a0[v], [--verbose], [], [],\ +[[\ + \'a0# Validate options\ + \'a0test $# -gt 0 \\\ + \'a0\'a0\'a0&& func_fatal_help "too many arguments: $@"\ +\ + \'a0# support the old interface too: `reconfdirs='. libltdl' ./bootstrap'\ + \'a0test -n "$opt_reconf_dirs" \\\ + \'a0\'a0\'a0|| opt_reconf_dirs=`echo $reconfdirs |$SED 's| \'a0*|,|g'`\ +\ + \'a0# validate $opt_reconf_dirs\ + \'a0save_IFS="$IFS"\ + \'a0IFS=,\ + \'a0for reconfdir in $opt_reconf_dirs; do\ + \'a0\'a0\'a0IFS="$save_IFS"\ + \'a0\'a0\'a0test -d "$reconfdir" || \{\ + \'a0\'a0\'a0\'a0\'a0func_error "bad reconf directory \\`$reconfdir': directory does not exist"\ + \'a0\'a0\'a0\'a0\'a0exit_cmd=exit\ + \'a0\'a0\'a0\}\ + \'a0done\ + \'a0IFS="$save_IFS"]dnl\ +])\ +\ +M4SH_VERBATIM([[\ +# Bail out on command errors!\ +set -e\ +\ +test $opt_dry_run || \{\ + \'a0\'a0# Delete stale cache files\ + \'a0\'a0# XXX it's bad to take advantage of internal knowledge about autom4te...\ + \'a0\'a0find . -depth \\( -name autom4te.cache -o -name libtool \\) -print \\\ + \'a0\'a0\'a0\'a0| grep -v '\{arch\}' \\\ + \'a0\'a0\'a0\'a0| xargs rm -rf\ +\ + \'a0# Delete stale files from previous libtool versions.\ + \'a0$RM acinclude.m4 libltdl/config.h\ +\}\ +\ +\ +## -------------------------------- ##\ +## Generate bootstrap dependencies. ##\ +## -------------------------------- ##\ +\ +# Whip up a dirty Makefile:\ +makes='Makefile.am libltdl/Makefile.inc'\ +$RM Makefile\ +$SED '/^if /,/^endif$/d;/^else$/,/^endif$/d;/^include /d' $makes > Makefile\ +\ +# Extract values from configure.ac for make invocation, below:\ +my_sed_traces='s,#.*$,,; s,^dnl .*$,,; s, dnl .*$,,;\ + /address@hidden:@/ \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\{\ + \'a0\'a0\'a0s|address@hidden:@[@<:@@^I@ ]*||\ + \'a0\'a0\'a0s|^\\([^@:>@,]*\\)address@hidden@ ]*,|package="\\1"; package_name="\\1",|\ + \'a0\'a0\'a0s|,[@:>@@^I@ ]*\\([^@:>@,]*\\)[@:>@@<:@@^I@ ]*,|; version="\\1",|\ + \'a0\'a0\'a0s|,[@:>@@^I@ ]*\\([^@:>@@:address@hidden).*$|; package_bugreport="\\1"|\ + \'a0\'a0\'a0s|^package="GNU |package="|\ + \'a0\'a0\'a0h\ + \'a0\'a0\'a0s|;.*$||\ + \'a0\'a0\'a0y|ABCDEFGHIJKLMNOPQRSTUVWXYZ|abcdefghijklmnopqrstuvwxyz|\ + \'a0\'a0\'a0x\ + \'a0\'a0\'a0s|^[^;]*; ||\ + \'a0\'a0\'a0G\ + \'a0\'a0\'a0p\ + \}\ + /address@hidden:@[@<:@]*PACKAGE_URL/\{\ + \'a0\'a0\'a0s|.*AC_SUBST([@<:@@^I@ ]*PACKAGE_URL[@<:@@^I@ ]*,[@<:@@^I@ ]*|package_url="|\ + \'a0\'a0\'a0s|[@:>@@:\}@@^I@ ]*$|"|\ + \'a0\'a0\'a0p\ + \}\ + /address@hidden:@/ \'a0\'a0\'a0\'a0\'a0\'a0\'a0\'a0\{\ + \'a0\'a0\'a0s|^.*AC_CONFIG_AUX_DIR([@<:@@^I@ ]*\\([^@:>@@:address@hidden).*$|config_aux_dir=\\1|\ + \'a0\'a0\'a0p\ + \}\ + /address@hidden:@/ \'a0\'a0\'a0\'a0\'a0\'a0\{\ + \'a0\'a0\'a0s|address@hidden:@[@<:@@^I@ ]*\\([^@:>@@:address@hidden).*$|config_macro_dir=\\1|\ + \'a0\'a0\'a0p\ + \}'\ +eval `$SED -n "$my_sed_traces" configure.ac 2>/dev/null`\ +\ +# Building distributed files from configure is bad for automake, so we\ +# generate them here, and have Makefile rules to keep them up to date.\ +# We don't have all the substitution values to build ltmain.sh from this\ +# script yet, but we need config/ltmain.sh for the libtool commands in\ +# configure, and ltversion.m4 to generate configure in the first place:\ +$RM $config_aux_dir/ltmain.sh $config_macro_dir/ltversion.m4\ +\ +$MAKE ./$config_aux_dir/ltmain.sh ./$config_macro_dir/ltversion.m4 \\\ + \'a0\'a0\'a0./libtoolize.in ./tests/defs.in ./tests/package.m4 \\\ + \'a0\'a0\'a0./tests/testsuite ./libltdl/Makefile.am ./doc/notes.txt \\\ + \'a0\'a0\'a0srcdir=. top_srcdir=. PACKAGE="$package" VERSION="$version" \\\ + \'a0\'a0\'a0PACKAGE_NAME="$package_name" PACKAGE_URL="$package_url" \\\ + \'a0\'a0\'a0PACKAGE_BUGREPORT="$package_bugreport" M4SH="$AUTOM4TE --language=m4sh" \\\ + \'a0\'a0\'a0AUTOTEST="$AUTOM4TE --language=autotest" SED="$SED" MAKEINFO="$MAKEINFO" \\\ + \'a0\'a0\'a0GREP="$GREP" FGREP="$FGREP" EGREP="$EGREP" LN_S="$LN_S"\ +\ +test -f clcommit.m4sh && $MAKE -f Makefile.maint ./commit \\\ + \'a0\'a0\'a0srcdir=. top_srcdir=. PACKAGE="$package" VERSION="$version" \\\ + \'a0\'a0\'a0M4SH="$AUTOM4TE -l m4sh" \\\ + \'a0\'a0\'a0SED="$SED" GREP="$GREP" FGREP="$FGREP" EGREP="$EGREP" LN_S="$LN_S"\ +\ +$RM Makefile\ +\ +\ +## ----------- ##\ +## Autoreconf. ##\ +## ----------- ##\ +\ +# Make a dummy libtoolize script for autoreconf:\ +cat > $config_aux_dir/libtoolize <<'EOF'\ +#! /bin/sh\ +# This is a dummy file for bootstrapping libtool.\ +echo "$0: Bootstrap detected, no files installed." | sed 's,^.*/,,g'\ +exit 0\ +EOF\ +chmod 755 $config_aux_dir/libtoolize\ +\ +# Running the installed `libtoolize' will trash the local (newer) libtool.m4\ +# among others. \'a0Call the dummy script we made earlier.\ +LIBTOOLIZE=`pwd`/$config_aux_dir/libtoolize\ +export LIBTOOLIZE\ +\ +save_IFS="$IFS"\ +IFS=,\ +for reconfdir in $opt_reconf_dirs; do\ + \'a0IFS="$save_IFS"\ + \'a0func_show_eval "$AUTORECONF --force --verbose --install $reconfdir"\ +done\ +IFS="$save_IFS"\ +\ +# Autoheader valiantly tries to prevent needless reconfigurations by\ +# not changing the timestamp of config-h.in unless the file contents\ +# are updated. \'a0Unfortunately config-h.in depends on aclocal.m4 which\ +# *is* updated, so running 'libtoolize --ltdl=. && configure && make'\ +# causes autoheader to be called... undesireable for users that do not\ +# have it! \'a0Fudge the timestamp to prevent that:\ +sleep 2 && touch libltdl/config-h.in\ +\ +# Remove our dummy files\ +$RM $config_aux_dir/libtoolize\ +\ +# These files can cause an infinite configure loop if left behind.\ +$RM libltdl/Makefile libtool vcl.tmp\ +\ +\ +## ------- ##\ +## Wrapup. ##\ +## ------- ##\ +\ +# Ensure aclocal didn't pull external libtool macros into aclocal.m4\ +for macro in LT_INIT AC_PROG_LIBTOOL AM_PROG_LIBTOOL; do\ + \'a0grep $macro aclocal.m4 libltdl/aclocal.m4 && \{\ + \'a0\'a0\'a0func_error "Bogus $macro macro contents in an aclocal.m4 file."\ +\ + \'a0\'a0\'a0cat <<'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'. \'a0The best way to work around such a problem is to\ +WARNING: uninstall your system libtool files, or failing that, overwrite\ +WARNING: them with all m4 file as shipped with this distribution (except\ +WARNING: `lt~obsolete.m4'). \'a0After that, retry this bootstrap.\ +EOF\ + \'a0\'a0\'a0exit $EXIT_FAILURE\ + \'a0\}\ +done\ +\ +exit $exit_status\ +\ +# Local Variables:\ +# mode:shell-script\ +# sh-indentation:2\ +# eval: (add-hook 'write-file-hooks 'time-stamp)\ +# time-stamp-start: "# bootstrap (@PACKAGE_NAME@) version "\ +# time-stamp-format: "%:y-%02m-%02d"\ +# time-stamp-end: "$"\ +# End:\ +]])\ -- \ 1.7.2.2\ \ }