MacOS X tweaks
authorSam Lantinga <slouken@libsdl.org>
Fri, 07 Sep 2001 01:06:20 +0000
changeset 1101885d27bab6c
parent 109 6cbf105616e3
child 111 3b709e102787
MacOS X tweaks
acinclude.m4
configure.in
native_midi/native_midi_mac.c
     1.1 --- a/acinclude.m4	Thu Sep 06 06:04:46 2001 +0000
     1.2 +++ b/acinclude.m4	Fri Sep 07 01:06:20 2001 +0000
     1.3 @@ -58,6 +58,17 @@
     1.4  dnl checks the results of sdl-config to some extent
     1.5  dnl
     1.6        rm -f conf.sdltest
     1.7 +      case "$target" in
     1.8 +          *-*-darwin*)
     1.9 +            cp -r `$SDL_CONFIG --nib` .
    1.10 +            dnl create an Info.plist file, unless one exists
    1.11 +            if test -f Info.plist ; then
    1.12 +             :
    1.13 +            else
    1.14 +             cp `$SDL_CONFIG --plist` .
    1.15 +            fi
    1.16 +              ;;
    1.17 +      esac
    1.18        AC_TRY_RUN([
    1.19  #include <stdio.h>
    1.20  #include <stdlib.h>
    1.21 @@ -140,6 +151,11 @@
    1.22            AC_TRY_LINK([
    1.23  #include <stdio.h>
    1.24  #include "SDL.h"
    1.25 +
    1.26 +int main(int argc, char *argv[])
    1.27 +{ return 0; }
    1.28 +#undef  main
    1.29 +#define main K_and_R_C_main
    1.30  ],      [ return 0; ],
    1.31          [ echo "*** The test program compiled, but did not run. This usually means"
    1.32            echo "*** that the run-time linker is not finding SDL or finding the wrong"
    1.33 @@ -164,6 +180,12 @@
    1.34    fi
    1.35    AC_SUBST(SDL_CFLAGS)
    1.36    AC_SUBST(SDL_LIBS)
    1.37 +      case "$target" in
    1.38 +          *-*-darwin*)
    1.39 +              SDL_APPLE_CREATOR="????"
    1.40 +              AC_SUBST(SDL_APPLE_CREATOR)
    1.41 +              ;;
    1.42 +      esac
    1.43    rm -f conf.sdltest
    1.44  ])
    1.45  # Configure paths for SMPEG
     2.1 --- a/configure.in	Thu Sep 06 06:04:46 2001 +0000
     2.2 +++ b/configure.in	Fri Sep 07 01:06:20 2001 +0000
     2.3 @@ -70,6 +70,9 @@
     2.4              fi
     2.5          fi
     2.6          ;;
     2.7 +    *-*-darwin*)
     2.8 +        AC_DEFINE(MACOSX)
     2.9 +        ;;
    2.10  esac
    2.11  
    2.12  dnl Check for SDL
    2.13 @@ -138,6 +141,7 @@
    2.14                  ;;
    2.15              *-*-darwin*)
    2.16                  use_music_native_midi=yes
    2.17 +                LIBS="$LIBS -framework QuickTime"
    2.18                  ;;
    2.19          esac
    2.20          if test x$use_music_native_midi = xyes; then
     3.1 --- a/native_midi/native_midi_mac.c	Thu Sep 06 06:04:46 2001 +0000
     3.2 +++ b/native_midi/native_midi_mac.c	Fri Sep 07 01:06:20 2001 +0000
     3.3 @@ -20,12 +20,16 @@
     3.4      max@quendi.de
     3.5  */
     3.6  
     3.7 -#if defined(macintosh) || defined(__APPLE__)
     3.8 +#if defined(macintosh) || defined(MACOSX)
     3.9  
    3.10  #include "native_midi.h"
    3.11  #include "native_midi_common.h"
    3.12  
    3.13 +#ifdef MACOSX
    3.14 +#include <QuickTime/QuickTimeMusic.h>
    3.15 +#else
    3.16  #include <QuickTimeMusic.h>
    3.17 +#endif
    3.18  
    3.19  #include <assert.h>
    3.20  #include <stdlib.h>