libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

libtool--gary--1.0--patch-46


From: Gary V. Vaughan
Subject: libtool--gary--1.0--patch-46
Date: Sun, 19 Sep 2004 14:00:06 +0100 (BST)
User-agent: mailnotify/0.3

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Okay to commit?
- -- 
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook
_________________________________________________________
This patch notification generated by tlaapply version 0.5
http://tkd.kicks-ass.net/arch/address@hidden/cvs-utils--tla--1.0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (Darwin)

iD8DBQFBTYLVFRMICSmD1gYRAoyPAJ9Z+YgAMlgdoZ9LTm+7h/8egeSmtwCgk2JM
9uwqNSL9Hy2wqqfk6wgwb0c=
=ckNT
-----END PGP SIGNATURE-----
* looking for address@hidden/libtool--gary--1.0--patch-45 to compare with
* comparing to address@hidden/libtool--gary--1.0--patch-45
A  config/.arch-ids/general.m4sh.id
A  config/.arch-ids/getopt.m4sh.id
A  config/general.m4sh
A  config/getopt.m4sh
M  ChangeLog
M  Makefile.am
M  bootstrap
M  configure.ac
M  libtoolize.in
M  config/ltmain.in
M  m4/libtool.m4
M  tests/defs.in
M  HACKING
=> tests/.arch-ids/defs.id      tests/.arch-ids/defs.in.id
=> tests/defs   tests/defs.in

* modified files

Index: Changelog
from  Gary V. Vaughan  <address@hidden>

        * configure.ac (M4SH): AC_SUBST m4sh expander.
        * config/general.m4sh, config/getopt.m4sh: New files with factored
        out functionality from...
        * config/ltmain.in, libtoolize.in: ...here.  m4_include the shared
        code, and call AS_SHELL_SANITIZE.  Also quote all `[' and `]' to
        survive m4 run.
        * tests/defs.in: New file expanded into tests/defs by autom4te.
        * m4/libtool.m4 (_LT_DECL_EGREP): Also require fgrep for the tests
        that use it.
        * Makefile.am ($(top_srcdir)/config/ltmain.sh): Now built with
        M4SH.
        (libtoolize): Ditto.
        * bootstrap: Set M4SH for call to make.
        * HACKING: No need to sync to AS_SHELL_SANITIZE by hand any more.

--- orig/HACKING
+++ mod/HACKING
@@ -130,11 +130,6 @@
 
 * Update NEWS, ChangeLog.
 
-* Make sure the 'Be Bourne compatible' shell snippet near the top of
-  ./libtoolize.in, config/ltmain.in and tests/defs matches the latest
-  autoconf wisdom by updating to match CVS autoconf AS_SHELL_SANITIZE in
-  autoconf's lib/m4sugar/m4sh.m4.
-
 * Run ./bootstrap.
 
 * Have some tea.  If you are running on less than 3.6GHz CPU, order


--- orig/Makefile.am
+++ mod/Makefile.am
@@ -20,11 +20,14 @@
 ACLOCAL_AMFLAGS  = -I m4
 
 edit = sed \
-       -e 's,@PACKAGE\@,$(PACKAGE),g' \
-       -e 's,@VERSION\@,$(VERSION),g' \
-       -e 's,@MACRO_VERSION\@,$(VERSION),g' \
+       -e 's,@EGREP\@,$(EGREP),g' \
+       -e 's,@FGREP\@,$(FGREP),g' \
+       -e 's,@GREP\@,$(GREP),g' \
        -e 's,@LN_S\@,$(LN_S),g' \
+       -e 's,@MACRO_VERSION\@,$(VERSION),g' \
+       -e 's,@PACKAGE\@,$(PACKAGE),g' \
        -e 's,@SED\@,$(SED),g' \
+       -e 's,@VERSION\@,$(VERSION),g' \
        -e 's,@prefix\@,$(prefix),g' \
        -e 's,@datadir\@,$(datadir),g' \
        -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
@@ -42,9 +45,11 @@
 SUBDIRS = $(BUILD_SUBDIRS)
 DIST_SUBDIRS = $(BUILD_SUBDIRS)
 
+sh_files = config/general.m4sh config/getopt.m4sh
 EXTRA_DIST = bootstrap libtoolize.in config/ltmain.in config/mkstamp \
-       stamp-vcl ChangeLog.1996 ChangeLog.1997 ChangeLog.1998 ChangeLog.1999 \
-       ChangeLog.2000 ChangeLog.2001 ChangeLog.2002 ChangeLog.2003
+       $(sh_files) stamp-vcl ChangeLog.1996 ChangeLog.1997 ChangeLog.1998 \
+       ChangeLog.1999 ChangeLog.2000 ChangeLog.2001 ChangeLog.2002 \
+       ChangeLog.2003
 CLEANFILES = libtool libtoolize \
        libtoolize.tmp config/ltmain.tmp m4/ltversion.tmp
 
@@ -110,30 +115,46 @@
 ##          distcheck (at least) by rebuilding ltmain.sh in the source
 ##          tree whenever config.status regenerates the Makefile.
 EXTRA_DIST += config/ltmain.sh
-$(top_srcdir)/config/ltmain.sh: config/ltmain.in configure.ac stamp-vcl
+$(top_srcdir)/config/ltmain.sh: $(sh_files) config/ltmain.in configure.ac 
stamp-vcl
        $(timestamp); \
        cd $(top_srcdir); \
-       rm -f config/ltmain.tmp; \
+       rm -f config/ltmain.m4sh config/ltmain.tmp config/ltmain.sh; \
+       $(M4SH) -B ./config config/ltmain.in > config/ltmain.m4sh; \
        input="ltmain.in"; \
        $(edit) -e "s,@TIMESTAMP\@,$$TIMESTAMP,g" \
                -e "s,@package_revision\@,$$1,g" \
-               config/ltmain.in > config/ltmain.tmp; \
+               config/ltmain.m4sh > config/ltmain.tmp; \
+       rm -f config/ltmain.m4sh; \
        chmod a-w config/ltmain.tmp; \
        mv -f config/ltmain.tmp config/ltmain.sh
 
 # The libtool distributor and the standalone libtool script.
 bin_SCRIPTS = libtoolize libtool
 
-libtoolize: libtoolize.in Makefile
-       rm -f libtoolize.tmp libtoolize
+libtoolize: $(sh_files) libtoolize.in Makefile
+       rm -f libtoolize.m4sh libtoolize.tmp libtoolize
+       $(M4SH) -B $(top_srcdir)/config \
+               $(srcdir)/libtoolize.in > libtoolize.m4sh
        $(timestamp); \
        input="libtoolize.in"; \
        $(edit) -e "s,@TIMESTAMP\@,$$TIMESTAMP,g" \
-               $(srcdir)/libtoolize.in > libtoolize.tmp
+               libtoolize.m4sh > libtoolize.tmp
+       rm -f libtoolize.m4sh
        chmod a+x libtoolize.tmp
        chmod a-w libtoolize.tmp
        mv -f libtoolize.tmp libtoolize
 
+check-recursive: tests/defs
+tests/defs: tests/defs.in Makefile
+       cd $(top_srcdir); \
+       rm -f tests/defs.m4sh tests/defs.tmp tests/defs; \
+       $(M4SH) -B ./config tests/defs.in > tests/defs.m4sh; \
+       input="defs.in"; \
+       $(edit) tests/defs.m4sh > tests/defs.tmp; \
+       rm -f tests/defs.m4sh; \
+       mv -f tests/defs.tmp tests/defs
+
+
 # Automake doesn't want us to generate distributed files from config.status,
 # but the alternative (see libtool-1.4.3) was even uglier!
 libtool: $(top_builddir)/config.status config/ltmain.sh stamp-vcl


--- orig/bootstrap
+++ mod/bootstrap
@@ -59,7 +59,7 @@
 rm -f ./config/ltmain.sh ./m4/ltversion.m4
 test -f Makefile || { makefile=Makefile; cp Makefile.am $makefile; }
 make ./config/ltmain.sh ./m4/ltversion.m4 \
-    top_srcdir=. PACKAGE="$2" VERSION="$3"
+    top_srcdir=. PACKAGE="$2" VERSION="$3" M4SH="autom4te -l m4sh"
 test -z "$makefile" || rm -f "$makefile"
 
 # Make a dummy libtoolize script for autoreconf:


--- orig/config/ltmain.in
+++ mod/config/ltmain.in
@@ -1,4 +1,5 @@
-# @configure_input@
+m4_define([_m4_divert(SCRIPT)], 100)
+m4_divert_push([SCRIPT])# @configure_input@
 
 # ltmain.sh (GNU @PACKAGE@@TIMESTAMP@) @VERSION@
 # Written by Gordon Matzigkeit <address@hidden>, 1996
@@ -68,63 +69,15 @@
 #
 # Report bugs to <address@hidden>.
 
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-elif test -n "${BASH_VERSION+set}${KSH_VERSION+set}" && (set -o posix) 
>/dev/null 2>&1; then
-  set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-
-: ${ECHO="echo"}
-: ${MKDIR="mkdir"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-
-dirname="s,/[^/]*$,,"
-basename="s,^.*/,,g"
-
-# 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"
-
-# The name of this program:
-PROGRAM=ltmain.sh
-progname=`$ECHO "$progpath" | $SED "$basename"`
-
-# Make sure we have an absolute path for reexecution:
-case $progpath in
-  [\\/]*|[A-Za-z]:\\*) ;;
-  *) progdir=`$ECHO "$progpath" | $SED "$dirname"`
-     progdir=`cd "$progdir" && pwd`
-     progpath="$progdir/$progname"
-     ;;
-esac
-
-# Global variables:
-EXIT_SUCCESS=0
-EXIT_FAILURE=1
-EXIT_MISMATCH=63  # $? = 63 is used to indicate version mismatch to missing.
-
 PROGRAM=ltmain.sh
 address@hidden@
 address@hidden@
 TIMESTAMP="@TIMESTAMP@"
 address@hidden@
 
