Reverted GCC_NO_PRAGMA change

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34772 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling 2005-06-29 13:26:45 +00:00
parent 8b5d41cc51
commit ddd14b1483
3 changed files with 805 additions and 342 deletions

1082
configure vendored

File diff suppressed because one or more lines are too long

View File

@ -6693,13 +6693,61 @@ if test "$wxUSE_OMF" = "yes"; then
esac
fi
dnl According to Vaclav, if NO_GCC_PRAGMA is used for any reason it needs to
dnl be in wx-config output. Not doing so could result in link problems.
GCC_PRAGMA_FLAGS=""
PCH_FLAGS=""
dnl Find out if we have to define NO_GCC_PRAGMA and WX_PRECOMP:
if test $GCC_PCH = 1 ; then
CPPFLAGS="-DWX_PRECOMP $CPPFLAGS"
GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA"
PCH_FLAGS="-DWX_PRECOMP"
else
case "${host}" in
powerpc-*-darwin* )
dnl Some Apple's GCC version are broken and can't handle the
dnl pragmas:
GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA"
;;
*-*-mingw32* )
dnl MinGW GCC versions > 3.2 have problems with
dnl static member of classes derived from templates
dnl in combination with #pragma interface/implementation
dnl (the test case uses 4 files)
dnl ... and with exceptions handling (undefined symbols needed
dnl to correctly calls dtors when unwinding) as well
if test "$wxUSE_STL" = "yes" -o \
"$wxUSE_NO_EXCEPTIONS" != "yes" -o \
"$wxUSE_NO_RTTI" != "yes"; then
AC_MSG_CHECKING([if this MinGW version needs -DNO_GCC_PRAGMA])
AC_TRY_COMPILE([],
[#if !(__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2))
#error "Not GCC 3.2 or greater"
#endif
],
[GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA"
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
fi
;;
*-pc-os2_emx | *-pc-os2-emx )
dnl GCC versions ported to OS/2 have similar problems with
dnl static member of classes in combination with STL and
dnl pragma interface/implementation
if test "$wxUSE_STL" = "yes"; then
AC_MSG_CHECKING([if this gcc version needs -DNO_GCC_PRAGMA])
AC_TRY_COMPILE([],
[#if !(__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2))
#error "Not GCC 3.2 or greater"
#endif
],
[GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA"
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
fi
;;
esac
fi
dnl FIXME: This is a temporary measure until the need for it is also
dnl removed from the headers.
CPPFLAGS="-DNO_GCC_PRAGMA $CPPFLAGS"
CPPFLAGS="$PCH_FLAGS $GCC_PRAGMA_FLAGS $CPPFLAGS"
dnl for convenience, sort the samples in alphabetical order
@ -6750,6 +6798,7 @@ AC_SUBST(WXCONFIG_INCLUDE)
AC_SUBST(WXCONFIG_RPATH)
AC_SUBST(WXCONFIG_LDFLAGS_GUI)
AC_SUBST(WX_LARGEFILE_FLAGS)
AC_SUBST(GCC_PRAGMA_FLAGS)
AC_SUBST(CODE_GEN_FLAGS)
AC_SUBST(CODE_GEN_FLAGS_CXX)
AC_SUBST(EXE_LINKER)

View File

@ -1142,11 +1142,7 @@ else
_include_cppflags="-I${includedir} -I${prefix}/contrib/include"
fi
_cppflags=$(echo "-I${libdir}/wx/include/@TOOLCHAIN_FULLNAME@" $_include_cppflags "@WXDEBUG_DEFINE@" "@TOOLCHAIN_DEFS@" "@TOOLCHAIN_DLL_DEFS@" $_gui_cppflags "@WXCONFIG_INCLUDE@" "@WX_LARGEFILE_FLAGS@" "-DNO_GCC_PRAGMA")
# FIXME: NO_GCC_PRAGMA is defined here to cover for a historical accident.
# it may be removed once it is purged from the wx/headers also.
_cppflags=$(echo "-I${libdir}/wx/include/@TOOLCHAIN_FULLNAME@" $_include_cppflags "@WXDEBUG_DEFINE@" "@TOOLCHAIN_DEFS@" "@TOOLCHAIN_DLL_DEFS@" $_gui_cppflags "@WXCONFIG_INCLUDE@" "@WX_LARGEFILE_FLAGS@" "@GCC_PRAGMA_FLAGS@")
# now without further ado, we can answer these too.
[ -z "$output_option_cppflags" ] || echo $_cppflags