Bug 1032528 - Use CFLAGS when determining the compiler version in case it can be affected by what is there; r=glandium

This for example allows us to use -fmsc-version in CFLAGS/CXXFLAGS
with clang-cl.
This commit is contained in:
Ehsan Akhgari 2014-07-04 10:43:08 -04:00
Родитель 02d0c6d693
Коммит 2843fe358e
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -26,10 +26,10 @@ COMPILER icc __INTEL_COMPILER
#endif
EOF
read dummy compiler CC_VERSION <<EOF
$($CC -E conftest.c 2>/dev/null | grep COMPILER)
$($CC -E $CFLAGS conftest.c 2>/dev/null | grep COMPILER)
EOF
read dummy cxxcompiler CXX_VERSION <<EOF
$($CXX -E conftest.c 2>/dev/null | grep COMPILER)
$($CXX -E $CXXFLAGS conftest.c 2>/dev/null | grep COMPILER)
EOF
if test "$compiler" != "$cxxcompiler"; then
AC_MSG_ERROR([Your C and C++ compilers are different. You need to use the same compiler.])