[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: configure script question ?
From: |
June Fang |
Subject: |
Re: configure script question ? |
Date: |
Fri, 24 Feb 2006 23:43:03 +0800 |
and what's more, the entire lines:
15 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16 emulate sh
i guess it means execuate "emulate sh" in subshell, and
if it success, do it in our current shell ? am i right ?
On 2/24/06, June Fang <address@hidden> wrote:
> sorry in advance if stupid question, but i am a really new bie.
>
> i found the following shell script in the configure file of autoconf-2.59
> but dose that means ?
> 15 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
> 16 emulate sh
> 17 NULLCMD=:
> 18 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
> 19 # is contrary to our usage. Disable this feature.
> 20 alias -g '${1+"$@"}'='"$@"'
> 21 elif test -n "${BASH_VERSION+set}" && (set -o posix)
> >/dev/null 2>&1; then
> 22 set -o posix
> 23 fi
>
> i know ${ZSH_VERSION} means variable substituting;
> and ${ZSH_VERSION:+set} means "If parameter is null or unset, nothing
> ~~ Note the `:`
> is substituted, otherwise the expansion of word is substituted."
> ---- from Bash reference manual
>
> but what dose ${ZSH_VERSION+set} without the `:` means ?
>
> thanks in advance.
>