From 08afc4c4919e3e6681a789d7b26cf044ce25c02a Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Mon, 13 Feb 2006 16:52:38 +0000 Subject: [PATCH] =?utf8?q?*=20ltmain.in=20:=20?= =?utf8?q?Add=20=5FAS=5FBOURNE=5FCOMPATIBLE=20code=20from=20Autoconf,=20to?= =?utf8?q?=20fix=20issues=20with=20zsh=20and=20other=20shells.=20Reported?= =?utf8?q?=20by=20David=20G=C3=B3mez=20Espinosa=20.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- ChangeLog | 6 ++++++ ltmain.in | 28 +++++++++++++++++++++++++--- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 56b3ed39e..9fa3542a8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-02-13 Ralf Wildenhues + + * ltmain.in : Add _AS_BOURNE_COMPATIBLE + code from Autoconf, to fix issues with zsh and other shells. + Reported by David Gómez Espinosa . + 2006-02-05 Ralf Wildenhues * ltmain.in (extracted_archives, extracted_serial): New globals. diff --git a/ltmain.in b/ltmain.in index 981cc3129..154965004 100644 --- a/ltmain.in +++ b/ltmain.in @@ -46,11 +46,19 @@ PACKAGE=@PACKAGE@ VERSION=@VERSION@ TIMESTAMP="@TIMESTAMP@" -# 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 (taken from Autoconf:_AS_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 +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh # Check that we have a working $echo. if test "X$1" = X--no-reexec; then @@ -5271,6 +5279,20 @@ EOF Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' +# Be Bourne compatible (taken from Autoconf:_AS_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 +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +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 -- 2.47.3