diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-08-31 14:49:56 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-09-01 11:05:10 +0900 |
commit | b01d852c2add603ab51689d495fa443d32cf5909 (patch) | |
tree | cbd0455a3db8a2545d3905f422f0a08ce93b64e2 /configure.ac | |
parent | 50736f127abf9f13152b900f0c71e6ecd7e71427 (diff) | |
download | ruby-b01d852c2add603ab51689d495fa443d32cf5909.tar.gz |
congigure.ac: favour gcc on Linux
Requested by Naruse.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index a6734dfafb..296b069f18 100644 --- a/configure.ac +++ b/configure.ac @@ -101,7 +101,9 @@ AS_IF([test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"], [ AC_MSG_ERROR(cached CC is different -- throw away $cache_file (it is also a good idea to do 'make clean' before compiling)) ]) -AS_IF([test -z "${CC}"], [ +AS_CASE(["${build_os}"], [linux*], [ + AC_CHECK_TOOLS([CC], [gcc clang cc]) +], [ # OpenBSD wants to prefer cc over gcc. # See https://github.com/ruby/ruby/pull/2443 AC_CHECK_TOOLS([CC], [cl.exe clang cc gcc c99 /usr/ucb/cc]) |