mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
configure.in: multiarch option
* configure.in (multiarch): add option to move architecture dependent directories. [Feature #6111] * template/ruby.pc.in: add arch dependent paths. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
67db06ba97
commit
834fd50ae2
3 changed files with 34 additions and 8 deletions
|
@ -1,4 +1,9 @@
|
||||||
Wed Feb 6 17:32:56 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Wed Feb 6 17:33:01 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* configure.in (multiarch): add option to move architecture dependent
|
||||||
|
directories. [Feature #6111]
|
||||||
|
|
||||||
|
* template/ruby.pc.in: add arch dependent paths.
|
||||||
|
|
||||||
* configure.in (rubyarchhdrdir, sitearchhdrdir, vendorarchhdrdir): add
|
* configure.in (rubyarchhdrdir, sitearchhdrdir, vendorarchhdrdir): add
|
||||||
options to customize architecture dependent header directories.
|
options to customize architecture dependent header directories.
|
||||||
|
|
31
configure.in
31
configure.in
|
@ -3138,11 +3138,24 @@ AS_CASE(["$target_os"],
|
||||||
rubyw_install_name='$(RUBYW_INSTALL_NAME)'
|
rubyw_install_name='$(RUBYW_INSTALL_NAME)'
|
||||||
])
|
])
|
||||||
|
|
||||||
|
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}'}
|
||||||
|
|
||||||
shvar_to_cpp() {
|
shvar_to_cpp() {
|
||||||
local var="$1" val="$2"
|
local var="$1" val="$2"
|
||||||
val="`echo '"'"${val}"'"' |
|
val="`echo '"'"${val}"'"' |
|
||||||
sed \
|
sed \
|
||||||
-e 's/\${\([[A-Z][A-Z_]]*\)}/"\1"/g' \
|
-e 's/\${\([[A-Z][A-Z_]]*\)}/"\1"/g' \
|
||||||
|
-e 's|\${sitearchlibdir}|'"${sitearchlibdir}|g" \
|
||||||
|
-e 's|\${sitearchincludedir}|'"${sitearchincludedir}|g" \
|
||||||
|
-e 's|\${archlibdir}|'"${archlibdir}|g" \
|
||||||
|
-e 's|\${archincludedir}|'"${archincludedir}|g" \
|
||||||
-e 's|\${libdir}|'"${libdir}|g" \
|
-e 's|\${libdir}|'"${libdir}|g" \
|
||||||
-e 's/\${ruby_version}/"RUBY_LIB_VERSION"/g' \
|
-e 's/\${ruby_version}/"RUBY_LIB_VERSION"/g' \
|
||||||
-e 's/\${arch}/"arch"/g' \
|
-e 's/\${arch}/"arch"/g' \
|
||||||
|
@ -3173,9 +3186,9 @@ AC_ARG_WITH(rubylibprefix,
|
||||||
rubylibprefix="$withval"])
|
rubylibprefix="$withval"])
|
||||||
AC_SUBST(rubylibprefix)
|
AC_SUBST(rubylibprefix)
|
||||||
rubylibdir='${rubylibprefix}/${ruby_version}'
|
rubylibdir='${rubylibprefix}/${ruby_version}'
|
||||||
rubyarchdir='${rubylibdir}/${arch}'
|
rubyarchdir=${multiarch+'${rubyarchprefix}/${ruby_version}'}${multiarch-'${rubylibdir}/${arch}'}
|
||||||
|
|
||||||
rubyarchprefix='${rubylibprefix}/${arch}'
|
rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'}
|
||||||
AC_ARG_WITH(rubyarchprefix,
|
AC_ARG_WITH(rubyarchprefix,
|
||||||
AS_HELP_STRING([--with-rubyarchprefix=DIR],
|
AS_HELP_STRING([--with-rubyarchprefix=DIR],
|
||||||
[prefix for architecture dependent ruby libraries [[RUBYLIBPREFIX/ARCH]]]),
|
[prefix for architecture dependent ruby libraries [[RUBYLIBPREFIX/ARCH]]]),
|
||||||
|
@ -3225,7 +3238,7 @@ AC_ARG_WITH(sitearchdir,
|
||||||
AS_HELP_STRING([--with-arch-sitedir=DIR],
|
AS_HELP_STRING([--with-arch-sitedir=DIR],
|
||||||
[architecture dependent site libraries in DIR [[SITEDIR/SITEARCH]], "no" to disable site directory]),
|
[architecture dependent site libraries in DIR [[SITEDIR/SITEARCH]], "no" to disable site directory]),
|
||||||
[sitearchdir=$withval],
|
[sitearchdir=$withval],
|
||||||
[sitearchdir='${sitelibdir}/${sitearch}'])
|
[sitearchdir=${multiarch+'${rubyarchprefix}/site_ruby/${ruby_version}'}${multiarch-'${sitelibdir}/${sitearch}'}])
|
||||||
|
|
||||||
AC_ARG_WITH(vendordir,
|
AC_ARG_WITH(vendordir,
|
||||||
AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]], "no" to disable vendor directory]),
|
AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]], "no" to disable vendor directory]),
|
||||||
|
@ -3237,7 +3250,7 @@ AC_ARG_WITH(vendorarchdir,
|
||||||
AS_HELP_STRING([--with-arch-vendordir=DIR],
|
AS_HELP_STRING([--with-arch-vendordir=DIR],
|
||||||
[architecture dependent vendor libraries in DIR [[VENDORDIR/SITEARCH]], "no" to disable vendor directory]),
|
[architecture dependent vendor libraries in DIR [[VENDORDIR/SITEARCH]], "no" to disable vendor directory]),
|
||||||
[vendorarchdir=$withval],
|
[vendorarchdir=$withval],
|
||||||
[vendorarchdir='${vendorlibdir}/${sitearch}'])
|
[vendorarchdir=${multiarch+'${rubyarchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}])
|
||||||
|
|
||||||
if test "${LOAD_RELATIVE+set}"; then
|
if test "${LOAD_RELATIVE+set}"; then
|
||||||
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
|
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
|
||||||
|
@ -3281,6 +3294,10 @@ else
|
||||||
AC_DEFINE_UNQUOTED(RUBY_VENDOR_ARCH_LIB_FOR(arch), ${RUBY_VENDOR_ARCH_LIB_FOR} !<verconf>!)
|
AC_DEFINE_UNQUOTED(RUBY_VENDOR_ARCH_LIB_FOR(arch), ${RUBY_VENDOR_ARCH_LIB_FOR} !<verconf>!)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AC_SUBST(archlibdir)dnl
|
||||||
|
AC_SUBST(sitearchlibdir)dnl
|
||||||
|
AC_SUBST(archincludedir)dnl
|
||||||
|
AC_SUBST(sitearchincludedir)dnl
|
||||||
AC_SUBST(arch)dnl
|
AC_SUBST(arch)dnl
|
||||||
AC_SUBST(sitearch)dnl
|
AC_SUBST(sitearch)dnl
|
||||||
AC_SUBST(ruby_version)dnl
|
AC_SUBST(ruby_version)dnl
|
||||||
|
@ -3343,7 +3360,7 @@ AC_ARG_WITH(rubyarchhdrdir,
|
||||||
AS_HELP_STRING([--with-arch-rubyhdrdir=DIR],
|
AS_HELP_STRING([--with-arch-rubyhdrdir=DIR],
|
||||||
[architecture dependent core headers in DIR [[$(rubyhdrdir)/$(arch)]]]),
|
[architecture dependent core headers in DIR [[$(rubyhdrdir)/$(arch)]]]),
|
||||||
[rubyarchhdrdir=$withval],
|
[rubyarchhdrdir=$withval],
|
||||||
[rubyarchhdrdir='${rubyhdrdir}/${arch}'])
|
[rubyarchhdrdir=${multiarch+'${archincludedir}/${RUBY_VERSION_NAME}'}${multiarch-'${rubyhdrdir}/${arch}'}])
|
||||||
|
|
||||||
AC_ARG_WITH(sitehdrdir,
|
AC_ARG_WITH(sitehdrdir,
|
||||||
AS_HELP_STRING([--with-sitehdrdir=DIR], [core site headers in DIR [[RUBYHDRDIR/site_ruby]]]),
|
AS_HELP_STRING([--with-sitehdrdir=DIR], [core site headers in DIR [[RUBYHDRDIR/site_ruby]]]),
|
||||||
|
@ -3354,7 +3371,7 @@ AC_ARG_WITH(sitearchhdrdir,
|
||||||
AS_HELP_STRING([--with-arch-sitehdrdir=DIR],
|
AS_HELP_STRING([--with-arch-sitehdrdir=DIR],
|
||||||
[architecture dependent core site headers in DIR [[RUBYHDRDIR/site_ruby]]]),
|
[architecture dependent core site headers in DIR [[RUBYHDRDIR/site_ruby]]]),
|
||||||
[sitearchhdrdir=$withval],
|
[sitearchhdrdir=$withval],
|
||||||
[sitearchhdrdir='${sitehdrdir}/${sitearch}'])
|
[sitearchhdrdir=${multiarch+'${sitearchincludedir}/${RUBY_VERSION_NAME}/site_ruby'}${multiarch-'${sitehdrdir}/${sitearch}'}])
|
||||||
|
|
||||||
AC_ARG_WITH(vendorhdrdir,
|
AC_ARG_WITH(vendorhdrdir,
|
||||||
AS_HELP_STRING([--with-vendorhdrdir=DIR], [core vendor headers in DIR [[RUBYHDRDIR/vendor_ruby]]]),
|
AS_HELP_STRING([--with-vendorhdrdir=DIR], [core vendor headers in DIR [[RUBYHDRDIR/vendor_ruby]]]),
|
||||||
|
@ -3365,7 +3382,7 @@ AC_ARG_WITH(vendorarchhdrdir,
|
||||||
AS_HELP_STRING([--with-arch-vendorhdrdir=DIR],
|
AS_HELP_STRING([--with-arch-vendorhdrdir=DIR],
|
||||||
[architecture dependent core vendor headers in DIR [[RUBYHDRDIR/vendor_ruby]]]),
|
[architecture dependent core vendor headers in DIR [[RUBYHDRDIR/vendor_ruby]]]),
|
||||||
[vendorarchhdrdir=$withval],
|
[vendorarchhdrdir=$withval],
|
||||||
[vendorarchhdrdir='${vendorhdrdir}/${sitearch}'])
|
[vendorarchhdrdir=${multiarch+'${sitearchincludedir}/${RUBY_VERSION_NAME}/vendor_ruby'}${multiarch-'${vendorhdrdir}/${sitearch}'}])
|
||||||
|
|
||||||
AC_SUBST(rubyhdrdir)dnl
|
AC_SUBST(rubyhdrdir)dnl
|
||||||
AC_SUBST(sitehdrdir)dnl
|
AC_SUBST(sitehdrdir)dnl
|
||||||
|
|
|
@ -24,6 +24,10 @@ LIBRUBYARG_STATIC=@LIBRUBYARG_STATIC@
|
||||||
LIBRUBYARG=@LIBRUBYARG@
|
LIBRUBYARG=@LIBRUBYARG@
|
||||||
LIBS=@LIBS@
|
LIBS=@LIBS@
|
||||||
DLDFLAGS=@DLDFLAGS@
|
DLDFLAGS=@DLDFLAGS@
|
||||||
|
archlibdir=@archlibdir@
|
||||||
|
sitearchlibdir=@sitearchlibdir@
|
||||||
|
archincludedir=@archincludedir@
|
||||||
|
sitearchincludedir=@sitearchincludedir@
|
||||||
ruby=${bindir}/${RUBY_INSTALL_NAME}@EXEEXT@
|
ruby=${bindir}/${RUBY_INSTALL_NAME}@EXEEXT@
|
||||||
rubylibprefix=@rubylibprefix@
|
rubylibprefix=@rubylibprefix@
|
||||||
rubyarchprefix=@rubyarchprefix@
|
rubyarchprefix=@rubyarchprefix@
|
||||||
|
|
Loading…
Reference in a new issue