When host is OS X (PowerPC Darwin) check if compiler defines __POWERPC__

before defining it in setup.h and if -D__CF_USE_FRAMEWORK_INCLUDES__ is
required for CoreFoundation headers (MW).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32167 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Elliott
2005-02-19 06:58:25 +00:00
parent e327fddf5f
commit 4d7ec9f1e7
2 changed files with 203 additions and 5 deletions

View File

@@ -328,7 +328,6 @@ case "${host}" in
SO_SUFFIX=dylib
AC_DEFINE(__BSD__)
AC_DEFINE(__DARWIN__)
AC_DEFINE(__POWERPC__)
AC_DEFINE(TARGET_CARBON)
DEFAULT_DEFAULT_wxUSE_MAC=1
;;
@@ -1495,6 +1494,39 @@ dnl ------------------------------------------------------------------------
dnl Platform specific tests
dnl ------------------------------------------------------------------------
dnl This case is for OS X vs. everything else
case "${host}" in
powerpc-*-darwin* )
AC_MSG_CHECKING([if __POWERPC__ is already defined])
AC_TRY_COMPILE([],[#ifndef __POWERPC__
choke me for lack of PowerPC
#endif
],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
AC_DEFINE(__POWERPC__)
])
AC_MSG_CHECKING([if CoreFoundation/CFBase.h is usable])
AC_TRY_COMPILE([#include <CoreFoundation/CFBase.h>
],[],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
AC_MSG_CHECKING([if __CF_USE_FRAMEWORK_INCLUDES__ is required])
AC_TRY_COMPILE([#define __CF_USE_FRAMEWORK_INCLUDES__
#include <CoreFoundation/CFBase.h>
],[],
[AC_MSG_RESULT([yes])
dnl We must use -D so source files that don't include wx/setup.h
dnl but do include CFBase will work.
CPPFLAGS="$CPPFLAGS -D__CF_USE_FRAMEWORK_INCLUDES__"],
[AC_MSG_FAILURE([no. CoreFoundation not available.])]
)
]
)
;;
esac
dnl This case is for OS/2 vs. everything else
case "${host}" in
*-pc-os2_emx | *-pc-os2-emx )
dnl ---------------------------------------------------------------------