+AS_SHELL_SANITIZE
+$as_unset CDPATH
+
 # Check that we have a working $ECHO.
 if test "X$1" = X--no-reexec; then
   # Discard the --no-reexec flag, and continue.
@@ -149,41 +102,11 @@
   exit $EXIT_SUCCESS
 fi
 
+m4_include([getopt.m4sh])
+
 default_mode=
-help="Try \`$progname --help' for more information."
 magic="%%%MAGIC variable%%%"
 
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed="${SED}"' -e 1s/^X//'
-sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
-# test EBCDIC or ASCII
-case `$ECHO A|tr A '\301'` in
- A) # EBCDIC based system
-  SP2NL="tr '\100' '\n'"
-  NL2SP="tr '\r\n' '\100\100'"
-  ;;
- *) # Assume ASCII based system
-  SP2NL="tr '\040' '\012'"
-  NL2SP="tr '\015\012' '\040\040'"
-  ;;
-esac
-
-# NLS nuisances.
-# Only set LANG and LC_ALL to C if already set.
-# These must not be set unconditionally because not all systems understand
-# e.g. LANG=C (notably SCO).
-# We save the old values to restore during execute mode.
-if test "${LC_ALL+set}" = set; then
-  save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
-fi
-if test "${LANG+set}" = set; then
-  save_LANG="$LANG"; LANG=C; export LANG
-fi
-
-# Make sure IFS has a sensible default
-: ${IFS="
-       "}
 
 # Global variables.
 mode=$default_mode
@@ -196,50 +119,12 @@
 
 opt_dry_run=${run-false}  ## inherit $run when mdemo-dryrun.test sets it above
 opt_duplicate_deps=false
-opt_help=false
 
 # If this variable is set in any of the actions, the command in it
 # will be execed at the end.  This prevents here-documents from being
 # left over by shells.
 exec_cmd=
 
-# func_echo arg...
-# Echo program name prefixed message, along with the current mode
-# name if it has been set yet.
-func_echo ()
-{
-    $ECHO $progname${mode+: }$mode: ${1+"$@"}
-}
-
-# func_verbose arg...
-# Echo program name prefixed message in verbose mode only.
-func_verbose ()
-{
-    $opt_verbose && func_echo ${1+"$@"}
-}
-
-# func_error arg...
-# Echo program name prefixed message to standard error.
-func_error ()
-{
-    $ECHO $progname${mode+: }$mode: ${1+"$@"} 1>&2
-}
-
-# func_warning arg...
-# Echo program name prefixed warning message to standard error.
-func_warning ()
-{
-    $ECHO $progname${mode+: }$mode: warning: ${1+"$@"} 1>&2
-}
-
-# func_fatal_error arg...
-# Echo program name prefixed message to standard error, and exit.
-func_fatal_error ()
-{
-    func_error ${1+"$@"}
-    exit $EXIT_FAILURE
-}
-
 # func_fatal_configuration arg...
 # Echo program name prefixed message to standard error, followed by
 # a configuration failure hint, and exit.
@@ -250,68 +135,6 @@
     func_fatal_error "Fatal configuration error."
 }
 
-# func_fatal_help arg...
-# Echo program name prefixed message to standard error, followed by
-# a help hint, and exit.
-func_fatal_help ()
-{
-    func_error ${1+"$@"}
-    func_fatal_error "$help"
-}
-
-# func_missing_arg argname
-# Echo program name prefixed message to standard error and set global
-# exit_cmd.
-func_missing_arg ()
-{
-    func_error "missing argument for $1"
-    exit_cmd=exit
-}
-
-# func_version
-# Echo version message to standard output and exit.
-func_version ()
-{
-    $SED '/^# '$PROGRAM' (GNU /,/# warranty; / {
-        s/^# //; s/^# *$//;
-        s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/;
-        p;
-     }; d' < "$progpath"
-     exit $EXIT_SUCCESS
-}
-
-# func_usage
-# Echo short help message to standard output and exit.
-func_usage ()
-{
-    $SED '/^# Usage:/,/# -h/ {
-        s/^# //; s/^# *$//;
-       s/\$progname/'$progname'/;
-       p;
-    }; d' < "$progpath"
-    $ECHO
-    $ECHO "run \`$progname --help | more' for full usage"
-    exit $EXIT_SUCCESS
-}
-
-# func_help
-# Echo long help message to standard output and exit.
-func_help ()
-{
-    $SED '/^# Usage:/,/# Report bugs to/ {
-        s/^# //; s/^# *$//;
-       s:\$progname:'$progname':;
-       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' < "$progpath"
-    exit $EXIT_SUCCESS
-}
 
 # func_config
 # Display the configuration for all the tags in this script.
@@ -365,7 +188,7 @@
 
   # Validate tagname.
   case $tagname in
-    *[!-_A-Za-z0-9,/]*)
+    *[[!-_A-Za-z0-9,/]]*)
       func_fatal_error "invalid tag name: $tagname"
       ;;
   esac
@@ -404,7 +227,7 @@
 
       clean)
         $ECHO \
-"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+"Usage: $progname [[OPTION]]... --mode=clean RM [[RM-OPTION]]... FILE...
 
 Remove files from the build directory.
 
@@ -418,7 +241,7 @@
 
       compile)
       $ECHO \
-"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+"Usage: $progname [[OPTION]]... --mode=compile COMPILE-COMMAND... SOURCEFILE
 
 Compile a source file into a libtool library object.
 
@@ -441,7 +264,7 @@
 
       execute)
         $ECHO \
-"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
+"Usage: $progname [[OPTION]]... --mode=execute COMMAND [[ARGS]]...
 
 Automatically set library path, then run a program.
 
@@ -461,7 +284,7 @@
 
       finish)
         $ECHO \
-"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
+"Usage: $progname [[OPTION]]... --mode=finish [[LIBDIR]]...
 
 Complete the installation of libtool libraries.
 
@@ -473,7 +296,7 @@
 
       install)
         $ECHO \
-"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
+"Usage: $progname [[OPTION]]... --mode=install INSTALL-COMMAND...
 
 Install executables or libraries.
 
@@ -490,7 +313,7 @@
 
       link)
         $ECHO \
-"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
+"Usage: $progname [[OPTION]]... --mode=link LINK-COMMAND...
 
 Link object files or libraries together to form another library, or to
 create an executable program.
@@ -521,12 +344,12 @@
                     don't remove output files matching REGEX
   -release RELEASE  specify package release information
   -rpath LIBDIR     the created library will eventually be installed in LIBDIR
-  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
+  -R[[ ]]LIBDIR       add LIBDIR to the runtime path of programs and libraries
   -shared           only do dynamic linking of libtool libraries
   -shrext SUFFIX    override the standard shared library file extension
   -static           do not do any dynamic linking of libtool libraries
