[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: _LT_COMPILER_OPTION/_LT_LINKER_OPTION/ sed fix
From: |
Ralf Wildenhues |
Subject: |
FYI: _LT_COMPILER_OPTION/_LT_LINKER_OPTION/ sed fix |
Date: |
Sat, 11 Jun 2005 13:04:38 +0200 |
User-agent: |
Mutt/1.5.9i |
Hi Paolo,
* Paolo Bonzini wrote on Fri, Jun 10, 2005 at 07:44:05PM CEST:
> >As detailedly explained in the comment above this change, `$ECHO' is not
> >necessary instead of `echo'. Also, sed regex `?' is not portable (and
> >in fact not recognized by GNU sed 4.1.2), but \{0,1\} is.
>
> ? is plain wrong, since sed uses basic regular expressions.
I actually thought that but was not sure..
> No GNU sed ever recognized it; the unportable one is \? and the
> portable one is \{0,1\} as you wrote.
Thanks for confirming this. I have applied the patch as-is to HEAD and
branch-2-0. For branch-1-5 I have fixed (only) the sed script as well,
patch below.
Regards,
Ralf
* libtool.m4 (AC_LIBTOOL_COMPILER_OPTION, AC_LIBTOOL_PROG_CC_C_O):
Fix sed script syntax to be portable.
Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/libtool.m4,v
retrieving revision 1.314.2.91
diff -u -r1.314.2.91 libtool.m4
--- libtool.m4 6 Jun 2005 16:14:04 -0000 1.314.2.91
+++ libtool.m4 11 Jun 2005 11:01:07 -0000
@@ -605,7 +605,7 @@
# with a dollar sign (not a hyphen), so the echo should work correctly.
# The option is referenced via a variable to avoid confusing sed.
lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
@@ -997,7 +997,7 @@
# Note that $ac_compile itself does not contain backslashes and begins
# with a dollar sign (not a hyphen), so the echo should work correctly.
lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)