summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-26 06:04:22 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-26 06:04:22 +0000
commita4ccd46d31ea9d67756e60a105fb9c3c3c3d063a (patch)
tree43c5089956da47d91d11ef48d012e830c19415d0 /configure.in
parent6f8feb2276a21c4ff2a916d934e10ef6554cc6d3 (diff)
configure.in: non-portable shell behavior
* configure.in (unexpand_shvar): get rid of non-portable shell behavior on OpenBSD, so no extra quotes. [Bug #7959] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in8
1 files changed, 4 insertions, 4 deletions
diff --git a/configure.in b/configure.in
index c3477a3108..23b64d963c 100644
--- a/configure.in
+++ b/configure.in
@@ -3281,19 +3281,19 @@ shvar_to_cpp() {
}
unexpand_shvar() {
- local var=$1 val n v expr quote
+ local var=$1 val n v expr
shift
test "$#" -eq 0 && return
- quote=['s/${[^${}"]*}/"&"/g']
+ quote=['']
for n do
eval v='"$'$n'"'
- v="`echo \"$v\" | sed -e \"$quote\" -e ['s/[][$|.\\?*]/\\\\&/g']`"
+ v="`echo \"$v\" | sed -e ['s/${[^${}"]*}/"&"/g'] -e ['s/[][$|.\\?*]/\\\\&/g']`"
if test -n "$v"; then
expr=["${expr};s|"'\("[^$"]*\)'"$v|\\1\${$n}\"|g"]
AS_CASE(["$v"], [*'${'*'}'*], [expr=["$expr;s|$v|\"\${$n}\"|g"]])
fi
done
- expr=["${quote}${expr};"'s/"\(\${[^${}"]*}\)"/\1/g']
+ expr=['s/${[^${}"]*}/"&"/g;'"${expr};"'s/"\(\${[^${}"]*}\)"/\1/g']
eval $var='"`echo \"\\\"${'$var'}\\\"\" | sed \"$expr;s/\\\"\\\"//g;s/^\\\"//;s/\\\"\\\$//\"`"'
}