From: Gary V. Vaughan Date: Wed, 28 Jul 2004 14:57:28 +0000 (+0000) Subject: To take full advantage of this, libtool must be bootstrapped with X-Git-Tag: release-1-9b~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf79a985499a75c4d4bc6f3ab4ba14c239e3e21f;p=thirdparty%2Flibtool.git 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. --- diff --git a/ChangeLog b/ChangeLog index fd98b1f72..6eb4a7501 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2004-07-28 Gary V. Vaughan + + 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 This change fixes another VPATH build bug, where the vcl.tmp diff --git a/libtoolize.in b/libtoolize.in index e036bf7cd..d5ec504fe 100644 --- a/libtoolize.in +++ b/libtoolize.in @@ -47,6 +47,19 @@ # # Report bugs to . +# 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 aedcd4a28..085a255e4 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 abd101d63..438118013 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