From 797730c4964d13283f8669c49f2bb23767ace65d Mon Sep 17 00:00:00 2001 From: Richard Brown Date: Mon, 30 Mar 2009 20:56:55 +0100 Subject: [PATCH 1/3] add AC_ARG_WITH rubylibprefix which defaults to libdir/ruby_install_name --- Makefile.in | 1 + configure.in | 17 ++++++++++++----- mkconfig.rb | 2 +- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Makefile.in b/Makefile.in index 766b112..7d58410 100644 --- a/Makefile.in +++ b/Makefile.in @@ -26,6 +26,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ datarootdir = @datarootdir@ datadir = @datadir@ +rubylibprefix = @rubylibprefix@ arch = @arch@ sitearch = @sitearch@ sitedir = @sitedir@ diff --git a/configure.in b/configure.in index 58926ca..e2972b6 100644 --- a/configure.in +++ b/configure.in @@ -2249,7 +2249,14 @@ case "$target_os" in rubyw_install_name="$RUBYW_INSTALL_NAME" ;; esac -RUBY_LIB_PREFIX=`eval echo \\"${libdir}/${RUBY_INSTALL_NAME}\\"` + +AC_ARG_WITH(rubylibprefix, + AS_HELP_STRING([--with-rubylibprefix=DIR], [prefix for ruby libraries [[LIBDIR/RUBY_INSTALL_NAME]]]), + [rubylibprefix=$withval], + [rubylibprefix='${libdir}/${RUBY_INSTALL_NAME}']) + +RUBY_LIB_PREFIX=`eval echo \\"${rubylibprefix}\\"` +AC_SUBST(rubylibprefix) AC_ARG_WITH(ruby-version, [ --with-ruby-version=STR ruby version string for version specific directories [[full]] (full|minor|STR)], @@ -2279,15 +2286,15 @@ else fi AC_ARG_WITH(sitedir, - [ --with-sitedir=DIR site libraries in DIR [[LIBDIR/ruby/site_ruby]]], + [ --with-sitedir=DIR site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]]], [sitedir=$withval], - [sitedir='${libdir}/${RUBY_INSTALL_NAME}/site_ruby']) + [sitedir='${rubylibprefix}/site_ruby']) SITE_DIR=`eval echo \\"${sitedir}\\"` AC_ARG_WITH(vendordir, - [ --with-vendordir=DIR vendor libraries in DIR [[LIBDIR/ruby/vendor_ruby]]], + [ --with-vendordir=DIR vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]]], [vendordir=$withval], - [vendordir='${libdir}/${RUBY_INSTALL_NAME}/vendor_ruby']) + [vendordir='${rubylibprefix}/vendor_ruby']) VENDOR_DIR=`eval echo \\"${vendordir}\\"` if test "${LOAD_RELATIVE+set}"; then diff --git a/mkconfig.rb b/mkconfig.rb index 67cc3fd..fd949a6 100755 --- a/mkconfig.rb +++ b/mkconfig.rb @@ -144,7 +144,7 @@ end print(*v_fast) print(*v_others) print <