From 67db06ba972a1fc99d5942e0d96ee6f0662a0e55 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 6 Feb 2013 08:32:58 +0000 Subject: [PATCH] configure.in: arch dependent header directory options * configure.in (rubyarchhdrdir, sitearchhdrdir, vendorarchhdrdir): add options to customize architecture dependent header directories. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 ++++- configure.in | 21 +++++++++++++++++++++ lib/mkmf.rb | 2 +- tool/rbinstall.rb | 4 ++-- 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 761c47f672..30f18c32ef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ -Wed Feb 6 17:32:51 2013 Nobuyoshi Nakada +Wed Feb 6 17:32:56 2013 Nobuyoshi Nakada + + * configure.in (rubyarchhdrdir, sitearchhdrdir, vendorarchhdrdir): add + options to customize architecture dependent header directories. * configure.in (rubyarchprefix, sitearchdir, vendorarchdir): add options to customize architecture dependent library directories. diff --git a/configure.in b/configure.in index df45609f2a..17864024b2 100644 --- a/configure.in +++ b/configure.in @@ -3339,19 +3339,40 @@ AC_ARG_WITH(rubyhdrdir, [rubyhdrdir=$withval], [rubyhdrdir='${includedir}/${RUBY_VERSION_NAME}']) +AC_ARG_WITH(rubyarchhdrdir, + AS_HELP_STRING([--with-arch-rubyhdrdir=DIR], + [architecture dependent core headers in DIR [[$(rubyhdrdir)/$(arch)]]]), + [rubyarchhdrdir=$withval], + [rubyarchhdrdir='${rubyhdrdir}/${arch}']) + AC_ARG_WITH(sitehdrdir, AS_HELP_STRING([--with-sitehdrdir=DIR], [core site headers in DIR [[RUBYHDRDIR/site_ruby]]]), [sitehdrdir=$withval], [sitehdrdir='${rubyhdrdir}/site_ruby']) +AC_ARG_WITH(sitearchhdrdir, + AS_HELP_STRING([--with-arch-sitehdrdir=DIR], + [architecture dependent core site headers in DIR [[RUBYHDRDIR/site_ruby]]]), + [sitearchhdrdir=$withval], + [sitearchhdrdir='${sitehdrdir}/${sitearch}']) + AC_ARG_WITH(vendorhdrdir, AS_HELP_STRING([--with-vendorhdrdir=DIR], [core vendor headers in DIR [[RUBYHDRDIR/vendor_ruby]]]), [vendorhdrdir=$withval], [vendorhdrdir='${rubyhdrdir}/vendor_ruby']) +AC_ARG_WITH(vendorarchhdrdir, + AS_HELP_STRING([--with-arch-vendorhdrdir=DIR], + [architecture dependent core vendor headers in DIR [[RUBYHDRDIR/vendor_ruby]]]), + [vendorarchhdrdir=$withval], + [vendorarchhdrdir='${vendorhdrdir}/${sitearch}']) + AC_SUBST(rubyhdrdir)dnl AC_SUBST(sitehdrdir)dnl AC_SUBST(vendorhdrdir)dnl +AC_SUBST(rubyarchhdrdir)dnl +AC_SUBST(sitearchhdrdir)dnl +AC_SUBST(vendorarchhdrdir)dnl AC_ARG_WITH(mantype, AS_HELP_STRING([--with-mantype=TYPE], [specify man page type; TYPE is one of man and doc]), diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 48e76ed15e..a33bb4c933 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -229,7 +229,7 @@ module MakeMakefile $hdrdir = CONFIG["rubyhdrdir"] $topdir = $hdrdir $top_srcdir = $hdrdir - $arch_hdrdir = "$(hdrdir)/$(arch)" + $arch_hdrdir = CONFIG["rubyarchhdrdir"] elsif File.exist?(($hdrdir = ($top_srcdir ||= topdir) + "/include") + "/ruby.h") $topdir ||= RbConfig::CONFIG["topdir"] $arch_hdrdir = "$(extout)/include/$(arch)" diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index 5da5125ff3..a5468f0d0f 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb @@ -305,8 +305,8 @@ goruby_install_name = "go" + ruby_install_name bindir = CONFIG["bindir", true] libdir = CONFIG["libdir", true] -archhdrdir = rubyhdrdir = CONFIG["rubyhdrdir", true] -archhdrdir += "/" + CONFIG["arch", true] +rubyhdrdir = CONFIG["rubyhdrdir", true] +archhdrdir = CONFIG["rubyarchhdrdir"] || (rubyhdrdir + "/" + $arch) rubylibdir = CONFIG["rubylibdir", true] archlibdir = CONFIG["rubyarchdir", true] sitelibdir = CONFIG["sitelibdir"]