summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-11 04:17:22 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-11 04:17:22 +0000
commit0d467210333b666eb04eb40d9aa50d8a7b82387e (patch)
tree53cd465c258923143b1374a78e449eed2577befa
parent507477af54fe3d0a088cc63fa85a02dd72ea9812 (diff)
configure.in: sitearch
* configure.in (rubysitearchprefix): sitearchdir and vendorarchdir should use sitearch, not arch. [ruby-dev:46964] [Bug #7823] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--configure.in22
-rw-r--r--template/ruby.pc.in1
-rw-r--r--test/test_rbconfig.rb4
4 files changed, 23 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 5f045d0..2025bc7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
-Mon Feb 11 13:15:11 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Mon Feb 11 13:17:20 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in (rubysitearchprefix): sitearchdir and vendorarchdir
+ should use sitearch, not arch. [ruby-dev:46964] [Bug #7823]
* win32/Makefile.sub (config.status): site and vendor directories
should use sitearch, not arch. [ruby-dev:46964] [Bug #7823]
diff --git a/configure.in b/configure.in
index b77b6fd..428dc84 100644
--- a/configure.in
+++ b/configure.in
@@ -3163,10 +3163,10 @@ AC_ARG_ENABLE(multiarch,
AS_HELP_STRING([--enable-multiarch], [enable multiarch compatible directories]),
[multiarch=], [unset multiarch])
-archlibdir='${libdir}'${multiarch+'/${arch}'}
-sitearchlibdir='${libdir}'${multiarch+'/${sitearch}'}
-archincludedir='${includedir}'${multiarch+'/${arch}'}
-sitearchincludedir='${includedir}'${multiarch+'/${sitearch}'}
+archlibdir='${libdir}/${arch}'
+sitearchlibdir='${libdir}/${sitearch}'
+archincludedir='${includedir}/${arch}'
+sitearchincludedir='${includedir}/${sitearch}'
shvar_to_cpp() {
local var="$1" val="$2"
@@ -3190,6 +3190,7 @@ shvar_to_cpp() {
-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|^\"NONE/|RUBY_EXEC_PREFIX\"/|' \
-e 's|^\"NONE\"|\"'"${prefix}"'\"|' \
@@ -3216,6 +3217,13 @@ AC_ARG_WITH(rubyarchprefix,
[rubyarchprefix="$withval"])
AC_SUBST(rubyarchprefix)
+rubysitearchprefix=${multiarch+'${sitearchlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${sitearch}'}
+AC_ARG_WITH(rubysitearchprefix,
+ AS_HELP_STRING([--with-rubysitearchprefix=DIR],
+ [prefix for architecture dependent site libraries [[RUBYLIBPREFIX/SITEARCH]]]),
+ [rubysitearchprefix="$withval"])
+AC_SUBST(rubysitearchprefix)
+
RI_BASE_NAME=`echo ${RUBY_BASE_NAME} | sed 's/ruby/ri/'`
ridir='${datarootdir}/${RI_BASE_NAME}'
AC_ARG_WITH(ridir,
@@ -3261,7 +3269,7 @@ AC_ARG_WITH(sitearchdir,
AS_HELP_STRING([--with-sitearchdir=DIR],
[architecture dependent site libraries in DIR [[SITEDIR/SITEARCH]], "no" to disable site directory]),
[sitearchdir=$withval],
- [sitearchdir=${multiarch+'${rubyarchprefix}/site_ruby/${ruby_version}'}${multiarch-'${sitelibdir}/${sitearch}'}])
+ [sitearchdir=${multiarch+'${rubysitearchprefix}/site_ruby/${ruby_version}'}${multiarch-'${sitelibdir}/${sitearch}'}])
AC_ARG_WITH(vendordir,
AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]], "no" to disable vendor directory]),
@@ -3273,7 +3281,7 @@ AC_ARG_WITH(vendorarchdir,
AS_HELP_STRING([--with-vendorarchdir=DIR],
[architecture dependent vendor libraries in DIR [[VENDORDIR/SITEARCH]], "no" to disable vendor directory]),
[vendorarchdir=$withval],
- [vendorarchdir=${multiarch+'${rubyarchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}])
+ [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}])
if test "${LOAD_RELATIVE+set}"; then
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
@@ -3283,6 +3291,7 @@ else
fi
shvar_to_cpp RUBY_LIB_PREFIX "${rubylibprefix}"
shvar_to_cpp RUBY_ARCH_PREFIX_FOR "${rubyarchprefix}"
+shvar_to_cpp RUBY_SITEARCH_PREFIX_FOR "${rubysitearchprefix}"
shvar_to_cpp RIDIR "${ridir}"
if test ${RUBY_LIB_VERSION_STYLE+set}; then
@@ -3293,6 +3302,7 @@ fi
AC_DEFINE_UNQUOTED(RUBY_EXEC_PREFIX, ${RUBY_EXEC_PREFIX})
AC_DEFINE_UNQUOTED(RUBY_LIB_PREFIX, ${RUBY_LIB_PREFIX} !<verconf>!)
AC_DEFINE_UNQUOTED(RUBY_ARCH_PREFIX_FOR(arch), ${RUBY_ARCH_PREFIX_FOR} !<verconf>!)
+AC_DEFINE_UNQUOTED(RUBY_SITEARCH_PREFIX_FOR(arch), ${RUBY_SITEARCH_PREFIX_FOR} !<verconf>!)
shvar_to_cpp RUBY_LIB "${rubylibdir}"
if test "x${RUBY_LIB}" != 'xRUBY_LIB_PREFIX"/"RUBY_LIB_VERSION'; then
diff --git a/template/ruby.pc.in b/template/ruby.pc.in
index 7ffd2d4..65a3f79 100644
--- a/template/ruby.pc.in
+++ b/template/ruby.pc.in
@@ -31,6 +31,7 @@ sitearchincludedir=@sitearchincludedir@
ruby=${bindir}/${RUBY_INSTALL_NAME}@EXEEXT@
rubylibprefix=@rubylibprefix@
rubyarchprefix=@rubyarchprefix@
+rubysitearchprefix=@rubysitearchprefix@
rubylibdir=@rubylibdir@
vendordir=@vendordir@
sitedir=@sitedir@
diff --git a/test/test_rbconfig.rb b/test/test_rbconfig.rb
index b241a92..49d65e9 100644
--- a/test/test_rbconfig.rb
+++ b/test/test_rbconfig.rb
@@ -27,7 +27,7 @@ class TestRbConfig < Test::Unit::TestCase
bug7823 = '[ruby-dev:46964] [Bug #7823]'
RbConfig::MAKEFILE_CONFIG.each do |key, val|
next unless /\Asite.*arch.*dir\z/ =~ key
- assert_match(/\$\(sitearch|\$\(rubyarchprefix\)/, val, "#{key} #{bug7823}")
+ assert_match(/\$\(sitearch|\$\(rubysitearchprefix\)/, val, "#{key} #{bug7823}")
end
end
@@ -35,7 +35,7 @@ class TestRbConfig < Test::Unit::TestCase
bug7823 = '[ruby-dev:46964] [Bug #7823]'
RbConfig::MAKEFILE_CONFIG.each do |key, val|
next unless /\Avendor.*arch.*dir\z/ =~ key
- assert_match(/\$\(sitearch|\$\(rubyarchprefix\)/, val, "#{key} #{bug7823}")
+ assert_match(/\$\(sitearch|\$\(rubysitearchprefix\)/, val, "#{key} #{bug7823}")
end
end
end