mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
configure.in: fix for old shells
* configure.in (rm, shvar_to_cpp, unexpand_shvar): local is not available on old shells. * configure.in (shvar_to_cpp): escape quotes for old shells. [Bug #7959] [Bug #8071] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fc82b5f4c0
commit
120e2219f3
2 changed files with 43 additions and 35 deletions
|
@ -1,3 +1,11 @@
|
|||
Wed Mar 13 13:06:26 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* configure.in (rm, shvar_to_cpp, unexpand_shvar): local is not
|
||||
available on old shells.
|
||||
|
||||
* configure.in (shvar_to_cpp): escape quotes for old shells.
|
||||
[Bug #7959] [Bug #8071]
|
||||
|
||||
Wed Mar 13 11:11:07 2013 Shugo Maeda <shugo@ruby-lang.org>
|
||||
|
||||
* object.c (Init_Object): remove Module#used, which has been
|
||||
|
|
70
configure.in
70
configure.in
|
@ -16,15 +16,15 @@ AC_DISABLE_OPTION_CHECKING
|
|||
#
|
||||
# TODO: remove this hack when AC_PREREQ() becomes 2.70 or later.
|
||||
rm() {
|
||||
local recursive
|
||||
rm_recursive=''
|
||||
for arg do
|
||||
AS_CASE("$arg",
|
||||
[--*], [],
|
||||
[-*r*], [break],
|
||||
[conftest.*], [if test -d "$arg"; then recursive=-r; break; fi],
|
||||
[conftest.*], [if test -d "$arg"; then rm_recursive=-r; break; fi],
|
||||
[])
|
||||
done
|
||||
command rm $recursive "$@"
|
||||
command rm $rm_recursive "$@"
|
||||
}
|
||||
|
||||
{ # environment section
|
||||
|
@ -3259,44 +3259,44 @@ AS_CASE(["$target_os"],
|
|||
])
|
||||
|
||||
shvar_to_cpp() {
|
||||
local var="$1" val="$2"
|
||||
local exec_prefix_pat="`echo \"${exec_prefix}\" | sed 's/\\./\\\\./g'`"
|
||||
local arch_pat="`echo \"${arch}\" | sed 's/\\./\\\\./g'`"
|
||||
local sitearch_pat="`echo \"${sitearch}\" | sed 's/\\./\\\\./g'`"
|
||||
val="`echo '"'"${val}"'"' |
|
||||
var="$1" val="$2"
|
||||
exec_prefix_pat="`echo \"${exec_prefix}\" | sed 's/\\./\\\\./g'`"
|
||||
arch_pat="`echo \"${arch}\" | sed 's/\\./\\\\./g'`"
|
||||
sitearch_pat="`echo \"${sitearch}\" | sed 's/\\./\\\\./g'`"
|
||||
val="`echo '\"'\"${val}\"'\"' |
|
||||
sed \
|
||||
-e 's/\${\([[A-Z][A-Z_]]*\)}/"\1"/g' \
|
||||
-e 's|\${sitearchlibdir}|'"${sitearchlibdir}|g" \
|
||||
-e 's|\${sitearchincludedir}|'"${sitearchincludedir}|g" \
|
||||
-e 's|\${archlibdir}|'"${archlibdir}|g" \
|
||||
-e 's|\${archincludedir}|'"${archincludedir}|g" \
|
||||
-e 's|\${libdir}|'"${libdir}|g" \
|
||||
-e 's/\${ruby_version}/"RUBY_LIB_VERSION"/g' \
|
||||
-e 's/\${arch}/"arch"/g' \
|
||||
-e 's/\${sitearch}/"arch"/g' \
|
||||
-e 's/\${vendorarchdir}/"RUBY_VENDOR_ARCH_LIB"/g' \
|
||||
-e 's/\${sitearchdir}/"RUBY_SITE_ARCH_LIB"/g' \
|
||||
-e 's/\${vendorlibdir}/"RUBY_VENDOR_LIB2"/g' \
|
||||
-e 's/\${sitelibdir}/"RUBY_SITE_LIB2"/g' \
|
||||
-e 's/\${vendordir}/"RUBY_VENDOR_LIB"/g' \
|
||||
-e 's/\${sitedir}/"RUBY_SITE_LIB"/g' \
|
||||
-e 's/\${rubylibdir}/"RUBY_LIB"/g' \
|
||||
-e 's/\${rubylibprefix}/"RUBY_LIB_PREFIX"/g' \
|
||||
-e 's/\${rubyarchprefix}/"RUBY_ARCH_PREFIX_FOR(arch)"/g' \
|
||||
-e 's/\${rubysitearchprefix}/"RUBY_SITEARCH_PREFIX_FOR(arch)"/g' \
|
||||
-e 's/\${exec_prefix}/"RUBY_EXEC_PREFIX"/g' \
|
||||
-e "s|${exec_prefix_pat}/|"'"RUBY_EXEC_PREFIX"/|g' \
|
||||
-e "s|${arch_pat}|"'"arch"|g' \
|
||||
-e "s|${sitearch_pat}|"'"sitearch"|g' \
|
||||
-e 's|^\"NONE/|RUBY_EXEC_PREFIX\"/|' \
|
||||
-e 's|^\"NONE\"|\"'"${prefix}"'\"|' \
|
||||
-e 's/^\"\"\(.\)/\1/;s/\(.\)\"\"$/\1/'
|
||||
-e 's/\${\([[A-Z][A-Z_]]*\)}/\"\1\"/g' \
|
||||
-e 's|\${sitearchlibdir}|'\"${sitearchlibdir}|g\" \
|
||||
-e 's|\${sitearchincludedir}|'\"${sitearchincludedir}|g\" \
|
||||
-e 's|\${archlibdir}|'\"${archlibdir}|g\" \
|
||||
-e 's|\${archincludedir}|'\"${archincludedir}|g\" \
|
||||
-e 's|\${libdir}|'\"${libdir}|g\" \
|
||||
-e 's/\${ruby_version}/\"RUBY_LIB_VERSION\"/g' \
|
||||
-e 's/\${arch}/\"arch\"/g' \
|
||||
-e 's/\${sitearch}/\"arch\"/g' \
|
||||
-e 's/\${vendorarchdir}/\"RUBY_VENDOR_ARCH_LIB\"/g' \
|
||||
-e 's/\${sitearchdir}/\"RUBY_SITE_ARCH_LIB\"/g' \
|
||||
-e 's/\${vendorlibdir}/\"RUBY_VENDOR_LIB2\"/g' \
|
||||
-e 's/\${sitelibdir}/\"RUBY_SITE_LIB2\"/g' \
|
||||
-e 's/\${vendordir}/\"RUBY_VENDOR_LIB\"/g' \
|
||||
-e 's/\${sitedir}/\"RUBY_SITE_LIB\"/g' \
|
||||
-e 's/\${rubylibdir}/\"RUBY_LIB\"/g' \
|
||||
-e 's/\${rubylibprefix}/\"RUBY_LIB_PREFIX\"/g' \
|
||||
-e 's/\${rubyarchprefix}/\"RUBY_ARCH_PREFIX_FOR(arch)\"/g' \
|
||||
-e 's/\${rubysitearchprefix}/\"RUBY_SITEARCH_PREFIX_FOR(arch)\"/g' \
|
||||
-e 's/\${exec_prefix}/\"RUBY_EXEC_PREFIX\"/g' \
|
||||
-e \"s|${exec_prefix_pat}/|\"'\"RUBY_EXEC_PREFIX\"/|g' \
|
||||
-e \"s|${arch_pat}|\"'\"arch\"|g' \
|
||||
-e \"s|${sitearch_pat}|\"'\"sitearch\"|g' \
|
||||
-e 's|^\\\"NONE/|RUBY_EXEC_PREFIX\\\"/|' \
|
||||
-e 's|^\\\"NONE\\\"|\\\"'\"${prefix}\"'\\\"|' \
|
||||
-e 's/^\\\"\\\"\(.\)/\1/;s/\(.\)\\\"\\\"$/\1/'
|
||||
`"
|
||||
eval $var='"$val"'
|
||||
}
|
||||
|
||||
unexpand_shvar() {
|
||||
local var=$1 val n v expr
|
||||
var=$1 n="" v="" expr=""
|
||||
shift
|
||||
test "$#" -eq 0 && return
|
||||
for n do
|
||||
|
|
Loading…
Reference in a new issue