summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary V. Vaughan <gary@gnu.org>2004-07-28 14:57:28 +0000
committerGary V. Vaughan <gary@gnu.org>2004-07-28 14:57:28 +0000
commitcf79a985499a75c4d4bc6f3ab4ba14c239e3e21f (patch)
tree5859fe8505d8d3a84a3afb56102d7643d13e8ed8
parentb0cf8fdd1667cc4fdae11a62f9b0bb12fd1de13e (diff)
downloadlibtool-cf79a985499a75c4d4bc6f3ab4ba14c239e3e21f.tar.gz
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.
-rw-r--r--ChangeLog16
-rw-r--r--libtoolize.in13
-rw-r--r--ltmain.in15
-rw-r--r--m4/libtool.m48
4 files changed, 44 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index fd98b1f7..6eb4a750 100644
--- 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
diff --git a/libtoolize.in b/libtoolize.in
index e036bf7c..d5ec504f 100644
--- a/libtoolize.in
+++ b/libtoolize.in
@@ -47,6 +47,19 @@
#
# 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"}
diff --git a/ltmain.in b/ltmain.in
index aedcd4a2..085a255e 100644
--- a/ltmain.in
+++ b/ltmain.in
@@ -24,11 +24,18 @@
# 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"
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index abd101d6..43811801 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -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