diff --git a/ChangeLog b/ChangeLog index 4b066061..0027f033 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2000-08-01 Akim Demaille + + * acgeneral.m4 (_AC_INIT_PREPARE_ENVIRONMENT): Neutralize also + LC_COLLATE and LC_NUMERIC. + * autoconf.m4: Don't rely on character ranges with tr. + * doc/autoconf.texi (Special Shell Variables): Adjust. + 2000-08-01 Akim Demaille * acfunctions.m4 (_AC_LIBOBJ_STRTOD, AC_FUNC_STRTOD, diff --git a/acgeneral.m4 b/acgeneral.m4 index 7df73195..0362c4f0 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -1826,8 +1826,11 @@ fi # NLS nuisances. AC_SHELL_UNSET([LANG], [C]) AC_SHELL_UNSET([LC_ALL], [C]) +AC_SHELL_UNSET([LC_TIME], [C]) AC_SHELL_UNSET([LC_CTYPE], [C]) AC_SHELL_UNSET([LANGUAGE], [C]) +AC_SHELL_UNSET([LC_COLLATE], [C]) +AC_SHELL_UNSET([LC_NUMERIC], [C]) AC_SHELL_UNSET([LC_MESSAGES], [C]) # IFS diff --git a/autoconf.in b/autoconf.in index 041b0878..a5a23038 100644 --- a/autoconf.in +++ b/autoconf.in @@ -76,14 +76,10 @@ echo \"\$help\" >&2 exit 1" # NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. if test "${LANG+set}" = set; then LANG=C; export LANG; fi if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi # ac_LF_and_DOT # We use echo to avoid assuming a particular line-breaking character. @@ -223,8 +219,11 @@ done # The warnings are the concatenation of 1. application's defaults, # 2. $WARNINGS, $3 command line options, in that order. # Set them in the order expected by the M4 macros: the converse. +alphabet='abcdefghijklmnopqrstuvwxyz' +ALPHABET='ABCDEFGHIJKLMNOPQRSTUVWXYZ' _ac_warnings= -for warning in `IFS=,; echo syntax,$WARNINGS,$warnings | tr 'A-Z' 'a-z'` +for warning in `IFS=,; echo syntax,$WARNINGS,$warnings | + tr $ALPHABET $alphabet` do test -n $warning || continue _ac_warnings="$warning"`test -n "$_ac_warnings" && echo ",$_ac_warnings"` diff --git a/autoconf.sh b/autoconf.sh index 041b0878..a5a23038 100644 --- a/autoconf.sh +++ b/autoconf.sh @@ -76,14 +76,10 @@ echo \"\$help\" >&2 exit 1" # NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. if test "${LANG+set}" = set; then LANG=C; export LANG; fi if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi # ac_LF_and_DOT # We use echo to avoid assuming a particular line-breaking character. @@ -223,8 +219,11 @@ done # The warnings are the concatenation of 1. application's defaults, # 2. $WARNINGS, $3 command line options, in that order. # Set them in the order expected by the M4 macros: the converse. +alphabet='abcdefghijklmnopqrstuvwxyz' +ALPHABET='ABCDEFGHIJKLMNOPQRSTUVWXYZ' _ac_warnings= -for warning in `IFS=,; echo syntax,$WARNINGS,$warnings | tr 'A-Z' 'a-z'` +for warning in `IFS=,; echo syntax,$WARNINGS,$warnings | + tr $ALPHABET $alphabet` do test -n $warning || continue _ac_warnings="$warning"`test -n "$_ac_warnings" && echo ",$_ac_warnings"` diff --git a/bin/autoconf.in b/bin/autoconf.in index 041b0878..a5a23038 100644 --- a/bin/autoconf.in +++ b/bin/autoconf.in @@ -76,14 +76,10 @@ echo \"\$help\" >&2 exit 1" # NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. if test "${LANG+set}" = set; then LANG=C; export LANG; fi if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi # ac_LF_and_DOT # We use echo to avoid assuming a particular line-breaking character. @@ -223,8 +219,11 @@ done # The warnings are the concatenation of 1. application's defaults, # 2. $WARNINGS, $3 command line options, in that order. # Set them in the order expected by the M4 macros: the converse. +alphabet='abcdefghijklmnopqrstuvwxyz' +ALPHABET='ABCDEFGHIJKLMNOPQRSTUVWXYZ' _ac_warnings= -for warning in `IFS=,; echo syntax,$WARNINGS,$warnings | tr 'A-Z' 'a-z'` +for warning in `IFS=,; echo syntax,$WARNINGS,$warnings | + tr $ALPHABET $alphabet` do test -n $warning || continue _ac_warnings="$warning"`test -n "$_ac_warnings" && echo ",$_ac_warnings"` diff --git a/doc/autoconf.texi b/doc/autoconf.texi index ae8baf1d..a408c562 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -4930,20 +4930,28 @@ fall back, see @ref{Limitations of Builtins}. @item LANG @itemx LC_ALL +@itemx LC_TIME @itemx LC_CTYPE @itemx LANGUAGE +@itemx LC_COLLATE +@itemx LC_NUMERIC @itemx LC_MESSAGES @evindex LANG @evindex LC_ALL +@evindex LC_TIME @evindex LC_CTYPE @evindex LANGUAGE +@evindex LC_COLLATE +@evindex LC_NUMERIC @evindex LC_MESSAGES These must not be set unconditionally because not all systems understand e.g. @samp{LANG=C} (notably SCO). Fixing @code{LC_MESSAGES} prevents Solaris @command{sh} from translating var values in @code{set}! Non-C -@code{LC_CTYPE} values break the ctype check. @code{LANGUAGE} is a -@sc{gnu} extension. +@code{LC_CTYPE} values break the ctype check. Fixing @code{LC_COLLATE} +prevents accented characters from being match by @samp{[a-z]} etc. You +are nevertheless encouraged to list explicitly the characters instead of +relying on ranges. @code{LANGUAGE} is a @sc{gnu} extension. @emph{If} one of these variables is set, you should try to unset it, using @samp{C} as a fall back value. see @ref{Limitations of Builtins}, diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 7df73195..0362c4f0 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -1826,8 +1826,11 @@ fi # NLS nuisances. AC_SHELL_UNSET([LANG], [C]) AC_SHELL_UNSET([LC_ALL], [C]) +AC_SHELL_UNSET([LC_TIME], [C]) AC_SHELL_UNSET([LC_CTYPE], [C]) AC_SHELL_UNSET([LANGUAGE], [C]) +AC_SHELL_UNSET([LC_COLLATE], [C]) +AC_SHELL_UNSET([LC_NUMERIC], [C]) AC_SHELL_UNSET([LC_MESSAGES], [C]) # IFS diff --git a/man/autoconf.1 b/man/autoconf.1 index 4400c77d..9973b37b 100644 --- a/man/autoconf.1 +++ b/man/autoconf.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.022. -.TH AUTOCONF "1" "July 2000" "GNU autoconf 2.14a" FSF +.TH AUTOCONF "1" "August 2000" "GNU autoconf 2.14a" FSF .SH NAME autoconf \- Generate configuration scripts .SH SYNOPSIS