From: Akim Demaille Date: Tue, 14 Nov 2000 11:01:44 +0000 (+0000) Subject: * acgeneral.m4 (_AC_INIT_DEFAULTS_ENVIRONMENT): Rename as... X-Git-Tag: autoconf-2.50~424 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d18e3cbb5785f7fb1ce62d9dd23e5bc6040f9f8d;p=thirdparty%2Fautoconf.git * acgeneral.m4 (_AC_INIT_DEFAULTS_ENVIRONMENT): Rename as... * m4sh.m4 (AS_SHELL_SANITIZE): this. --- diff --git a/ChangeLog b/ChangeLog index 7fb014c9c..0e4565162 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-11-14 Akim Demaille + + * acgeneral.m4 (_AC_INIT_DEFAULTS_ENVIRONMENT): Rename as... + * m4sh.m4 (AS_SHELL_SANITIZE): this. + 2000-11-14 Akim Demaille * tests/atspecific.m4 (_AT_CHECK_AC_MACRO): Don't neutralize diff --git a/acgeneral.m4 b/acgeneral.m4 index f6b0200d0..6f9987fe3 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -742,41 +742,6 @@ gives unlimited permission to copy, distribute and modify it.])dnl ]) -# _AC_INIT_DEFAULTS_ENVIRONMENT -# ----------------------------- -# Tune the behavior of the shell. -m4_define([_AC_INIT_DEFAULTS_ENVIRONMENT], -[# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi - -_AS_UNSET_PREPARE - -# NLS nuisances. -AS_UNSET([LANG], [C]) -AS_UNSET([LC_ALL], [C]) -AS_UNSET([LC_TIME], [C]) -AS_UNSET([LC_CTYPE], [C]) -AS_UNSET([LANGUAGE], [C]) -AS_UNSET([LC_COLLATE], [C]) -AS_UNSET([LC_NUMERIC], [C]) -AS_UNSET([LC_MESSAGES], [C]) - -# IFS -# We need space, tab and new line, in precisely that order. -ac_nl=' -' -IFS=" $ac_nl" - -# CDPATH. -AS_UNSET([CDPATH], [:]) -])# _AC_INIT_DEFAULTS_ENVIRONMENT - - # _AC_INIT_DEFAULTS_FDS # --------------------- # Set up the file descriptors used by `configure'. @@ -811,7 +776,7 @@ exec AS_MESSAGE_LOG_FD>>config.log m4_define([_AC_INIT_DEFAULTS], [m4_divert_push([DEFAULTS])dnl -_AC_INIT_DEFAULTS_ENVIRONMENT +AS_SHELL_SANITIZE cat >config.log << EOF This file contains any messages produced by compilers while @@ -3857,7 +3822,7 @@ debug=false as_me=`echo "$[0]" | sed 's,.*/,,'` SHELL=${CONFIG_SHELL-/bin/sh} -_AC_INIT_DEFAULTS_ENVIRONMENT +AS_SHELL_SANITIZE _AC_INIT_DEFAULTS_FDS cat >&AS_MESSAGE_LOG_FD << EOF diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index f6b0200d0..6f9987fe3 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -742,41 +742,6 @@ gives unlimited permission to copy, distribute and modify it.])dnl ]) -# _AC_INIT_DEFAULTS_ENVIRONMENT -# ----------------------------- -# Tune the behavior of the shell. -m4_define([_AC_INIT_DEFAULTS_ENVIRONMENT], -[# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi - -_AS_UNSET_PREPARE - -# NLS nuisances. -AS_UNSET([LANG], [C]) -AS_UNSET([LC_ALL], [C]) -AS_UNSET([LC_TIME], [C]) -AS_UNSET([LC_CTYPE], [C]) -AS_UNSET([LANGUAGE], [C]) -AS_UNSET([LC_COLLATE], [C]) -AS_UNSET([LC_NUMERIC], [C]) -AS_UNSET([LC_MESSAGES], [C]) - -# IFS -# We need space, tab and new line, in precisely that order. -ac_nl=' -' -IFS=" $ac_nl" - -# CDPATH. -AS_UNSET([CDPATH], [:]) -])# _AC_INIT_DEFAULTS_ENVIRONMENT - - # _AC_INIT_DEFAULTS_FDS # --------------------- # Set up the file descriptors used by `configure'. @@ -811,7 +776,7 @@ exec AS_MESSAGE_LOG_FD>>config.log m4_define([_AC_INIT_DEFAULTS], [m4_divert_push([DEFAULTS])dnl -_AC_INIT_DEFAULTS_ENVIRONMENT +AS_SHELL_SANITIZE cat >config.log << EOF This file contains any messages produced by compilers while @@ -3857,7 +3822,7 @@ debug=false as_me=`echo "$[0]" | sed 's,.*/,,'` SHELL=${CONFIG_SHELL-/bin/sh} -_AC_INIT_DEFAULTS_ENVIRONMENT +AS_SHELL_SANITIZE _AC_INIT_DEFAULTS_FDS cat >&AS_MESSAGE_LOG_FD << EOF diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4 index dfe60c12e..c205d9b85 100644 --- a/lib/m4sugar/m4sh.m4 +++ b/lib/m4sugar/m4sh.m4 @@ -50,8 +50,47 @@ divert(-1)# -*- Autoconf -*- # and many other people. +## ------------------------- ## +## 1. Sanitizing the shell. ## +## ------------------------- ## + +# AS_SHELL_SANITIZE +# ----------------- +# Try to be as Bourne and/or POSIX as possible. +m4_defun([AS_SHELL_SANITIZE], +[# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +_AS_UNSET_PREPARE + +# NLS nuisances. +AS_UNSET([LANG], [C]) +AS_UNSET([LC_ALL], [C]) +AS_UNSET([LC_TIME], [C]) +AS_UNSET([LC_CTYPE], [C]) +AS_UNSET([LANGUAGE], [C]) +AS_UNSET([LC_COLLATE], [C]) +AS_UNSET([LC_NUMERIC], [C]) +AS_UNSET([LC_MESSAGES], [C]) + +# IFS +# We need space, tab and new line, in precisely that order. +ac_nl=' +' +IFS=" $ac_nl" + +# CDPATH. +AS_UNSET([CDPATH], [:]) +]) + + ## ----------------------------- ## -## 1. Wrappers around builtins. ## +## 2. Wrappers around builtins. ## ## ----------------------------- ## # This section is lexicographically sorted. @@ -119,7 +158,7 @@ m4_define([AS_EXIT], ## ------------------------------------------ ## -## 2. Error and warnings at the shell level. ## +## 3. Error and warnings at the shell level. ## ## ------------------------------------------ ## # If AS_MESSAGE_LOG_FD is defined, shell messages are duplicated there @@ -204,7 +243,7 @@ m4_define([AS_ERROR], ## ------------------------------------------- ## -## 3. Portable versions of common file utils. ## +## 4. Portable versions of common file utils. ## ## ------------------------------------------- ## # This section is lexicographically sorted. @@ -259,7 +298,7 @@ AS_DIRNAME_SED([$1])]) ## ------------------ ## -## 4. Common idioms. ## +## 5. Common idioms. ## ## ------------------ ## # This section is lexicographically sorted. diff --git a/m4sh.m4 b/m4sh.m4 index dfe60c12e..c205d9b85 100644 --- a/m4sh.m4 +++ b/m4sh.m4 @@ -50,8 +50,47 @@ divert(-1)# -*- Autoconf -*- # and many other people. +## ------------------------- ## +## 1. Sanitizing the shell. ## +## ------------------------- ## + +# AS_SHELL_SANITIZE +# ----------------- +# Try to be as Bourne and/or POSIX as possible. +m4_defun([AS_SHELL_SANITIZE], +[# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +_AS_UNSET_PREPARE + +# NLS nuisances. +AS_UNSET([LANG], [C]) +AS_UNSET([LC_ALL], [C]) +AS_UNSET([LC_TIME], [C]) +AS_UNSET([LC_CTYPE], [C]) +AS_UNSET([LANGUAGE], [C]) +AS_UNSET([LC_COLLATE], [C]) +AS_UNSET([LC_NUMERIC], [C]) +AS_UNSET([LC_MESSAGES], [C]) + +# IFS +# We need space, tab and new line, in precisely that order. +ac_nl=' +' +IFS=" $ac_nl" + +# CDPATH. +AS_UNSET([CDPATH], [:]) +]) + + ## ----------------------------- ## -## 1. Wrappers around builtins. ## +## 2. Wrappers around builtins. ## ## ----------------------------- ## # This section is lexicographically sorted. @@ -119,7 +158,7 @@ m4_define([AS_EXIT], ## ------------------------------------------ ## -## 2. Error and warnings at the shell level. ## +## 3. Error and warnings at the shell level. ## ## ------------------------------------------ ## # If AS_MESSAGE_LOG_FD is defined, shell messages are duplicated there @@ -204,7 +243,7 @@ m4_define([AS_ERROR], ## ------------------------------------------- ## -## 3. Portable versions of common file utils. ## +## 4. Portable versions of common file utils. ## ## ------------------------------------------- ## # This section is lexicographically sorted. @@ -259,7 +298,7 @@ AS_DIRNAME_SED([$1])]) ## ------------------ ## -## 4. Common idioms. ## +## 5. Common idioms. ## ## ------------------ ## # This section is lexicographically sorted.