Default to cc/c++ instead of gcc/g++ on OpenBSD

This commit is contained in:
Jeremy Evans 2019-09-09 16:19:26 -07:00
parent 0e9d56f5e7
commit 8d3db4f26c
Notes: git 2019-09-10 10:12:16 +09:00

View File

@ -181,7 +181,9 @@ AS_CASE(["$host_os:$build_os"],
@%:@endif @%:@endif
SRC SRC
AC_MSG_ERROR([clang version 3.0 or later is required]) AC_MSG_ERROR([clang version 3.0 or later is required])
]) ])],
[openbsd*:openbsd*], [
AC_CHECK_TOOLS(CC, [cc])
]) ])
AS_IF([test x"${build}" != x"${host}"], [ AS_IF([test x"${build}" != x"${host}"], [
AC_CHECK_TOOL(CC, gcc) AC_CHECK_TOOL(CC, gcc)
@ -210,7 +212,9 @@ AS_CASE(["$build_os:${CXX}"],
AS_IF([test "${CXX}"], [ AS_IF([test "${CXX}"], [
CXX=`echo "/$CC " | sed ["s:\([ /]\)${pat}:\1$CXX:; s:^/::; s: *$::"]` CXX=`echo "/$CC " | sed ["s:\([ /]\)${pat}:\1$CXX:; s:^/::; s: *$::"]`
]) ])
AC_MSG_RESULT([$CXX]) AC_MSG_RESULT([$CXX])],
[openbsd*:*], [
AC_CHECK_TOOLS(CXX, [c++])
]) ])
test -z "$CXX" || ac_cv_prog_CXX="$CXX" test -z "$CXX" || ac_cv_prog_CXX="$CXX"