-  -version-info CURRENT[:REVISION[:AGE]]
-                   specify library version info [each variable defaults to 0]
+  -version-info CURRENT[[:REVISION[:AGE]]]
+                   specify library version info [[each variable defaults to 0]]
   -weak LIBNAME     declare that the target provides the LIBNAME interface
 
 All other options (arguments beginning with \`-') are ignored.
@@ -548,7 +371,7 @@
 
       uninstall)
         $ECHO \
-"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+"Usage: $progname [[OPTION]]... --mode=uninstall RM [[RM-OPTION]]... FILE...
 
 Remove libraries from an installation directory.
 
@@ -577,10 +400,8 @@
   # sed scripts:
   my_sed_single_opt='1s/^\(..\).*$/\1/;q'
   my_sed_single_rest='1s/^..\(.*\)$/\1/;q'
-  my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
-  my_sed_long_arg='1s/^--[^=]*=//'
-
-  exit_cmd=:
+  my_sed_long_opt='1s/^\(--[[^=]]*\)=.*/\1/;q'
+  my_sed_long_arg='1s/^--[[^=]]*=//'
 
   # Shorthand for --mode=foo, only valid as the first argument
   case $1 in
@@ -720,104 +541,6 @@
 }
 
 
-# func_mkdir_p directory-path
-# Make sure the entire path to DIRECTORY-PATH is available.
-func_mkdir_p ()
-{
-    my_directory_path="$1"
-    my_dir_list=
-
-    if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
-
-      # Protect directory names starting with `-'
-      case $my_directory_path in
-        -*) my_directory_path="./$my_directory_path" ;;
-      esac
-
-      # While some portion of DIR does not yet exist...
-      while test ! -d "$my_directory_path"; do
-        # ...make a list in topmost first order.  Use a colon delimited
-       # list incase some portion of path contains whitespace.
-        my_dir_list="$my_directory_path:$my_dir_list"
-
-        # If the last portion added has no slash in it, the list is done
-        case $my_directory_path in */*) ;; *) break ;; esac
-
-        # ...otherwise throw away the child directory and loop
-        my_directory_path=`$ECHO "$my_directory_path" | $SED "$dirname"`
-      done
-      my_dir_list=`$ECHO $my_dir_list | $SED 's,:*$,,'`
-
-      save_mkdir_p_IFS="$IFS"; IFS=':'
-      for my_dir in $my_dir_list; do
-       IFS="$save_mkdir_p_IFS"
-        # mkdir can fail with a `File exist' error if two processes
-        # try to create one of the directories concurrently.  Don't
-        # stop in that case!
-        $MKDIR "$my_dir" 2>/dev/null || :
-      done
-      IFS="$save_mkdir_p_IFS"
-
-      # Bail out if we (or some other process) failed to create a directory.
-      test -d "$my_directory_path" || \
-        func_fatal_error "Failed to create \`$1'"
-    fi
-}
-
-
-# func_mktempdir
-# Make a temporary directory that won't clash with other running
-# libtool processes, and avoids race conditions if possible
-func_mktempdir ()
-{
-    my_template="${TMPDIR-/tmp}/libtool"
-
-    if test "$opt_dry_run" = ":"; then
-      # Return a directory name, but don't create it in dry-run mode
-      my_tmpdir="${my_template}-$$"
-    else
-
-      # If mktemp works, use that first and foremost
-      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
-
-      if test ! -d "$my_tmpdir"; then
-        # Failing that, at least try and use $RANDOM to avoid a race
-        my_tmpdir="${my_template}-${RANDOM-0}$$"
-
-        save_mktempdir_umask=`umask`
-        umask 0077
-        $MKDIR "$my_tmpdir"
-        umask $save_mktempdir_umask
-      fi
-
-      # If we're not in dry-run mode, bomb out on failure
-      test -d "$my_tmpdir" || \
-        func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
-    fi
-
-    $ECHO "$my_tmpdir"
-}
-
-
-# func_quote_for_eval arg
-# Aesthetically quote ARG to be evaled later.
-func_quote_for_eval ()
-{
-  my_arg="$1"
-
-  case $my_arg in
-    # Double-quote args containing other shell metacharacters.
-    # Many Bourne shells cannot handle close brackets correctly
-    # in scan sets, so we specify it separately.
-    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \      ]*|*]*|"")
-      my_arg="\"$my_arg\""
-      ;;
-  esac
-
-  func_quote_for_eval_result="$my_arg"
-}
-
-
 # func_check_version_match
 # Ensure that we are using m4 macros, and libtool script from the same
 # release of libtool.
@@ -958,7 +681,7 @@
     my_outputname="$1"
     my_originator="$2"
     my_pic_p="${3-no}"
-    my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
+    my_prefix=`$ECHO "$my_originator" | sed 's%[[^a-zA-Z0-9]]%_%g'`
     my_dlsyms=
 
     if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
@@ -1021,7 +744,7 @@
            $run $RM $export_symbols
            $run eval "${SED} -n -e '/^: @address@hidden/d' -e 's/^.* 
\(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
          else
-           $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 
's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
+           $run eval "${SED} -e 's/\([[]][[.*^$]]\)/\\\1/g' -e 's/^/ /' -e 
's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
            $run eval '$GREP -f "$output_objdir/$output.exp" < "$nlist" > 
"$nlist"T'
            $run eval '$MV "$nlist"T "$nlist"'
          fi
@@ -1069,7 +792,7 @@
    const char *name;
    void *address;
 }
-lt_${my_prefix}_LTX_preloaded_symbols[] =
+lt_${my_prefix}_LTX_preloaded_symbols[[]] =
 {\
   { \"$my_originator\", (void *) 0 },
 "
@@ -1156,7 +879,7 @@
     for my_xlib in $my_oldlibs; do
       # Extract the objects.
       case $my_xlib in
-       [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+       [[\\/]]* | [[A-Za-z]]:[[\\/]]*) my_xabs="$my_xlib" ;;
        *) my_xabs=`pwd`"/$my_xlib" ;;
       esac
       my_xlib=`$ECHO "X$my_xlib" | $Xsed -e 's%^.*/%%'`
@@ -1227,7 +950,7 @@
              name_to="$name"
              while test "X$name_to" = "X$name" || test -f "$my_xdir/$name_to"
              do
-               name_to=`$ECHO "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
+               name_to=`$ECHO "X$name_to" | $Xsed -e "s/\([[^.]]*\)/\1-$i/"`
              done
              $show "(cd $my_xdir && $AR xN $i $my_xabs '$name' && $MV '$name' 
'$name_to')"
              $run eval "(cd \$my_xdir && $AR xN $i \$my_xabs '$name' && $MV 
'$name' '$name_to')" || exit $?
@@ -1345,7 +1068,7 @@
 
     # Recognize several different file suffixes.
     # If the user specifies -o file.o, it is replaced with file.lo
-    xform='[cCFSifmso]'
+    xform='[[cCFSifmso]]'
     case $libobj in
     *.ada) xform=ada ;;
     *.adb) xform=adb ;;
@@ -1401,7 +1124,7 @@
     done
 
     objname=`$ECHO "X$obj" | $Xsed -e 's%^.*/%%'`
-    xdir=`$ECHO "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+    xdir=`$ECHO "X$obj" | $Xsed -e 's%/[[^/]]*$%%'`
     if test "X$xdir" = "X$obj"; then
       xdir=
     else
@@ -1436,7 +1159,7 @@
     # Calculate the filename of the output object if compiler does
     # not support -o with -c
     if test "$compiler_c_o" = no; then
-      output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 
's%\.[^.]*$%%'`.${objext}
+      output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 
's%\.[[^.]]*$%%'`.${objext}
       lockfile="$output_obj.lock"
       removelist="$removelist $output_obj $lockfile"
       trap "$run $RM $removelist; exit $EXIT_FAILURE" 1 2 15
@@ -1687,7 +1410,7 @@
          continue
        fi
 
-       dir=`$ECHO "X$file" | $Xsed -e 's%/[^/]*$%%'`
+       dir=`$ECHO "X$file" | $Xsed -e 's%/[[^/]]*$%%'`
        test "X$dir" = "X$file" && dir=.
 
        if test -f "$dir/$objdir/$dlname"; then
@@ -1699,7 +1422,7 @@
 
       *.lo)
        # Just add the directory containing the .lo file.
-       dir=`$ECHO "X$file" | $Xsed -e 's%/[^/]*$%%'`
+       dir=`$ECHO "X$file" | $Xsed -e 's%/[[^/]]*$%%'`
        test "X$dir" = "X$file" && dir=.
        ;;
 
@@ -1947,7 +1670,7 @@
       destdir="$dest"
       destname=
     else
-      destdir=`$ECHO "X$dest" | $Xsed -e 's%/[^/]*$%%'`
+      destdir=`$ECHO "X$dest" | $Xsed -e 's%/[[^/]]*$%%'`
       test "X$destdir" = "X$dest" && destdir=.
       destname=`$ECHO "X$dest" | $Xsed -e 's%^.*/%%'`
 
@@ -1957,7 +1680,7 @@
        func_fatal_help "\`$dest' is not a directory"
     fi
     case $destdir in
-    [\\/]* | [A-Za-z]:[\\/]*) ;;
+    [[\\/]]* | [[A-Za-z]]:[[\\/]]*) ;;
     *)
       for file in $files; do
        case $file in
@@ -2014,7 +1737,7 @@
          esac
        fi
 
-       dir=`$ECHO "X$file" | $Xsed -e 's%/[^/]*$%%'`/
+       dir=`$ECHO "X$file" | $Xsed -e 's%/[[^/]]*$%%'`/
        test "X$dir" = "X$file/" && dir=
        dir="$dir$objdir"
 
@@ -2244,7 +1967,7 @@
            fi
          else
            # Install the binary that we compiled earlier.
-           file=`$ECHO "X$file$stripped_ext" | $Xsed -e 
"s%\([^/]*\)$%$objdir/\1%"`
+           file=`$ECHO "X$file$stripped_ext" | $Xsed -e 
"s%\([[^/]]*\)$%$objdir/\1%"`
          fi
        fi
 
@@ -2537,7 +2260,7 @@
                fi
 
                # Extract subdirectory from the argument.
-               xdir=`$ECHO "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+               xdir=`$ECHO "X$arg" | $Xsed -e 's%/[[^/]]*$%%'`
                if test "X$xdir" = "X$arg"; then
                  xdir=
                else
@@ -2595,7 +2318,7 @@
                  # Dry-run case.
 
                  # Extract subdirectory from the argument.
-                 xdir=`$ECHO "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+                 xdir=`$ECHO "X$arg" | $Xsed -e 's%/[[^/]]*$%%'`
                  if test "X$xdir" = "X$arg"; then
                    xdir=
                  else
@@ -2629,7 +2352,7 @@
        rpath | xrpath)
          # We need an absolute path.
          case $arg in
-         [\\/]* | [A-Za-z]:[\\/]*) ;;
+         [[\\/]]* | [[A-Za-z]]:[[\\/]]*) ;;
          *)
            func_fatal_error "only absolute run-paths are allowed"
            ;;
@@ -2746,7 +2469,7 @@
 
       # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
       # so, if we see these flags be careful not to treat them like -L
