>>>>> "ILT" == Ian Lance Taylor <[EMAIL PROTECTED]> writes:

ILT> I personally don't really see why shell functions and unset matter
ILT> much for autoconf proper.  You can already use m4 and weird shell
ILT> constructs to implement the same functionality (e.g., instead of
ILT> unsetting a cache variable, set it to the empty string, and test for
ILT> that when necessary).  Sure, these features could make the configure
ILT> (not configure.in) script much more attractive, but in an ideal world
ILT> no ordinary person should have to look at the configure script.
ILT> People do have to look at the configure script in practice, but this
ILT> problem will not be solved by using unset or shell functions.

You might want to unset CDPATH, LANG, LC_ALL, LC_MESSAGES.

I agree that autoconf should support machines of Decstation 3100
vintage (10 years or so).

I was wrong when I said XEmacs' configure indiscriminately uses
`unset'.  In fact it does something like this:


if test -n "$ZSH_VERSION"; then
  dnl zsh's Bourne shell emulation options
  setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
  setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
  setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
  setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
  dnl zsh-3.1-beta drops core on the following
  dnl unset CDPATH
  if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
elif test -n "$BASH_VERSION"; then
  dnl Use Posix mode with bash
  set -o posix
  unset CDPATH
else
  if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
fi


I know fanatics who do

mv /bin/zsh /bin/sh


Purists will note we use

test -n "$foo"

instead of

test "x$foo" != "x"


Hmmm.  The latter certainly does look more portable...but it's so ugly...

Reply via email to