ruby-changes:27057
From: nobu <ko1@a...>
Date: Wed, 6 Feb 2013 17:33:13 +0900 (JST)
Subject: [ruby-changes:27057] nobu:r39109 (trunk): configure.in: multiarch option
nobu 2013-02-06 17:33:03 +0900 (Wed, 06 Feb 2013) New Revision: 39109 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39109 Log: configure.in: multiarch option * configure.in (multiarch): add option to move architecture dependent directories. [Feature #6111] * template/ruby.pc.in: add arch dependent paths. Modified files: trunk/ChangeLog trunk/configure.in trunk/template/ruby.pc.in Index: configure.in =================================================================== --- configure.in (revision 39108) +++ configure.in (revision 39109) @@ -3138,11 +3138,24 @@ AS_CASE(["$target_os"], https://github.com/ruby/ruby/blob/trunk/configure.in#L3138 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() { local var="$1" val="$2" val="`echo '"'"${val}"'"' | sed \ -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/\${ruby_version}/"RUBY_LIB_VERSION"/g' \ -e 's/\${arch}/"arch"/g' \ @@ -3173,9 +3186,9 @@ AC_ARG_WITH(rubylibprefix, https://github.com/ruby/ruby/blob/trunk/configure.in#L3186 rubylibprefix="$withval"]) AC_SUBST(rubylibprefix) 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, AS_HELP_STRING([--with-rubyarchprefix=DIR], [prefix for architecture dependent ruby libraries [[RUBYLIBPREFIX/ARCH]]]), @@ -3225,7 +3238,7 @@ AC_ARG_WITH(sitearchdir, https://github.com/ruby/ruby/blob/trunk/configure.in#L3238 AS_HELP_STRING([--with-arch-sitedir=DIR], [architecture dependent site libraries in DIR [[SITEDIR/SITEARCH]], "no" to disable site directory]), [sitearchdir=$withval], - [sitearchdir='${sitelibdir}/${sitearch}']) + [sitearchdir=${multiarch+'${rubyarchprefix}/site_ruby/${ruby_version}'}${multiarch-'${sitelibdir}/${sitearch}'}]) AC_ARG_WITH(vendordir, 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, https://github.com/ruby/ruby/blob/trunk/configure.in#L3250 AS_HELP_STRING([--with-arch-vendordir=DIR], [architecture dependent vendor libraries in DIR [[VENDORDIR/SITEARCH]], "no" to disable vendor directory]), [vendorarchdir=$withval], - [vendorarchdir='${vendorlibdir}/${sitearch}']) + [vendorarchdir=${multiarch+'${rubyarchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}]) if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) @@ -3281,6 +3294,10 @@ else https://github.com/ruby/ruby/blob/trunk/configure.in#L3294 AC_DEFINE_UNQUOTED(RUBY_VENDOR_ARCH_LIB_FOR(arch), ${RUBY_VENDOR_ARCH_LIB_FOR} !<verconf>!) fi +AC_SUBST(archlibdir)dnl +AC_SUBST(sitearchlibdir)dnl +AC_SUBST(archincludedir)dnl +AC_SUBST(sitearchincludedir)dnl AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl @@ -3343,7 +3360,7 @@ AC_ARG_WITH(rubyarchhdrdir, https://github.com/ruby/ruby/blob/trunk/configure.in#L3360 AS_HELP_STRING([--with-arch-rubyhdrdir=DIR], [architecture dependent core headers in DIR [[$(rubyhdrdir)/$(arch)]]]), [rubyarchhdrdir=$withval], - [rubyarchhdrdir='${rubyhdrdir}/${arch}']) + [rubyarchhdrdir=${multiarch+'${archincludedir}/${RUBY_VERSION_NAME}'}${multiarch-'${rubyhdrdir}/${arch}'}]) AC_ARG_WITH(sitehdrdir, AS_HELP_STRING([--with-sitehdrdir=DIR], [core site headers in DIR [[RUBYHDRDIR/site_ruby]]]), @@ -3354,7 +3371,7 @@ AC_ARG_WITH(sitearchhdrdir, https://github.com/ruby/ruby/blob/trunk/configure.in#L3371 AS_HELP_STRING([--with-arch-sitehdrdir=DIR], [architecture dependent core site headers in DIR [[RUBYHDRDIR/site_ruby]]]), [sitearchhdrdir=$withval], - [sitearchhdrdir='${sitehdrdir}/${sitearch}']) + [sitearchhdrdir=${multiarch+'${sitearchincludedir}/${RUBY_VERSION_NAME}/site_ruby'}${multiarch-'${sitehdrdir}/${sitearch}'}]) AC_ARG_WITH(vendorhdrdir, AS_HELP_STRING([--with-vendorhdrdir=DIR], [core vendor headers in DIR [[RUBYHDRDIR/vendor_ruby]]]), @@ -3365,7 +3382,7 @@ AC_ARG_WITH(vendorarchhdrdir, https://github.com/ruby/ruby/blob/trunk/configure.in#L3382 AS_HELP_STRING([--with-arch-vendorhdrdir=DIR], [architecture dependent core vendor headers in DIR [[RUBYHDRDIR/vendor_ruby]]]), [vendorarchhdrdir=$withval], - [vendorarchhdrdir='${vendorhdrdir}/${sitearch}']) + [vendorarchhdrdir=${multiarch+'${sitearchincludedir}/${RUBY_VERSION_NAME}/vendor_ruby'}${multiarch-'${vendorhdrdir}/${sitearch}'}]) AC_SUBST(rubyhdrdir)dnl AC_SUBST(sitehdrdir)dnl Index: ChangeLog =================================================================== --- ChangeLog (revision 39108) +++ ChangeLog (revision 39109) @@ -1,4 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 -Wed Feb 6 17:32:56 2013 Nobuyoshi Nakada <nobu@r...> +Wed Feb 6 17:33:01 2013 Nobuyoshi Nakada <nobu@r...> + + * 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 options to customize architecture dependent header directories. Index: template/ruby.pc.in =================================================================== --- template/ruby.pc.in (revision 39108) +++ template/ruby.pc.in (revision 39109) @@ -24,6 +24,10 @@ LIBRUBYARG_STATIC=@LIBRUBYARG_STATIC@ https://github.com/ruby/ruby/blob/trunk/template/ruby.pc.in#L24 LIBRUBYARG=@LIBRUBYARG@ LIBS=@LIBS@ DLDFLAGS=@DLDFLAGS@ +archlibdir=@archlibdir@ +sitearchlibdir=@sitearchlibdir@ +archincludedir=@archincludedir@ +sitearchincludedir=@sitearchincludedir@ ruby=${bindir}/${RUBY_INSTALL_NAME}@EXEEXT@ rubylibprefix=@rubylibprefix@ rubyarchprefix=@rubyarchprefix@ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/