-      -L[A-Z][A-Z]*:*)
+      -L[[A-Z]][[A-Z]]*:*)
        case $with_gcc/$host in
        no/*-*-irix* | /*-*-irix*)
          compile_command="$compile_command $arg"
@@ -2760,7 +2483,7 @@
        dir=`$ECHO "X$arg" | $Xsed -e 's/^-L//'`
        # We need an absolute path.
        case $dir in
-       [\\/]* | [A-Za-z]:[\\/]*) ;;
+       [[\\/]]* | [[A-Za-z]]:[[\\/]]*) ;;
        *)
          absdir=`cd "$dir" && pwd`
          test -z "$absdir" && \
@@ -2801,7 +2524,7 @@
            # Do not include libc due to us having libc/libc_r.
            test "X$arg" = "X-lc" && continue
            ;;
-         *-*-rhapsody* | *-*-darwin1.[012])
+         *-*-rhapsody* | *-*-darwin1.[[012]])
            # Rhapsody C and math libraries are in the System framework
            deplibs="$deplibs System.ltframework"
            continue
@@ -2883,7 +2606,7 @@
        dir=`$ECHO "X$arg" | $Xsed -e 's/^-R//'`
        # We need an absolute path.
        case $dir in
-       [\\/]* | [A-Za-z]:[\\/]*) ;;
+       [[\\/]]* | [[A-Za-z]]:[[\\/]]*) ;;
        *)
          func_fatal_error "only absolute run-paths are allowed"
          ;;
@@ -2984,7 +2707,7 @@
       # +DA*, +DD* enable 64-bit mode on the HP compiler
       # -q* pass through compiler args for the IBM compiler
       # -m* pass through architecture-specific compiler args for GCC
-      -64|-mips[0-9]|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*)
+      -64|-mips[[0-9]]|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*)
         arg=`$ECHO "X$arg" | $Xsed -e "$sed_quote_subst"`
         func_quote_for_eval "$arg"
        arg="$func_quote_for_eval_result"
@@ -3029,7 +2752,7 @@
          fi
 
          # Extract subdirectory from the argument.
-         xdir=`$ECHO "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+         xdir=`$ECHO "X$arg" | $Xsed -e 's%/[[^/]]*$%%'`
          if test "X$xdir" = "X$arg"; then
            xdir=
          else
@@ -3087,7 +2810,7 @@
            # Dry-run case.
 
            # Extract subdirectory from the argument.
-           xdir=`$ECHO "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+           xdir=`$ECHO "X$arg" | $Xsed -e 's%/[[^/]]*$%%'`
            if test "X$xdir" = "X$arg"; then
              xdir=
            else
@@ -3166,7 +2889,7 @@
     eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
     eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
 
-    output_objdir=`$ECHO "X$output" | $Xsed -e 's%/[^/]*$%%'`
+    output_objdir=`$ECHO "X$output" | $Xsed -e 's%/[[^/]]*$%%'`
     if test "X$output_objdir" = "X$output"; then
       output_objdir="$objdir"
     else
@@ -3268,7 +2991,7 @@
          # Ignore non-libtool-libs
          dependency_libs=
          case $lib in
-         *[\\/]*.la) . $lib   ;;
+         *[[\\/]]*.la) . $lib   ;;
          *.la)       . ./$lib ;;
          esac
 
@@ -3356,7 +3079,7 @@
                  done
                  if test "X$ll" = "X$old_library" ; then # only static version 
available
                    found=no
-                   ladir=`$ECHO "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+                   ladir=`$ECHO "X$lib" | $Xsed -e 's%/[[^/]]*$%%'`
                    test "X$ladir" = "X$lib" && ladir="."
                    lib=$ladir/$old_library
                    if test "$linkmode,$pass" = "prog,link"; then
@@ -3519,7 +3242,7 @@
          func_fatal_error "\`$lib' is not a valid libtool archive"
        fi
 
-       ladir=`$ECHO "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+       ladir=`$ECHO "X$lib" | $Xsed -e 's%/[[^/]]*$%%'`
        test "X$ladir" = "X$lib" && ladir="."
 
        dlname=
@@ -3544,9 +3267,9 @@
        *-*-darwin*)
          # Convert "-framework foo" to "foo.ltframework"
          if test -n "$inherited_linker_flags"; then
-           inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 
's/-framework \([^ $]*\)/\1.ltframework/g'`
+           inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 
's/-framework \([[^ $]]*\)/\1.ltframework/g'`
          fi
-         dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ 
$]*\).ltframework% -framework \1%g'`
+         dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([[^ 
$]]*\).ltframework% -framework \1%g'`
          ;;
        esac
 
@@ -3614,7 +3337,7 @@
 
        # We need an absolute path.
        case $ladir in
-       [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+       [[\\/]]* | [[A-Za-z]]:[[\\/]]*) abs_ladir="$ladir" ;;
        *)
          abs_ladir=`cd "$ladir" && pwd`
          if test -z "$abs_ladir"; then
@@ -3928,7 +3651,7 @@
                # Try looking first in the location we're being installed to.
                if test -n "$inst_prefix_dir"; then
                  case "$libdir" in
-                   [\\/]*)
+                   [[\\/]]*)
                      add_dir="$add_dir -L$inst_prefix_dir$libdir"
                      ;;
                  esac
@@ -4000,7 +3723,7 @@
              # Try looking first in the location we're being installed to.
              if test -n "$inst_prefix_dir"; then
                case "$libdir" in
-                 [\\/]*)
+                 [[\\/]]*)
                    add_dir="$add_dir -L$inst_prefix_dir$libdir"
                    ;;
                esac
@@ -4108,11 +3831,11 @@
              case $deplib in
              -L*) path="$deplib" ;;
              *.la)
-               dir=`$ECHO "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
+               dir=`$ECHO "X$deplib" | $Xsed -e 's%/[[^/]]*$%%'`
                test "X$dir" = "X$deplib" && dir="."
                # We need an absolute path.
                case $dir in
-               [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+               [[\\/]]* | [[A-Za-z]]:[[\\/]]*) absdir="$dir" ;;
                *)
                  absdir=`cd "$dir" && pwd`
                  if test -z "$absdir"; then
@@ -4409,7 +4132,7 @@
 
        # Check that each of the things are valid numbers.
        case $current in
-       0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+       0 | [[1-9]] | [[1-9]][[0-9]] | [[1-9]][[0-9]][[0-9]]) ;;
        *)
          func_error "CURRENT \`$current' is not a nonnegative integer"
          func_fatal_error "\`$vinfo' is not valid version information"
@@ -4417,7 +4140,7 @@
        esac
 
        case $revision in
-       0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+       0 | [[1-9]] | [[1-9]][[0-9]] | [[1-9]][[0-9]][[0-9]]) ;;
        *)
          func_error "REVISION \`$revision' is not a nonnegative integer"
          func_fatal_error "\`$vinfo' is not valid version information"
@@ -4425,7 +4148,7 @@
        esac
 
        case $age in
-       0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+       0 | [[1-9]] | [[1-9]][[0-9]] | [[1-9]][[0-9]][[0-9]]) ;;
        *)
          func_error "AGE \`$age' is not a nonnegative integer"
          func_fatal_error "\`$vinfo' is not valid version information"
@@ -4657,7 +4380,7 @@
          *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
            # these systems don't actually have a c library (as such)!
            ;;
-         *-*-rhapsody* | *-*-darwin1.[012])
+         *-*-rhapsody* | *-*-darwin1.[[012]])
            # Rhapsody C library is in the System framework
            deplibs="$deplibs System.ltframework"
            ;;
@@ -4817,7 +4540,7 @@
              if test -n "$a_deplib" ; then
                libname=`eval \\$ECHO \"$libname_spec\"`
                for i in $lib_search_path $sys_lib_search_path 
$shlib_search_path; do
-                 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+                 potential_libs=`ls $i/$libname[[.-]]* 2>/dev/null`
                  for potent_lib in $potential_libs; do
                      # Follow soft links.
                      if ls -lLd "$potent_lib" 2>/dev/null |
@@ -4833,8 +4556,8 @@
                      while test -h "$potlib" 2>/dev/null; do
                        potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
                        case $potliblink in
-                       [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
-                       *) potlib=`$ECHO "X$potlib" | $Xsed -e 
's,[^/]*$,,'`"$potliblink";;
+                       [[\\/]]* | [[A-Za-z]]:[[\\/]]*) potlib="$potliblink";;
+                       *) potlib=`$ECHO "X$potlib" | $Xsed -e 
's,[[^/]]*$,,'`"$potliblink";;
                        esac
                      done
                      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
@@ -4886,7 +4609,7 @@
              if test -n "$a_deplib" ; then
                libname=`eval \\$ECHO \"$libname_spec\"`
                for i in $lib_search_path $sys_lib_search_path 
$shlib_search_path; do
-                 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+                 potential_libs=`ls $i/$libname[[.-]]* 2>/dev/null`
                  for potent_lib in $potential_libs; do
                    potlib="$potent_lib" # see symlink-check above in 
file_magic test
                    if eval $ECHO \"$potent_lib\" 2>/dev/null |
@@ -4923,14 +4646,14 @@
        none | unknown | *)
          newdeplibs=""
          tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
-             -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
+             -e 's/ -lc$//' -e 's/ -[[LR]][[^ ]]*//g'`
          if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
            for i in $predeps $postdeps ; do
              # can't use Xsed below, because $i might contain '/'
              tmp_deplibs=`$ECHO "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e 
"s,$i,,"`
            done
          fi
-         if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[     ]//g' |
+         if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[[    ]]//g' |
             $GREP . >/dev/null; then
            $ECHO
            if test "X$deplibs_check_method" = "Xnone"; then
@@ -4950,7 +4673,7 @@
        name=$name_save
 
        case $host in
