comparison configure.in @ 1397:b189a73aa335

Added rules to build libSDLmain.a Reverted Patrice's mint changes - you should fix the source files, not add include paths to the build process.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 20 Feb 2006 22:15:38 +0000
parents 428c8690cf73
children 27b719501eb4
comparison
equal deleted inserted replaced
1396:428c8690cf73 1397:b189a73aa335
1173 CXXFLAGS="$OLD_CXX" 1173 CXXFLAGS="$OLD_CXX"
1174 AC_MSG_RESULT($video_qtopia) 1174 AC_MSG_RESULT($video_qtopia)
1175 if test x$video_qtopia = xyes; then 1175 if test x$video_qtopia = xyes; then
1176 AC_DEFINE(SDL_VIDEO_DRIVER_QTOPIA) 1176 AC_DEFINE(SDL_VIDEO_DRIVER_QTOPIA)
1177 SOURCES="$SOURCES $srcdir/src/video/qtopia/*.cc" 1177 SOURCES="$SOURCES $srcdir/src/video/qtopia/*.cc"
1178 SDLMAIN_SOURCES="$srcdir/src/main/qtopia/*.cc"
1178 BUILD_CFLAGS="$BUILD_CFLAGS $QTOPIA_FLAGS" 1179 BUILD_CFLAGS="$BUILD_CFLAGS $QTOPIA_FLAGS"
1179 SDL_CFLAGS="$SDL_CFLAGS -DQWS -Dmain=SDL_main" 1180 SDL_CFLAGS="$SDL_CFLAGS -DQWS -Dmain=SDL_main"
1180 SDL_LIBS="-lSDLmain $SDL_LIBS -L${QPEDIR}/lib -L${QTDIR}/lib/ -lqpe -lqte" 1181 SDL_LIBS="-lSDLmain $SDL_LIBS -L${QPEDIR}/lib -L${QTDIR}/lib/ -lqpe -lqte"
1181 have_video=yes 1182 have_video=yes
1182 fi 1183 fi
2115 BUILD_LDFLAGS="$BUILD_LDFLAGS -luser32 -lgdi32 -lwinmm" 2116 BUILD_LDFLAGS="$BUILD_LDFLAGS -luser32 -lgdi32 -lwinmm"
2116 if test x$have_directx = xyes; then 2117 if test x$have_directx = xyes; then
2117 BUILD_LDFLAGS="$BUILD_LDFLAGS -ldxguid" 2118 BUILD_LDFLAGS="$BUILD_LDFLAGS -ldxguid"
2118 fi 2119 fi
2119 # The Win32 platform requires special setup 2120 # The Win32 platform requires special setup
2121 SDLMAIN_SOURCES="$srcdir/src/main/win32/*.c"
2120 SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main" 2122 SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
2121 SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows" 2123 SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows"
2122 ;; 2124 ;;
2123 *-*-beos*) 2125 *-*-beos*)
2124 ARCH=beos 2126 ARCH=beos
2217 AC_DEFINE(SDL_LOADSO_DLCOMPAT) 2219 AC_DEFINE(SDL_LOADSO_DLCOMPAT)
2218 SOURCES="$SOURCES $srcdir/src/loadso/macosx/*.c" 2220 SOURCES="$SOURCES $srcdir/src/loadso/macosx/*.c"
2219 have_loadso=yes 2221 have_loadso=yes
2220 fi 2222 fi
2221 # The MacOS X platform requires special setup. 2223 # The MacOS X platform requires special setup.
2224 SDLMAIN_SOURCES="$srcdir/src/main/macosx/*.m"
2222 AC_DEFINE(TARGET_API_MAC_CARBON) 2225 AC_DEFINE(TARGET_API_MAC_CARBON)
2223 BUILD_CFLAGS="$BUILD_CFLAGS -fpascal-strings -DMACOSX" 2226 BUILD_CFLAGS="$BUILD_CFLAGS -fpascal-strings -DMACOSX"
2224 SDL_LIBS="-lSDLmain $SDL_LIBS" 2227 SDL_LIBS="-lSDLmain $SDL_LIBS"
2225 if test x$enable_video_cocoa = xyes; then 2228 if test x$enable_video_cocoa = xyes; then
2226 BUILD_LDFLAGS="$BUILD_LDFLAGS -framework Cocoa" 2229 BUILD_LDFLAGS="$BUILD_LDFLAGS -framework Cocoa"
2272 AC_DEFINE(SDL_TIMER_UNIX) 2275 AC_DEFINE(SDL_TIMER_UNIX)
2273 SOURCES="$SOURCES $srcdir/src/timer/unix/*.c" 2276 SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
2274 else 2277 else
2275 AC_DEFINE(SDL_TIMER_MINT) 2278 AC_DEFINE(SDL_TIMER_MINT)
2276 SOURCES="$SOURCES $srcdir/src/timer/mint/*.c" 2279 SOURCES="$SOURCES $srcdir/src/timer/mint/*.c"
2277 BUILD_CFLAGS="$BUILD_CFLAGS -I$srcdir/src/timer/mint"
2278 fi 2280 fi
2279 have_timers=yes 2281 have_timers=yes
2280 fi 2282 fi
2281 # MiNT does not define "unix" 2283 # MiNT does not define "unix"
2282 BUILD_CFLAGS="$BUILD_CFLAGS -Dunix" 2284 BUILD_CFLAGS="$BUILD_CFLAGS -Dunix"
2283 BUILD_CFLAGS="$BUILD_CFLAGS -I$srcdir/src/video/ataricommon"
2284 ;; 2285 ;;
2285 *-riscos) 2286 *-riscos)
2286 ARCH=riscos 2287 ARCH=riscos
2287 CheckOSS 2288 CheckOSS
2288 CheckPTHREAD 2289 CheckPTHREAD
2343 if test x$enable_loadso = xyes; then 2344 if test x$enable_loadso = xyes; then
2344 AC_DEFINE(SDL_LOADSO_DISABLED) 2345 AC_DEFINE(SDL_LOADSO_DISABLED)
2345 fi 2346 fi
2346 SOURCES="$SOURCES $srcdir/src/loadso/dummy/*.c" 2347 SOURCES="$SOURCES $srcdir/src/loadso/dummy/*.c"
2347 fi 2348 fi
2349 if test x$SDLMAIN_SOURCES = x; then
2350 SDLMAIN_SOURCES="$srcdir/src/main/dummy/*.c"
2351 fi
2348 2352
2349 OBJECTS=`echo $SOURCES | sed 's,[[^ ]]*/\([[^ ]]*\)\.asm,$(objects)/\1.lo,g'` 2353 OBJECTS=`echo $SOURCES | sed 's,[[^ ]]*/\([[^ ]]*\)\.asm,$(objects)/\1.lo,g'`
2350 OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.cc,$(objects)/\1.lo,g'` 2354 OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.cc,$(objects)/\1.lo,g'`
2351 OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.m,$(objects)/\1.lo,g'` 2355 OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.m,$(objects)/\1.lo,g'`
2352 OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'` 2356 OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
2357
2358 SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES | sed 's,[[^ ]]*/\([[^ ]]*\)\.cc,$(objects)/\1.o,g'`
2359 SDLMAIN_OBJECTS=`echo $SDLMAIN_OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.m,$(objects)/\1.o,g'`
2360 SDLMAIN_OBJECTS=`echo $SDLMAIN_OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'`
2353 2361
2354 # Set runtime shared library paths as needed 2362 # Set runtime shared library paths as needed
2355 2363
2356 if test "x$enable_rpath" = "xyes"; then 2364 if test "x$enable_rpath" = "xyes"; then
2357 if test $ARCH = linux -o $ARCH = freebsd -o $ARCH = bsdi -o $ARCH = irix; then 2365 if test $ARCH = linux -o $ARCH = freebsd -o $ARCH = bsdi -o $ARCH = irix; then
2432 dnl Expand the sources and objects needed to build the library 2440 dnl Expand the sources and objects needed to build the library
2433 AC_SUBST(ac_aux_dir) 2441 AC_SUBST(ac_aux_dir)
2434 AC_SUBST(INCLUDE) 2442 AC_SUBST(INCLUDE)
2435 AC_SUBST(SOURCES) 2443 AC_SUBST(SOURCES)
2436 AC_SUBST(OBJECTS) 2444 AC_SUBST(OBJECTS)
2445 AC_SUBST(SDLMAIN_SOURCES)
2446 AC_SUBST(SDLMAIN_OBJECTS)
2437 AC_SUBST(BUILD_CFLAGS) 2447 AC_SUBST(BUILD_CFLAGS)
2438 AC_SUBST(BUILD_LDFLAGS) 2448 AC_SUBST(BUILD_LDFLAGS)
2439 2449
2440 AC_OUTPUT([ 2450 AC_OUTPUT([
2441 Makefile sdl-config SDL.spec SDL.qpg 2451 Makefile sdl-config SDL.spec SDL.qpg