1
1

Reorder the C++ compiler discovery stages. Check first the compiler vendor

before checking if we are able to compile the test program. This is required
for windows as the C++ conftest.c file generated by configure cannot be
compiled with the Microsoft cl.exe compiler (because of the exit function
prototype). So if we detect a vendor equal to microsoft we will assume
that the compiler is correctly installed (which is true on Windows most
of the time anyway).

This commit was SVN r11268.
Этот коммит содержится в:
George Bosilca 2006-08-20 13:53:27 +00:00
родитель 6b01358cc1
Коммит 8db4a55a57

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

@ -3,7 +3,7 @@ dnl
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
dnl University Research and Technology dnl University Research and Technology
dnl Corporation. All rights reserved. dnl Corporation. All rights reserved.
dnl Copyright (c) 2004-2005 The University of Tennessee and The University dnl Copyright (c) 2004-2006 The University of Tennessee and The University
dnl of Tennessee Research Foundation. All rights dnl of Tennessee Research Foundation. All rights
dnl reserved. dnl reserved.
dnl Copyright (c) 2004-2006 High Performance Computing Center Stuttgart, dnl Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
@ -26,8 +26,6 @@ AC_DEFUN([OMPI_SETUP_CXX],[
AC_REQUIRE([_OMPI_START_SETUP_CXX]) AC_REQUIRE([_OMPI_START_SETUP_CXX])
AC_REQUIRE([_OMPI_PROG_CXX]) AC_REQUIRE([_OMPI_PROG_CXX])
OMPI_CXX_COMPILER_VENDOR([ompi_cxx_vendor])
# Do we want code coverage # Do we want code coverage
if test "$WANT_COVERAGE" = "1"; then if test "$WANT_COVERAGE" = "1"; then
if test "$ompi_cxx_vendor" = "gnu" ; then if test "$ompi_cxx_vendor" = "gnu" ; then
@ -239,6 +237,8 @@ AC_DEFUN([_OMPI_PROG_CXX],[
OMPI_CXX_ABSOLUTE="`which $CXX`" OMPI_CXX_ABSOLUTE="`which $CXX`"
AC_SUBST(OMPI_CXX_ABSOLUTE) AC_SUBST(OMPI_CXX_ABSOLUTE)
OMPI_CXX_COMPILER_VENDOR([ompi_cxx_vendor])
# Make sure that the C++ compiler both works and is actually a C++ # Make sure that the C++ compiler both works and is actually a C++
# compiler (if not cross-compiling). Don't just use the AC macro # compiler (if not cross-compiling). Don't just use the AC macro
# so that we can have a pretty message. Do something here that # so that we can have a pretty message. Do something here that
@ -252,7 +252,9 @@ AC_DEFUN([_OMPI_PROG_CXX],[
# we want to cover the entire spectrum (compiling, linking, # we want to cover the entire spectrum (compiling, linking,
# running). # running).
if[ test "$ompi_cv_cxx_compiler_vendor" != "microsoft" ]; then
OMPI_CHECK_COMPILER_WORKS([C++], [#include <string>], OMPI_CHECK_COMPILER_WORKS([C++], [#include <string>],
[std::string foo = "Hello, world"; return 0], [], [std::string foo = "Hello, world"], [],
[AC_MSG_ERROR([Could not run a simple C++ program. Aborting.])]) [AC_MSG_ERROR([Could not run a simple C++ program. Aborting.])])
fi
]) ])