-       *-*-rhapsody* | *-*-darwin1.[012])
+       *-*-rhapsody* | *-*-darwin1.[[012]])
          # On Rhapsody replace the C library with the System framework
          newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / 
System.ltframework /'`
          ;;
@@ -5004,9 +4727,9 @@
       # Time to change all our "foo.ltframework" stuff back to "-framework foo"
       case $host in
        *-*-darwin*)
-         newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ 
$]*\).ltframework% -framework \1%g'`
-         inherited_linker_flags=`$ECHO "X $inherited_linker_flags" | $Xsed -e 
's% \([^ $]*\).ltframework% -framework \1%g'`
-         deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% 
-framework \1%g'`
+         newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([[^ 
$]]*\).ltframework% -framework \1%g'`
+         inherited_linker_flags=`$ECHO "X $inherited_linker_flags" | $Xsed -e 
's% \([[^ $]]*\).ltframework% -framework \1%g'`
+         deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([[^ $]]*\).ltframework% 
-framework \1%g'`
          ;;
       esac
 
@@ -5525,10 +5248,10 @@
         && test "$dlopen_support" = unknown \
        && test "$dlopen_self" = unknown \
        && test "$dlopen_self_static" = unknown && \
-         func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen 
support."
+         func_warning "\`LT_INIT([[dlopen]])' not used. Assuming no dlopen 
support."
 
       case $host in
-      *-*-rhapsody* | *-*-darwin1.[012])
+      *-*-rhapsody* | *-*-darwin1.[[012]])
        # On Rhapsody replace the C library is the System framework
        compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / 
System.ltframework /'`
        finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / 
System.ltframework /'`
@@ -5541,15 +5264,15 @@
        # But is supposedly fixed on 10.4 or later (yay!).
        if test "$tagname" = CXX ; then
          case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
-           10.[0123])
+           10.[[0123]])
              compile_command="$compile_command ${wl}-bind_at_load"
              finalize_command="$finalize_command ${wl}-bind_at_load"
            ;;
          esac
        fi
        # Time to change all our "foo.ltframework" stuff back to "-framework 
foo"
-       compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ 
$]*\).ltframework% -framework \1%g'`
-       finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ 
$]*\).ltframework% -framework \1%g'`
+       compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([[^ 
$]]*\).ltframework% -framework \1%g'`
+       finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([[^ 
$]]*\).ltframework% -framework \1%g'`
        ;;
       esac
 
@@ -5680,7 +5403,7 @@
        rpath=
        for dir in $temp_rpath; do
          case $dir in
-         [\\/]* | [A-Za-z]:[\\/]*)
+         [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
            # Absolute path.
            rpath="$rpath$dir:"
            ;;
@@ -5788,7 +5511,7 @@
       # Quote $ECHO for shipping.
       if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
        case $progpath in
-       [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+       [[\\/]]* | [[A-Za-z]]:[[\\/]]*) qecho="$SHELL $progpath 
--fallback-echo";;
        *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
        esac
        qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
@@ -5901,36 +5624,36 @@
 void lt_fatal (const char *message, ...);
 
 int
-main (int argc, char *argv[])
+main (int argc, char *argv[[]])
 {
   char **newargz;
   int i;
 
-  program_name = (char *) xstrdup ((char *) basename (argv[0]));
-  DEBUG("(main) argv[0]      : %s\n",argv[0]);
+  program_name = (char *) xstrdup ((char *) basename (argv[[0]]));
+  DEBUG("(main) argv[[0]]      : %s\n",argv[[0]]);
   DEBUG("(main) program_name : %s\n",program_name);
   newargz = XMALLOC(char *, argc+2);
 EOF
 
            cat >> $cwrappersource <<EOF
-  newargz[0] = "$SHELL";
+  newargz[[0]] = "$SHELL";
 EOF
 
            cat >> $cwrappersource <<"EOF"
-  newargz[1] = find_executable(argv[0]);
-  if (newargz[1] == NULL)
-    lt_fatal("Couldn't find %s", argv[0]);
-  DEBUG("(main) found exe at : %s\n",newargz[1]);
+  newargz[[1]] = find_executable(argv[[0]]);
+  if (newargz[[1]] == NULL)
+    lt_fatal("Couldn't find %s", argv[[0]]);
+  DEBUG("(main) found exe at : %s\n",newargz[[1]]);
   /* we know the script has the same name, without the .exe */
-  /* so make sure newargz[1] doesn't end in .exe */
-  strendzap(newargz[1],".exe");
+  /* so make sure newargz[[1]] doesn't end in .exe */
+  strendzap(newargz[[1]],".exe");
   for (i = 1; i < argc; i++)
-    newargz[i+1] = xstrdup(argv[i]);
-  newargz[argc+1] = NULL;
+    newargz[[i+1]] = xstrdup(argv[[i]]);
+  newargz[[argc+1]] = NULL;
 
   for (i=0; i<argc+1; i++)
   {
-    DEBUG("(main) newargz[%d]   : %s\n",i,newargz[i]);
+    DEBUG("(main) newargz[[%d]]   : %s\n",i,newargz[[i]]);
     ;
   }
 
@@ -5967,7 +5690,7 @@
 
 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
   /* Skip over the disk name in MSDOS pathnames. */
-  if (isalpha (name[0]) && name[1] == ':')
+  if (isalpha (name[[0]]) && name[[1]] == ':')
     name += 2;
 #endif
 
@@ -6012,7 +5735,7 @@
   const char* p_next;
   struct stat st;
   /* static buffer for getcwd */
-  char tmp[LT_PATHMAX + 1];
+  char tmp[[LT_PATHMAX + 1]];
   int tmp_len;
   char* concat_name;
 
@@ -6023,7 +5746,7 @@
 
   /* Absolute path? */
 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
-  if (isalpha (wrapper[0]) && wrapper[1] == ':')
+  if (isalpha (wrapper[[0]]) && wrapper[[1]] == ':')
   {
     concat_name = xstrdup (wrapper);
     if (check_executable(concat_name))
@@ -6033,7 +5756,7 @@
   else
   {
 #endif
-    if (IS_DIR_SEPARATOR (wrapper[0]))
+    if (IS_DIR_SEPARATOR (wrapper[[0]]))
     {
       concat_name = xstrdup (wrapper);
       if (check_executable(concat_name))
@@ -6073,14 +5796,14 @@
          tmp_len = strlen(tmp);
          concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
          memcpy (concat_name, tmp, tmp_len);
-         concat_name[tmp_len] = '/';
+         concat_name[[tmp_len]] = '/';
          strcpy (concat_name + tmp_len + 1, wrapper);
        }
        else
        {
          concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
          memcpy (concat_name, p, p_len);
-         concat_name[p_len] = '/';
+         concat_name[[p_len]] = '/';
          strcpy (concat_name + p_len + 1, wrapper);
        }
        if (check_executable(concat_name))
@@ -6096,7 +5819,7 @@
   tmp_len = strlen(tmp);
   concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
   memcpy (concat_name, tmp, tmp_len);
-  concat_name[tmp_len] = '/';
+  concat_name[[tmp_len]] = '/';
   strcpy (concat_name + tmp_len + 1, wrapper);
 
   if (check_executable(concat_name))
@@ -6205,18 +5928,18 @@
        $ECHO >> $output "\
 
   # Find the directory that this script lives in.
-  thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+  thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[[^/]]*$%%'\`
   test \"x\$thisdir\" = \"x\$file\" && thisdir=.
 
   # Follow symbolic links until we get to the real thisdir.
   file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
   while test -n \"\$file\"; do
-    destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+    destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[[^/]]*\$%%'\`
 
     # If there was a directory component, then change thisdir.
     if test \"x\$destdir\" != \"x\$file\"; then
       case \"\$destdir\" in
-      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+      [[\\\\/]]* | [[A-Za-z]]:[[\\\\/]]*) thisdir=\"\$destdir\" ;;
       *) thisdir=\"\$thisdir/\$destdir\" ;;
       esac
     fi
@@ -6535,7 +6258,7 @@
            newdlfiles=
            for lib in $dlfiles; do
              case $lib in
-               [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+               [[\\/]]* | [[A-Za-z]]:[[\\/]]*) abs="$lib" ;;
                *) abs=`pwd`"/$lib" ;;
              esac
              newdlfiles="$newdlfiles $abs"
@@ -6544,7 +6267,7 @@
            newdlprefiles=
            for lib in $dlprefiles; do
              case $lib in
-               [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+               [[\\/]]* | [[A-Za-z]]:[[\\/]]*) abs="$lib" ;;
                *) abs=`pwd`"/$lib" ;;
              esac
              newdlprefiles="$newdlprefiles $abs"
@@ -6644,7 +6367,7 @@
 
     origobjdir="$objdir"
     for file in $files; do
-      dir=`$ECHO "X$file" | $Xsed -e 's%/[^/]*$%%'`
+      dir=`$ECHO "X$file" | $Xsed -e 's%/[[^/]]*$%%'`
       if test "X$dir" = "X$file"; then
        dir=.
        objdir="$origobjdir"
@@ -6847,7 +6570,7 @@
   fi
 }
 
-exit $EXIT_SUCCESS
+exit $exit_status
 
 
 # The TAGs below are defined such that we never get into a situation


--- orig/configure.ac
+++ mod/configure.ac
@@ -114,6 +114,9 @@
 dnl much older releases of autoconf and automake.  See release notes.
 AM_INIT_AUTOMAKE([1.8 gnits dist-bzip2]) ## We use auto-m4_including
 
