[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: |
Thu, 9 Jun 2005 19:13:02 +0200 |
User-agent: |
Mutt/1.4.1i |
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.
The nice side-effect of this fix is that it will work with FC Fortran
where $ac_fcflags_srcext has to come immediately before the source file
name and thus this macro doesn't have to be adjusted. :)
I do realize that this macro takes into account probably age-old
Autoconf writeup and could probably be simplified for the current
version we require. However, for the sake of user macros and given
my fear of breaking backward-compatibility, I'd like to make this
least-invasive change.
See also the thread at
<http://lists.gnu.org/archive/html/autoconf/2005-06/msg00033.html>.
OK to apply?
Regards,
Ralf
* m4/libtool.m4 (_LT_COMPILER_OPTION, _LT_LINKER_OPTION): No
need for $ECHO here. Fix sed script syntax to be portable.
This should now put the pic-flag right after the last $*FLAGS
variable again, if any. Necessary for Fortran AC_FC_SRCEXT.
Index: m4/libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/libtool.m4,v
retrieving revision 1.125.2.58
diff -u -r1.125.2.58 libtool.m4
--- m4/libtool.m4 6 Jun 2005 16:13:23 -0000 1.125.2.58
+++ m4/libtool.m4 9 Jun 2005 16:55:32 -0000
@@ -1053,8 +1062,8 @@
# Note that $ac_compile itself does not contain backslashes and begins
# 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' \
+ lt_compile=`echo "$ac_compile" | $SED \
+ -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)
@@ -1475,8 +1484,8 @@
# (2) before a word containing "conftest.", or (3) at the end.
# 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' \
+ lt_compile=`echo "$ac_compile" | $SED \
+ -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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: _LT_COMPILER_OPTION/_LT_LINKER_OPTION/ sed fix,
Ralf Wildenhues <=