[前][次][番号順一覧][スレッド一覧]

ruby-changes:33273

From: nobu <ko1@a...>
Date: Mon, 17 Mar 2014 13:05:36 +0900 (JST)
Subject: [ruby-changes:33273] nobu:r45352 (trunk): configure.in: default os_version_style

nobu	2014-03-17 13:05:32 +0900 (Mon, 17 Mar 2014)

  New Revision: 45352

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45352

  Log:
    configure.in: default os_version_style
    
    * configure.in (os_version_style): get default style from
      `/usr/bin/ruby` if possible.

  Modified files:
    trunk/configure.in
Index: configure.in
===================================================================
--- configure.in	(revision 45351)
+++ configure.in	(revision 45352)
@@ -242,14 +242,21 @@ test x"$target_alias" = x && https://github.com/ruby/ruby/blob/trunk/configure.in#L242
 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=$withval],
+	[os_version_style=full
+	    AS_CASE($target_os, [[*[0-9].*]],
+		[AS_CASE([`/usr/bin/ruby -e 'puts RUBY_PLATFORM' 2>/dev/null`],
+		    [[*-*[0-9].*.0]], [os_version_style=minor+0],
+		    [[*-*[0-9].*.*]], [os_version_style=full],
+		    [[*-*[0-9].0]  ], [os_version_style=major+0],
+		    [[*-*[0-9].*]  ], [os_version_style=minor],
+		    [[*-*[0-9]]    ], [os_version_style=major],
+		)])
+	])
 os_version_style_transform=
 AS_CASE("${os_version_style}",
 	[full|teeny], [],

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]