+dnl We use m4sh to generate libtool's portable shell scripts
+AC_SUBST([M4SH], ['autom4te -l m4sh'])
+
 dnl Make sure config.status is regenerated when the version timestamp changes
 AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_builddir)/stamp-vcl'])
 


--- orig/libtoolize.in
+++ mod/libtoolize.in
@@ -1,4 +1,5 @@
-#! /bin/sh
+m4_define([_m4_divert(SCRIPT)], 100)
+m4_divert_push([SCRIPT])#! /bin/sh
 # @configure_input@
 
 # libtoolize (GNU @PACKAGE@@TIMESTAMP@) @VERSION@
@@ -57,63 +58,17 @@
 #
 # Report bugs to <address@hidden>.
 
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-elif test -n "${BASH_VERSION+set}${KSH_VERSION+set}" && (set -o posix) 
>/dev/null 2>&1; then
-  set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-: ${CP="cp -f"}
-: ${ECHO="echo"}
-: ${LN_S="@LN_S@"}
-: ${MKDIR="mkdir"}
-: ${RM="rm -f"}
-: ${SED="@SED@"}
-
-dirname="s,/[^/]*$,,"
-basename="s,^.*/,,g"
-
-# 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"
-
-# The name of this program:
-progname=`$ECHO "$progpath" | $SED "$basename"`
 PROGRAM=libtoolize
 
-# Make sure we have an absolute path for reexecution:
-case $progpath in
-  [\\/]*|[A-Za-z]:\\*) ;;
-  *) progdir=`$ECHO "$progpath" | $SED "$dirname"`
-     progdir=`cd "$progdir" && pwd`
-     progpath="$progdir/$progname"
-     ;;
-esac
-
-# Global variables:
-EXIT_SUCCESS=0
-EXIT_FAILURE=1
+AS_SHELL_SANITIZE
+$as_unset CDPATH
+
+m4_include([getopt.m4sh])
 
-opt_dry_run=false
+# Command line options:
 opt_force=false
 opt_install=false
 opt_link=:
-opt_quiet=false
-opt_verbose=false
 
 seen_libtool=false
 seen_ltdl=false
@@ -121,8 +76,6 @@
 # Collect flags to pass into libltdl libtoolize
 libtoolize_flags=
 
-exit_status=$EXIT_SUCCESS
-
 # Locations for important files:
 address@hidden@
 address@hidden@
@@ -134,106 +87,14 @@
 configure_ac=configure.in
 
 
-# func_echo arg...
-# Echo program name prefixed message.
-func_echo ()
-{
-    $ECHO $progname: ${1+"$@"}
-}
-
-# func_verbose arg...
-# Echo program name prefixed message in verbose mode only.
-func_verbose ()
-{
-    $opt_verbose && func_echo ${1+"$@"}
-}
-
-# func_error arg...
-# Echo program name prefixed message to standard error.
-func_error ()
-{
-    $ECHO $progname: ${1+"$@"} 1>&2
-}
-
-# func_fatal_error arg...
-# Echo program name prefixed message to standard error, and exit.
-func_fatal_error ()
-{
-    func_error ${1+"$@"}
-    exit $EXIT_FAILURE
-}
-
-# func_fatal_help arg...
-# Echo program name prefixed message to standard error, followed by
-# a help hint, and exit.
-func_fatal_help ()
-{
-    func_error ${1+"$@"}
-    func_fatal_error "Try \`$progname --help' for more information."
-}
-
-# func_missing_arg argname
-# Echo program name prefixed message to standard error and set global
-# exit_cmd.
-func_missing_arg ()
-{
-    func_error "missing argument for $1"
-    exit_cmd=exit
-}
-
-# func_usage
-# Echo short help message to standard output and exit.
-func_usage ()
-{
-    $SED '/^# Usage:/,/# -h/ {
-        s/^# //; s/^# *$//;
-       s/\$progname/'$progname'/;
-       p;
-    }; d' < "$progpath"
-    $ECHO
-    $ECHO "run \`$progname --help | more' for full usage"
-    exit $EXIT_SUCCESS
-}
-
-# func_help
-# Echo long help message to standard output and exit.
-func_help ()
-{
-    $SED '/^# Usage:/,/# Report bugs to/ {
-        s/^# //; s/^# *$//;
-       s:\$progname:'$progname':;
-       s:\$SHELL:'"$SHELL"':;
-       s:\$LTCC:'"$LTCC"':;
-       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' < "$progpath"
-    exit $EXIT_SUCCESS
-}
-
-# func_version
-# Echo version message to standard output and exit.
-func_version ()
-{
-    $SED '/^# '$PROGRAM' (GNU /,/# warranty; / {
-        s/^# //; s/^# *$//;
-        s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/;
-        p;
-     }; d' < "$progpath"
-     exit $EXIT_SUCCESS
-}
-
-
 # Parse options once, thoroughly.  This comes as soon as possible in
 # the script to make things like `libtoolize --version' happen quickly.
 {
   # sed scripts:
   my_sed_single_opt='1s/^\(..\).*$/\1/;q'
   my_sed_single_rest='1s/^..\(.*\)$/\1/;q'
-  my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
-  my_sed_long_arg='1s/^--[^=]*=//'
+  my_sed_long_opt='1s/^\(--[[^=]]*\)=.*/\1/;q'
+  my_sed_long_arg='1s/^--[[^=]]*=//'
 
   while test "$#" -gt 0; do
     opt="$1"
@@ -308,51 +169,6 @@
 }
 
 
