Changeset 1168


Ignore:
Timestamp:
Sep 1, 2008 5:13:27 AM (11 years ago)
Author:
stefan
Message:

check whether the C++ compiler actually works

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/coin.m4

    r1113 r1168  
    527527# AC_MSG_NOTICE([C++ compiler candidates: $comps])
    528528AC_PROG_CXX([$comps])
    529 if test -z "$CXX" ; then
    530   AC_MSG_ERROR([Failed to find a C++ compiler!])
    531 fi
     529
     530#AC_PROG_CXX sets CXX to g++ if it cannot find a working C++ compiler
     531#thus, we test here whether $CXX is actually working
     532AC_LANG_PUSH(C++)
     533AC_MSG_CHECKING([whether C++ compiler $CXX works]);
     534AC_COMPILE_IFELSE(
     535  [AC_LANG_PROGRAM(, [int i=0;])],
     536  [AC_MSG_RESULT(yes)],
     537  [AC_MSG_RESULT(no)
     538   AC_MSG_ERROR(failed to find a C++ compiler or C++ compiler $CXX does not work)]
     539)
     540AC_LANG_POP(C++)
    532541
    533542# It seems that we need to cleanup something here for the Windows
Note: See TracChangeset for help on using the changeset viewer.