Separate part of _LT_SETUP into other macros, detect ECHO sooner.

* libltdl/m4/libtool.m4 (_LT_PREPARE_SED_QUOTE_VARS): New macro,
extracted from...
(_LT_SETUP): ... here.  Require _LT_PROG_ECHO_BACKSLASH sooner.
This commit is contained in:
Paolo Bonzini 2008-11-07 14:47:19 +01:00
parent bf5eab9d04
commit cdeb1af511
2 changed files with 32 additions and 18 deletions

View File

@ -1,3 +1,10 @@
2008-11-10 Paolo Bonzini <bonzini@gnu.org>
Separate part of _LT_SETUP into other macros, detect ECHO sooner.
* libltdl/m4/libtool.m4 (_LT_PREPARE_SED_QUOTE_VARS): New macro,
extracted from...
(_LT_SETUP): ... here. Require _LT_PROG_ECHO_BACKSLASH sooner.
2008-11-10 Paolo Bonzini <bonzini@gnu.org>
Fix quoting when config.status generates libtool config.

43
libltdl/m4/libtool.m4 vendored
View File

@ -138,6 +138,9 @@ m4_defun([_LT_FILEUTILS_DEFAULTS],
m4_defun([_LT_SETUP],
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
_LT_DECL([], [host_alias], [0], [The host system])dnl
_LT_DECL([], [host], [0])dnl
_LT_DECL([], [host_os], [0])dnl
@ -179,7 +182,6 @@ fi
_LT_CHECK_OBJDIR
m4_require([_LT_TAG_COMPILER])dnl
_LT_PROG_ECHO_BACKSLASH
case $host_os in
aix3*)
@ -193,23 +195,6 @@ aix3*)
;;
esac
# Sed substitution that helps us do robust quoting. It backslashifies
# metacharacters that are still active within double-quoted strings.
sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
# Same as above, but do not quote variable references.
double_quote_subst='s/\([["`\\]]\)/\\\1/g'
# Sed substitution to delay expansion of an escaped shell variable in a
# double_quote_subst'ed string.
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
# Sed substitution to delay expansion of an escaped single quote.
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
# Sed substitution to avoid accidental globbing in evaled expressions
no_glob_subst='s/\*/\\\*/g'
# Global variables:
ofile=libtool
can_build_shared=yes
@ -250,6 +235,28 @@ _LT_CONFIG_COMMANDS
])# _LT_SETUP
# _LT_PREPARE_SED_QUOTE_VARS
# --------------------------
# Define a few sed substitution that help us do robust quoting.
m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
[# Backslashify metacharacters that are still active within
# double-quoted strings.
sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
# Same as above, but do not quote variable references.
double_quote_subst='s/\([["`\\]]\)/\\\1/g'
# Sed substitution to delay expansion of an escaped shell variable in a
# double_quote_subst'ed string.
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
# Sed substitution to delay expansion of an escaped single quote.
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
# Sed substitution to avoid accidental globbing in evaled expressions
no_glob_subst='s/\*/\\\*/g'
])
# _LT_PROG_LTMAIN
# ---------------
# Note that this code is called both from `configure', and `config.status'