Bug 1032528 - Use C{,PP,XX}FLAGS 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
Родитель b1b4b8dc9d
Коммит 9dc77f0f7a
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 $CPPFLAGS $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 $CPPFLAGS $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.])