[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
fix for quoting problem in as_tr_sh and as_tr_cpp
From: |
Paul Eggert |
Subject: |
fix for quoting problem in as_tr_sh and as_tr_cpp |
Date: |
20 Oct 2003 16:29:24 -0700 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
The following shell script illustrates a bizarre quoting bug in
autoconf's implementation of as_tr_sh and as_tr_cpp:
touch 'y%s+%pp%;address@hidden'
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
ac_header=stdio.h
echo "ac_cv_header_$ac_header" | $as_tr_sh
This script outputs "ac_cv_header_ptdio.h" rather than the desired
"ac_cv_header_stdio_h".
I installed this patch.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/autoconf/autoconf/ChangeLog,v
retrieving revision 1.2287
diff -p -u -r1.2287 ChangeLog
--- ChangeLog 20 Oct 2003 16:18:26 -0000 1.2287
+++ ChangeLog 20 Oct 2003 23:24:08 -0000
@@ -1,3 +1,9 @@
+2003-10-20 Paul Eggert <address@hidden>
+
+ * lib/m4sugar/m4sh.m4 (_AS_TR_SH_PREPARE, _AS_TR_CPP_PREPARE):
+ Use 'eval', so that the resulting configure scripts work even if
+ the current directory has a weird file name like
'y%s+%pp%;address@hidden'.
+
2003-10-20 Daniel Jacobowitz <address@hidden>
* lib/autoconf/lang.m4 (AC_LANG_WERROR): New macro.
Index: lib/m4sugar/m4sh.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/m4sugar/m4sh.m4,v
retrieving revision 1.103
diff -p -u -r1.103 m4sh.m4
--- lib/m4sugar/m4sh.m4 15 Oct 2003 22:56:23 -0000 1.103
+++ lib/m4sugar/m4sh.m4 20 Oct 2003 23:24:08 -0000
@@ -938,7 +938,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
m4_defun([_AS_TR_SH_PREPARE],
[AS_REQUIRE([_AS_CR_PREPARE])dnl
# Sed expression to map a string onto a valid variable name.
-as_tr_sh="sed y%*+%pp%;s%[[^_$as_cr_alnum]]%_%g"
+as_tr_sh="eval sed 'y%*+%pp%;s%[[^_$as_cr_alnum]]%_%g'"
])
@@ -960,7 +960,7 @@ AS_LITERAL_IF([$1],
m4_defun([_AS_TR_CPP_PREPARE],
[AS_REQUIRE([_AS_CR_PREPARE])dnl
# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[[^_$as_cr_alnum]]%_%g"
+as_tr_cpp="eval sed
'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[[^_$as_cr_alnum]]%_%g'"
])
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- fix for quoting problem in as_tr_sh and as_tr_cpp,
Paul Eggert <=