From fbe45fdfa2a3dd461adfe82e13e97c7717b34dca Mon Sep 17 00:00:00 2001 From: akr Date: Fri, 17 May 2013 09:10:16 +0000 Subject: * 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 --- configure.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'configure.in') 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) -- cgit v1.2.3