summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)