define NO_GCC_PRAGMA if

- PCH
    - GCC >= 4.0
    - certain cases like Apple GCC, Mingw32 with certain other option


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34775 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2005-06-29 19:02:19 +00:00
parent 87dd70d3c9
commit 87ae5038ef
2 changed files with 93 additions and 90 deletions

13
configure vendored
View File

@@ -44238,9 +44238,9 @@ PCH_FLAGS=""
if test $GCC_PCH = 1 ; then
PCH_FLAGS="-DWX_PRECOMP"
fi
if test "$GCC" = yes; then
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
@@ -44292,9 +44292,6 @@ sed 's/^/| /' conftest.$ac_ext >&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"
@@ -44416,6 +44413,10 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
;;
esac
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
fi
CPPFLAGS="$PCH_FLAGS $GCC_PRAGMA_FLAGS $CPPFLAGS"

View File

@@ -6698,13 +6698,13 @@ 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 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
GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA"
else
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)
@@ -6713,8 +6713,7 @@ if test "$GCC" = yes; then
],
[GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA"
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
else
[AC_MSG_RESULT([no])
case "${host}" in
powerpc-*-darwin* )
dnl Some Apple's GCC version are broken and can't handle the
@@ -6759,6 +6758,9 @@ else
fi
;;
esac
dnl closing bracket of if GCC < 4.0
] )
fi
fi
CPPFLAGS="$PCH_FLAGS $GCC_PRAGMA_FLAGS $CPPFLAGS"