зеркало из https://github.com/mozilla/gecko-dev.git
Bug 933047 - Add a configure check whether the C++ compiler actually is a C++ compiler. r=ted
This commit is contained in:
Родитель
d162c6c32d
Коммит
aefaa836ba
|
@ -192,6 +192,18 @@ if test "$CLANG_CXX"; then
|
|||
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-mismatched-tags"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) actually is a C++ compiler])
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
_SAVE_LIBS=$LIBS
|
||||
LIBS=
|
||||
AC_TRY_LINK([#include <new>], [int *foo = new int;],,
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([$CXX $CXXFLAGS $LDFLAGS failed to compile and link a simple C++ source.]))
|
||||
LIBS=$_SAVE_LIBS
|
||||
AC_LANG_RESTORE
|
||||
AC_MSG_RESULT([yes])
|
||||
|
||||
if test -z "$GNU_CC"; then
|
||||
case "$target" in
|
||||
*-mingw*)
|
||||
|
|
|
@ -192,6 +192,18 @@ if test "$CLANG_CXX"; then
|
|||
_WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-mismatched-tags"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) actually is a C++ compiler])
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
_SAVE_LIBS=$LIBS
|
||||
LIBS=
|
||||
AC_TRY_LINK([#include <new>], [int *foo = new int;],,
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([$CXX $CXXFLAGS $LDFLAGS failed to compile and link a simple C++ source.]))
|
||||
LIBS=$_SAVE_LIBS
|
||||
AC_LANG_RESTORE
|
||||
AC_MSG_RESULT([yes])
|
||||
|
||||
if test -z "$GNU_CC"; then
|
||||
case "$target" in
|
||||
*-mingw*)
|
||||
|
|
Загрузка…
Ссылка в новой задаче