configure.in: architecture name

* configure.in, version.c: parametric architecture name for paths.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-02-06 08:32:43 +00:00
Родитель a8795e3527
Коммит 85aae4c658
3 изменённых файлов: 28 добавлений и 19 удалений

Просмотреть файл

@ -1,4 +1,6 @@
Wed Feb 6 17:32:36 2013 Nobuyoshi Nakada <nobu@ruby-lang.org> Wed Feb 6 17:32:41 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in, version.c: parametric architecture name for paths.
* configure.in (shvar_to_cpp): convert sh variable references * configure.in (shvar_to_cpp): convert sh variable references
by replacing with string literal forms in cpp. by replacing with string literal forms in cpp.

Просмотреть файл

@ -3143,8 +3143,8 @@ shvar_to_cpp() {
-e 's/\${\([[A-Z][A-Z_]]*\)}/"\1"/g' \ -e 's/\${\([[A-Z][A-Z_]]*\)}/"\1"/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}/"RUBY_ARCH"/g' \ -e 's/\${arch}/"arch"/g' \
-e 's/\${sitearch}/"RUBY_SITEARCH"/g' \ -e 's/\${sitearch}/"arch"/g' \
-e 's/\${vendorarchdir}/"RUBY_VENDOR_ARCH_LIB"/g' \ -e 's/\${vendorarchdir}/"RUBY_VENDOR_ARCH_LIB"/g' \
-e 's/\${sitearchdir}/"RUBY_SITE_ARCH_LIB"/g' \ -e 's/\${sitearchdir}/"RUBY_SITE_ARCH_LIB"/g' \
-e 's/\${vendorlibdir}/"RUBY_VENDOR_LIB2"/g' \ -e 's/\${vendorlibdir}/"RUBY_VENDOR_LIB2"/g' \
@ -3240,17 +3240,23 @@ shvar_to_cpp RUBY_LIB "${rubylibdir}"
if test "x${RUBY_LIB}" != 'xRUBY_LIB_PREFIX"/"RUBY_LIB_VERSION'; then if test "x${RUBY_LIB}" != 'xRUBY_LIB_PREFIX"/"RUBY_LIB_VERSION'; then
AC_DEFINE_UNQUOTED(RUBY_LIB, ${RUBY_LIB} !<verconf>!) AC_DEFINE_UNQUOTED(RUBY_LIB, ${RUBY_LIB} !<verconf>!)
fi fi
shvar_to_cpp RUBY_ARCH_LIB_FOR "${rubyarchdir}"
AC_DEFINE_UNQUOTED(RUBY_ARCH_LIB_FOR(arch), ${RUBY_ARCH_LIB_FOR} !<verconf>!)
if test "x$sitedir" = xno; then if test "x$sitedir" = xno; then
AC_DEFINE(NO_RUBY_SITE_LIB, [] !<verconf>!) AC_DEFINE(NO_RUBY_SITE_LIB, [] !<verconf>!)
else else
shvar_to_cpp RUBY_SITE_LIB "${sitedir}" shvar_to_cpp RUBY_SITE_LIB "${sitedir}"
AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, ${RUBY_SITE_LIB} !<verconf>!) AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, ${RUBY_SITE_LIB} !<verconf>!)
shvar_to_cpp RUBY_SITE_ARCH_LIB_FOR "${sitearchdir}"
AC_DEFINE_UNQUOTED(RUBY_SITE_ARCH_LIB_FOR(arch), ${RUBY_SITE_ARCH_LIB_FOR} !<verconf>!)
fi fi
if test "x$vendordir" = xno; then if test "x$vendordir" = xno; then
AC_DEFINE(NO_RUBY_VENDOR_LIB, [] !<verconf>!) AC_DEFINE(NO_RUBY_VENDOR_LIB, [] !<verconf>!)
else else
shvar_to_cpp RUBY_VENDOR_LIB "${vendordir}" shvar_to_cpp RUBY_VENDOR_LIB "${vendordir}"
AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB, ${RUBY_VENDOR_LIB} !<verconf>!) AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB, ${RUBY_VENDOR_LIB} !<verconf>!)
shvar_to_cpp RUBY_VENDOR_ARCH_LIB_FOR "${vendorarchdir}"
AC_DEFINE_UNQUOTED(RUBY_VENDOR_ARCH_LIB_FOR(arch), ${RUBY_VENDOR_ARCH_LIB_FOR} !<verconf>!)
fi fi
AC_SUBST(arch)dnl AC_SUBST(arch)dnl

