[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20-as-shell-sanitize.patch
From: |
Akim Demaille |
Subject: |
20-as-shell-sanitize.patch |
Date: |
12 Nov 2000 18:59:20 +0100 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands) |
Index: ChangeLog
from Akim Demaille <address@hidden>
* acgeneral.m4 (_AC_INIT_DEFAULTS_ENVIRONMENT): Rename as...
* m4sh.m4 (AS_SHELL_SANITIZE): this.
Index: acgeneral.m4
--- acgeneral.m4 Sun, 12 Nov 2000 12:34:34 +0100 akim (ace/27_acgeneral.
1.169.8.91 644)
+++ acgeneral.m4 Sun, 12 Nov 2000 16:09:55 +0100 akim (ace/27_acgeneral.
1.169.8.91 644)
@@ -742,41 +742,6 @@ m4_define([_AC_INIT_COPYRIGHT],
])
-# _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 @@ m4_define([_AC_INIT_DEFAULTS_FDS],
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 @@ m4_define([_AC_OUTPUT_CONFIG_STATUS],
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
Index: m4sh.m4
--- m4sh.m4 Sat, 11 Nov 2000 18:31:28 +0100 akim (ace/b/41_m4sh.m4 1.7 644)
+++ m4sh.m4 Sun, 12 Nov 2000 16:08:31 +0100 akim (ace/b/41_m4sh.m4 1.7 644)
@@ -50,8 +50,47 @@
# 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 @@ m4_define([AS_DIRNAME],
## ------------------ ##
-## 4. Common idioms. ##
+## 5. Common idioms. ##
## ------------------ ##
# This section is lexicographically sorted.
- 20-as-shell-sanitize.patch,
Akim Demaille <=