From db3635a75ef0c248b327868156943287d77e3daa Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 7 Sep 2001 01:06:20 +0000 Subject: [PATCH] MacOS X tweaks --- acinclude.m4 | 22 ++++++++++++++++++++++ configure.in | 4 ++++ native_midi/native_midi_mac.c | 6 +++++- 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/acinclude.m4 b/acinclude.m4 index e380c543..b5bd8c8e 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -58,6 +58,17 @@ dnl Now check if the installed SDL is sufficiently new. (Also sanity dnl checks the results of sdl-config to some extent dnl rm -f conf.sdltest + case "$target" in + *-*-darwin*) + cp -r `$SDL_CONFIG --nib` . + dnl create an Info.plist file, unless one exists + if test -f Info.plist ; then + : + else + cp `$SDL_CONFIG --plist` . + fi + ;; + esac AC_TRY_RUN([ #include #include @@ -140,6 +151,11 @@ int main (int argc, char *argv[]) AC_TRY_LINK([ #include #include "SDL.h" + +int main(int argc, char *argv[]) +{ return 0; } +#undef main +#define main K_and_R_C_main ], [ return 0; ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding SDL or finding the wrong" @@ -164,6 +180,12 @@ int main (int argc, char *argv[]) fi AC_SUBST(SDL_CFLAGS) AC_SUBST(SDL_LIBS) + case "$target" in + *-*-darwin*) + SDL_APPLE_CREATOR="????" + AC_SUBST(SDL_APPLE_CREATOR) + ;; + esac rm -f conf.sdltest ]) # Configure paths for SMPEG diff --git a/configure.in b/configure.in index 0e2d8ecd..c3a491df 100644 --- a/configure.in +++ b/configure.in @@ -70,6 +70,9 @@ case "$target" in fi fi ;; + *-*-darwin*) + AC_DEFINE(MACOSX) + ;; esac dnl Check for SDL @@ -138,6 +141,7 @@ if test x$enable_music_midi = xyes; then ;; *-*-darwin*) use_music_native_midi=yes + LIBS="$LIBS -framework QuickTime" ;; esac if test x$use_music_native_midi = xyes; then diff --git a/native_midi/native_midi_mac.c b/native_midi/native_midi_mac.c index fa6c2922..87cb42b1 100644 --- a/native_midi/native_midi_mac.c +++ b/native_midi/native_midi_mac.c @@ -20,12 +20,16 @@ max@quendi.de */ -#if defined(macintosh) || defined(__APPLE__) +#if defined(macintosh) || defined(MACOSX) #include "native_midi.h" #include "native_midi_common.h" +#ifdef MACOSX +#include +#else #include +#endif #include #include