From: Ralf Wildenhues Date: Sun, 11 Feb 2007 11:07:08 +0000 (+0000) Subject: * libltdl/config/general.m4sh (sed_double_backslash): Replace X-Git-Tag: release-2-1b~203 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8faf59a4215bd5bbba76b3804ced0c01e26ceb6c;p=thirdparty%2Flibtool.git * libltdl/config/general.m4sh (sed_double_backslash): Replace POSIX sed script with a hack that treats up to 10 backslashes in the input correctly and is portable to Solaris /bin/sed. --- diff --git a/ChangeLog b/ChangeLog index 0edfc1576..c225689c1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-02-08 Ralf Wildenhues + + * libltdl/config/general.m4sh (sed_double_backslash): Replace + POSIX sed script with a hack that treats up to 10 backslashes + in the input correctly and is portable to Solaris /bin/sed. + 2007-02-08 Ralf Wildenhues * tests/testsuite.at (LT_AT_TAG): Skip also if the compiler diff --git a/libltdl/config/general.m4sh b/libltdl/config/general.m4sh index 8340a71a1..4e1d1f1bd 100644 --- a/libltdl/config/general.m4sh +++ b/libltdl/config/general.m4sh @@ -1,7 +1,7 @@ m4_if([# general.m4sh -- general shell script boiler plate -*- Autoconf -*- # Written by Gary V. Vaughan , 2004 -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -100,10 +100,29 @@ double_quote_subst='s/\([["`\\]]\)/\\\1/g' # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of -# four `\'s followed by two `\'s and then a '$'. `\' that '$'. Note -# that the embedded single quotes serve only to enhance readability. -sed_double_backslash='s/^\(\(''\\\\''\\\\''\)*''\\\\''\)\$/\1\\$/; - s/\([[^\\]]\(''\\\\''\\\\''\)*''\\\\''\)\$/\1\\$/g' +# four `\'s followed by two `\'s and then a '$'. `\' that '$'. +# +# Note in the first, non-portable but general version, the embedded single +# quotes serve only to enhance readability. +#sed_double_backslash='s/^\(\(''\\\\''\\\\''\)*''\\\\''\)\$/\1\\$/; +# s/\([[^\\]]\(''\\\\''\\\\''\)*''\\\\''\)\$/\1\\$/g' +bs='\\' +bs2='\\\\' +bs4='\\\\\\\\' +dollar='\$' +sed_double_backslash="\ + s/^$bs2$dollar/$bs&/ + s/^$bs4$bs2$dollar/$bs&/ + s/^$bs4$bs4$bs2$dollar/$bs&/ + s/^$bs4$bs4$bs4$bs2$dollar/$bs&/ + s/^$bs4$bs4$bs4$bs4$bs2$dollar/$bs&/ + s/^$bs4$bs4$bs4$bs4$bs4$bs2$dollar/$bs&/ + s/\\([[^$bs]]\\)\\($bs2$dollar\\)/\\1$bs\\2/g + s/\\([[^$bs]]\\)\\($bs4$bs2$dollar\\)/\\1$bs\\2/g + s/\\([[^$bs]]\\)\\($bs4$bs4$bs2$dollar\\)/\\1$bs\\2/g + s/\\([[^$bs]]\\)\\($bs4$bs4$bs4$bs2$dollar\\)/\\1$bs\\2/g + s/\\([[^$bs]]\\)\\($bs4$bs4$bs4$bs4$bs2$dollar\\)/\\1$bs\\2/g + s/\\([[^$bs]]\\)\\($bs4$bs4$bs4$bs4$bs4$bs2$dollar\\)/\\1$bs\\2/g" # Standard options: opt_dry_run=false