if test $GCC_PCH = 1 ; then
PCH_FLAGS="-DWX_PRECOMP"
-fi
-
-if test "$GCC" = yes; then
- echo "$as_me:$LINENO: checking if this GCC version is >= 4.0 and needs -DNO_GCC_PRAGMA" >&5
+ GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA"
+else
+ if test "$GCC" = yes; then
+ echo "$as_me:$LINENO: checking if this GCC version is >= 4.0 and needs -DNO_GCC_PRAGMA" >&5
echo $ECHO_N "checking if this GCC version is >= 4.0 and needs -DNO_GCC_PRAGMA... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
main ()
{
#if (__GNUC__ < 4)
- #error "Not GCC 4.0 or greater"
- #endif
+ #error "Not GCC 4.0 or greater"
+ #endif
;
return 0;
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA"
- echo "$as_me:$LINENO: result: yes" >&5
+ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
echo "$as_me: failed program was:" >&5
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-else
- case "${host}" in
- powerpc-*-darwin* )
- GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA"
- ;;
- *-*-mingw32* )
- if test "$wxUSE_STL" = "yes" -o \
+ case "${host}" in
+ powerpc-*-darwin* )
+ GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA"
+ ;;
+ *-*-mingw32* )
+ if test "$wxUSE_STL" = "yes" -o \
"$wxUSE_NO_EXCEPTIONS" != "yes" -o \
"$wxUSE_NO_RTTI" != "yes"; then
- echo "$as_me:$LINENO: checking if this MinGW version needs -DNO_GCC_PRAGMA" >&5
+ echo "$as_me:$LINENO: checking if this MinGW version needs -DNO_GCC_PRAGMA" >&5
echo $ECHO_N "checking if this MinGW version needs -DNO_GCC_PRAGMA... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
main ()
{
#if !(__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2))
- #error "Not GCC 3.2 or greater"
- #endif
+ #error "Not GCC 3.2 or greater"
+ #endif
;
return 0;
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA"
- echo "$as_me:$LINENO: result: yes" >&5
+ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
echo "$as_me: failed program was:" >&5
echo "${ECHO_T}no" >&6
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- ;;
- *-pc-os2_emx | *-pc-os2-emx )
- if test "$wxUSE_STL" = "yes"; then
- echo "$as_me:$LINENO: checking if this gcc version needs -DNO_GCC_PRAGMA" >&5
+ fi
+ ;;
+ *-pc-os2_emx | *-pc-os2-emx )
+ if test "$wxUSE_STL" = "yes"; then
+ echo "$as_me:$LINENO: checking if this gcc version needs -DNO_GCC_PRAGMA" >&5
echo $ECHO_N "checking if this gcc version needs -DNO_GCC_PRAGMA... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
main ()
{
#if !(__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2))
- #error "Not GCC 3.2 or greater"
- #endif
+ #error "Not GCC 3.2 or greater"
+ #endif
;
return 0;
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA"
- echo "$as_me:$LINENO: result: yes" >&5
+ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
echo "$as_me: failed program was:" >&5
echo "${ECHO_T}no" >&6
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- ;;
- esac
+ fi
+ ;;
+ esac
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
fi
CPPFLAGS="$PCH_FLAGS $GCC_PRAGMA_FLAGS $CPPFLAGS"
GCC_PRAGMA_FLAGS=""
PCH_FLAGS=""
-dnl Find out if we have to define WX_PRECOMP:
+dnl Find out if we have to define WX_PRECOMP (and thus NO_GCC_PRAGMA)
if test $GCC_PCH = 1 ; then
PCH_FLAGS="-DWX_PRECOMP"
-fi
-
-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])])
+ GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA"
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 \
+ 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 \
"$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
+ 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
+dnl closing bracket of if GCC < 4.0
+ ] )
+ fi
fi
CPPFLAGS="$PCH_FLAGS $GCC_PRAGMA_FLAGS $CPPFLAGS"