From: David Elliott Date: Thu, 20 Jan 2005 16:10:17 +0000 (+0000) Subject: Make sure -DNO_GCC_PRAGMA is in wx-config output regardless of the reason. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c08ebc627546d8f1a3c69c989d21d587c851f9a9 Make sure -DNO_GCC_PRAGMA is in wx-config output regardless of the reason. Mostly reverts configure.in,1.916,1.917 and uses a simpler method. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31516 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/configure b/configure index 220f375f72..2288d3eab5 100755 --- a/configure +++ b/configure @@ -41211,6 +41211,11 @@ else fi GCC_PRAGMA_FLAGS="" +PCH_FLAGS="" +if test $GCC_PCH = 1 ; then + GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA" + PCH_FLAGS="-DWX_PRECOMP" +else case "${host}" in powerpc-*-darwin* ) GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA" @@ -41330,16 +41335,7 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi ;; esac - -PCH_FLAGS="" -if test $GCC_PCH = 1 ; then - if test "x$GCC_PRAGMA_FLAGS" = "x"; then - PCH_FLAGS="-DWX_PRECOMP -DNO_GCC_PRAGMA" - else - PCH_FLAGS="-DWX_PRECOMP" - fi fi - CPPFLAGS="$PCH_FLAGS $GCC_PRAGMA_FLAGS $CPPFLAGS" diff --git a/configure.in b/configure.in index da02b737cf..fc4a6193a7 100644 --- a/configure.in +++ b/configure.in @@ -6286,8 +6286,15 @@ else fi -dnl Check to see if the platform always requires NO_GCC_PRAGMA +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 + 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 @@ -6332,17 +6339,7 @@ GCC_PRAGMA_FLAGS="" fi ;; esac - -dnl Find out if we have to define NO_GCC_PRAGMA and WX_PRECOMP: -PCH_FLAGS="" -if test $GCC_PCH = 1 ; then - if test "x$GCC_PRAGMA_FLAGS" = "x"; then - PCH_FLAGS="-DWX_PRECOMP -DNO_GCC_PRAGMA" - else - PCH_FLAGS="-DWX_PRECOMP" - fi fi - CPPFLAGS="$PCH_FLAGS $GCC_PRAGMA_FLAGS $CPPFLAGS"