зеркало из https://github.com/github/ruby.git
configure.in: --with-os-version-style
* configure.in (--with-os-version-style): option to transform target OS version string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
a8e29fb206
Коммит
b9294f226b
|
@ -1,3 +1,8 @@
|
|||
Tue Nov 19 23:38:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* configure.in (--with-os-version-style): option to transform target
|
||||
OS version string.
|
||||
|
||||
Tue Nov 19 21:27:33 2013 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* test/net/http/utils.rb (spawn_server): Specify zero for port to
|
||||
|
|
23
configure.in
23
configure.in
|
@ -242,6 +242,29 @@ test x"$target_alias" = x &&
|
|||
target_os=`echo $target_os | sed 's/linux-gnu$/linux/;s/linux-gnu/linux-/'`
|
||||
ac_install_sh='' # unusable for extension libraries.
|
||||
|
||||
AS_CASE($target_os,
|
||||
[darwin*], [os_version_style=major+0],
|
||||
[os_version_style=full])
|
||||
AC_ARG_WITH(os-version-style,
|
||||
AS_HELP_STRING([--with-os-version-style=TYPE],
|
||||
[OS version number for target and target_os [[full]]]
|
||||
[(full|teeny|minor+0|minor|major+0|major|none)]),
|
||||
[os_version_style=$withval])
|
||||
os_version_style_transform=
|
||||
AS_CASE("${os_version_style}",
|
||||
[full|teeny], [],
|
||||
[minor+0], [os_version_style_transform=['s/\([0-9]\.[0-9][0-9]*\)\.[0-9][.0-9]*$/\1.0/']],
|
||||
[minor], [os_version_style_transform=['s/\([0-9]\.[0-9][0-9]*\)\.[0-9][.0-9]*$/\1/']],
|
||||
[major+0], [os_version_style_transform=['s/\([0-9]\)\.[0-9][.0-9]*$/\1.0/']],
|
||||
[major], [os_version_style_transform=['s/\([0-9]\)\.[0-9][.0-9]*$/\1/']],
|
||||
[none], [os_version_style_transform=['s/[0-9]\.[0-9][.0-9]*$//']],
|
||||
[AC_MSG_ERROR(unknown --with-os-version-style: $withval)])
|
||||
AS_IF([test -z "$target_alias" -a -n "$os_version_style_transform"],
|
||||
[
|
||||
target=`echo ${target} | sed "$os_version_style_transform"`
|
||||
target_os=`echo ${target_os} | sed "$os_version_style_transform"`
|
||||
])
|
||||
|
||||
AC_DEFUN([RUBY_APPEND_OPTION],
|
||||
[# RUBY_APPEND_OPTION($1, $2)
|
||||
AS_CASE([" [$]{$1-} "],
|
||||
|
|
Загрузка…
Ссылка в новой задаче