configure.in
changeset 3283 1ed5d432e468
parent 3276 720d176be107
child 3288 8c32cabae4f8
equal deleted inserted replaced
3282:10a12f77f597 3283:1ed5d432e468
   895         AC_DEFINE(SDL_AUDIO_DRIVER_DUMMY)
   895         AC_DEFINE(SDL_AUDIO_DRIVER_DUMMY)
   896         SOURCES="$SOURCES $srcdir/src/audio/dummy/*.c"
   896         SOURCES="$SOURCES $srcdir/src/audio/dummy/*.c"
   897     fi
   897     fi
   898 }
   898 }
   899 
   899 
   900 dnl Set up the Atari Audio driver
       
   901 CheckAtariAudio()
       
   902 {
       
   903     AC_ARG_ENABLE(mintaudio,
       
   904 AC_HELP_STRING([--enable-mintaudio], [support Atari audio driver [[default=yes]]]),
       
   905                   , enable_mintaudio=yes)
       
   906     if test x$enable_audio = xyes -a x$enable_mintaudio = xyes; then
       
   907         mintaudio=no
       
   908         AC_CHECK_HEADER(mint/falcon.h, have_mint_falcon_hdr=yes)
       
   909         if test x$have_mint_falcon_hdr = xyes; then
       
   910             mintaudio=yes
       
   911             AC_DEFINE(SDL_AUDIO_DRIVER_MINT)
       
   912             SOURCES="$SOURCES $srcdir/src/audio/mint/*.c"
       
   913             SOURCES="$SOURCES $srcdir/src/audio/mint/*.S"
       
   914             have_audio=yes
       
   915         fi
       
   916     fi
       
   917 }
       
   918 
       
   919 dnl See if GCC's -fvisibility=hidden is supported (gcc4 and later, usually).
   900 dnl See if GCC's -fvisibility=hidden is supported (gcc4 and later, usually).
   920 dnl  Details of this flag are here: http://gcc.gnu.org/wiki/Visibility
   901 dnl  Details of this flag are here: http://gcc.gnu.org/wiki/Visibility
   921 CheckVisibilityHidden()
   902 CheckVisibilityHidden()
   922 {
   903 {
   923     AC_MSG_CHECKING(for GCC -fvisibility=hidden option)
   904     AC_MSG_CHECKING(for GCC -fvisibility=hidden option)
  1527             have_video=yes
  1508             have_video=yes
  1528         fi
  1509         fi
  1529     fi
  1510     fi
  1530 }
  1511 }
  1531 
  1512 
  1532 dnl Set up the Atari Bios keyboard driver
       
  1533 CheckAtariBiosEvent()
       
  1534 {
       
  1535     SOURCES="$SOURCES $srcdir/src/video/ataricommon/*.c"
       
  1536     SOURCES="$SOURCES $srcdir/src/video/ataricommon/*.S"
       
  1537 }
       
  1538 
       
  1539 dnl Set up the Atari Xbios driver
       
  1540 CheckAtariXbiosVideo()
       
  1541 {
       
  1542     AC_ARG_ENABLE(video-xbios,
       
  1543 AC_HELP_STRING([--enable-video-xbios], [use Atari Xbios video driver [[default=yes]]]),
       
  1544                   , enable_video_xbios=yes)
       
  1545     video_xbios=no
       
  1546     if test x$enable_video = xyes -a x$enable_video_xbios = xyes; then
       
  1547         video_xbios=yes
       
  1548         AC_DEFINE(SDL_VIDEO_DRIVER_XBIOS)
       
  1549         SOURCES="$SOURCES $srcdir/src/video/xbios/*.c"
       
  1550         have_video=yes
       
  1551     fi
       
  1552 }
       
  1553 
       
  1554 dnl Set up the Atari Gem driver
       
  1555 CheckAtariGemVideo()
       
  1556 {
       
  1557     AC_ARG_ENABLE(video-gem,
       
  1558 AC_HELP_STRING([--enable-video-gem], [use Atari Gem video driver [[default=yes]]]),
       
  1559                   , enable_video_gem=yes)
       
  1560     if test x$enable_video = xyes -a x$enable_video_gem = xyes; then
       
  1561         video_gem=no
       
  1562         AC_CHECK_HEADER(gem.h, have_gem_hdr=yes)
       
  1563         AC_CHECK_LIB(gem, appl_init, have_gem_lib=yes)
       
  1564         if test x$have_gem_hdr = xyes -a x$have_gem_lib = xyes; then
       
  1565             video_gem=yes
       
  1566             AC_DEFINE(SDL_VIDEO_DRIVER_GEM)
       
  1567             SOURCES="$SOURCES $srcdir/src/video/gem/*.c"
       
  1568             SDL_LIBS="$SDL_LIBS -lgem"
       
  1569             have_video=yes
       
  1570         fi
       
  1571     fi
       
  1572 }
       
  1573 
       
  1574 dnl rcg04172001 Set up the Null video driver.
  1513 dnl rcg04172001 Set up the Null video driver.
  1575 CheckDummyVideo()
  1514 CheckDummyVideo()
  1576 {
  1515 {
  1577     AC_ARG_ENABLE(video-dummy,
  1516     AC_ARG_ENABLE(video-dummy,
  1578 AC_HELP_STRING([--enable-video-dummy], [use dummy video driver [[default=yes]]]),
  1517 AC_HELP_STRING([--enable-video-dummy], [use dummy video driver [[default=yes]]]),
  1703             *-*-darwin*)
  1642             *-*-darwin*)
  1704                 if test x$enable_video_cocoa = xyes; then
  1643                 if test x$enable_video_cocoa = xyes; then
  1705                     EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,OpenGL"
  1644                     EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,OpenGL"
  1706                 fi
  1645                 fi
  1707         esac
  1646         esac
  1708     fi
       
  1709 }
       
  1710 
       
  1711 dnl Check for Mesa offscreen rendering
       
  1712 CheckAtariOSMesa()
       
  1713 {
       
  1714     if test "x$enable_video" = "xyes" -a "x$enable_video_opengl" = "xyes"; then
       
  1715         AC_CHECK_HEADER(GL/osmesa.h, have_osmesa_hdr=yes)
       
  1716         AC_CHECK_LIB(OSMesa, OSMesaCreateContext, have_osmesa_lib=yes, have_osmesa_lib=no, -lm)
       
  1717 
       
  1718         # Static linking to -lOSMesa
       
  1719         AC_PATH_PROG(OSMESA_CONFIG, osmesa-config, no)
       
  1720         if test "x$OSMESA_CONFIG" = "xno" -o "x$enable_atari_ldg" = "xno"; then
       
  1721             # -lOSMesa is really the static library
       
  1722             if test "x$have_osmesa_hdr" = "xyes" -a "x$have_osmesa_lib" = "xyes"; then
       
  1723                 OSMESA_LIBS="-lOSMesa"
       
  1724             fi
       
  1725         else
       
  1726             # -lOSMesa is a loader for OSMesa.ldg
       
  1727             OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags`
       
  1728             OSMESA_LIBS=`$OSMESA_CONFIG --libs`
       
  1729         fi
       
  1730         AC_DEFINE(SDL_VIDEO_OPENGL)
       
  1731         AC_DEFINE(SDL_VIDEO_OPENGL_OSMESA)
       
  1732         AC_DEFINE(SDL_VIDEO_RENDER_OGL)
       
  1733         SDL_CFLAGS="$SDL_CFLAGS $OSMESA_CFLAGS"
       
  1734         SDL_LIBS="$SDL_LIBS $OSMESA_LIBS"
       
  1735 
       
  1736         AC_ARG_ENABLE(osmesa-shared,
       
  1737 AC_HELP_STRING([--enable-osmesa-shared], [dynamically load OSMesa OpenGL support [[default=yes]]]),
       
  1738                               , enable_osmesa_shared=yes)
       
  1739         if test "x$enable_osmesa_shared" = "xyes" -a "x$enable_atari_ldg" = "xyes"; then
       
  1740             # Dynamic linking
       
  1741             if test "x$have_osmesa_hdr" = "xyes"; then
       
  1742                 AC_DEFINE(SDL_VIDEO_OPENGL_OSMESA_DYNAMIC)
       
  1743             fi
       
  1744         fi
       
  1745     fi
  1647     fi
  1746 }
  1648 }
  1747 
  1649 
  1748 dnl See if we can use the new unified event interface in Linux 2.4
  1650 dnl See if we can use the new unified event interface in Linux 2.4
  1749 CheckInputEvents()
  1651 CheckInputEvents()
  2079             if test x$have_dlvsym = xyes; then
  1981             if test x$have_dlvsym = xyes; then
  2080                 AC_DEFINE(HAVE_DLVSYM)
  1982                 AC_DEFINE(HAVE_DLVSYM)
  2081             fi
  1983             fi
  2082             AC_DEFINE(SDL_LOADSO_DLOPEN)
  1984             AC_DEFINE(SDL_LOADSO_DLOPEN)
  2083             SOURCES="$SOURCES $srcdir/src/loadso/dlopen/*.c"
  1985             SOURCES="$SOURCES $srcdir/src/loadso/dlopen/*.c"
  2084             have_loadso=yes
       
  2085         fi
       
  2086     fi
       
  2087 }
       
  2088 
       
  2089 dnl Set up the Atari LDG (shared object loader)
       
  2090 CheckAtariLdg()
       
  2091 {
       
  2092     AC_ARG_ENABLE(atari-ldg,
       
  2093 AC_HELP_STRING([--enable-atari-ldg], [use Atari LDG for shared object loading [[default=yes]]]),
       
  2094                   , enable_atari_ldg=yes)
       
  2095     if test x$video_gem = xyes -a x$enable_atari_ldg = xyes; then
       
  2096         AC_CHECK_HEADER(ldg.h, have_ldg_hdr=yes)
       
  2097         AC_CHECK_LIB(ldg, ldg_open, have_ldg_lib=yes, have_ldg_lib=no, -lgem)
       
  2098         if test x$have_ldg_hdr = xyes -a x$have_ldg_lib = xyes; then
       
  2099             AC_DEFINE(SDL_LOADSO_LDG)
       
  2100             SOURCES="$SOURCES $srcdir/src/loadso/mint/*.c"
       
  2101             SDL_LIBS="$SDL_LIBS -lldg -lgem"
       
  2102             have_loadso=yes
  1986             have_loadso=yes
  2103         fi
  1987         fi
  2104     fi
  1988     fi
  2105 }
  1989 }
  2106 
  1990 
  2793         # If either the audio or CD driver is used, add the AudioUnit framework
  2677         # If either the audio or CD driver is used, add the AudioUnit framework
  2794         if test x$enable_audio = xyes; then
  2678         if test x$enable_audio = xyes; then
  2795             EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit"
  2679             EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit"
  2796         fi
  2680         fi
  2797         ;;
  2681         ;;
  2798     *-*-mint*)
       
  2799         ARCH=mint
       
  2800         CheckDummyVideo
       
  2801         CheckDiskAudio
       
  2802         CheckDummyAudio
       
  2803         CheckAtariBiosEvent
       
  2804         CheckAtariXbiosVideo
       
  2805         CheckAtariGemVideo
       
  2806         CheckAtariAudio
       
  2807         CheckAtariLdg
       
  2808         CheckAtariOSMesa
       
  2809         CheckPTH
       
  2810         # Set up files for the audio library
       
  2811         if test x$enable_threads = xyes -a x$enable_pth = xyes; then
       
  2812             if test x$enable_audio = xyes; then
       
  2813                 AC_DEFINE(SDL_AUDIO_DRIVER_SUNAUDIO)
       
  2814                 SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
       
  2815                 have_audio=yes
       
  2816             fi
       
  2817         fi
       
  2818         # Set up files for the joystick library
       
  2819         if test x$enable_joystick = xyes; then
       
  2820             AC_DEFINE(SDL_JOYSTICK_MINT)
       
  2821             SOURCES="$SOURCES $srcdir/src/joystick/mint/*.c"
       
  2822             have_joystick=yes
       
  2823         fi
       
  2824         # Set up files for the timer library
       
  2825         if test x$enable_timers = xyes; then
       
  2826             if test x$enable_threads = xyes -a x$enable_pth = xyes; then
       
  2827                 AC_DEFINE(SDL_TIMER_UNIX)
       
  2828                 SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
       
  2829             else
       
  2830                 AC_DEFINE(SDL_TIMER_MINT)
       
  2831                 SOURCES="$SOURCES $srcdir/src/timer/mint/*.c"
       
  2832                 SOURCES="$SOURCES $srcdir/src/timer/mint/*.S"
       
  2833             fi
       
  2834             have_timers=yes
       
  2835         fi
       
  2836         ;;
       
  2837     *-riscos)
  2682     *-riscos)
  2838         ARCH=riscos
  2683         ARCH=riscos
  2839         CheckOSS
  2684         CheckOSS
  2840         CheckPTHREAD
  2685         CheckPTHREAD
  2841         # Set up files for the video library
  2686         # Set up files for the video library