Skip to content

Commit

Permalink
* configure.in (--with-ruby-version): Add a new option to specify
Browse files Browse the repository at this point in the history
  the ruby version string for version specific directories.
  [ruby-dev:35490]

* mkconfig.rb: Definition of ruby_version is now determined by the
  configure script.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
knu committed Jul 15, 2008
1 parent a6efdc4 commit 6bc480e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 5 deletions.
9 changes: 9 additions & 0 deletions ChangeLog
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,12 @@
Tue Jul 15 21:31:26 2008 Akinori MUSHA <knu@iDaemons.org>

* configure.in (--with-ruby-version): Add a new option to specify
the ruby version string for version specific directories.
[ruby-dev:35490]

* mkconfig.rb: Definition of ruby_version is now determined by the
configure script.

Tue Jul 15 18:14:20 2008 NAKAMURA Usaku <usa@ruby-lang.org> Tue Jul 15 18:14:20 2008 NAKAMURA Usaku <usa@ruby-lang.org>


* ext/socket/socket.c (ruby_connect, s_accept): check before readable/ * ext/socket/socket.c (ruby_connect, s_accept): check before readable/
Expand Down
22 changes: 18 additions & 4 deletions configure.in
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -1884,6 +1884,19 @@ case "$target_os" in
esac esac
RUBY_LIB_PREFIX=`eval echo \\"${libdir}/ruby\\"` RUBY_LIB_PREFIX=`eval echo \\"${libdir}/ruby\\"`


AC_ARG_WITH(ruby-version,
[ --with-ruby-version=STR ruby version string for version specific directories [[full]] (full|minor|STR)],
[ruby_version=$withval],
[ruby_version=full])
case "$ruby_version" in
full)
ruby_version="${MAJOR}.${MINOR}.${TEENY}"
;;
minor)
ruby_version="${MAJOR}.${MINOR}"
;;
esac

AC_ARG_WITH(sitedir, AC_ARG_WITH(sitedir,
[ --with-sitedir=DIR site libraries in DIR [[LIBDIR/ruby/site_ruby]]], [ --with-sitedir=DIR site libraries in DIR [[LIBDIR/ruby/site_ruby]]],
[sitedir=$withval], [sitedir=$withval],
Expand All @@ -1908,9 +1921,9 @@ case "$target_os" in
RUBY_VENDOR_LIB_PATH="`eval echo \\"$VENDOR_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`" RUBY_VENDOR_LIB_PATH="`eval echo \\"$VENDOR_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`"
;; ;;
esac esac
RUBY_LIB_PATH="${RUBY_LIB_PREFIX}/${MAJOR}.${MINOR}.${TEENY}" RUBY_LIB_PATH="${RUBY_LIB_PREFIX}/${ruby_version}"
RUBY_SITE_LIB_PATH2="${RUBY_SITE_LIB_PATH}/${MAJOR}.${MINOR}.${TEENY}" RUBY_SITE_LIB_PATH2="${RUBY_SITE_LIB_PATH}/${ruby_version}"
RUBY_VENDOR_LIB_PATH2="${RUBY_VENDOR_LIB_PATH}/${MAJOR}.${MINOR}.${TEENY}" RUBY_VENDOR_LIB_PATH2="${RUBY_VENDOR_LIB_PATH}/${ruby_version}"


AC_DEFINE_UNQUOTED(RUBY_LIB, "${RUBY_LIB_PATH}") AC_DEFINE_UNQUOTED(RUBY_LIB, "${RUBY_LIB_PATH}")
AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, "${RUBY_SITE_LIB_PATH}") AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, "${RUBY_SITE_LIB_PATH}")
Expand All @@ -1920,6 +1933,7 @@ AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB2, "${RUBY_VENDOR_LIB_PATH2}")


AC_SUBST(arch)dnl AC_SUBST(arch)dnl
AC_SUBST(sitearch)dnl AC_SUBST(sitearch)dnl
AC_SUBST(ruby_version)dnl
AC_SUBST(sitedir)dnl AC_SUBST(sitedir)dnl
AC_SUBST(vendordir)dnl AC_SUBST(vendordir)dnl


Expand Down Expand Up @@ -1961,7 +1975,7 @@ fi
AC_ARG_WITH(rubyhdrdir, AC_ARG_WITH(rubyhdrdir,
[ --with-ruby-hdrdir=DIR core headers in DIR [INCLUDEDIR]], [ --with-ruby-hdrdir=DIR core headers in DIR [INCLUDEDIR]],
[rubyhdrdir=$withval], [rubyhdrdir=$withval],
[rubyhdrdir='${includedir}/ruby-${MAJOR}.${MINOR}.${TEENY}']) [rubyhdrdir='${includedir}/ruby-${ruby_version}'])


AC_ARG_WITH(sitehdrdir, AC_ARG_WITH(sitehdrdir,
[ --with-site-hdrdir=DIR core headers in DIR [INCLUDEDIR]], [ --with-site-hdrdir=DIR core headers in DIR [INCLUDEDIR]],
Expand Down
1 change: 0 additions & 1 deletion mkconfig.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ module RbConfig
print(*v_fast) print(*v_fast)
print(*v_others) print(*v_others)
print <<EOS print <<EOS
CONFIG["ruby_version"] = "$(MAJOR).$(MINOR).$(TEENY)"
CONFIG["rubylibdir"] = "$(libdir)/ruby/$(ruby_version)" CONFIG["rubylibdir"] = "$(libdir)/ruby/$(ruby_version)"
CONFIG["archdir"] = "$(rubylibdir)/$(arch)" CONFIG["archdir"] = "$(rubylibdir)/$(arch)"
CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)" CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)"
Expand Down

0 comments on commit 6bc480e

Please sign in to comment.