From: Brian Candler Date: 2005-02-18T05:21:55+09:00 Subject: Re: ./configure --libdir problem --J2SCkAp4GZ/dPZZf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Feb 17, 2005 at 05:49:32PM +0000, Brian Candler wrote: > If I set --libdir when compiling ruby-1.8.2, I find that ruby installs its > standard libraries in one place, but at runtime it looks for them in the > wrong place. I made a patch which seems to fix this for me - see below. (Note that I've not run it through autoconf; I just edited configure and configure.in by hand) There is still the underlying issue that, in effect, the same value is being calculated twice independently: prefix/libdir --> ./configure ----> RUBY_LIB_PREFIX in config.h ---> $: \ `--> mkconfig.rb --> rbconfig.rb [rubylibdir] \ `-> files installed here But at least, overriding --libdir now has (hopefully) the same effect on both. Regards, Brian. --J2SCkAp4GZ/dPZZf Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=ruby-libdir diff -uNr ruby-1.8.2.orig/configure.in ruby-1.8.2/configure.in --- ruby-1.8.2.orig/configure.in Wed Dec 22 15:16:55 2004 +++ ruby-1.8.2/configure.in Thu Feb 17 19:08:26 2005 @@ -1386,15 +1386,15 @@ RUBY_LIB_PREFIX="/lib/ruby" ;; *) - RUBY_LIB_PREFIX="${prefix}/lib/ruby" + RUBY_LIB_PREFIX="${libdir}/ruby" ;; esac RUBY_LIB_PATH="${RUBY_LIB_PREFIX}/${MAJOR}.${MINOR}" AC_ARG_WITH(sitedir, - [ --with-sitedir=DIR site libraries in DIR [PREFIX/lib/ruby/site_ruby]], + [ --with-sitedir=DIR site libraries in DIR [LIBDIR/ruby/site_ruby]], [sitedir=$withval], - [sitedir='${prefix}/lib/ruby/site_ruby']) + [sitedir='${libdir}/ruby/site_ruby']) SITE_DIR="`eval \"echo ${sitedir}\"`" case "$target_os" in cygwin*|mingw*|*djgpp*|os2-emx*) diff -uNr ruby-1.8.2.orig/configure ruby-1.8.2/configure --- ruby-1.8.2.orig/configure Sat Dec 25 10:58:38 2004 +++ ruby-1.8.2/configure Thu Feb 17 19:08:03 2005 @@ -875,7 +875,7 @@ --with-default-kcode=CODE specify default value for \$KCODE (utf8|euc|sjis|none) --with-dln-a-out use dln_a_out if possible --with-static-linked-ext link external modules statically - --with-sitedir=DIR site libraries in DIR PREFIX/lib/ruby/site_ruby + --with-sitedir=DIR site libraries in DIR LIBDIR/ruby/site_ruby --with-search-path=DIR specify the additional search path --with-mantype=TYPE specify man page type; TYPE is one of man and doc @@ -14961,7 +14961,7 @@ RUBY_LIB_PREFIX="/lib/ruby" ;; *) - RUBY_LIB_PREFIX="${prefix}/lib/ruby" + RUBY_LIB_PREFIX="${libdir}/ruby" ;; esac RUBY_LIB_PATH="${RUBY_LIB_PREFIX}/${MAJOR}.${MINOR}" @@ -14972,7 +14972,7 @@ withval="$with_sitedir" sitedir=$withval else - sitedir='${prefix}/lib/ruby/site_ruby' + sitedir='${libdir}/ruby/site_ruby' fi; SITE_DIR="`eval \"echo ${sitedir}\"`" case "$target_os" in --J2SCkAp4GZ/dPZZf--