]> granicus.if.org Git - icu/commitdiff
ICU-8912 verify that C++ compiler works before running tests.. somehow this was dropp...
authorSteven R. Loomis <srl@icu-project.org>
Tue, 21 Feb 2012 01:34:54 +0000 (01:34 +0000)
committerSteven R. Loomis <srl@icu-project.org>
Tue, 21 Feb 2012 01:34:54 +0000 (01:34 +0000)
X-SVN-Rev: 31459

icu4c/source/configure
icu4c/source/configure.in

index 8c1bbcc0ae28acc57160f9fc07c69900324914bc..64114bcb8a259152d72ea56dcd9343c7f4674a9e 100755 (executable)
@@ -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 <string> works" >&5
 $as_echo_n "checking if #include <string> works... " >&6; }
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
index f6194903d335191ec02cbb23f96f2cf49c61f1be..3f4f4ee569908605f5408e699ab0b395ac2a42d4 100644 (file)
@@ -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 <string> works]])
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <string>]], [[]])], [ac_cv_header_stdstring=yes], [ac_cv_header_stdstring=no])
 AC_MSG_RESULT($ac_cv_header_stdstring)