- 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 \
+ dnl Find out if we have to define NO_GCC_PRAGMA
+ if test "$GCC" = yes; then
+ AC_MSG_CHECKING([if this GCC version is >= 4.0 and needs -DNO_GCC_PRAGMA])
+ AC_TRY_COMPILE([],
+ [#if (__GNUC__ < 4)
+ #error "Not GCC 4.0 or greater"
+ #endif
+ ],
+ [GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA"
+ AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ 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 \