[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/3] Properly expand @configure_input@ in config.status.
From: |
Benoit Sigoure |
Subject: |
[PATCH 1/3] Properly expand @configure_input@ in config.status. |
Date: |
Tue, 18 Dec 2007 13:54:06 +0100 |
Fixes test 119.
* lib/autoconf/status.m4 (_AC_OUTPUT_FILE): Escape the
backslashes and ampersands in $configure_input before using
it in the sed replacement string to expand @address@hidden
Signed-off-by: Benoit Sigoure <address@hidden>
---
lib/autoconf/status.m4 | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/lib/autoconf/status.m4 b/lib/autoconf/status.m4
index 8afa9ba..9cb56f8 100644
--- a/lib/autoconf/status.m4
+++ b/lib/autoconf/status.m4
@@ -624,6 +624,13 @@ esac
_ACEOF
])dnl
+# Neutralize special characters interpreted by sed in replacement strings.
+case $configure_input in #(
+ *'&'*) ac_sed_conf_input=`AS_ECHO(["$configure_input"]) |
+ sed 's/\\\\/\\\\\\\\/g;s/&/\\\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+esac
+
# Neutralize VPATH when `$srcdir' = `.'.
# Shell code in configure.ac might set extrasub.
# FIXME: do we really want to maintain this feature?
@@ -635,7 +642,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
:t
[/@[a-zA-Z_][a-zA-Z_0-9]*@/!b]
dnl configure_input is a somewhat special, so we don't call AC_SUBST_TRACE.
-s&@configure_input@&$configure_input&;t t
+s&@configure_input@&$ac_sed_conf_input&;t t
dnl During the transition period, this is a special case:
s&@top_builddir@&$ac_top_builddir_sub&;t t[]AC_SUBST_TRACE([top_builddir])
dnl For this substitution see the witness macro _AC_HAVE_TOP_BUILD_PREFIX
above.
--
1.5.4.rc0.88.g7d4e-dirty