]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
To take full advantage of this, libtool must be bootstrapped with
authorGary V. Vaughan <gary@gnu.org>
Wed, 28 Jul 2004 14:57:28 +0000 (14:57 +0000)
committerGary V. Vaughan <gary@gnu.org>
Wed, 28 Jul 2004 14:57:28 +0000 (14:57 +0000)
CVS autoconf, otherwise pdksh chokes on some nested escaped quotes
from libtool.m4.  Using CVS autoconf protects configure from
non-bourne compatible shells in the same way this changeset
protects libtool and libtoolize:

* libtoolize.in: Include latest CVS autoconf AS_SHELL_SANITIZE
expansion to make various shells fully bourne compatible.
* ltmain.in: Ditto.
* m4/libtool.m4 (AC_PATH_TOOL_PREFIX): Remove spurious quotes, the
RHS of = assignment is not IFS split.
(_LT_LANG_CXX_CONFIG): Ditto.
(AC_LIBTOOL_POSTDEP_PREDEP): Ditto.

ChangeLog
libtoolize.in
ltmain.in
m4/libtool.m4

index fd98b1f728b5cd6ab0c25b855b3d5f77fdf41d73..6eb4a7501ef6d3905f279bb98e03bfa384db7d44 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2004-07-28  Gary V. Vaughan  <gary@gnu.org>
+
+       To take full advantage of this, libtool must be bootstrapped with
+       CVS autoconf, otherwise pdksh chokes on some nested escaped quotes
+       from libtool.m4.  Using CVS autoconf protects configure from
+       non-bourne compatible shells in the same way this changeset
+       protects libtool and libtoolize:
+
+       * libtoolize.in: Include latest CVS autoconf AS_SHELL_SANITIZE
+       expansion to make various shells fully bourne compatible.
+       * ltmain.in: Ditto.
+       * m4/libtool.m4 (AC_PATH_TOOL_PREFIX): Remove spurious quotes, the
+       RHS of = assignment is not IFS split.
+       (_LT_LANG_CXX_CONFIG): Ditto.
+       (AC_LIBTOOL_POSTDEP_PREDEP): Ditto.
+
 2004-07-27  Gary V. Vaughan  <gary@gnu.org>
 
        This change fixes another VPATH build bug, where the vcl.tmp
index e036bf7cd20c6cea22de601762d42eea9c7f6312..d5ec504fed27332990869ad51e46c2b2386e27f8 100644 (file)
 #
 # Report bugs to <bug-libtool@gnu.org>.
 
+# 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
+
 : ${CP="cp -f"}
 : ${LN_S="@LN_S@"}
 : ${MKDIR="mkdir"}
index aedcd4a289f70ea16545f31d2ceb883867370139..085a255e4dba891c06167a7a739a865389375614 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
-# See if we are running on zsh, and set the options which allow our
-# commands through without removal of \ escapes.
-if test -n "${ZSH_VERSION+set}" ; then
+# 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
 
 basename="s,^.*/,,g"
 
@@ -526,7 +533,7 @@ func_extract_archives () {
          darwin_curdir=`pwd`
          darwin_base_archive=`basename $darwin_archive`
          darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null`
-         if test -n "$darwin_arches"; then 
+         if test -n "$darwin_arches"; then
            darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
            darwin_arch=
            $show "$darwin_base_archive has multiple architectures $darwin_arches"
index abd101d630425fde57c64ba1bdb3b645be407af3..438118013b42e9bb6f78d94532bf79b425fdcdf0 100644 (file)
@@ -2169,7 +2169,7 @@ dnl not every word.  This closes a longstanding sh security hole.
       if test -n "$file_magic_test_file"; then
        case $deplibs_check_method in
        "file_magic "*)
-         file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+         file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
            $EGREP "$file_magic_regex" > /dev/null; then
@@ -5284,7 +5284,7 @@ if test -n "$compiler"; then
            # Commands to make compiler produce verbose output that lists
            # what "hidden" libraries, object files and flags are used when
            # linking a shared library.
-           output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP \"\-L\""
+           output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
          else
            # g++ 2.7 appears to require `-G' NOT `-shared' on this
            # platform.
@@ -5295,7 +5295,7 @@ if test -n "$compiler"; then
            # Commands to make compiler produce verbose output that lists
            # what "hidden" libraries, object files and flags are used when
            # linking a shared library.
-           output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP \"\-L\""
+           output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
          fi
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
@@ -5427,7 +5427,7 @@ if AC_TRY_EVAL(ac_compile); then
   # The `*' in the case matches for architectures that use `case' in
   # $output_verbose_cmd can trigger glob expansion during the loop
   # eval without this substitution.
-  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
+  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
 
   for p in `eval $output_verbose_link_cmd`; do
     case $p in