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:
69
configure
vendored
69
configure
vendored
@@ -44238,12 +44238,12 @@ PCH_FLAGS=""
|
|||||||
|
|
||||||
if test $GCC_PCH = 1 ; then
|
if test $GCC_PCH = 1 ; then
|
||||||
PCH_FLAGS="-DWX_PRECOMP"
|
PCH_FLAGS="-DWX_PRECOMP"
|
||||||
fi
|
GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA"
|
||||||
|
else
|
||||||
if test "$GCC" = yes; then
|
if test "$GCC" = yes; then
|
||||||
echo "$as_me:$LINENO: checking if this GCC version is >= 4.0 and needs -DNO_GCC_PRAGMA" >&5
|
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
|
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. */
|
/* confdefs.h. */
|
||||||
_ACEOF
|
_ACEOF
|
||||||
cat confdefs.h >>conftest.$ac_ext
|
cat confdefs.h >>conftest.$ac_ext
|
||||||
@@ -44254,8 +44254,8 @@ int
|
|||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
#if (__GNUC__ < 4)
|
#if (__GNUC__ < 4)
|
||||||
#error "Not GCC 4.0 or greater"
|
#error "Not GCC 4.0 or greater"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
@@ -44284,7 +44284,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
(exit $ac_status); }; }; then
|
(exit $ac_status); }; }; then
|
||||||
GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA"
|
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
|
echo "${ECHO_T}yes" >&6
|
||||||
else
|
else
|
||||||
echo "$as_me: failed program was:" >&5
|
echo "$as_me: failed program was:" >&5
|
||||||
@@ -44292,20 +44292,17 @@ sed 's/^/| /' conftest.$ac_ext >&5
|
|||||||
|
|
||||||
echo "$as_me:$LINENO: result: no" >&5
|
echo "$as_me:$LINENO: result: no" >&5
|
||||||
echo "${ECHO_T}no" >&6
|
echo "${ECHO_T}no" >&6
|
||||||
fi
|
case "${host}" in
|
||||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
powerpc-*-darwin* )
|
||||||
else
|
GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA"
|
||||||
case "${host}" in
|
;;
|
||||||
powerpc-*-darwin* )
|
*-*-mingw32* )
|
||||||
GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA"
|
if test "$wxUSE_STL" = "yes" -o \
|
||||||
;;
|
|
||||||
*-*-mingw32* )
|
|
||||||
if test "$wxUSE_STL" = "yes" -o \
|
|
||||||
"$wxUSE_NO_EXCEPTIONS" != "yes" -o \
|
"$wxUSE_NO_EXCEPTIONS" != "yes" -o \
|
||||||
"$wxUSE_NO_RTTI" != "yes"; then
|
"$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
|
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. */
|
/* confdefs.h. */
|
||||||
_ACEOF
|
_ACEOF
|
||||||
cat confdefs.h >>conftest.$ac_ext
|
cat confdefs.h >>conftest.$ac_ext
|
||||||
@@ -44316,8 +44313,8 @@ int
|
|||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
#if !(__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2))
|
#if !(__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2))
|
||||||
#error "Not GCC 3.2 or greater"
|
#error "Not GCC 3.2 or greater"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
@@ -44346,7 +44343,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
(exit $ac_status); }; }; then
|
(exit $ac_status); }; }; then
|
||||||
GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA"
|
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
|
echo "${ECHO_T}yes" >&6
|
||||||
else
|
else
|
||||||
echo "$as_me: failed program was:" >&5
|
echo "$as_me: failed program was:" >&5
|
||||||
@@ -44356,13 +44353,13 @@ echo "$as_me:$LINENO: result: no" >&5
|
|||||||
echo "${ECHO_T}no" >&6
|
echo "${ECHO_T}no" >&6
|
||||||
fi
|
fi
|
||||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*-pc-os2_emx | *-pc-os2-emx )
|
*-pc-os2_emx | *-pc-os2-emx )
|
||||||
if test "$wxUSE_STL" = "yes"; then
|
if test "$wxUSE_STL" = "yes"; then
|
||||||
echo "$as_me:$LINENO: checking if this gcc version needs -DNO_GCC_PRAGMA" >&5
|
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
|
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. */
|
/* confdefs.h. */
|
||||||
_ACEOF
|
_ACEOF
|
||||||
cat confdefs.h >>conftest.$ac_ext
|
cat confdefs.h >>conftest.$ac_ext
|
||||||
@@ -44373,8 +44370,8 @@ int
|
|||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
#if !(__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2))
|
#if !(__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2))
|
||||||
#error "Not GCC 3.2 or greater"
|
#error "Not GCC 3.2 or greater"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
@@ -44403,7 +44400,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
(exit $ac_status); }; }; then
|
(exit $ac_status); }; }; then
|
||||||
GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA"
|
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
|
echo "${ECHO_T}yes" >&6
|
||||||
else
|
else
|
||||||
echo "$as_me: failed program was:" >&5
|
echo "$as_me: failed program was:" >&5
|
||||||
@@ -44413,9 +44410,13 @@ echo "$as_me:$LINENO: result: no" >&5
|
|||||||
echo "${ECHO_T}no" >&6
|
echo "${ECHO_T}no" >&6
|
||||||
fi
|
fi
|
||||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
fi
|
||||||
|
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
CPPFLAGS="$PCH_FLAGS $GCC_PRAGMA_FLAGS $CPPFLAGS"
|
CPPFLAGS="$PCH_FLAGS $GCC_PRAGMA_FLAGS $CPPFLAGS"
|
||||||
|
|
||||||
|
114
configure.in
114
configure.in
@@ -6698,67 +6698,69 @@ dnl be in wx-config output. Not doing so could result in link problems.
|
|||||||
GCC_PRAGMA_FLAGS=""
|
GCC_PRAGMA_FLAGS=""
|
||||||
PCH_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
|
if test $GCC_PCH = 1 ; then
|
||||||
PCH_FLAGS="-DWX_PRECOMP"
|
PCH_FLAGS="-DWX_PRECOMP"
|
||||||
fi
|
GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA"
|
||||||
|
|
||||||
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])])
|
|
||||||
else
|
else
|
||||||
case "${host}" in
|
dnl Find out if we have to define NO_GCC_PRAGMA
|
||||||
powerpc-*-darwin* )
|
if test "$GCC" = yes; then
|
||||||
dnl Some Apple's GCC version are broken and can't handle the
|
AC_MSG_CHECKING([if this GCC version is >= 4.0 and needs -DNO_GCC_PRAGMA])
|
||||||
dnl pragmas:
|
AC_TRY_COMPILE([],
|
||||||
GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA"
|
[#if (__GNUC__ < 4)
|
||||||
;;
|
#error "Not GCC 4.0 or greater"
|
||||||
*-*-mingw32* )
|
#endif
|
||||||
dnl MinGW GCC versions > 3.2 have problems with
|
],
|
||||||
dnl static member of classes derived from templates
|
[GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA"
|
||||||
dnl in combination with #pragma interface/implementation
|
AC_MSG_RESULT([yes])],
|
||||||
dnl (the test case uses 4 files)
|
[AC_MSG_RESULT([no])
|
||||||
dnl ... and with exceptions handling (undefined symbols needed
|
case "${host}" in
|
||||||
dnl to correctly calls dtors when unwinding) as well
|
powerpc-*-darwin* )
|
||||||
if test "$wxUSE_STL" = "yes" -o \
|
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_EXCEPTIONS" != "yes" -o \
|
||||||
"$wxUSE_NO_RTTI" != "yes"; then
|
"$wxUSE_NO_RTTI" != "yes"; then
|
||||||
AC_MSG_CHECKING([if this MinGW version needs -DNO_GCC_PRAGMA])
|
AC_MSG_CHECKING([if this MinGW version needs -DNO_GCC_PRAGMA])
|
||||||
AC_TRY_COMPILE([],
|
AC_TRY_COMPILE([],
|
||||||
[#if !(__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2))
|
[#if !(__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2))
|
||||||
#error "Not GCC 3.2 or greater"
|
#error "Not GCC 3.2 or greater"
|
||||||
#endif
|
#endif
|
||||||
],
|
],
|
||||||
[GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA"
|
[GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA"
|
||||||
AC_MSG_RESULT([yes])],
|
AC_MSG_RESULT([yes])],
|
||||||
[AC_MSG_RESULT([no])])
|
[AC_MSG_RESULT([no])])
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*-pc-os2_emx | *-pc-os2-emx )
|
*-pc-os2_emx | *-pc-os2-emx )
|
||||||
dnl GCC versions ported to OS/2 have similar problems with
|
dnl GCC versions ported to OS/2 have similar problems with
|
||||||
dnl static member of classes in combination with STL and
|
dnl static member of classes in combination with STL and
|
||||||
dnl pragma interface/implementation
|
dnl pragma interface/implementation
|
||||||
if test "$wxUSE_STL" = "yes"; then
|
if test "$wxUSE_STL" = "yes"; then
|
||||||
AC_MSG_CHECKING([if this gcc version needs -DNO_GCC_PRAGMA])
|
AC_MSG_CHECKING([if this gcc version needs -DNO_GCC_PRAGMA])
|
||||||
AC_TRY_COMPILE([],
|
AC_TRY_COMPILE([],
|
||||||
[#if !(__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2))
|
[#if !(__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2))
|
||||||
#error "Not GCC 3.2 or greater"
|
#error "Not GCC 3.2 or greater"
|
||||||
#endif
|
#endif
|
||||||
],
|
],
|
||||||
[GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA"
|
[GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA"
|
||||||
AC_MSG_RESULT([yes])],
|
AC_MSG_RESULT([yes])],
|
||||||
[AC_MSG_RESULT([no])])
|
[AC_MSG_RESULT([no])])
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
dnl closing bracket of if GCC < 4.0
|
||||||
|
] )
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
CPPFLAGS="$PCH_FLAGS $GCC_PRAGMA_FLAGS $CPPFLAGS"
|
CPPFLAGS="$PCH_FLAGS $GCC_PRAGMA_FLAGS $CPPFLAGS"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user