Просмотреть файл

@ -42,13 +42,14 @@
#define RUBY_LIB RUBY_LIB_PREFIX "/"RUBY_LIB_VERSION #define RUBY_LIB RUBY_LIB_PREFIX "/"RUBY_LIB_VERSION
#define RUBY_SITE_LIB2 RUBY_SITE_LIB "/"RUBY_LIB_VERSION #define RUBY_SITE_LIB2 RUBY_SITE_LIB "/"RUBY_LIB_VERSION
#define RUBY_VENDOR_LIB2 RUBY_VENDOR_LIB "/"RUBY_LIB_VERSION #define RUBY_VENDOR_LIB2 RUBY_VENDOR_LIB "/"RUBY_LIB_VERSION
#define RUBY_ARCHLIB RUBY_LIB "/"RUBY_ARCH #ifndef RUBY_ARCH_LIB_FOR
#define RUBY_SITE_ARCHLIB RUBY_SITE_LIB2 "/"RUBY_SITEARCH #define RUBY_ARCH_LIB_FOR(arch) RUBY_LIB "/"arch
#define RUBY_VENDOR_ARCHLIB RUBY_VENDOR_LIB2 "/"RUBY_SITEARCH #endif
#ifdef RUBY_THINARCH #ifndef RUBY_SITE_ARCH_LIB_FOR
#define RUBY_THIN_ARCHLIB RUBY_LIB "/"RUBY_THINARCH #define RUBY_SITE_ARCH_LIB_FOR(arch) RUBY_SITE_LIB2 "/"arch
#define RUBY_SITE_THIN_ARCHLIB RUBY_SITE_LIB2 "/"RUBY_THINARCH #endif
#define RUBY_VENDOR_THIN_ARCHLIB RUBY_VENDOR_LIB2 "/"RUBY_THINARCH #ifndef RUBY_VENDOR_ARCH_LIB_FOR
#define RUBY_VENDOR_ARCH_LIB_FOR(arch) RUBY_VENDOR_LIB2 "/"arch
#endif #endif
const int ruby_api_version[] = { const int ruby_api_version[] = {
@ -72,27 +73,27 @@ const char ruby_initial_load_paths[] =
#endif #endif
#ifndef NO_RUBY_SITE_LIB #ifndef NO_RUBY_SITE_LIB
RUBY_SITE_LIB2 "\0" RUBY_SITE_LIB2 "\0"
#ifdef RUBY_SITE_THIN_ARCHLIB #ifdef RUBY_THINARCH
RUBY_SITE_THIN_ARCHLIB "\0" RUBY_SITE_ARCH_LIB_FOR(RUBY_THINARCH) "\0"
#endif #endif
RUBY_SITE_ARCHLIB "\0" RUBY_SITE_ARCH_LIB_FOR(RUBY_SITEARCH) "\0"
RUBY_SITE_LIB "\0" RUBY_SITE_LIB "\0"
#endif #endif
#ifndef NO_RUBY_VENDOR_LIB #ifndef NO_RUBY_VENDOR_LIB
RUBY_VENDOR_LIB2 "\0" RUBY_VENDOR_LIB2 "\0"
#ifdef RUBY_VENDOR_THIN_ARCHLIB #ifdef RUBY_THINARCH
RUBY_VENDOR_THIN_ARCHLIB "\0" RUBY_VENDOR_ARCH_LIB_FOR(RUBY_THINARCH) "\0"
#endif #endif
RUBY_VENDOR_ARCHLIB "\0" RUBY_VENDOR_ARCH_LIB_FOR(RUBY_SITEARCH) "\0"
RUBY_VENDOR_LIB "\0" RUBY_VENDOR_LIB "\0"
#endif #endif
RUBY_LIB "\0" RUBY_LIB "\0"
#ifdef RUBY_THIN_ARCHLIB #ifdef RUBY_THINARCH
RUBY_THIN_ARCHLIB "\0" RUBY_ARCH_LIB_FOR(RUBY_THINARCH) "\0"
#endif #endif
RUBY_ARCHLIB "\0" RUBY_ARCH_LIB_FOR(RUBY_ARCH) "\0"
#endif #endif
""; "";