summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-17 09:10:16 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-17 09:10:16 +0000
commitfbe45fdfa2a3dd461adfe82e13e97c7717b34dca (patch)
treeaa8ab831e9ff3d5aa52858ca24b418f4c83a70a2
parentbaa65ad10878385dc47caebdb6c482f1dea71b98 (diff)
* configure.in: Consider error messages to find out version option of
C compiler. The C compiler of Sun Studio C emits "Warning: Option -qversion passed to ld, if ld is invoked, ignored otherwise" and exit successfully. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog8
-rw-r--r--configure.in5
2 files changed, 12 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 04979dea54..c1801332f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Fri May 17 18:06:15 2013 Tanaka Akira <akr@fsij.org>
+
+ * configure.in: Consider error messages to find out version option of
+ C compiler.
+ The C compiler of Sun Studio C emits "Warning: Option -qversion
+ passed to ld, if ld is invoked, ignored otherwise" and exit
+ successfully.
+
Fri May 17 17:34:48 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* gc.c (rb_gc_guarded_ptr): unoptimize on other compilers than gcc and
diff --git a/configure.in b/configure.in
index 540d7d2097..bd4b039e55 100644
--- a/configure.in
+++ b/configure.in
@@ -439,7 +439,10 @@ AC_SUBST(COUTFLAG)
cc_version=
for option in --version -v -V -qversion; do
- $CC $option > /dev/null 2>&1 || continue
+ cc_version_message=`$CC $option 2>&1`
+ cc_version_status=$?
+ AS_CASE($cc_version_status, [0], [:], [continue])
+ AS_CASE($cc_version_message, [*Warning*], [continue])
cc_version='$(CC) '$option
done
AC_SUBST(CC_VERSION, $cc_version)