Fixed bug #185
authorSam Lantinga <slouken@libsdl.org>
Thu, 13 Apr 2006 14:14:06 +0000
changeset 162810b4827452a8
parent 1627 aee7ea396f59
child 1629 ef4a796e7f24
Fixed bug #185

The SDL platform header shouldn't dictate the OS target API for other
applications. The build system should define the target API for building
SDL internally.
configure.in
include/SDL_platform.h
     1.1 --- a/configure.in	Thu Apr 13 14:04:13 2006 +0000
     1.2 +++ b/configure.in	Thu Apr 13 14:14:06 2006 +0000
     1.3 @@ -2319,10 +2319,13 @@
     1.4          # Next line is broken, and a few files below require Mac OS X (full)
     1.5          ARCH=macosx
     1.6  
     1.7 -        # HACK: Reset EXTRA_LDFLAGS; the only thing it contains at this point is 
     1.8 -        # -lm which is not needed under Mac OS X. But for some reasons it also
     1.9 -        # tends to contain spurious -L switches, which we don't want to use
    1.10 -        # here or in sdl-config. Hence we reset it.
    1.11 +        # Mac OS X builds with both the Carbon and OSX APIs at the moment
    1.12 +        EXTRA_CFLAGS="-DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX"
    1.13 +
    1.14 +        # HACK: Reset EXTRA_LDFLAGS; the only thing it contains at this point
    1.15 +        # is -lm which is not needed under Mac OS X. But for some reasons it
    1.16 +        # also tends to contain spurious -L switches, which we don't want to
    1.17 +        # use here or in sdl-config. Hence we reset it.
    1.18          EXTRA_LDFLAGS=""
    1.19  
    1.20          CheckDummyVideo
     2.1 --- a/include/SDL_platform.h	Thu Apr 13 14:04:13 2006 +0000
     2.2 +++ b/include/SDL_platform.h	Thu Apr 13 14:14:06 2006 +0000
     2.3 @@ -64,16 +64,10 @@
     2.4  #if defined(macintosh)
     2.5  #undef __MACOS__
     2.6  #define __MACOS__	1
     2.7 -#define TARGET_API_MAC_OS8	1
     2.8 -#define TARGET_API_MAC_CARBON	0
     2.9 -#define TARGET_API_MAC_OSX	0
    2.10  #endif
    2.11  #if defined(__GNUC__) && (defined(__APPLE_CC__) || defined(__APPLE_CPP__))
    2.12  #undef __MACOSX__
    2.13  #define __MACOSX__	1
    2.14 -#define TARGET_API_MAC_OS8	0
    2.15 -#define TARGET_API_MAC_CARBON	1
    2.16 -#define TARGET_API_MAC_OSX	1
    2.17  #endif
    2.18  #if defined(__NetBSD__)
    2.19  #undef __NETBSD__