Use clip_macosx64.cpp on MacOSX autoconf-based builds.

Note: Checks for __LP64__ explicitly because build/host/target
all get reported as i686-apple-darwin10.8.0 (not x86_64).

Also fixes a compile warning in clip_macosx64.cpp.
This commit is contained in:
Alexei Svitkine 2012-06-21 21:28:55 -04:00
parent 99e8914019
commit a40257b33a
2 changed files with 13 additions and 2 deletions

View File

@ -77,7 +77,7 @@ static int GetMacScriptManagerVariable(uint16 id)
0x2f, 0x3c, 0x84, 0x02, 0x00, 0x08, // move.l #-2080243704,-(sp)
0xa8, 0xb5, // ScriptUtil()
0x20, 0x1f, // move.l (a7)+,d0
M68K_RTS >> 8, M68K_RTS
M68K_RTS >> 8, M68K_RTS & 0xff
};
r.d[0] = sizeof(proc);
Execute68kTrap(0xa71e, &r); // NewPtrSysClear()

View File

@ -708,7 +708,18 @@ if [[ "x$WANT_SDL_VIDEO" = "xyes" ]]; then
VIDEOSRCS="../SDL/video_sdl.cpp"
KEYCODES="../SDL/keycodes"
if [[ "x$ac_cv_framework_Carbon" = "xyes" ]]; then
EXTRASYSSRCS="$EXTRASYSSRCS ../MacOSX/clip_macosx.cpp"
AC_MSG_CHECKING([whether __LP64__ is defined])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#if !defined(__LP64__)
# error __LP64__ not defined
#endif
]])],
[AC_MSG_RESULT(yes); LP64_DEFINED=yes],
[AC_MSG_RESULT(no)])
if [[ "x$LP64_DEFINED" = "xyes" ]]; then
EXTRASYSSRCS="$EXTRASYSSRCS ../MacOSX/clip_macosx64.cpp"
else
EXTRASYSSRCS="$EXTRASYSSRCS ../MacOSX/clip_macosx.cpp"
fi
EXTRASYSSRCS="$EXTRASYSSRCS ../MacOSX/utils_macosx.mm"
CPPFLAGS="$CPPFLAGS -I../MacOSX"
else