diff --git a/ChangeLog b/ChangeLog index 5f045d0f56..2025bc7f1e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ -Mon Feb 11 13:15:11 2013 Nobuyoshi Nakada +Mon Feb 11 13:17:20 2013 Nobuyoshi Nakada + + * 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 b77b6fd894..428dc8492b 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} !!) AC_DEFINE_UNQUOTED(RUBY_ARCH_PREFIX_FOR(arch), ${RUBY_ARCH_PREFIX_FOR} !!) +AC_DEFINE_UNQUOTED(RUBY_SITEARCH_PREFIX_FOR(arch), ${RUBY_SITEARCH_PREFIX_FOR} !!) 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 7ffd2d43d0..65a3f79857 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 b241a926fc..49d65e9d06 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