autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NLS sanitization


From: Eric Blake
Subject: NLS sanitization
Date: Tue, 09 Oct 2007 21:49:30 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Any objections to this patch?  By my count, it shaves more than 50 forks
each from configure, config.status, and testsuite; for a noticeable effect
on Cygwin in the common case of LC_ALL being settable.  It bypasses the
setting of 14 other variables, each of which invokes 2 subshells and a
command substitution.

2007-10-09  Eric Blake  <address@hidden>

        Reduce number of forks at startup.
        * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Speed up NLS
        sanitization.
        * configure: Regenerate.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHDEvJ84KuGfSFAYARAi79AKCnI26VaOx7NCaFVlgrKNiqexx3aQCgtGd6
pVLroQZFOJU63V0H5Qhqm98=
=HlHk
-----END PGP SIGNATURE-----
>From 27347b8466bb2f9aaea9d0187b8be27bdf94ad08 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Tue, 9 Oct 2007 21:41:22 -0600
Subject: [PATCH] Reduce number of forks at startup.

* lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Speed up NLS
sanitization.
* configure: Regenerate.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog           |    5 +++++
 configure           |   10 ++++++----
 lib/m4sugar/m4sh.m4 |    5 +++--
 3 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 6f04cea..752db6f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2007-10-09  Eric Blake  <address@hidden>
 
+       Reduce number of forks at startup.
+       * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Speed up NLS
+       sanitization.
+       * configure: Regenerate.
+
        Improve header of bin/autoconf.
        * lib/m4sugar/m4sh.m4 (AS_INIT): Add a 'generated from' notice.
        * lib/autoconf/general.m4 (_AC_INIT_NOTICE): Override new notice
diff --git a/configure b/configure
index f132ece..d478f5d 100755
--- a/configure
+++ b/configure
@@ -127,14 +127,15 @@ PS1='$ '
 PS2='> '
 PS4='+ '
 
-# NLS nuisances.
+# NLS nuisances.  Try LC_ALL first, since it overrides others.
 for as_var in \
-  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_ALL LANG LANGUAGE LC_ADDRESS LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
   LC_TELEPHONE LC_TIME
 do
   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
     eval $as_var=C; export $as_var
+    eval test \$$ac_var = LC_ALL && break
   else
     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
   fi
@@ -3145,14 +3146,15 @@ PS1='$ '
 PS2='> '
 PS4='+ '
 
-# NLS nuisances.
+# NLS nuisances.  Try LC_ALL first, since it overrides others.
 for as_var in \
-  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_ALL LANG LANGUAGE LC_ADDRESS LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
   LC_TELEPHONE LC_TIME
 do
   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
     eval $as_var=C; export $as_var
+    eval test \$$ac_var = LC_ALL && break
   else
     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
   fi
diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4
index b9677bd..c2a8c2c 100644
--- a/lib/m4sugar/m4sh.m4
+++ b/lib/m4sugar/m4sh.m4
@@ -383,14 +383,15 @@ PS1='$ '
 PS2='> '
 PS4='+ '
 
-# NLS nuisances.
+# NLS nuisances.  Try LC_ALL first, since it overrides others.
 for as_var in \
-  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_ALL LANG LANGUAGE LC_ADDRESS LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
   LC_TELEPHONE LC_TIME
 do
   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
     eval $as_var=C; export $as_var
+    eval test \$$ac_var = LC_ALL && break
   else
     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
   fi
-- 
1.5.3.2


reply via email to

[Prev in Thread] Current Thread [Next in Thread]