use -erroff=E_NO_EXPLICIT_TYPE_GIVEN option with Sun cc to avoid hundreds of warnings from Sun X11 headers

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35504 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2005-09-14 13:18:10 +00:00
parent 94500b3284
commit 9122d155ab
2 changed files with 18 additions and 6 deletions

16
configure vendored
View File

@ -11316,7 +11316,7 @@ echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
GCC=`test $ac_compiler_gnu = yes && echo yes` GCC=`test $ac_compiler_gnu = yes && echo yes`
ac_test_CFLAGS=${CFLAGS+set} ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS ac_save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -g" CFLAGS="-g"
echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
if test "${ac_cv_prog_cc_g+set}" = set; then if test "${ac_cv_prog_cc_g+set}" = set; then
@ -11706,7 +11706,7 @@ fi
unset ac_cv_prog_cc_g unset ac_cv_prog_cc_g
ac_test_CFLAGS=${CFLAGS+set} ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS ac_save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -g" CFLAGS="-g"
echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
if test "${ac_cv_prog_cc_g+set}" = set; then if test "${ac_cv_prog_cc_g+set}" = set; then
@ -12544,9 +12544,9 @@ if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS=$ac_save_CXXFLAGS CXXFLAGS=$ac_save_CXXFLAGS
elif test $ac_cv_prog_cxx_g = yes; then elif test $ac_cv_prog_cxx_g = yes; then
if test "$GXX" = yes; then if test "$GXX" = yes; then
CXXFLAGS="$CXXFLAGS -g -O2" CXXFLAGS="-g -O2"
else else
CXXFLAGS="$CXXFLAGS -g" CXXFLAGS="-g"
fi fi
else else
if test "$GXX" = yes; then if test "$GXX" = yes; then
@ -12784,9 +12784,9 @@ if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS=$ac_save_CXXFLAGS CXXFLAGS=$ac_save_CXXFLAGS
elif test $ac_cv_prog_cxx_g = yes; then elif test $ac_cv_prog_cxx_g = yes; then
if test "$GXX" = yes; then if test "$GXX" = yes; then
CXXFLAGS="$CXXFLAGS -g -O2" CXXFLAGS="-g -O2"
else else
CXXFLAGS="$CXXFLAGS -g" CXXFLAGS="-g"
fi fi
else else
if test "$GXX" = yes; then if test "$GXX" = yes; then
@ -21470,6 +21470,10 @@ if test "x$SUNCXX" = xyes; then
CXXFLAGS="$CXXFLAGS -features=tmplife" CXXFLAGS="$CXXFLAGS -features=tmplife"
fi fi
if test "x$SUNCC" = xyes; then
CFLAGS="$CFLAGS -erroff=E_NO_EXPLICIT_TYPE_GIVEN"
fi
if test "$wxUSE_STD_STRING" = "yes" -o "$wxUSE_STL" = "yes"; then if test "$wxUSE_STD_STRING" = "yes" -o "$wxUSE_STL" = "yes"; then
ac_ext=cc ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS' ac_cpp='$CXXCPP $CPPFLAGS'

View File

@ -1918,6 +1918,14 @@ if test "x$SUNCXX" = xyes; then
CXXFLAGS="$CXXFLAGS -features=tmplife" CXXFLAGS="$CXXFLAGS -features=tmplife"
fi fi
dnl Sun X11 headers are (still, in 2005!) non-ANSI and the best they could do
dnl was to hack their C++ compiler to accept them silently -- but C compiler
dnl still spits out dozens of warnings for each X include file, so suppress
dnl them
if test "x$SUNCC" = xyes; then
CFLAGS="$CFLAGS -erroff=E_NO_EXPLICIT_TYPE_GIVEN"
fi
dnl check for std::string or std::wstring dnl check for std::string or std::wstring
if test "$wxUSE_STD_STRING" = "yes" -o "$wxUSE_STL" = "yes"; then if test "$wxUSE_STD_STRING" = "yes" -o "$wxUSE_STL" = "yes"; then
AC_LANG_PUSH(C++) AC_LANG_PUSH(C++)