comparison configure.in @ 158:4382c38dfbee

Date: Tue, 21 Aug 2001 03:50:01 +0200 From: Max Horn <max@quendi.de> Subject: New patch for OS X Attached a .patch file for SDL/OSX with some nice bug fixes / enhancments. * fixes the activation issues, which also caused the window to be always drawn like an inactive. The close/minimize widgets now are animated properly, too. * the menu items are automatically adjusted to use the app name instead of just "SDL App". I did this so that we really can use one central SDLMain.nib file, w/o requiring developers to make a copy of it and adjust it. * libSDLMain now contains the proper cocoa code, not as before the carbon code. This means apps no longer have to carry a copy of SDLMain.m/SDLMain.h * revamped configure.in to properly build a Cocoa/Quartz SDL lib, not a Carbon based SDL lib
author Sam Lantinga <slouken@libsdl.org>
date Tue, 21 Aug 2001 07:19:59 +0000
parents 2839f45bdba0
children 39877400bd1e
comparison
equal deleted inserted replaced
157:de04f423389a 158:4382c38dfbee
60 AC_PROG_CXX 60 AC_PROG_CXX
61 ;; 61 ;;
62 # This is stupid, but necessary on some versions of Linux (joysticks) 62 # This is stupid, but necessary on some versions of Linux (joysticks)
63 *-*-linux*) 63 *-*-linux*)
64 AC_PROG_CXX 64 AC_PROG_CXX
65 ;;
66 *-*-darwin*)
67 OBJC="???"
68 AC_SUBST(OBJC)
69 ;; 65 ;;
70 esac 66 esac
71 AC_PROG_INSTALL 67 AC_PROG_INSTALL
72 AC_FUNC_ALLOCA 68 AC_FUNC_ALLOCA
73 69
1190 VIDEO_DRIVERS="$VIDEO_DRIVERS maccommon/libvideo_maccommon.la" 1186 VIDEO_DRIVERS="$VIDEO_DRIVERS maccommon/libvideo_maccommon.la"
1191 VIDEO_SUBDIRS="$VIDEO_SUBDIRS macrom" 1187 VIDEO_SUBDIRS="$VIDEO_SUBDIRS macrom"
1192 VIDEO_DRIVERS="$VIDEO_DRIVERS macrom/libvideo_macrom.la" 1188 VIDEO_DRIVERS="$VIDEO_DRIVERS macrom/libvideo_macrom.la"
1193 } 1189 }
1194 1190
1191 dnl Set up the Mac toolbox video driver for Mac OS X
1192 CheckQUARTZ()
1193 {
1194 # "MACOSX" is not an official definition, but it's commonly
1195 # accepted as a way to differentiate between what runs on X
1196 # and what runs on older Macs - while in theory "Carbon" defns
1197 # are consistent between the two, in practice Carbon is still
1198 # changing. -sts Aug 2000
1199 CFLAGS="$CFLAGS -I/System/Library/Frameworks/Carbon.framework/Headers \
1200 -I/System/Library/Frameworks/Cocoa.framework/Headers -fpascal-strings \
1201 -DENABLE_QUARTZ -DMACOSX -DTARGET_API_MAC_CARBON=1 -I\$(top_srcdir)/src/video/quartz"
1202 VIDEO_SUBDIRS="$VIDEO_SUBDIRS quartz"
1203 VIDEO_DRIVERS="$VIDEO_DRIVERS quartz/libvideo_quartz.la"
1204 }
1205
1195 dnl Set up the kernel statistics library for Solaris 1206 dnl Set up the kernel statistics library for Solaris
1196 CheckKSTAT() 1207 CheckKSTAT()
1197 { 1208 {
1198 CFLAGS="$CFLAGS -DHAVE_KSTAT" 1209 CFLAGS="$CFLAGS -DHAVE_KSTAT"
1199 SYSTEM_LIBS="$SYSTEM_LIBS -lkstat" 1210 SYSTEM_LIBS="$SYSTEM_LIBS -lkstat"
1992 SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main" 2003 SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
1993 SDL_LIBS="-lSDLmain $SDL_LIBS" 2004 SDL_LIBS="-lSDLmain $SDL_LIBS"
1994 ;; 2005 ;;
1995 *-*-darwin* ) 2006 *-*-darwin* )
1996 # Strictly speaking, we want "Mac OS X", not "Darwin", which is 2007 # Strictly speaking, we want "Mac OS X", not "Darwin", which is
1997 # just the OS X kernel sans upper layers like Carbon. But 2008 # just the OS X kernel sans upper layers like Carbon and Cocoa.
1998 # config.guess comes back with "darwin", so go with the flow. 2009 # But config.guess comes back with "darwin", so go with the flow.
1999 ARCH=macos 2010 ARCH=macosx
2000 CheckDummyVideo 2011 CheckDummyVideo
2001 CheckDiskAudio 2012 CheckDiskAudio
2002 CheckCARBON 2013 CheckQUARTZ
2003 CheckMacGL 2014 CheckMacGL
2004 CheckPTHREAD 2015 CheckPTHREAD
2005 # Set up files for the main() stub 2016 # Set up files for the main() stub
2006 # COPY_ARCH_SRC(src/main, macos, SDL_main.c) 2017 COPY_ARCH_SRC(src/main, macosx, SDLmain.m)
2007 COPY_ARCH_SRC(src/main, linux, SDL_main.c) 2018 COPY_ARCH_SRC(src/main, macosx, SDLmain.h)
2008 # Set up files for the audio library 2019 # Set up files for the audio library
2009 if test x$enable_audio = xyes; then 2020 if test x$enable_audio = xyes; then
2010 AUDIO_SUBDIRS="$AUDIO_SUBDIRS macrom" 2021 AUDIO_SUBDIRS="$AUDIO_SUBDIRS macrom"
2011 AUDIO_DRIVERS="$AUDIO_DRIVERS macrom/libaudio_macrom.la" 2022 AUDIO_DRIVERS="$AUDIO_DRIVERS macrom/libaudio_macrom.la"
2012 fi 2023 fi
2038 # Set up files for the timer library 2049 # Set up files for the timer library
2039 if test x$enable_timers = xyes; then 2050 if test x$enable_timers = xyes; then
2040 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) 2051 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
2041 fi 2052 fi
2042 # The MacOS X platform requires special setup 2053 # The MacOS X platform requires special setup
2043 SDL_CFLAGS="$SDL_CFLAGS -F/System/Library/Frameworks/Carbon.framework" 2054 SDL_CFLAGS="$SDL_CFLAGS -F/System/Library/Frameworks/Carbon.framework -F/System/Library/Frameworks/Cocoa.framework"
2044 SDL_LIBS="-lSDLmain $SDL_LIBS -framework Carbon" 2055 SDL_LIBS="-lSDLmain $SDL_LIBS -framework Carbon -framework Cocoa"
2045 ;; 2056 ;;
2046 *) 2057 *)
2047 AC_MSG_ERROR(Unsupported target: Please add to configure.in) 2058 AC_MSG_ERROR(Unsupported target: Please add to configure.in)
2048 ;; 2059 ;;
2049 esac 2060 esac
2059 AM_CONDITIONAL(TARGET_OPENBSD, test $ARCH = openbsd) 2070 AM_CONDITIONAL(TARGET_OPENBSD, test $ARCH = openbsd)
2060 AM_CONDITIONAL(TARGET_AIX, test $ARCH = aix) 2071 AM_CONDITIONAL(TARGET_AIX, test $ARCH = aix)
2061 AM_CONDITIONAL(TARGET_WIN32, test $ARCH = win32) 2072 AM_CONDITIONAL(TARGET_WIN32, test $ARCH = win32)
2062 AM_CONDITIONAL(TARGET_BEOS, test $ARCH = beos) 2073 AM_CONDITIONAL(TARGET_BEOS, test $ARCH = beos)
2063 AM_CONDITIONAL(TARGET_MACOS, test $ARCH = macos) 2074 AM_CONDITIONAL(TARGET_MACOS, test $ARCH = macos)
2075 AM_CONDITIONAL(TARGET_MACOSX, test $ARCH = macosx)
2064 2076
2065 # Set conditional variables for shared and static library selection. 2077 # Set conditional variables for shared and static library selection.
2066 # These are not used in any Makefile.am but in sdl-config.in. 2078 # These are not used in any Makefile.am but in sdl-config.in.
2067 AM_CONDITIONAL([ENABLE_SHARED], [test "$enable_shared" = yes]) 2079 AM_CONDITIONAL([ENABLE_SHARED], [test "$enable_shared" = yes])
2068 AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = yes]) 2080 AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = yes])
2119 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/thread" 2131 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/thread"
2120 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/timer" 2132 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/timer"
2121 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/endian" 2133 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/endian"
2122 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/file" 2134 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/file"
2123 CXXFLAGS="$CFLAGS" 2135 CXXFLAGS="$CFLAGS"
2136
2137
2138 # Check for darwin at the very end and set up the Objective C compiler
2139 # We do this here so that we get the full CFLAGS into OBJCFLAGS
2140 case "$target" in
2141 *-*-darwin*)
2142 OBJC="cc"
2143 OBJCFLAGS="$CFLAGS"
2144 AC_SUBST(OBJC)
2145 AC_SUBST(OBJCFLAGS)
2146 ;;
2147 esac
2124 2148
2125 # Finally create all the generated files 2149 # Finally create all the generated files
2126 dnl Important: Any directory that you want to be in the distcheck should 2150 dnl Important: Any directory that you want to be in the distcheck should
2127 dnl have a file listed here, so that configure generates the 2151 dnl have a file listed here, so that configure generates the
2128 dnl subdirectories on the build target. 2152 dnl subdirectories on the build target.