From: Steven R. Loomis Date: Tue, 21 Feb 2012 01:34:54 +0000 (+0000) Subject: ICU-8912 verify that C++ compiler works before running tests.. somehow this was dropp... X-Git-Tag: milestone-59-0-1~4011 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4322a7b1c99ef97c332e658f5d67d8ff573824e3;p=icu ICU-8912 verify that C++ compiler works before running tests.. somehow this was dropped in r30750 X-SVN-Rev: 31459 --- diff --git a/icu4c/source/configure b/icu4c/source/configure index 8c1bbcc0ae2..64114bcb8a2 100755 --- a/icu4c/source/configure +++ b/icu4c/source/configure @@ -5774,6 +5774,35 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have a C++ compiler" >&5 +$as_echo_n "checking if we have a C++ compiler... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + cxx_okay=yes +else + cxx_okay=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +if test $cxx_okay = yes +then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Good" >&5 +$as_echo "Good" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "C++ compiler $CXX does not work or no compiler found" "$LINENO" 5 +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if #include works" >&5 $as_echo_n "checking if #include works... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext diff --git a/icu4c/source/configure.in b/icu4c/source/configure.in index f6194903d33..3f4f4ee5699 100644 --- a/icu4c/source/configure.in +++ b/icu4c/source/configure.in @@ -442,6 +442,16 @@ AC_SUBST(ENABLE_RPATH) AC_LANG_PUSH([C++]) +AC_MSG_CHECKING([[if we have a C++ compiler]]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[cxx_okay=yes],[cxx_okay=no]) +if test $cxx_okay = yes +then + AC_MSG_RESULT([[Good]]) +else + AC_MSG_RESULT([[no]]) + AC_MSG_ERROR([[C++ compiler $CXX does not work or no compiler found]]) +fi + AC_MSG_CHECKING([[if #include works]]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[]])], [ac_cv_header_stdstring=yes], [ac_cv_header_stdstring=no]) AC_MSG_RESULT($ac_cv_header_stdstring)