-# func_mkdir_p directory-path
-# Make sure the entire path to DIRECTORY-PATH is available.
-func_mkdir_p ()
-{
-    my_directory_path="$1"
-    my_dir_list=
-
-    if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
-
-      # Protect directory names starting with `-'
-      case $my_directory_path in
-        -*) my_directory_path="./$my_directory_path" ;;
-      esac
-
-      # While some portion of DIR does not yet exist...
-      while test ! -d "$my_directory_path"; do
-        # ...make a list in topmost first order.  Use a colon delimited
-       # list incase some portion of path contains whitespace.
-        my_dir_list="$my_directory_path:$my_dir_list"
-
-        # If the last portion added has no slash in it, the list is done
-        case $my_directory_path in */*) ;; *) break ;; esac
-
-        # ...otherwise throw away the child directory and loop
-        my_directory_path=`$ECHO "$my_directory_path" | $SED "$dirname"`
-      done
-      my_dir_list=`$ECHO $my_dir_list | $SED 's,:*$,,'`
-
-      save_mkdir_p_IFS="$IFS"; IFS=':'
-      for my_dir in $my_dir_list; do
-       IFS="$save_mkdir_p_IFS"
-        # mkdir can fail with a `File exist' error if two processes
-        # try to create one of the directories concurrently.  Don't
-        # stop in that case!
-        $MKDIR "$my_dir" 2>/dev/null || :
-      done
-      IFS="$save_mkdir_p_IFS"
-
-      # Bail out if we (or some other process) failed to create a directory.
-      test -d "$my_directory_path" || \
-        func_fatal_error "Failed to create \`$1'"
-    fi
-}
-
-
 # func_copy srcfile destfile
 # If option `--copy' was specified, or soft-linking SRCFILE to DESTFILE fails,
 # then try to copy SRCFILE to DESTFILE.
@@ -409,7 +225,7 @@
 
       IFS="$my_save_IFS"
       my_srcdir=`$ECHO "$my_srcdirs" | sed 's,:.*,,g'`
-      my_srcdirs=`$ECHO "$my_srcdirs" | sed 's,:*[^:][^:]*:*,,'`
+      my_srcdirs=`$ECHO "$my_srcdirs" | sed 's,:*[[^:]][[^:]]*:*,,'`
 
       for my_filename in `cd "$my_srcdir" && ls`; do
 
@@ -469,13 +285,6 @@
     IFS="$my_save_IFS"
 }
 
-# func_grep expression filename
-# Check whether EXPRESSION matches any line of FILENAME, without output.
-func_grep ()
-{
-    grep "$1" "$2" >/dev/null 2>&1
-}
-
 # func_scan_files
 # Scan configure.(ac|in) and aclocal.m4 (if present) for use of libltdl
 # and libtool.  Possibly running some of these tools if necessary.
@@ -510,13 +319,13 @@
     # ---------------------------------------------------- #
 
     my_sed_traces='s,#.*$,,; s,^dnl .*$,,; s, dnl .*$,,;
-       /AC_CONFIG_AUX_DIR[^_]/  {
-           s,^.*AC_CONFIG_AUX_DIR([[   ]*\([^])]*\).*$,auxdir=\1,; p;
+       /AC_CONFIG_AUX_DIR[[^_]]/  {
+           s,^.*AC_CONFIG_AUX_DIR([[[  ]*\([^])]]*\).*$,auxdir=\1,; p;
         };
        /AC_CONFIG_MACRO_DIR/   {
-           s,^.*AC_CONFIG_MACRO_DIR([[         ]*\([^])]*\).*$,m4dir=\1,; p;
+           s,^.*AC_CONFIG_MACRO_DIR([[[        ]*\([^])]]*\).*$,m4dir=\1,; p;
         };
-       /A[CM]_PROG_LIBTOOL/ { s,^.*$,seen_libtool=:,; p; };
+       /A[[CM]]_PROG_LIBTOOL/ { s,^.*$,seen_libtool=:,; p; };
        /LT_INIT/            { s,^.*$,seen_libtool=:,; p; };
        /LTDL_INIT/          { s,^.*$,seen_ltdl=:,; p; };
        /LT_WITH_LTDL/       { s,^.*$,seen_ltdl=:,; p; };
@@ -564,8 +373,8 @@
     # If AC_CONFIG_MACRO_DIR turned nothing up, we hunt for ACLOCAL_AMFLAGS
     # in `Makefile.am' for a `-I' argument.
 
-    my_sed_aclocal_flags='/^[  ]*ACLOCAL_[A-Z_]*FLAGS[         ]*=/ {
-       s,^[^=]*=[      ]*\(.*\), \1,; q; }; d'
+    my_sed_aclocal_flags='/^[[         ]]*ACLOCAL_[[A-Z_]]*FLAGS[[     ]]*=/ {
+       s,^[[^=]]*=[[   ]]*\(.*\), \1,; q; }; d'
     if test ! -n "$m4dir" && test -f Makefile.am; then
       my_m4dir_is_next=false
       for arg in `$SED "$my_sed_aclocal_flags" Makefile.am`; do
@@ -591,7 +400,7 @@
 
     my_include_regex=
     my_sed_include='
-        /^m4_include(\[.*\])$/ { s,^m4_include(\[\(.*\)\])$,\1,; p; };
+        /^[m4]_include(\[[.*\]])$/ { s,^[m4]_include(\[[\(.*\)\]])$,\1,; p; };
         d'
 
     test -f "$my_searchfile" && $ECHO "$my_searchfile"
@@ -610,8 +419,8 @@
 {
     my_filename="$1"
     my_macro_regex="$2"
-    my_sed_serial='/^# serial [1-9][0-9]*[     ]*'"$my_macro_regex"'[  ]*$/ {
-         s,^# serial \([1-9][0-9]*\).*$,\1,; q;
+    my_sed_serial='/^# serial [[1-9]][[0-9]]*[[        
]]*'"$my_macro_regex"'[[        ]]*$/ {
+         s,^# serial \([[1-9]][[0-9]]*\).*$,\1,; q;
        }; d'
 
     # Search FILENAME and all the files it m4_includes for a serial number
@@ -619,7 +428,7 @@
     my_serial=
     for my_file in `func_included_files "$my_filename"`; do
       if test -z "$my_macro_regex" ||
-         func_grep '^AC_DEFUN(\['"$my_macro_regex" "$my_file"
+         func_grep '^AC_DEFUN(\@<:@'"$my_macro_regex" "$my_file"
       then
         my_serial=`$SED -e "$my_sed_serial" "$my_file"`
        break
@@ -718,8 +527,8 @@
     my_srcfile="$1"
     my_destfile="$2"
     my_sed_ltmain='
-       s,^VERSION=[^0-9]*\(.*\)[       ]*$,\1,; t
-       s,^TIMESTAMP=[^0-9]*\([.0-9]*\) .*$,\1,; t
+       s,^VERSION=[[^0-9]]*\(.*\)[[    ]]*$,\1,; t
+       s,^TIMESTAMP=[[^0-9]]*\([[.0-9]]*\) .*$,\1,; t
        d'
 
     if test -f "$my_srcfile"; then :
@@ -745,7 +554,7 @@
 {
     my_srcfile="$1"
     my_destfile="$2"
-    my_sed_config='s,^timestamp=[^0-9]*\([.0-9-]*\)[^0-9].*$,\1,; t; d'
+    my_sed_config='s,^timestamp=[[^0-9]]*\([[.0-9-]]*\)[[^0-9]].*$,\1,; t; d'
 
     if test -f "$my_srcfile"; then :
     else
@@ -812,7 +621,7 @@
     $opt_quiet || func_echo "putting macros in AC_CONFIG_MACRO_DIR, \`$m4dir'."
 
     func_serial_update  "$libtool_m4" "$m4dir/libtool.m4" \
-      LT_INIT 'A[CM]_PROG_LIBTOOL'
+      LT_INIT 'A[[CM]]_PROG_LIBTOOL'
 
     if $seen_ltdl; then
       func_serial_update "$ltdl_m4" "$m4dir/ltdl.m4" 'LTDL_INIT'


--- orig/m4/libtool.m4
+++ mod/m4/libtool.m4
@@ -5773,9 +5773,11 @@
 # available, choose the one first in the user's PATH.
 m4_defun([_LT_DECL_EGREP],
 [AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_REQUIRE([AC_PROG_FGREP])dnl
 test -z "$GREP" && GREP=grep
 _LT_DECL([], [GREP], [1], [A grep program that handles long line])
 _LT_DECL([], [EGREP], [1], [An ERE matcher])
+_LT_DECL([], [FGREP], [1], [A literal string matcher])
 ])
 
 


--- orig/tests/defs
+++ mod/tests/defs.in
@@ -1,5 +1,7 @@
-# -*- sh -*-
-# Defines for Libtool testing environment.
+m4_define([_m4_divert(SCRIPT)], 100)
+m4_divert_push([SCRIPT])# @configure_input@
+
+# defs -- Defines for Libtool testing environment.
 # Gord Matzigkeit <address@hidden>, 1996
 # Gary V. Vaughan <address@hidden>, 2003
 
@@ -23,76 +25,15 @@
 # Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
 # MA 02111-1307, USA.
 
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-elif test -n "${BASH_VERSION+set}${KSH_VERSION+set}" && (set -o posix) 
>/dev/null 2>&1; then
-  set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
+AS_SHELL_SANITIZE
+$as_unset CDPATH
 
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+m4_include([general.m4sh])
 
 : ${AUTOCONF="autoconf"}
-: ${ECHO="echo"}
-: ${GREP="grep"}
 : ${LIBTOOL="../libtool"}
-: ${MAKE="make"}
-: ${MKDIR="mkdir"}
-: ${SED="sed"}
 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
 
-# FIXME: Substitute @EGREP@ and @FGREP@ from the Makefile too
-if $ECHO a | ($GREP -E '(a|b)') >/dev/null 2>&1; then
-  EGREP="$GREP -E"
-else
-  EGREP='egrep'
-fi
-if $ECHO 'ab*c' | ($GREP -F 'ab*c') >/dev/null 2>&1; then
-  FGREP="$GREP -F"
-else
-  FGREP='fgrep'
-fi
-
-basename='s,^.*/,,g'
-dirname='s,/[^/]*$,,'
-
-# 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"
-
-# The name of this program:
-progname=`$ECHO "$progpath" | $SED "$basename"`
-
-# Make sure we have an absolute path for reexecution:
-case $progpath in
-  [\\/]*|[A-Za-z]:\\*) ;;
-  *) progdir=`$ECHO "$progpath" | $SED "$dirname"`
-     progdir=`cd "$progdir" && pwd`
-     progpath="$progdir/$progname"
-     ;;
-esac
-
-# Check that srcdir is set to an absolute path.
-case "$srcdir" in
-/* | [A-Za-z]:\\*) ;;
-*) srcdir=`cd $srcdir && pwd` ;;
-esac
-
-# Global variables:
-EXIT_SUCCESS=0
-EXIT_FAILURE=1
-EXIT_SKIP=77  # $? = 77 is used to indicate a skipped test to automake
 
 # Disable usage of config.site for autoconf, unless DJGPP is present.
 # The DJGPP port of autoconf requires config.site, to work correctly.
@@ -113,14 +54,7 @@
 # Echo message with prefix.
 func_msg ()
 {
-    $ECHO "=" ${1+"$@"}
-}
-
-# func_error arg...
-# Echo message to standard error.
-func_error ()
-{
-    $ECHO ${1+"$@"} 1>&2
+    func_echo "=== " ${1+"$@"}
 }
 
 # func_skip arg...
@@ -135,8 +69,7 @@
 # Echo message to standard error, and fail this test.
 func_fail ()
 {
-    func_error ${1+"$@"}
-    exit $EXIT_FAILURE
+    func_fatal_error ${1+"$@"}
 }
 
 # func_get_config varname_list src [failp] [regex]
@@ -177,57 +110,6 @@
 func_get_config "host" "$LIBTOOL --config" ": fatal"
 
 
-# func_grep expression filename
-# Check whether EXPRESSION matches any line of FILENAME, without output.
-func_grep ()
-{
-    $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 ()
-{
-    my_directory_path="$1"
-    my_dir_list=
-
-    if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
-
-      # Protect directory names starting with `-'
-      case $my_directory_path in
-        -*) my_directory_path="./$my_directory_path" ;;
-      esac
-
-      # While some portion of DIR does not yet exist...
-      while test ! -d "$my_directory_path"; do
-        # ...make a list in topmost first order.  Use a colon delimited
-       # list incase some portion of path contains whitespace.
-        my_dir_list="$my_directory_path:$my_dir_list"
-
-        # If the last portion added has no slash in it, the list is done
-        case $my_directory_path in */*) ;; *) break ;; esac
-
-        # ...otherwise throw away the child directory and loop
-        my_directory_path=`$ECHO "$my_directory_path" | $SED "$dirname"`
-      done
-      my_dir_list=`$ECHO $my_dir_list | $SED 's,:*$,,'`
-
-      save_mkdir_p_IFS="$IFS"; IFS=':'
-      for my_dir in $my_dir_list; do
-       IFS="$save_mkdir_p_IFS"
-        # mkdir can fail with a `File exist' error if two processes
-        # try to create one of the directories concurrently.  Don't
-        # stop in that case!
-        $MKDIR "$my_dir" 2>/dev/null || :
-      done
-      IFS="$save_mkdir_p_IFS"
-
-      # Bail out if we (or some other process) failed to create a directory.
-      test -d "$my_directory_path" || \
-        func_fatal_error "Failed to create \`$1'"
-    fi
-}
-
 # func_mkprefixdir
 func_mkprefixdir ()
 {
@@ -253,7 +135,7 @@
     func_mkdir_p "$my_dir"
 
     # Change to our build directory.
-    cd "$my_dir" || exit 1
+    cd "$my_dir" || func_fatal_error "couldn't cd to \`$my_dir'"
 }
 
 
