summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-06 08:32:58 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-06 08:32:58 +0000
commit67db06ba972a1fc99d5942e0d96ee6f0662a0e55 (patch)
treea335c537a41f7e948ce4335fc4975aa924bbfaeb
parent29c214e4a058fc4017ab0c0bf5c36b5bad203b5b (diff)
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
-rw-r--r--ChangeLog5
-rw-r--r--configure.in21
-rw-r--r--lib/mkmf.rb2
-rwxr-xr-xtool/rbinstall.rb4
4 files changed, 28 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 761c47f..30f18c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
-Wed Feb 6 17:32:51 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Wed Feb 6 17:32:56 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * 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 df45609..1786402 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 48e76ed..a33bb4c9 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 5da5125..a5468f0 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"]