Make configure work with clang
It was mistaking clang for gcc and deciding its version was too low.
This commit is contained in:
parent
e637f8b40c
commit
2a50187a92
16
configure.ac
16
configure.ac
|
@ -48,9 +48,23 @@ solaris*)
|
|||
;;
|
||||
esac
|
||||
|
||||
dnl clang is mostly GCC-compatible, but its version is much lower,
|
||||
dnl so we have to check for it.
|
||||
AC_MSG_CHECKING([if compiling with clang])
|
||||
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([], [[
|
||||
#ifndef __clang__
|
||||
not clang
|
||||
#endif
|
||||
]])],
|
||||
[CLANG=yes], [CLANG=no])
|
||||
|
||||
AC_MSG_RESULT([$CLANG])
|
||||
|
||||
dnl If we're using GCC, make sure that it is at least version 3.3.0. Older
|
||||
dnl versions are explictly not supported.
|
||||
if test "x$GCC" = xyes; then
|
||||
if test "x$GCC" = xyes -a "x$CLANG" = xno; then
|
||||
AC_MSG_CHECKING([whether gcc version is sufficient])
|
||||
major=0
|
||||
minor=0
|
||||
|
|
Loading…
Reference in New Issue