@@ -405,6 +287,12 @@
 
 # Shared global variables for test scripts
 prefix="./_inst"
-scripts="$srcdir/../config/ltmain.sh ../libtoolize"
+srcdir=`cd $srcdir && pwd`
+scripts="$srcdir/config/general.m4sh $srcdir/config/getopt.m4sh 
$srcdir/config/ltmain.in ../libtoolize"
+
+func_msg "Running $progname"
 
-$ECHO "=== Running $progname"
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:



* added files

--- /dev/null
+++ 
/Users/gary/devel/savannah/libtool--gary--1.0/,,address@hidden/new-files-archive/./config/.arch-ids/general.m4sh.id
@@ -0,0 +1 @@
+Gary V. Vaughan <address@hidden> Sat Sep 18 19:55:28 2004 11306.0
--- /dev/null
+++ 
/Users/gary/devel/savannah/libtool--gary--1.0/,,address@hidden/new-files-archive/./config/.arch-ids/getopt.m4sh.id
@@ -0,0 +1 @@
+Gary V. Vaughan <address@hidden> Sat Sep 18 19:55:28 2004 11306.1
--- /dev/null
+++ 
/Users/gary/devel/savannah/libtool--gary--1.0/,,address@hidden/new-files-archive/./config/general.m4sh
@@ -0,0 +1,247 @@
+m4_if([# general.m4sh -- general shell script boiler plate -*- Autoconf -*-
+# Written by Gary V. Vaughan <address@hidden>, 2004
+
+# Copyright (C) 2004 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions.  There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# 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; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+])dnl
+
+: ${CP="cp -f"}
+: ${ECHO="echo"}
+: ${EGREP="@EGREP@"}
+: ${FGREP="@FGREP@"}
+: ${GREP="@GREP@"}
+: ${LN_S="@LN_S@"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SED="@SED@"}
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63  # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77     # $? = 77 is used to indicate a skipped test to automake.
+
+exit_status=$EXIT_SUCCESS
+
+# Make sure IFS has a sensible default
+: ${IFS="
+       "}
+
+dirname="s,/[[^/]]*$,,"
+basename="s,^.*/,,g"
+
+# 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"
+
+# The name of this program:
+progname=`$ECHO "$progpath" | $SED "$basename"`
+
+# Make sure we have an absolute path for reexecution:
+case $progpath in
+  [[\\/]]*|[[A-Za-z]]:\\*) ;;
+  *) progdir=`$ECHO "$progpath" | $SED "$dirname"`
+     progdir=`cd "$progdir" && pwd`
+     progpath="$progdir/$progname"
+     ;;
+esac
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([[\\`\\"$\\\\]]\)/\\\1/g'
+# test EBCDIC or ASCII
+case `$ECHO A|tr A '\301'` in
+ A) # EBCDIC based system
+  SP2NL="tr '\100' '\n'"
+  NL2SP="tr '\r\n' '\100\100'"
+  ;;
+ *) # Assume ASCII based system
+  SP2NL="tr '\040' '\012'"
+  NL2SP="tr '\015\012' '\040\040'"
+  ;;
+esac
+
+# Standard options:
+opt_dry_run=false
+opt_help=false
+opt_quiet=false
+opt_verbose=false
+
+# func_echo arg...
+# Echo program name prefixed message, along with the current mode
+# name if it has been set yet.
+func_echo ()
+{
+    $ECHO $progname${mode+: }$mode: ${1+"$@"}
+}
+
+# func_verbose arg...
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+    $opt_verbose && func_echo ${1+"$@"}
+}
+
+# func_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+    $ECHO $progname${mode+: }$mode: ${1+"$@"} 1>&2
+}
+
+# func_warning arg...
+# Echo program name prefixed warning message to standard error.
+func_warning ()
+{
+    $ECHO $progname${mode+: }$mode: warning: ${1+"$@"} 1>&2
+}
+
+# func_fatal_error arg...
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+    func_error ${1+"$@"}
+    exit $EXIT_FAILURE
+}
+
+# func_fatal_help arg...
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+    func_error ${1+"$@"}
+    func_fatal_error "$help"
+}
+help="Try \`$progname --help' for more information."  ## default
+
+
+# func_grep expression filename
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+    $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 ()
+{
+    my_directory_path="$1"
+    my_dir_list=
+
+    if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+
+      # Protect directory names starting with `-'
+      case $my_directory_path in
+        -*) my_directory_path="./$my_directory_path" ;;
+      esac
+
+      # While some portion of DIR does not yet exist...
+      while test ! -d "$my_directory_path"; do
+        # ...make a list in topmost first order.  Use a colon delimited
+       # list incase some portion of path contains whitespace.
+        my_dir_list="$my_directory_path:$my_dir_list"
+
+        # If the last portion added has no slash in it, the list is done
+        case $my_directory_path in */*) ;; *) break ;; esac
+
+        # ...otherwise throw away the child directory and loop
+        my_directory_path=`$ECHO "$my_directory_path" | $SED "$dirname"`
+      done
+      my_dir_list=`$ECHO $my_dir_list | $SED 's,:*$,,'`
+
+      save_mkdir_p_IFS="$IFS"; IFS=':'
+      for my_dir in $my_dir_list; do
+       IFS="$save_mkdir_p_IFS"
+        # mkdir can fail with a `File exist' error if two processes
+        # try to create one of the directories concurrently.  Don't
+        # stop in that case!
+        $MKDIR "$my_dir" 2>/dev/null || :
+      done
+      IFS="$save_mkdir_p_IFS"
+
+      # Bail out if we (or some other process) failed to create a directory.
+      test -d "$my_directory_path" || \
+        func_fatal_error "Failed to create \`$1'"
+    fi
+}
+
+
+# func_mktempdir
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible
+func_mktempdir ()
+{
+    my_template="${TMPDIR-/tmp}/libtool"
+
+    if test "$opt_dry_run" = ":"; then
+      # Return a directory name, but don't create it in dry-run mode
+      my_tmpdir="${my_template}-$$"
+    else
+
+      # If mktemp works, use that first and foremost
+      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+      if test ! -d "$my_tmpdir"; then
+        # Failing that, at least try and use $RANDOM to avoid a race
+        my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+        save_mktempdir_umask=`umask`
+        umask 0077
+        $MKDIR "$my_tmpdir"
+        umask $save_mktempdir_umask
+      fi
+
+      # If we're not in dry-run mode, bomb out on failure
+      test -d "$my_tmpdir" || \
+        func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
+    fi
+
+    $ECHO "$my_tmpdir"
+}
+
+
+# func_quote_for_eval arg
+# Aesthetically quote ARG to be evaled later.
+func_quote_for_eval ()
+{
+  my_arg="$1"
+
+  case $my_arg in
+    # Double-quote args containing other shell metacharacters.
+    # Many Bourne shells cannot handle close brackets correctly
+    # in scan sets, so we specify it separately.
+    *[[\@<:@\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \  ]]*|*@:>@*|"")
+      my_arg="\"$my_arg\""
+      ;;
+  esac
+
+  func_quote_for_eval_result="$my_arg"
+}
--- /dev/null
+++ 
/Users/gary/devel/savannah/libtool--gary--1.0/,,address@hidden/new-files-archive/./config/getopt.m4sh
@@ -0,0 +1,84 @@
+m4_if([# getopt.m4sh -- getopt helper functions                 -*- Autoconf 
-*-
+# Written by Gary V. Vaughan <address@hidden>, 2004
+
+# Copyright (C) 2004 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions.  There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# 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; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+])dnl
+
+m4_include([general.m4sh])
+
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
+{
+    $SED '/^# '$PROGRAM' (GNU /,/# warranty; / {
+        s/^# //; s/^# *$//;
+        s/\((C)\)[[ 0-9,-]]*\( [[1-9]][[0-9]]*\)/\1\2/;
+        p;
+     }; d' < "$progpath"
+     exit $EXIT_SUCCESS
+}
+
+# func_usage
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+    $SED '/^# Usage:/,/# -h/ {
+        s/^# //; s/^# *$//;
+       s/\$progname/'$progname'/;
+       p;
+    }; d' < "$progpath"
+    $ECHO
+    $ECHO "run \`$progname --help | more' for full usage"
+    exit $EXIT_SUCCESS
+}
+
+# func_help
+# Echo long help message to standard output and exit.
+func_help ()
+{
+    $SED '/^# Usage:/,/# Report bugs to/ {
+        s/^# //; s/^# *$//;
+       s:\$progname:'$progname':;
+       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' < "$progpath"
+    exit $EXIT_SUCCESS
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+    func_error "missing argument for $1"
+    exit_cmd=exit
+}
+
+exit_cmd=:


reply via email to

[Prev in Thread] Current Thread [Next in Thread]