configure.in
author Sam Lantinga <slouken@libsdl.org>
Tue, 05 Mar 2002 19:55:32 +0000
changeset 292 eadc0746dfaf
parent 286 3ea69fd0b095
child 294 d2d48e10f370
permissions -rw-r--r--
Added SDL_LockRect() and SDL_UnlockRect()
Incorporated XFree86 extension libraries into the source
     1 dnl Process this file with autoconf to produce a configure script.
     2 AC_INIT(README)
     3 
     4 dnl Set various version strings - taken gratefully from the GTk sources
     5 #
     6 # Making releases:
     7 # Edit include/SDL/SDL_version.h and change the version, then:
     8 #   SDL_MICRO_VERSION += 1;
     9 #   SDL_INTERFACE_AGE += 1;
    10 #   SDL_BINARY_AGE += 1;
    11 # if any functions have been added, set SDL_INTERFACE_AGE to 0.
    12 # if backwards compatibility has been broken,
    13 # set SDL_BINARY_AGE and SDL_INTERFACE_AGE to 0.
    14 #
    15 SDL_MAJOR_VERSION=1
    16 SDL_MINOR_VERSION=2
    17 SDL_MICRO_VERSION=4
    18 SDL_INTERFACE_AGE=4
    19 SDL_BINARY_AGE=4
    20 SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
    21 
    22 AC_SUBST(SDL_MAJOR_VERSION)
    23 AC_SUBST(SDL_MINOR_VERSION)
    24 AC_SUBST(SDL_MICRO_VERSION)
    25 AC_SUBST(SDL_INTERFACE_AGE)
    26 AC_SUBST(SDL_BINARY_AGE)
    27 AC_SUBST(SDL_VERSION)
    28 
    29 # libtool versioning
    30 LT_RELEASE=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION
    31 LT_CURRENT=`expr $SDL_MICRO_VERSION - $SDL_INTERFACE_AGE`
    32 LT_REVISION=$SDL_INTERFACE_AGE
    33 LT_AGE=`expr $SDL_BINARY_AGE - $SDL_INTERFACE_AGE`
    34 
    35 AC_SUBST(LT_RELEASE)
    36 AC_SUBST(LT_CURRENT)
    37 AC_SUBST(LT_REVISION)
    38 AC_SUBST(LT_AGE)
    39 
    40 dnl Detect the canonical host and target build environment
    41 AC_CANONICAL_HOST
    42 AC_CANONICAL_TARGET
    43 
    44 dnl Setup for automake
    45 AM_INIT_AUTOMAKE(SDL, $SDL_VERSION)
    46 
    47 dnl Check for tools
    48 
    49 AC_LIBTOOL_WIN32_DLL
    50 AM_PROG_LIBTOOL
    51 AC_PROG_MAKE_SET
    52 AC_PROG_CC
    53 AC_C_INLINE
    54 AC_C_CONST
    55 AC_PROG_CXX
    56 AC_PROG_INSTALL
    57 AC_FUNC_ALLOCA
    58 ASFLAGS=""
    59 AC_SUBST(ASFLAGS)
    60 
    61 dnl The alpha architecture needs special flags for binary portability
    62 case "$target" in
    63     alpha*-*-linux*)
    64         if test x$ac_cv_prog_gcc = xyes; then
    65             CFLAGS="$CFLAGS -mcpu=ev4 -Wa,-mall"
    66         fi
    67         ;;
    68 esac
    69 
    70 dnl Add compiler-specific optimization flags
    71 
    72 dnl See if the user wants aggressive optimizations of the code
    73 AC_ARG_ENABLE(debug,
    74 [  --enable-debug          Disable aggressive optimizations [default=yes]],
    75               , enable_debug=yes)
    76 if test x$enable_debug != xyes; then
    77     if test x$ac_cv_prog_gcc = xyes; then
    78         CFLAGS="$CFLAGS -fexpensive-optimizations"
    79         # Ack! This breaks the MMX YV12 conversion on gcc 2.95.2
    80         # CFLAGS="$CFLAGS -fomit-frame-pointer"
    81     fi
    82     case "$target" in
    83         i486-*-*)
    84             if test x$ac_cv_prog_gcc = xyes; then
    85                 CFLAGS="$CFLAGS -march=486"
    86             fi
    87             ;;
    88         i?86-*-*)
    89             if test x$ac_cv_prog_gcc = xyes; then
    90                 CFLAGS="$CFLAGS -march=pentium -mcpu=pentiumpro"
    91             fi
    92             ;;
    93         *-*-osf*)
    94             if test x$ac_cv_prog_gcc != xyes; then
    95                 CFLAGS="-g3 -fast -arch host"
    96             fi
    97             ;;
    98     esac
    99 fi
   100 
   101 dnl Add verbose warnings by default, and allow ANSI compliance checking
   102 AC_ARG_ENABLE(strict-ansi,
   103 [  --enable-strict-ansi    Enable strict ANSI compliance build [default=no]],
   104               , enable_strict_ansi=no)
   105 if test x$ac_cv_prog_gcc = xyes; then
   106     CFLAGS="$CFLAGS -Wall"
   107     if test x$enable_strict_ansi = xyes; then
   108         CFLAGS="$CFLAGS -ansi -pedantic -D_XOPEN_SOURCE"
   109     fi
   110 fi
   111 
   112 dnl Initialize the compiler and linker flags for SDL applications
   113 
   114 SDL_CFLAGS=""
   115 SDL_LIBS="-lSDL"
   116 
   117 dnl Add the math library for the new gamma correction support
   118 
   119 case "$target" in
   120     *-*-cygwin* | *-*-mingw32*)
   121         MATHLIB=""
   122         ;;
   123     *-*-beos*)
   124         MATHLIB=""
   125         ;;
   126     *-*-darwin*)
   127         MATHLIB=""
   128         ;;
   129     *)
   130         MATHLIB="-lm"
   131         ;;
   132 esac
   133 SYSTEM_LIBS="$SYSTEM_LIBS $MATHLIB"
   134 
   135 dnl Enable/disable various subsystems of the SDL library
   136 
   137 AC_ARG_ENABLE(audio,
   138 [  --enable-audio          Enable the audio subsystem [default=yes]],
   139               , enable_audio=yes)
   140 if test x$enable_audio = xyes; then
   141     SDL_EXTRADIRS="$SDL_EXTRADIRS audio"
   142     SDL_EXTRALIBS="$SDL_EXTRALIBS audio/libaudio.la"
   143 else
   144     CFLAGS="$CFLAGS -DDISABLE_AUDIO"
   145 fi
   146 AC_ARG_ENABLE(video,
   147 [  --enable-video          Enable the video subsystem [default=yes]],
   148               , enable_video=yes)
   149 if test x$enable_video = xyes; then
   150     SDL_EXTRADIRS="$SDL_EXTRADIRS video"
   151     SDL_EXTRALIBS="$SDL_EXTRALIBS video/libvideo.la"
   152 else
   153     CFLAGS="$CFLAGS -DDISABLE_VIDEO"
   154 fi
   155 AC_ARG_ENABLE(events,
   156 [  --enable-events         Enable the events subsystem [default=yes]],
   157               , enable_events=yes)
   158 if test x$enable_video = xyes -a x$enable_events = xyes; then
   159     SDL_EXTRADIRS="$SDL_EXTRADIRS events"
   160     SDL_EXTRALIBS="$SDL_EXTRALIBS events/libevents.la"
   161 else
   162     CFLAGS="$CFLAGS -DDISABLE_EVENTS"
   163 fi
   164 AC_ARG_ENABLE(joystick,
   165 [  --enable-joystick       Enable the joystick subsystem [default=yes]],
   166               , enable_joystick=yes)
   167 if test x$enable_joystick = xyes; then
   168     SDL_EXTRADIRS="$SDL_EXTRADIRS joystick"
   169     SDL_EXTRALIBS="$SDL_EXTRALIBS joystick/libjoystick.la"
   170 else
   171     CFLAGS="$CFLAGS -DDISABLE_JOYSTICK"
   172 fi
   173 AC_ARG_ENABLE(cdrom,
   174 [  --enable-cdrom          Enable the cdrom subsystem [default=yes]],
   175               , enable_cdrom=yes)
   176 if test x$enable_cdrom = xyes; then
   177     SDL_EXTRADIRS="$SDL_EXTRADIRS cdrom"
   178     SDL_EXTRALIBS="$SDL_EXTRALIBS cdrom/libcdrom.la"
   179 else
   180     CFLAGS="$CFLAGS -DDISABLE_CDROM"
   181 fi
   182 AC_ARG_ENABLE(threads,
   183 [  --enable-threads        Enable the threading subsystem [default=yes]],
   184               , enable_threads=yes)
   185 SDL_EXTRADIRS="$SDL_EXTRADIRS thread"
   186 SDL_EXTRALIBS="$SDL_EXTRALIBS thread/libthread.la"
   187 if test x$enable_threads != xyes; then
   188     CFLAGS="$CFLAGS -DDISABLE_THREADS"
   189     COPY_ARCH_SRC(src/thread, generic, SDL_systhread.c)
   190     COPY_ARCH_SRC(src/thread, generic, SDL_systhread_c.h)
   191     COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
   192     COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
   193     COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
   194     COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
   195     COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
   196     COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
   197 fi
   198 AC_ARG_ENABLE(timers,
   199 [  --enable-timers         Enable the timer subsystem [default=yes]],
   200               , enable_timers=yes)
   201 if test x$enable_timers = xyes; then
   202     SDL_EXTRADIRS="$SDL_EXTRADIRS timer"
   203     SDL_EXTRALIBS="$SDL_EXTRALIBS timer/libtimer.la"
   204 else
   205     CFLAGS="$CFLAGS -DDISABLE_TIMERS"
   206 fi
   207 AC_ARG_ENABLE(endian,
   208 [  --enable-endian         Enable the endian subsystem [default=yes]],
   209               , enable_endian=yes)
   210 if test x$enable_endian = xyes; then
   211     SDL_EXTRADIRS="$SDL_EXTRADIRS endian"
   212     SDL_EXTRALIBS="$SDL_EXTRALIBS endian/libendian.la"
   213 else
   214     CFLAGS="$CFLAGS -DDISABLE_ENDIAN"
   215 fi
   216 AC_ARG_ENABLE(file,
   217 [  --enable-file           Enable the file subsystem [default=yes]],
   218               , enable_file=yes)
   219 if test x$enable_file = xyes; then
   220     SDL_EXTRADIRS="$SDL_EXTRADIRS file"
   221     SDL_EXTRALIBS="$SDL_EXTRALIBS file/libfile.la"
   222 else
   223     CFLAGS="$CFLAGS -DDISABLE_FILE"
   224 fi
   225 
   226 dnl See if the OSS audio interface is supported
   227 CheckOSS()
   228 {
   229     AC_ARG_ENABLE(oss,
   230 [  --enable-oss            support the OSS audio API [default=yes]],
   231                   , enable_oss=yes)
   232     if test x$enable_audio = xyes -a x$enable_oss = xyes; then
   233         AC_MSG_CHECKING(for OSS audio support)
   234         have_oss=no
   235         if test x$have_oss != xyes; then
   236             AC_TRY_COMPILE([
   237               #include <sys/soundcard.h>
   238             ],[
   239               int arg = SNDCTL_DSP_SETFRAGMENT;
   240             ],[
   241             have_oss=yes
   242             ])
   243         fi
   244         if test x$have_oss != xyes; then
   245             AC_TRY_COMPILE([
   246               #include <soundcard.h>
   247             ],[
   248               int arg = SNDCTL_DSP_SETFRAGMENT;
   249             ],[
   250             have_oss=yes
   251             CFLAGS="$CFLAGS -DOSS_USE_SOUNDCARD_H"
   252             ])
   253         fi
   254         AC_MSG_RESULT($have_oss)
   255         if test x$have_oss = xyes; then
   256             CFLAGS="$CFLAGS -DOSS_SUPPORT"
   257             AUDIO_SUBDIRS="$AUDIO_SUBDIRS dsp"
   258             AUDIO_DRIVERS="$AUDIO_DRIVERS dsp/libaudio_dsp.la"
   259             AUDIO_SUBDIRS="$AUDIO_SUBDIRS dma"
   260             AUDIO_DRIVERS="$AUDIO_DRIVERS dma/libaudio_dma.la"
   261         fi
   262     fi
   263 }
   264 
   265 dnl See if the ALSA audio interface is supported
   266 CheckALSA()
   267 {
   268     AC_ARG_ENABLE(alsa,
   269 [  --enable-alsa           support the ALSA audio API [default=yes]],
   270                   , enable_alsa=yes)
   271     if test x$enable_audio = xyes -a x$enable_alsa = xyes; then
   272         have_alsa=no
   273         AC_CHECK_HEADER(sys/asoundlib.h, have_alsa_hdr=yes)
   274         AC_CHECK_LIB(asound, snd_pcm_open, have_alsa_lib=yes)
   275         if test x$have_alsa_hdr = xyes -a x$have_alsa_lib = xyes; then
   276             CFLAGS="$CFLAGS -DALSA_SUPPORT"
   277             SYSTEM_LIBS="$SYSTEM_LIBS -lasound"
   278             AUDIO_SUBDIRS="$AUDIO_SUBDIRS alsa"
   279             AUDIO_DRIVERS="$AUDIO_DRIVERS alsa/libaudio_alsa.la"
   280         fi
   281     fi
   282 }
   283 
   284 dnl Check whether we want to use OpenBSD native audio or not
   285 CheckOPENBSDAUDIO()
   286 {
   287     AC_ARG_ENABLE(openbsdaudio,
   288 [  --enable-openbsdaudio   OpenBSD native audio support [default=yes]],
   289                   , enable_openbsdaudio=yes)
   290     if test x$enable_audio = xyes -a x$enable_openbsdaudio = xyes; then
   291         CFLAGS="$CFLAGS -DOPENBSD_AUDIO_SUPPORT"
   292         AUDIO_SUBDIRS="$AUDIO_SUBDIRS openbsd"
   293         AUDIO_DRIVERS="$AUDIO_DRIVERS openbsd/libaudio_openbsd.la"
   294     fi
   295 }
   296 
   297 dnl Check whether we want to use IRIX 6.5+ native audio or not
   298 CheckDMEDIA()
   299 {
   300     if test x$enable_audio = xyes; then
   301         AC_MSG_CHECKING(for dmedia audio support)
   302         have_dmedia=no
   303         AC_TRY_COMPILE([
   304           #include <dmedia/audio.h>
   305         ],[
   306           ALport audio_port;
   307         ],[
   308         have_dmedia=yes
   309         ])
   310         # Set up files for the audio library
   311         if test x$have_dmedia = xyes; then
   312             CFLAGS="$CFLAGS -DDMEDIA_SUPPORT"
   313             AUDIO_SUBDIRS="$AUDIO_SUBDIRS dmedia"
   314             AUDIO_DRIVERS="$AUDIO_DRIVERS dmedia/libaudio_dmedia.la"
   315             SYSTEM_LIBS="$SYSTEM_LIBS -laudio"
   316         fi
   317     fi
   318 }
   319 
   320 dnl Find the ESD includes and libraries
   321 CheckESD()
   322 {
   323     AC_ARG_ENABLE(esd,
   324 [  --enable-esd            support the Enlightened Sound Daemon [default=yes]],
   325                   , enable_esd=yes)
   326     if test x$enable_audio = xyes -a x$enable_esd = xyes; then
   327         AM_PATH_ESD(0.2.8, [
   328             CFLAGS="$CFLAGS -DESD_SUPPORT $ESD_CFLAGS"
   329             SYSTEM_LIBS="$SYSTEM_LIBS $ESD_LIBS"
   330             AUDIO_SUBDIRS="$AUDIO_SUBDIRS esd"
   331             AUDIO_DRIVERS="$AUDIO_DRIVERS esd/libaudio_esd.la"
   332         ])
   333     fi
   334 }
   335 
   336 CheckARTSC()
   337 {
   338     AC_ARG_ENABLE(arts,
   339 [  --enable-arts           support the Analog Real Time Synthesizer [default=yes]],
   340                   , enable_arts=yes)
   341     if test x$enable_audio = xyes -a x$enable_arts = xyes; then
   342         AC_PATH_PROG(ARTSCCONFIG, artsc-config)
   343         if test x$ARTSCCONFIG = x -o x$ARTSCCONFIG = x'"$ARTSCCONFIG"'; then
   344             : # arts isn't installed
   345         else
   346             ARTSC_CFLAGS=`$ARTSCCONFIG --cflags`
   347             ARTSC_LIBS=`$ARTSCCONFIG --libs`
   348             AC_MSG_CHECKING(for aRts development environment)
   349             audio_arts=no
   350             save_CFLAGS="$CFLAGS"
   351             CFLAGS="$CFLAGS $ARTSC_CFLAGS"
   352             AC_TRY_COMPILE([
   353              #include <artsc.h>
   354             ],[
   355              arts_stream_t stream;
   356             ],[
   357             audio_arts=yes
   358             ])
   359             CFLAGS="$save_CFLAGS"
   360             AC_MSG_RESULT($audio_arts)
   361             if test x$audio_arts = xyes; then
   362                 CFLAGS="$CFLAGS -DARTSC_SUPPORT $ARTSC_CFLAGS"
   363                 SYSTEM_LIBS="$SYSTEM_LIBS $ARTSC_LIBS"
   364                 AUDIO_SUBDIRS="$AUDIO_SUBDIRS arts"
   365                 AUDIO_DRIVERS="$AUDIO_DRIVERS arts/libaudio_arts.la"
   366             fi
   367         fi
   368     fi
   369 }
   370 
   371 dnl See if the NAS audio interface is supported
   372 CheckNAS()
   373 {
   374     AC_ARG_ENABLE(nas,
   375 [  --enable-nas                  support the NAS audio API [default=yes]],
   376                   , enable_nas=yes)
   377     if test x$enable_audio = xyes -a x$enable_nas = xyes; then
   378         AC_MSG_CHECKING(for NAS audio support)
   379         have_nas=no
   380         if test -r /usr/X11R6/include/audio/audiolib.h; then
   381             have_nas=yes
   382         fi
   383         AC_MSG_RESULT($have_nas)
   384         if test x$have_nas = xyes; then
   385             CFLAGS="$CFLAGS -DNAS_SUPPORT"
   386             SYSTEM_LIBS="$SYSTEM_LIBS -laudio -lXt"
   387             AUDIO_SUBDIRS="$AUDIO_SUBDIRS nas"
   388             AUDIO_DRIVERS="$AUDIO_DRIVERS nas/libaudio_nas.la"
   389         fi
   390     fi
   391 }
   392 
   393 dnl rcg07142001 See if the user wants the disk writer audio driver...
   394 CheckDiskAudio()
   395 {
   396     AC_ARG_ENABLE(diskaudio,
   397 [  --enable-diskaudio            support the disk writer audio driver [default=yes]],
   398                   , enable_diskaudio=yes)
   399     if test x$enable_audio = xyes -a x$enable_diskaudio = xyes; then
   400         CFLAGS="$CFLAGS -DDISKAUD_SUPPORT"
   401         AUDIO_SUBDIRS="$AUDIO_SUBDIRS disk"
   402         AUDIO_DRIVERS="$AUDIO_DRIVERS disk/libaudio_disk.la"
   403     fi
   404 }
   405 
   406 dnl See if we can use x86 assembly blitters
   407 # NASM is available from: http://nasm.octium.net/
   408 CheckNASM()
   409 {
   410     dnl Make sure we are running on an x86 platform
   411     case $target in
   412         i?86*)
   413             ;;
   414         *)
   415         # Nope, bail early.
   416             return
   417             ;;
   418     esac
   419     dnl Check for NASM (for assembly blit routines)
   420     AC_ARG_ENABLE(nasm,
   421 [  --enable-nasm           use nasm assembly blitters on x86 [default=yes]],
   422                   , enable_nasm=yes)
   423     if test x$enable_video = xyes -a x$enable_nasm = xyes; then
   424         AC_PATH_PROG(NASM, nasm)
   425         if test x$NASM = x -o x$NASM = x'"$NASM"'; then
   426             : # nasm isn't installed
   427         else
   428             CFLAGS="$CFLAGS -DUSE_ASMBLIT -I$srcdir/hermes"
   429             case $ARCH in
   430               win32)
   431                   NASMFLAGS="-f win32"
   432                   ;;
   433               *)
   434                   NASMFLAGS="-f elf"
   435                   ;;
   436             esac
   437             AC_SUBST(NASMFLAGS)
   438             CFLAGS="$CFLAGS -I\$(top_srcdir)/src/hermes"
   439             SDL_EXTRADIRS="$SDL_EXTRADIRS hermes"
   440             SDL_EXTRALIBS="$SDL_EXTRALIBS hermes/libhermes.la"
   441         fi
   442     fi
   443 }
   444 
   445 dnl Find the nanox include and library directories
   446 CheckNANOX()
   447 {
   448     AC_ARG_ENABLE(video-nanox,
   449         [  --enable-video-nanox use nanox video driver [default=no]],
   450         , enable_video_nanox=no)
   451     AC_ARG_ENABLE(nanox-debug,  
   452         [  --enable-nanox-debug print debug messages [default=no]],
   453         , enable_nanox_debug=no)
   454     AC_ARG_ENABLE(nanox-share-memory,  
   455         [  --enable-nanox-share-memory use share memory [default=no]],
   456         , enable_nanox_share_memory=no)
   457 
   458     AC_ARG_WITH(nanox_pixel_type, 
   459         [  --with-nanox-pixel-type=[rgb/0888/888/565/555/332/pal]])
   460 
   461     if test x$enable_video = xyes -a x$enable_video_nanox = xyes; then
   462         if test x$enable_nanox_debug = xyes; then
   463             CFLAGS="$CFLAGS -DENABLE_NANOX_DEBUG"
   464         fi
   465 
   466         if test x$enable_nanox_share_memory = xyes; then
   467             CFLAGS="$CFLAGS -DNANOX_SHARE_MEMORY"
   468         fi
   469 
   470         case "$with_nanox_pixel_type" in
   471              rgb) CFLAGS="$CFLAGS -DNANOX_PIXEL_RGB" ;;
   472             0888) CFLAGS="$CFLAGS -DNANOX_PIXEL_0888" ;;
   473              888) CFLAGS="$CFLAGS -DNANOX_PIXEL_888"  ;;
   474              565) CFLAGS="$CFLAGS -DNANOX_PIXEL_565"  ;;
   475              555) CFLAGS="$CFLAGS -DNANOX_PIXEL_555"  ;;
   476              332) CFLAGS="$CFLAGS -DNANOX_PIXEL_332"  ;;
   477              pal) CFLAGS="$CFLAGS -DNANOX_PIXEL_PAL"  ;;
   478                *) AC_MSG_ERROR([Invalid nanox_pixel_type]);;
   479         esac
   480 
   481         CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_NANOX"
   482         SYSTEM_LIBS="$SYSTEM_LIBS -lnano-X"
   483         VIDEO_SUBDIRS="$VIDEO_SUBDIRS nanox"
   484         VIDEO_DRIVERS="$VIDEO_DRIVERS nanox/libvideo_nanox.la"
   485     fi
   486 }
   487 
   488 dnl Find the X11 include and library directories
   489 CheckX11()
   490 {
   491     AC_ARG_ENABLE(video-x11,
   492 [  --enable-video-x11      use X11 video driver [default=yes]],
   493                   , enable_video_x11=yes)
   494     if test x$enable_video = xyes -a x$enable_video_x11 = xyes; then
   495         AC_PATH_X
   496         AC_PATH_XTRA
   497         if test x$have_x = xyes; then
   498             CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_X11 -Isrc/video"
   499             if test x$ac_cv_func_shmat != xyes; then
   500                 CFLAGS="$CFLAGS -DNO_SHARED_MEMORY"
   501             fi
   502             SYSTEM_LIBS="$SYSTEM_LIBS $X_LIBS -lX11 -lXext"
   503             VIDEO_SUBDIRS="$VIDEO_SUBDIRS x11"
   504             VIDEO_DRIVERS="$VIDEO_DRIVERS x11/libvideo_x11.la"
   505 
   506             AC_ARG_ENABLE(video-x11-vm,
   507 [  --enable-video-x11-vm   use X11 VM extension for fullscreen [default=yes]],
   508                           , enable_video_x11_vm=yes)
   509             if test x$enable_video_x11_vm = xyes; then
   510                 AC_MSG_CHECKING(for XFree86 VidMode 1.0 support)
   511                 video_x11_vm=no
   512                 AC_TRY_COMPILE([
   513                  #include <X11/Xlib.h>
   514                  #include <XFree86/extensions/xf86vmode.h>
   515                 ],[
   516                 ],[
   517                 video_x11_vm=yes
   518                 ])
   519                 AC_MSG_RESULT($video_x11_vm)
   520                 if test x$video_x11_vm = xyes; then
   521                     CFLAGS="$CFLAGS -DXFREE86_VM"
   522                     VIDEO_SUBDIRS="$VIDEO_SUBDIRS XFree86/Xxf86vm"
   523                     VIDEO_DRIVERS="$VIDEO_DRIVERS XFree86/Xxf86vm/libXFree86_Xxf86vm.la"
   524                     AC_MSG_CHECKING(for XFree86 VidMode gamma support)
   525                     video_x11_vmgamma=no
   526                     AC_TRY_COMPILE([
   527                      #include <X11/Xlib.h>
   528                      #include <XFree86/extensions/xf86vmode.h>
   529                     ],[
   530                      SDL_NAME(XF86VidModeGamma) gamma;
   531                     ],[
   532                     video_x11_vmgamma=yes
   533                     ])
   534                     AC_MSG_RESULT($video_x11_vmgamma)
   535                     if test x$video_x11_vmgamma = xyes; then
   536                         CFLAGS="$CFLAGS -DXFREE86_VMGAMMA"
   537                     fi
   538                 fi
   539             fi
   540             AC_ARG_ENABLE(dga,
   541 [  --enable-dga            allow use of X11 DGA code [default=yes]],
   542                           , enable_dga=yes)
   543             AC_ARG_ENABLE(video-x11-dgamouse,
   544 [  --enable-video-x11-dgamouse  use X11 DGA for mouse events [default=yes]],
   545                           , enable_video_x11_dgamouse=yes)
   546             if test x$enable_dga = xyes; then
   547                 AC_MSG_CHECKING(for XFree86 DGA 1.0 support)
   548                 video_x11_dga=no
   549                 AC_TRY_COMPILE([
   550                  #include <X11/Xlib.h>
   551                  #include <XFree86/extensions/xf86dga.h>
   552                 ],[
   553                 ],[
   554                 video_x11_dga=yes
   555                 ])
   556                 AC_MSG_RESULT($video_x11_dga)
   557                 if test x$video_x11_dga = xyes; then
   558                     CFLAGS="$CFLAGS -DXFREE86_DGAMOUSE"
   559                     if test x$enable_video_x11_dgamouse = xyes; then
   560                         CFLAGS="$CFLAGS -DDEFAULT_DGAMOUSE"
   561                     fi
   562                     VIDEO_SUBDIRS="$VIDEO_SUBDIRS XFree86/Xxf86dga"
   563                     VIDEO_DRIVERS="$VIDEO_DRIVERS XFree86/Xxf86dga/libXFree86_Xxf86dga.la"
   564                 fi
   565             fi
   566             AC_ARG_ENABLE(video-x11-xv,
   567 [  --enable-video-x11-xv   use X11 XvImage extension for video [default=yes]],
   568                           , enable_video_x11_xv=yes)
   569             if test x$enable_video_x11_xv = xyes; then
   570                 AC_MSG_CHECKING(for XFree86 XvImage support)
   571                 video_x11_xv=no
   572                 AC_TRY_COMPILE([
   573                  #include <X11/Xlib.h>
   574                  #include <sys/ipc.h>
   575                  #include <sys/shm.h>
   576                  #include <X11/extensions/XShm.h>
   577                  #include <XFree86/extensions/Xvlib.h>
   578                 ],[
   579                  SDL_NAME(XvImage) *image;
   580                 ],[
   581                 video_x11_xv=yes
   582                 ])
   583                 AC_MSG_RESULT($video_x11_xv)
   584                 if test x$video_x11_xv = xyes; then
   585                     CFLAGS="$CFLAGS -DXFREE86_XV"
   586                     VIDEO_SUBDIRS="$VIDEO_SUBDIRS XFree86/Xv"
   587                     VIDEO_DRIVERS="$VIDEO_DRIVERS XFree86/Xv/libXFree86_Xv.la"
   588                 fi
   589             fi
   590             AC_ARG_ENABLE(video-x11-xinerama,
   591 [  --enable-video-x11-xinerama   enable X11 Xinerama support [default=yes]],
   592                             , enable_video_x11_xinerama=yes)
   593             if test x$enable_video_x11_xinerama = xyes; then
   594                 AC_MSG_CHECKING(for X11 Xinerama support)
   595                 video_x11_xinerama=no
   596                 AC_TRY_COMPILE([
   597                  #include <X11/Xlib.h>
   598                  #include <XFree86/extensions/Xinerama.h>
   599                 ],[
   600                  SDL_NAME(XineramaScreenInfo) *xinerama;
   601                 ],[
   602                 video_x11_xinerama=yes
   603                 ])
   604                 AC_MSG_RESULT($video_x11_xinerama)
   605                 if test x$video_x11_xinerama = xyes; then
   606                     CFLAGS="$CFLAGS -DHAVE_XINERAMA"
   607                     VIDEO_SUBDIRS="$VIDEO_SUBDIRS XFree86/Xinerama"
   608                     VIDEO_DRIVERS="$VIDEO_DRIVERS XFree86/Xinerama/libXFree86_Xinerama.la"
   609                 fi
   610             fi
   611             AC_ARG_ENABLE(video-x11-xme,
   612 [  --enable-video-x11-xme  enable Xi Graphics XME for fullscreen [default=yes]],
   613                             , enable_video_x11_xme=yes)
   614             if test x$enable_video_x11_xme = xyes; then
   615                 AC_MSG_CHECKING(for Xi Graphics XiGMiscExtension support)
   616                 video_x11_xme=no
   617                 AC_TRY_COMPILE([
   618                  #include <X11/Xlib.h>
   619                  #include <X11/extensions/xme.h>
   620                 ],[
   621                  XiGMiscResolutionInfo *resolutions;
   622                 ],[
   623                 video_x11_xme=yes
   624                 ])
   625                 AC_MSG_RESULT($video_x11_xme)
   626                 if test x$video_x11_xme = xyes; then
   627                     CFLAGS="$CFLAGS -DHAVE_XIGXME"
   628                     SYSTEM_LIBS="$SYSTEM_LIBS -lxme"
   629                 fi
   630             fi
   631         fi
   632     fi
   633 }
   634 
   635 dnl Find the X11 DGA 2.0 include and library directories
   636 CheckDGA()
   637 {
   638     AC_ARG_ENABLE(video-dga,
   639 [  --enable-video-dga      use DGA 2.0 video driver [default=yes]],
   640                   , enable_video_dga=yes)
   641     if test x$video_x11_dga = xyes -a x$enable_video_dga = xyes; then
   642         save_CFLAGS="$CFLAGS"; CFLAGS="$CFLAGS -Isrc/video"
   643         AC_MSG_CHECKING(for XFree86 DGA 2.0 support)
   644         video_x11_dga2=no
   645         AC_TRY_COMPILE([
   646          #include <X11/Xlib.h>
   647          #include <XFree86/extensions/xf86dga.h>
   648         ],[
   649          SDL_NAME(XDGAEvent) xevent;
   650         ],[
   651         video_x11_dga2=yes
   652         ])
   653         AC_MSG_RESULT($video_x11_dga2)
   654         if test x$video_x11_dga2 = xyes; then
   655             CFLAGS="$CFLAGS -DENABLE_DGA"
   656             VIDEO_SUBDIRS="$VIDEO_SUBDIRS dga"
   657             VIDEO_DRIVERS="$VIDEO_DRIVERS dga/libvideo_dga.la"
   658         fi
   659     fi
   660 }
   661 
   662 CheckPHOTON()
   663 {
   664     AC_ARG_ENABLE(video-photon,
   665 [  --enable-video-photon   use QNX Photon video driver [default=yes]],
   666                   , enable_video_photon=yes)
   667     if test x$enable_video = xyes -a x$enable_video_photon = xyes; then
   668         AC_MSG_CHECKING(for QNX Photon support)
   669         video_photon=no
   670         AC_TRY_COMPILE([
   671           #include <Ph.h>
   672           #include <Pt.h>
   673           #include <photon/Pg.h>
   674           #include <photon/PdDirect.h>
   675         ],[
   676          PgDisplaySettings_t *visual;
   677         ],[
   678         video_photon=yes
   679         ])
   680         AC_MSG_RESULT($video_photon)
   681         if test x$video_photon = xyes; then
   682             CFLAGS="$CFLAGS -DENABLE_PHOTON"
   683             SYSTEM_LIBS="$SYSTEM_LIBS -lph"
   684             VIDEO_SUBDIRS="$VIDEO_SUBDIRS photon"
   685             VIDEO_DRIVERS="$VIDEO_DRIVERS photon/libvideo_photon.la"
   686             CheckOpenGLQNX
   687         fi
   688     fi
   689 }
   690 
   691 dnl Find the framebuffer console includes
   692 CheckFBCON()
   693 {
   694     AC_ARG_ENABLE(video-fbcon,
   695 [  --enable-video-fbcon    use framebuffer console video driver [default=yes]],
   696                   , enable_video_fbcon=yes)
   697     if test x$enable_video = xyes -a x$enable_video_fbcon = xyes; then
   698         AC_MSG_CHECKING(for framebuffer console support)
   699         video_fbcon=no
   700         AC_TRY_COMPILE([
   701          #include <linux/fb.h>
   702          #include <linux/kd.h>
   703          #include <linux/keyboard.h>
   704         ],[
   705         ],[
   706         video_fbcon=yes
   707         ])
   708         AC_MSG_RESULT($video_fbcon)
   709         if test x$video_fbcon = xyes; then
   710             CFLAGS="$CFLAGS -DENABLE_FBCON"
   711             VIDEO_SUBDIRS="$VIDEO_SUBDIRS fbcon"
   712             VIDEO_DRIVERS="$VIDEO_DRIVERS fbcon/libvideo_fbcon.la"
   713         fi
   714     fi
   715 }
   716 
   717 dnl Find DirectFB
   718 CheckDirectFB()
   719 {
   720     AC_ARG_ENABLE(video-directfb,
   721 [  --enable-video-directfb    use DirectFB video driver [default=yes]],
   722                   , enable_video_directfb=yes)
   723     if test x$enable_video = xyes -a x$enable_video_directfb = xyes; then
   724         video_directfb=no
   725 
   726         AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
   727         if test x$PKG_CONFIG = xno ; then
   728             AC_MSG_WARN([*** pkg-config is required to build the DirectFB video driver.])
   729         else
   730             AC_MSG_CHECKING(for DirectFB support)
   731 
   732             if ! $PKG_CONFIG --atleast-pkgconfig-version 0.5 ; then
   733                 AC_MSG_ERROR([*** pkg-config too old; version 0.5 or better required.])
   734             fi
   735 
   736             DIRECTFB_REQUIRED_VERSION=0.9.9
   737 
   738             if $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb ; then
   739                 DIRECTFB_CFLAGS=`$PKG_CONFIG --cflags directfb`
   740                 DIRECTFB_LIBS=`$PKG_CONFIG --libs directfb`
   741                 video_directfb=yes
   742             fi
   743         fi
   744 
   745         AC_MSG_RESULT($video_directfb)
   746         if test x$video_directfb = xyes; then
   747             CFLAGS="$CFLAGS -DENABLE_DIRECTFB"
   748             VIDEO_SUBDIRS="$VIDEO_SUBDIRS directfb"
   749             VIDEO_DRIVERS="$VIDEO_DRIVERS directfb/libvideo_directfb.la"
   750 
   751             AC_SUBST(DIRECTFB_CFLAGS)
   752             AC_SUBST(DIRECTFB_LIBS)
   753         fi
   754     fi
   755 }
   756 
   757 dnl See if we're running on PlayStation 2 hardware
   758 CheckPS2GS()
   759 {
   760     AC_ARG_ENABLE(video-ps2gs,
   761 [  --enable-video-ps2gs    use PlayStation 2 GS video driver [default=yes]],
   762                   , enable_video_ps2gs=yes)
   763     if test x$enable_video = xyes -a x$enable_video_ps2gs = xyes; then
   764         AC_MSG_CHECKING(for PlayStation 2 GS support)
   765         video_ps2gs=no
   766         AC_TRY_COMPILE([
   767          #include <linux/ps2/dev.h>
   768          #include <linux/ps2/gs.h>
   769         ],[
   770         ],[
   771         video_ps2gs=yes
   772         ])
   773         AC_MSG_RESULT($video_ps2gs)
   774         if test x$video_ps2gs = xyes; then
   775             CFLAGS="$CFLAGS -DENABLE_PS2GS"
   776             VIDEO_SUBDIRS="$VIDEO_SUBDIRS ps2gs"
   777             VIDEO_DRIVERS="$VIDEO_DRIVERS ps2gs/libvideo_ps2gs.la"
   778         fi
   779     fi
   780 }
   781 
   782 dnl Find the GGI includes
   783 CheckGGI()
   784 {
   785     AC_ARG_ENABLE(video-ggi,
   786 [  --enable-video-ggi      use GGI video driver [default=no]],
   787                   , enable_video_ggi=no)
   788     if test x$enable_video = xyes -a x$enable_video_ggi = xyes; then
   789         AC_MSG_CHECKING(for GGI support)
   790         video_ggi=no
   791         AC_TRY_COMPILE([
   792          #include <ggi/ggi.h>
   793          #include <ggi/gii.h>
   794         ],[
   795         ],[
   796         video_ggi=yes
   797         ])
   798         AC_MSG_RESULT($video_ggi)
   799         if test x$video_ggi = xyes; then
   800             CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_GGI"
   801             SYSTEM_LIBS="$SYSTEM_LIBS -lggi -lgii -lgg"
   802 
   803             VIDEO_SUBDIRS="$VIDEO_SUBDIRS ggi"
   804             VIDEO_DRIVERS="$VIDEO_DRIVERS ggi/libvideo_ggi.la"
   805         fi
   806     fi
   807 }
   808 
   809 dnl Find the SVGAlib includes and libraries
   810 CheckSVGA()
   811 {
   812     AC_ARG_ENABLE(video-svga,
   813 [  --enable-video-svga     use SVGAlib video driver [default=no]],
   814                   , enable_video_svga=no)
   815     if test x$enable_video = xyes -a x$enable_video_svga = xyes; then
   816         AC_MSG_CHECKING(for SVGAlib (1.4.0+) support)
   817         video_svga=no
   818         AC_TRY_COMPILE([
   819          #include <vga.h>
   820          #include <vgamouse.h>
   821          #include <vgakeyboard.h>
   822         ],[
   823          if ( SCANCODE_RIGHTWIN && SCANCODE_LEFTWIN ) {
   824              exit(0);
   825          }
   826         ],[
   827         video_svga=yes
   828         ])
   829         AC_MSG_RESULT($video_svga)
   830         if test x$video_svga = xyes; then
   831             CFLAGS="$CFLAGS -DENABLE_SVGALIB"
   832             SYSTEM_LIBS="$SYSTEM_LIBS -lvga"
   833 
   834             VIDEO_SUBDIRS="$VIDEO_SUBDIRS svga"
   835             VIDEO_DRIVERS="$VIDEO_DRIVERS svga/libvideo_svga.la"
   836         fi
   837     fi
   838 }
   839 
   840 dnl Find the VGL includes and libraries
   841 CheckVGL()
   842 {
   843     AC_ARG_ENABLE(video-vgl,
   844 [  --enable-video-vgl     use VGL video driver [default=no]],
   845                   , enable_video_vgl=no)
   846     if test x$enable_video = xyes -a x$enable_video_vgl = xyes; then
   847         AC_MSG_CHECKING(for libVGL support)
   848         video_vgl=no
   849         AC_TRY_COMPILE([
   850          #include <sys/fbio.h>
   851          #include <sys/consio.h>
   852          #include <sys/kbio.h>
   853          #include <vgl.h>
   854         ],[
   855          VGLBitmap bitmap;
   856          exit(bitmap.Bitmap);
   857         ],[
   858         video_vgl=yes
   859         ])
   860         AC_MSG_RESULT($video_vgl)
   861         if test x$video_vgl = xyes; then
   862             CFLAGS="$CFLAGS -DENABLE_VGL"
   863             SYSTEM_LIBS="$SYSTEM_LIBS -lvgl"
   864 
   865             VIDEO_SUBDIRS="$VIDEO_SUBDIRS vgl"
   866             VIDEO_DRIVERS="$VIDEO_DRIVERS vgl/libvideo_vgl.la"
   867         fi
   868     fi
   869 }
   870 
   871 dnl Find the AAlib includes
   872 CheckAAlib()
   873 {
   874     AC_ARG_ENABLE(video-aalib,
   875 [  --enable-video-aalib    use AAlib video driver [default=no]],
   876                   , enable_video_aalib=no)
   877     if test x$enable_video = xyes -a x$enable_video_aalib = xyes; then
   878         AC_MSG_CHECKING(for AAlib support)
   879         video_aalib=no
   880         AC_TRY_COMPILE([
   881          #include <aalib.h>
   882         ],[
   883         ],[
   884         video_aalib=yes
   885         ])
   886         AC_MSG_RESULT($video_aalib)
   887         if test x$video_aalib = xyes; then
   888             CFLAGS="$CFLAGS -DENABLE_AALIB"
   889             SYSTEM_LIBS="$SYSTEM_LIBS -laa"
   890 
   891             VIDEO_SUBDIRS="$VIDEO_SUBDIRS aalib"
   892             VIDEO_DRIVERS="$VIDEO_DRIVERS aalib/libvideo_aa.la"
   893         fi
   894     fi
   895 }
   896 
   897 dnl Set up the Atari Xbios driver
   898 CheckAtariXbiosVideo()
   899 {
   900     AC_ARG_ENABLE(xbios,
   901 [  --enable-video-xbios    use Atari Xbios video driver [default=yes]],
   902                   , enable_video_xbios=yes)
   903     video_xbios=no
   904     if test x$enable_video = xyes -a x$enable_video_xbios = xyes; then
   905         video_xbios=yes
   906         CFLAGS="$CFLAGS -DENABLE_XBIOS"
   907         VIDEO_SUBDIRS="$VIDEO_SUBDIRS xbios"
   908         VIDEO_DRIVERS="$VIDEO_DRIVERS xbios/libvideo_xbios.la"
   909     fi
   910 }
   911 
   912 dnl Set up the Atari Gem driver
   913 CheckAtariGemVideo()
   914 {
   915     AC_ARG_ENABLE(gem,
   916 [  --enable-video-gem      use Atari Gem video driver [default=yes]],
   917                   , enable_video_gem=yes)
   918     if test x$enable_video = xyes -a x$enable_video_gem = xyes; then
   919         video_gem=no
   920         AC_CHECK_HEADER(gem.h, have_gem_hdr=yes)
   921         AC_CHECK_LIB(gem, appl_init, have_gem_lib=yes)
   922         if test x$have_gem_hdr = xyes -a x$have_gem_lib = xyes; then
   923             video_gem=yes
   924             CFLAGS="$CFLAGS -DENABLE_GEM"
   925             SYSTEM_LIBS="$SYSTEM_LIBS -lgem"
   926             VIDEO_SUBDIRS="$VIDEO_SUBDIRS gem"
   927             VIDEO_DRIVERS="$VIDEO_DRIVERS gem/libvideo_gem.la"
   928         fi
   929     fi
   930 }
   931 
   932 dnl Set up the Atari Bios keyboard driver
   933 CheckAtariBiosEvent()
   934 {
   935     CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video/ataricommon"
   936     VIDEO_SUBDIRS="$VIDEO_SUBDIRS ataricommon"
   937     VIDEO_DRIVERS="$VIDEO_DRIVERS ataricommon/libvideo_ataricommon.la"
   938 }
   939 
   940 dnl rcg04172001 Set up the Null video driver.
   941 CheckDummyVideo()
   942 {
   943     AC_ARG_ENABLE(video-dummy,
   944 [  --enable-video-dummy    use dummy video driver [default=yes]],
   945                   , enable_video_dummy=yes)
   946     if test x$enable_video_dummy = xyes; then
   947       CFLAGS="$CFLAGS -DENABLE_DUMMYVIDEO"
   948       VIDEO_SUBDIRS="$VIDEO_SUBDIRS dummy"
   949       VIDEO_DRIVERS="$VIDEO_DRIVERS dummy/libvideo_null.la"
   950     fi
   951 }
   952 
   953 dnl Check to see if OpenGL support is desired
   954 AC_ARG_ENABLE(video-opengl,
   955 [  --enable-video-opengl   include OpenGL context creation [default=yes]],
   956               , enable_video_opengl=yes)
   957 
   958 dnl Find OpenGL
   959 CheckOpenGL()
   960 {
   961     if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
   962         AC_MSG_CHECKING(for OpenGL (GLX) support)
   963         video_opengl=no
   964         AC_TRY_COMPILE([
   965          #include <GL/gl.h>
   966          #include <GL/glx.h>
   967          #include <dlfcn.h> /* For loading extensions */
   968         ],[
   969         ],[
   970         video_opengl=yes
   971         ])
   972         AC_MSG_RESULT($video_opengl)
   973         if test x$video_opengl = xyes; then
   974             CFLAGS="$CFLAGS -DHAVE_OPENGL"
   975             AC_CHECK_LIB(dl, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS -ldl")
   976         fi
   977     fi
   978 }
   979 
   980 dnl Find QNX RtP OpenGL
   981 CheckOpenGLQNX()
   982 {
   983     if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
   984         AC_MSG_CHECKING(for OpenGL (Photon) support)
   985         video_opengl=no
   986         AC_TRY_COMPILE([
   987          #include <GL/gl.h>
   988         ],[
   989         ],[
   990         video_opengl=yes
   991         ])
   992         AC_MSG_RESULT($video_opengl)
   993         if test x$video_opengl = xyes; then
   994             CFLAGS="$CFLAGS -DHAVE_OPENGL"
   995             SYSTEM_LIBS="$SYSTEM_LIBS -lGL"
   996         fi
   997     fi
   998 }
   999 
  1000 dnl Check for BeOS OpenGL
  1001 CheckBeGL()
  1002 {
  1003     if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
  1004         CFLAGS="$CFLAGS -DHAVE_OPENGL"
  1005         SYSTEM_LIBS="$SYSTEM_LIBS -lGL"
  1006     fi
  1007 }
  1008 
  1009 dnl Check for MacOS OpenGL
  1010 CheckMacGL()
  1011 {
  1012     if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
  1013         CFLAGS="$CFLAGS -DHAVE_OPENGL"
  1014         case "$target" in
  1015             *-*-darwin*)
  1016                 SDL_LIBS="$SDL_LIBS -framework OpenGL -framework AGL"
  1017         esac
  1018     fi
  1019 }
  1020 
  1021 dnl See if we can use the new unified event interface in Linux 2.4
  1022 CheckInputEvents()
  1023 {
  1024     dnl Check for Linux 2.4 unified input event interface support
  1025     AC_ARG_ENABLE(input-events,
  1026 [  --enable-input-events   use Linux 2.4 unified input interface [default=yes]],
  1027                   , enable_input_events=yes)
  1028     if test x$enable_input_events = xyes; then
  1029         AC_MSG_CHECKING(for Linux 2.4 unified input interface)
  1030         use_input_events=no
  1031         AC_TRY_COMPILE([
  1032           #include <linux/input.h>
  1033         ],[
  1034           #ifndef EVIOCGNAME
  1035           #error EVIOCGNAME() ioctl not available
  1036           #endif
  1037         ],[
  1038         use_input_events=yes
  1039         ])
  1040         AC_MSG_RESULT($use_input_events)
  1041         if test x$use_input_events = xyes; then
  1042             CFLAGS="$CFLAGS -DUSE_INPUT_EVENTS"
  1043         fi
  1044     fi
  1045 }
  1046 
  1047 dnl See what type of thread model to use on Linux and Solaris
  1048 CheckPTHREAD()
  1049 {
  1050     dnl Check for pthread support
  1051     AC_ARG_ENABLE(pthreads,
  1052 [  --enable-pthreads       use POSIX threads for multi-threading [default=yes]],
  1053                   , enable_pthreads=yes)
  1054     dnl This is used on Linux for glibc binary compatibility (Doh!)
  1055     AC_ARG_ENABLE(pthread-sem,
  1056 [  --enable-pthread-sem    use pthread semaphores [default=yes]],
  1057                   , enable_pthread_sem=yes)
  1058     ac_save_libs="$LIBS"
  1059     case "$target" in
  1060         *-*-bsdi*)
  1061             pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
  1062             pthread_lib=""
  1063             ;;
  1064         *-*-darwin*)
  1065             pthread_cflags="-D_THREAD_SAFE"
  1066 # causes Carbon.p complaints?
  1067 #            pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
  1068             ;;
  1069         *-*-freebsd*)
  1070             pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
  1071             pthread_lib="-pthread"
  1072             ;;
  1073         *-*-netbsd*)
  1074             pthread_cflags="-I/usr/pkg/include -D_REENTRANT"
  1075             pthread_lib="-L/usr/pkg/lib -lpthread -lsem"
  1076             ;;
  1077         *-*-openbsd*)
  1078             pthread_cflags="-D_REENTRANT"
  1079             pthread_lib="-pthread"
  1080             ;;
  1081         *-*-solaris*)
  1082             pthread_cflags="-D_REENTRANT"
  1083             pthread_lib="-lpthread -lposix4"
  1084             ;;
  1085         *-*-sysv5*)
  1086             pthread_cflags="-D_REENTRANT -Kthread"
  1087             pthread_lib=""
  1088             ;;
  1089         *-*-irix*)
  1090             pthread_cflags="-D_SGI_MP_SOURCE"
  1091             pthread_lib="-lpthread"
  1092             ;;
  1093         *-*-aix*)
  1094             pthread_cflags="-D_REENTRANT -mthreads"
  1095             pthread_lib="-lpthread"
  1096             ;;
  1097         *-*-qnx*)
  1098             pthread_cflags=""
  1099             pthread_lib=""
  1100             ;;
  1101         *)
  1102             pthread_cflags="-D_REENTRANT"
  1103             pthread_lib="-lpthread"
  1104             ;;
  1105     esac
  1106     LIBS="$LIBS $pthread_lib"
  1107     if test x$enable_threads = xyes -a x$enable_pthreads = xyes; then
  1108         AC_MSG_CHECKING(for pthreads)
  1109         use_pthreads=no
  1110         AC_TRY_LINK([
  1111          #include <pthread.h>
  1112         ],[
  1113          pthread_attr_t type;
  1114          pthread_attr_init(&type);
  1115         ],[
  1116         use_pthreads=yes
  1117         ])
  1118         AC_MSG_RESULT($use_pthreads)
  1119         if test x$use_pthreads = xyes; then
  1120             CFLAGS="$CFLAGS $pthread_cflags -DSDL_USE_PTHREADS"
  1121             SDL_CFLAGS="$SDL_CFLAGS $pthread_cflags"
  1122             SDL_LIBS="$SDL_LIBS $pthread_lib"
  1123 
  1124             # Check to see if recursive mutexes are available
  1125             AC_MSG_CHECKING(for recursive mutexes)
  1126             has_recursive_mutexes=no
  1127             AC_TRY_LINK([
  1128               #include <pthread.h>
  1129             ],[
  1130               pthread_mutexattr_t attr;
  1131               #ifdef linux
  1132               pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
  1133               #else
  1134               pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
  1135               #endif
  1136             ],[
  1137             has_recursive_mutexes=yes
  1138             ])
  1139             # Some systems have broken recursive mutex implementations
  1140             case "$target" in
  1141                 *-*-solaris*)
  1142                     has_recursive_mutexes=no
  1143                     ;;
  1144             esac
  1145             AC_MSG_RESULT($has_recursive_mutexes)
  1146             if test x$has_recursive_mutexes != xyes; then
  1147                 CFLAGS="$CFLAGS -DPTHREAD_NO_RECURSIVE_MUTEX"
  1148             fi
  1149 
  1150             # Check to see if pthread semaphore support is missing
  1151             if test x$enable_pthread_sem = xyes; then
  1152                 AC_MSG_CHECKING(for pthread semaphores)
  1153                 have_pthread_sem=no
  1154                 AC_TRY_COMPILE([
  1155                   #include <pthread.h>
  1156                   #include <semaphore.h>
  1157                 ],[
  1158                 ],[
  1159                 have_pthread_sem=yes
  1160                 ])
  1161                 AC_MSG_RESULT($have_pthread_sem)
  1162             fi
  1163 
  1164             # Check to see if this is broken glibc 2.0 pthreads
  1165             case "$target" in
  1166                 *-*-linux*)
  1167                     AC_MSG_CHECKING(for broken glibc 2.0 pthreads)
  1168                     glibc20_pthreads=no
  1169                     AC_TRY_COMPILE([
  1170                       #include <features.h>
  1171                       #if (__GLIBC__ == 2) && (__GLIBC_MINOR__ == 0)
  1172                       #warning Working around a bug in glibc 2.0 pthreads
  1173                       #else
  1174                       #error pthread implementation okay
  1175                       #endif /* glibc 2.0 */
  1176                     ],[
  1177                     ],[
  1178                     glibc20_pthreads=yes
  1179                     ])
  1180                     AC_MSG_RESULT($glibc20_pthreads)
  1181             esac
  1182         fi
  1183     fi
  1184     LIBS="$ac_save_libs"
  1185 
  1186     AC_MSG_CHECKING(whether semun is defined in /usr/include/sys/sem.h)
  1187     have_semun=no
  1188     AC_TRY_COMPILE([
  1189       #include <sys/types.h>
  1190       #include <sys/sem.h>
  1191     ],[
  1192       union semun t;
  1193     ],[
  1194     have_semun=yes
  1195     ])
  1196     AC_MSG_RESULT($have_semun)
  1197     if test x$have_semun = xyes; then
  1198         CFLAGS="$CFLAGS -DHAVE_SEMUN"
  1199     fi
  1200 
  1201     # See if we can use clone() on Linux directly
  1202     use_clone=no
  1203     if test x$enable_threads = xyes -a x$use_pthreads != xyes; then
  1204         case "$target" in
  1205             *-*-linux*)
  1206                 use_clone=yes
  1207                 ;;
  1208             *)
  1209                 CFLAGS="$CFLAGS -DFORK_HACK"
  1210                 ;;
  1211         esac
  1212     fi
  1213     AM_CONDITIONAL(USE_CLONE, test x$use_clone = xyes)
  1214 }
  1215 
  1216 dnl See if we can use GNU pth library for threads
  1217 CheckPTH()
  1218 {
  1219     dnl Check for pth support
  1220     AC_ARG_ENABLE(pth,
  1221 [  --enable-pth            use GNU pth library for multi-threading [default=yes]],
  1222                   , enable_pth=yes)
  1223     if test x$enable_threads = xyes -a x$enable_pth = xyes; then
  1224         AC_PATH_PROG(PTH_CONFIG, pth-config, no)
  1225         if test "$PTH_CONFIG" = "no"; then
  1226             use_pth=no
  1227         else
  1228             PTH_CFLAGS=`$PTH_CONFIG --cflags`
  1229             PTH_LIBS=`$PTH_CONFIG --libs`
  1230             SDL_CFLAGS="$SDL_CFLAGS $PTH_CFLAGS"
  1231             SDL_LIBS="$SDL_LIBS $PTH_LIBS"
  1232             use_pth=yes
  1233         fi
  1234         AC_MSG_CHECKING(pth)
  1235         if test "x$use_pth" = xyes; then
  1236             AC_MSG_RESULT(yes)
  1237         else
  1238             AC_MSG_RESULT(no)
  1239         fi
  1240     fi
  1241 }
  1242 
  1243 dnl Determine whether the compiler can produce Win32 executables
  1244 CheckWIN32()
  1245 {
  1246     AC_MSG_CHECKING(Win32 compiler)
  1247     have_win32_gcc=no
  1248     AC_TRY_COMPILE([
  1249      #include <windows.h>
  1250     ],[
  1251     ],[
  1252     have_win32_gcc=yes
  1253     ])
  1254     AC_MSG_RESULT($have_win32_gcc)
  1255     if test x$have_win32_gcc != xyes; then
  1256        AC_MSG_ERROR([
  1257 *** Your compiler ($CC) does not produce Win32 executables!
  1258        ])
  1259     fi
  1260 
  1261     dnl See if the user wants to redirect standard output to files
  1262     AC_ARG_ENABLE(stdio-redirect,
  1263 [  --enable-stdio-redirect Redirect STDIO to files on Win32 [default=yes]],
  1264                   , enable_stdio_redirect=yes)
  1265     if test x$enable_stdio_redirect != xyes; then
  1266         CFLAGS="$CFLAGS -DNO_STDIO_REDIRECT"
  1267     fi
  1268 }
  1269 
  1270 dnl Find the DirectX includes and libraries
  1271 CheckDIRECTX()
  1272 {
  1273     AC_ARG_ENABLE(directx,
  1274 [  --enable-directx        use DirectX for Win32 audio/video [default=yes]],
  1275                   , enable_directx=yes)
  1276     if test x$enable_directx = xyes; then
  1277         AC_MSG_CHECKING(for DirectX headers and libraries)
  1278         use_directx=no
  1279         AC_TRY_COMPILE([
  1280          #include "src/video/windx5/directx.h"
  1281         ],[
  1282         ],[
  1283         use_directx=yes
  1284         ])
  1285         AC_MSG_RESULT($use_directx)
  1286     fi
  1287     AM_CONDITIONAL(USE_DIRECTX, test x$use_directx = xyes)
  1288 
  1289     CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video/wincommon"
  1290     SYSTEM_LIBS="$SYSTEM_LIBS -luser32 -lgdi32 -lwinmm"
  1291     VIDEO_SUBDIRS="$VIDEO_SUBDIRS wincommon"
  1292     VIDEO_DRIVERS="$VIDEO_DRIVERS wincommon/libvideo_wincommon.la"
  1293     # Enable the DIB driver
  1294     CFLAGS="$CFLAGS -DENABLE_WINDIB"
  1295     VIDEO_SUBDIRS="$VIDEO_SUBDIRS windib"
  1296     VIDEO_DRIVERS="$VIDEO_DRIVERS windib/libvideo_windib.la"
  1297     # See if we should enable the DirectX driver
  1298     if test x$use_directx = xyes; then
  1299         CFLAGS="$CFLAGS -DENABLE_DIRECTX"
  1300         SYSTEM_LIBS="$SYSTEM_LIBS -ldxguid"
  1301         VIDEO_SUBDIRS="$VIDEO_SUBDIRS windx5"
  1302         VIDEO_DRIVERS="$VIDEO_DRIVERS windx5/libvideo_windx5.la"
  1303     fi
  1304 }
  1305 
  1306 dnl Set up the BWindow video driver on BeOS
  1307 CheckBWINDOW()
  1308 {
  1309     CFLAGS="$CFLAGS -DENABLE_BWINDOW"
  1310     VIDEO_SUBDIRS="$VIDEO_SUBDIRS bwindow"
  1311     VIDEO_DRIVERS="$VIDEO_DRIVERS bwindow/libvideo_bwindow.la"
  1312 }
  1313 
  1314 dnl Set up the Mac toolbox video driver for Mac OS 7-9
  1315 CheckTOOLBOX()
  1316 {
  1317     VIDEO_SUBDIRS="$VIDEO_SUBDIRS maccommon"
  1318     VIDEO_DRIVERS="$VIDEO_DRIVERS maccommon/libvideo_maccommon.la"
  1319     VIDEO_SUBDIRS="$VIDEO_SUBDIRS macrom"
  1320     VIDEO_DRIVERS="$VIDEO_DRIVERS macrom/libvideo_macrom.la"
  1321 }
  1322 
  1323 dnl Set up the Mac toolbox video driver for Mac OS X
  1324 CheckCARBON()
  1325 {
  1326     # "MACOSX" is not an official definition, but it's commonly
  1327     # accepted as a way to differentiate between what runs on X
  1328     # and what runs on older Macs - while in theory "Carbon" defns
  1329     # are consistent between the two, in practice Carbon is still
  1330     # changing. -sts Aug 2000
  1331     mac_autoconf_target_workaround="MAC"
  1332     CFLAGS="$CFLAGS -I/System/Library/Frameworks/Carbon.framework/Headers \
  1333       -fpascal-strings -DENABLE_TOOLBOX -DMACOSX -DTARGET_API_${mac_autoconf_target_workaround}_CARBON=1 -I\$(top_srcdir)/src/video/maccommon -I\$(top_srcdir)/src/video/macrom -I\$(top_srcdir)/src/video/macdsp"
  1334     VIDEO_SUBDIRS="$VIDEO_SUBDIRS maccommon"
  1335     VIDEO_DRIVERS="$VIDEO_DRIVERS maccommon/libvideo_maccommon.la"
  1336     VIDEO_SUBDIRS="$VIDEO_SUBDIRS macrom"
  1337     VIDEO_DRIVERS="$VIDEO_DRIVERS macrom/libvideo_macrom.la"
  1338 }
  1339 
  1340 dnl Set up the Mac toolbox video driver for Mac OS X
  1341 CheckQUARTZ()
  1342 {
  1343     # "MACOSX" is not an official definition, but it's commonly
  1344     # accepted as a way to differentiate between what runs on X
  1345     # and what runs on older Macs - while in theory "Carbon" defns
  1346     # are consistent between the two, in practice Carbon is still
  1347     # changing. -sts Aug 2000
  1348     mac_autoconf_target_workaround="MAC"
  1349     CFLAGS="$CFLAGS -I/System/Library/Frameworks/Carbon.framework/Headers \
  1350       -I/System/Library/Frameworks/Cocoa.framework/Headers -fpascal-strings \
  1351       -DENABLE_QUARTZ -DMACOSX -DTARGET_API_${mac_autoconf_target_workaround}_CARBON=1 -I\$(top_srcdir)/src/video/quartz"
  1352     VIDEO_SUBDIRS="$VIDEO_SUBDIRS quartz"
  1353     VIDEO_DRIVERS="$VIDEO_DRIVERS quartz/libvideo_quartz.la"
  1354 }
  1355 
  1356 case "$target" in
  1357     *-*-linux*)
  1358         ARCH=linux
  1359         CheckDummyVideo
  1360         CheckDiskAudio
  1361         CheckNASM
  1362         CheckOSS
  1363         CheckALSA
  1364         CheckARTSC
  1365         CheckESD
  1366         CheckNAS
  1367         CheckX11
  1368         CheckNANOX
  1369         CheckDGA
  1370         CheckFBCON
  1371         CheckDirectFB
  1372         CheckPS2GS
  1373         CheckGGI
  1374         CheckSVGA
  1375         CheckAAlib
  1376         CheckOpenGL
  1377         CheckInputEvents
  1378         CheckPTHREAD
  1379         # Set up files for the main() stub
  1380         COPY_ARCH_SRC(src/main, linux, SDL_main.c)
  1381         # Set up files for the audio library
  1382         # We use the OSS and ALSA API's, not the Sun audio API
  1383         #if test x$enable_audio = xyes; then
  1384         #    CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
  1385         #    AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
  1386         #    AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
  1387         #fi
  1388         # Set up files for the joystick library
  1389         if test x$enable_joystick = xyes; then
  1390             JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS linux"
  1391             JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS linux/libjoystick_linux.la"
  1392         fi
  1393         # Set up files for the cdrom library
  1394         if test x$enable_cdrom = xyes; then
  1395             CDROM_SUBDIRS="$CDROM_SUBDIRS linux"
  1396             CDROM_DRIVERS="$CDROM_DRIVERS linux/libcdrom_linux.la"
  1397         fi
  1398         # Set up files for the thread library
  1399         if test x$enable_threads = xyes; then
  1400             if test x$use_pthreads != xyes; then
  1401                 COPY_ARCH_SRC(src/thread, linux, clone.S)
  1402             fi
  1403             COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
  1404             COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
  1405             if test x$use_pthreads = xyes -a x$have_pthread_sem != xyes; then
  1406                 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
  1407             else
  1408                 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
  1409             fi
  1410             COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
  1411             if test x$glibc20_pthreads = xyes; then
  1412                 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
  1413                 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
  1414                 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
  1415                 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
  1416             else
  1417                 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
  1418                 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
  1419                 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
  1420                 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
  1421             fi
  1422         fi
  1423         # Set up files for the timer library
  1424         if test x$enable_timers = xyes; then
  1425             COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
  1426         fi
  1427         ;;
  1428     *-*-bsdi*)
  1429         ARCH=bsdi
  1430         CheckDummyVideo
  1431         CheckDiskAudio
  1432         CheckNASM
  1433         CheckOSS
  1434         CheckARTSC
  1435         CheckESD
  1436         CheckNAS
  1437         CheckX11
  1438         CheckDGA
  1439         CheckSVGA
  1440         CheckAAlib
  1441         CheckOpenGL
  1442         CheckPTHREAD
  1443         # Set up files for the main() stub
  1444         COPY_ARCH_SRC(src/main, linux, SDL_main.c)
  1445         # Set up files for the audio library
  1446         # We use the OSS and ALSA API's, not the Sun audio API
  1447         #if test x$enable_audio = xyes; then
  1448         #    CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
  1449         #    AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
  1450         #    AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
  1451         #fi
  1452         # Set up files for the joystick library
  1453         # (No joystick support yet)
  1454         if test x$enable_joystick = xyes; then
  1455             JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
  1456             JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
  1457         fi
  1458         # Set up files for the cdrom library
  1459         if test x$enable_cdrom = xyes; then
  1460             CDROM_SUBDIRS="$CDROM_SUBDIRS bsdi"
  1461             CDROM_DRIVERS="$CDROM_DRIVERS bsdi/libcdrom_bsdi.la"
  1462         fi
  1463         # Set up files for the thread library
  1464         if test x$enable_threads = xyes; then
  1465             COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
  1466             COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
  1467             COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
  1468             COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
  1469             COPY_ARCH_SRC(src/thread, bsdi, SDL_syssem.c)
  1470             COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
  1471             COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
  1472             COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
  1473         fi
  1474         # Set up files for the timer library
  1475         if test x$enable_timers = xyes; then
  1476             COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
  1477         fi
  1478         ;;
  1479     *-*-freebsd*)
  1480         ARCH=freebsd
  1481         CheckDummyVideo
  1482         CheckDiskAudio
  1483         CheckVGL
  1484         CheckNASM
  1485         CheckOSS
  1486         CheckARTSC
  1487         CheckESD
  1488         CheckNAS
  1489         CheckX11
  1490         CheckDGA
  1491         CheckSVGA
  1492         CheckAAlib
  1493         CheckOpenGL
  1494         CheckPTHREAD
  1495         # Set up files for the main() stub
  1496         COPY_ARCH_SRC(src/main, linux, SDL_main.c)
  1497         # Set up files for the audio library
  1498         # We use the OSS and ALSA API's, not the Sun audio API
  1499         #if test x$enable_audio = xyes; then
  1500         #    CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
  1501         #    AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
  1502         #    AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
  1503         #fi
  1504         # Set up files for the joystick library
  1505         if test x$enable_joystick = xyes; then
  1506             JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS bsd"
  1507             JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS bsd/libjoystick_bsd.la"
  1508         fi
  1509         # Set up files for the cdrom library
  1510         if test x$enable_cdrom = xyes; then
  1511             CDROM_SUBDIRS="$CDROM_SUBDIRS freebsd"
  1512             CDROM_DRIVERS="$CDROM_DRIVERS freebsd/libcdrom_freebsd.la"
  1513         fi
  1514         # Set up files for the thread library
  1515         if test x$enable_threads = xyes; then
  1516             COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
  1517             COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
  1518             COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
  1519             COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
  1520             if test x$use_pthreads = xyes -a x$have_pthread_sem != xyes; then
  1521                 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
  1522             else
  1523                 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
  1524             fi
  1525             COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
  1526             COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
  1527             COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
  1528         fi
  1529         # Set up files for the timer library
  1530         if test x$enable_timers = xyes; then
  1531             COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
  1532         fi
  1533         ;;
  1534     *-*-netbsd*)
  1535         ARCH=netbsd
  1536         CheckDummyVideo
  1537         CheckDiskAudio
  1538         CheckNASM
  1539         CheckOSS
  1540         CheckARTSC
  1541         CheckESD
  1542         CheckNAS
  1543         CheckX11
  1544         CheckAAlib
  1545         CheckOpenGL
  1546         CheckPTHREAD
  1547         # Set up files for the main() stub
  1548         COPY_ARCH_SRC(src/main, linux, SDL_main.c)
  1549         # Set up files for the audio library
  1550         if test x$enable_audio = xyes; then
  1551             CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
  1552             AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
  1553             AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
  1554         fi
  1555         # Set up files for the joystick library
  1556         if test x$enable_joystick = xyes; then
  1557             JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS bsd"
  1558             JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS bsd/libjoystick_bsd.la"
  1559         fi
  1560         # Set up files for the cdrom library
  1561         if test x$enable_cdrom = xyes; then
  1562             CDROM_SUBDIRS="$CDROM_SUBDIRS openbsd"
  1563             CDROM_DRIVERS="$CDROM_DRIVERS openbsd/libcdrom_openbsd.la"
  1564         fi
  1565         # Set up files for the thread library
  1566         if test x$enable_threads = xyes; then
  1567             COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
  1568             COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
  1569             COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
  1570             COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
  1571             if test x$use_pthreads = xyes -a x$have_pthread_sem != xyes; then
  1572                 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
  1573             else
  1574                 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
  1575             fi
  1576             COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
  1577             COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
  1578             COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
  1579         fi
  1580         # Set up files for the timer library
  1581         if test x$enable_timers = xyes; then
  1582             COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
  1583         fi
  1584         # NetBSD does not define "unix"
  1585         CFLAGS="$CFLAGS -Dunix -D_POSIX_THREAD_SYSCALL_SOFT=1"
  1586         ;;
  1587     *-*-openbsd*)
  1588         ARCH=openbsd
  1589         CheckDummyVideo
  1590         CheckDiskAudio
  1591         CheckOPENBSDAUDIO
  1592         CheckNASM
  1593         CheckOSS
  1594         CheckARTSC
  1595         CheckESD
  1596         CheckNAS
  1597         CheckX11
  1598         CheckAAlib
  1599         CheckOpenGL
  1600         CheckPTHREAD
  1601         # Set up files for the main() stub
  1602         COPY_ARCH_SRC(src/main, linux, SDL_main.c)
  1603         # Set up files for the audio library
  1604         # We use the OSS and native API's, not the Sun audio API
  1605         #if test x$enable_audio = xyes; then
  1606         #    CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
  1607         #    AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
  1608         #    AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
  1609         #fi
  1610         # OpenBSD needs linking with ossaudio emulation library
  1611         if test x$have_oss = xyes; then
  1612             SYSTEM_LIBS="$SYSTEM_LIBS -lossaudio"
  1613         fi
  1614         # Set up files for the joystick library
  1615         if test x$enable_joystick = xyes; then
  1616             JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS bsd"
  1617             JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS bsd/libjoystick_bsd.la"
  1618         fi
  1619         # Set up files for the cdrom library
  1620         if test x$enable_cdrom = xyes; then
  1621             CDROM_SUBDIRS="$CDROM_SUBDIRS openbsd"
  1622             CDROM_DRIVERS="$CDROM_DRIVERS openbsd/libcdrom_openbsd.la"
  1623         fi
  1624         # Set up files for the thread library
  1625         if test x$enable_threads = xyes; then
  1626             COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
  1627             COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
  1628             COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
  1629             COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
  1630             if test x$use_pthreads = xyes -a x$have_pthread_sem != xyes; then
  1631                 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
  1632             else
  1633                 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
  1634             fi
  1635             COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
  1636             COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
  1637             COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
  1638         fi
  1639         # Set up files for the timer library
  1640         if test x$enable_timers = xyes; then
  1641             COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
  1642         fi
  1643         # OpenBSD does not define "unix"
  1644         CFLAGS="$CFLAGS -Dunix"
  1645         ;;
  1646     *-*-sysv5*)
  1647         ARCH=sysv5
  1648         CheckDummyVideo
  1649         CheckDiskAudio
  1650         CheckNASM
  1651         CheckOSS
  1652         CheckARTSC
  1653         CheckESD
  1654         CheckNAS
  1655         CheckX11
  1656         CheckAAlib
  1657         CheckOpenGL
  1658         CheckPTHREAD
  1659         # Set up files for the main() stub
  1660         COPY_ARCH_SRC(src/main, linux, SDL_main.c)
  1661         # Set up files for the audio library
  1662         if test x$enable_audio = xyes; then
  1663             CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
  1664             AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
  1665             AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
  1666         fi
  1667         # Set up files for the joystick library
  1668         # (No joystick support yet)
  1669         if test x$enable_joystick = xyes; then
  1670             JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
  1671             JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
  1672         fi
  1673         # Set up files for the cdrom library
  1674         if test x$enable_cdrom = xyes; then
  1675             CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
  1676             CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
  1677         fi
  1678         # Set up files for the thread library
  1679         if test x$enable_threads = xyes; then
  1680             COPY_ARCH_SRC(src/thread, generic, SDL_systhread.c)
  1681             COPY_ARCH_SRC(src/thread, generic, SDL_systhread_c.h)
  1682             COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
  1683             COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
  1684             COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
  1685             COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
  1686             COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
  1687             COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
  1688         fi
  1689         # Set up files for the timer library
  1690         if test x$enable_timers = xyes; then
  1691             COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
  1692         fi
  1693         ;;
  1694     *-*-solaris*)
  1695         ARCH=solaris
  1696         CFLAGS="$CFLAGS -D__ELF__" # Fix for nasm on Solaris x86
  1697         CheckDummyVideo
  1698         CheckDiskAudio
  1699         CheckNASM
  1700         CheckOSS
  1701         CheckARTSC
  1702         CheckESD
  1703         CheckNAS
  1704         CheckX11
  1705         CheckAAlib
  1706         CheckOpenGL
  1707         CheckPTHREAD
  1708         # Set up files for the main() stub
  1709         COPY_ARCH_SRC(src/main, linux, SDL_main.c)
  1710         # Set up files for the audio library
  1711         if test x$enable_audio = xyes; then
  1712             CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
  1713             AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
  1714             AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
  1715         fi
  1716         # Set up files for the joystick library
  1717         # (No joystick support yet)
  1718         if test x$enable_joystick = xyes; then
  1719             JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
  1720             JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
  1721         fi
  1722         # Set up files for the cdrom library
  1723         if test x$enable_cdrom = xyes; then
  1724             CDROM_SUBDIRS="$CDROM_SUBDIRS linux"
  1725             CDROM_DRIVERS="$CDROM_DRIVERS linux/libcdrom_linux.la"
  1726         fi
  1727         # Set up files for the thread library
  1728         if test x$enable_threads = xyes; then
  1729             COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
  1730             COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
  1731             COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
  1732             COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
  1733             COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
  1734             COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
  1735             COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
  1736             COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
  1737         fi
  1738         # Set up files for the timer library
  1739         if test x$enable_timers = xyes; then
  1740             COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
  1741         fi
  1742         ;;
  1743     *-*-irix*)
  1744         ARCH=irix
  1745         CheckDummyVideo
  1746         CheckDiskAudio
  1747         CheckDMEDIA
  1748         CheckESD
  1749         CheckNAS
  1750         CheckX11
  1751         CheckAAlib
  1752         CheckOpenGL
  1753         CheckPTHREAD
  1754         # Set up files for the main() stub
  1755         COPY_ARCH_SRC(src/main, linux, SDL_main.c)
  1756         # We use the dmedia audio API, not the Sun audio API
  1757         #if test x$enable_audio = xyes; then
  1758         #    CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
  1759         #    AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
  1760         #    AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
  1761         #fi
  1762         # Set up files for the joystick library
  1763         # (No joystick support yet)
  1764         if test x$enable_joystick = xyes; then
  1765             JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
  1766             JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
  1767         fi
  1768         # Set up files for the cdrom library
  1769         # (No CD-ROM support yet)
  1770         if test x$enable_cdrom = xyes; then
  1771             CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
  1772             CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
  1773         fi
  1774         # Set up files for the thread library
  1775         if test x$enable_threads = xyes; then
  1776             if test x$use_pthreads = xyes; then
  1777                 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
  1778                 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
  1779                 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
  1780                 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
  1781                 if test x$have_pthread_sem != xyes; then
  1782                     COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
  1783                 else
  1784                     COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
  1785                 fi
  1786                 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
  1787                 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
  1788                 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
  1789             else
  1790                 COPY_ARCH_SRC(src/thread, irix, SDL_systhread.c)
  1791                 COPY_ARCH_SRC(src/thread, irix, SDL_systhread_c.h)
  1792                 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
  1793                 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
  1794                 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
  1795                 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
  1796                 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
  1797                 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
  1798             fi
  1799         fi
  1800         # Set up files for the timer library
  1801         if test x$enable_timers = xyes; then
  1802             COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
  1803         fi
  1804         ;;
  1805     *-*-hpux*)
  1806         ARCH=hpux
  1807         CheckDummyVideo
  1808         CheckDiskAudio
  1809         CheckOSS
  1810         CheckNAS
  1811         CheckX11
  1812         CheckGGI
  1813         CheckAAlib
  1814         CheckOpenGL
  1815         CheckPTHREAD
  1816         # Set up files for the main() stub
  1817         COPY_ARCH_SRC(src/main, linux, SDL_main.c)
  1818         # Set up files for the audio library
  1819         if test x$enable_audio = xyes; then
  1820             CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
  1821             AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
  1822             AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
  1823         fi
  1824         # Set up files for the joystick library
  1825         # (No joystick support yet)
  1826         if test x$enable_joystick = xyes; then
  1827             JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
  1828             JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
  1829         fi
  1830         # Set up files for the cdrom library
  1831         # (No CD-ROM support yet)
  1832         if test x$enable_cdrom = xyes; then
  1833             CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
  1834             CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
  1835         fi
  1836         # Set up files for the thread library
  1837         if test x$enable_threads = xyes; then
  1838             COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
  1839             COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
  1840             COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
  1841             COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
  1842             COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
  1843             COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
  1844             COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
  1845             COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
  1846         fi
  1847         # Set up files for the timer library
  1848         if test x$enable_timers = xyes; then
  1849             COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
  1850         fi
  1851         ;;
  1852     *-*-aix*)
  1853         ARCH=aix
  1854         CheckDummyVideo
  1855         CheckDiskAudio
  1856         CheckOSS
  1857         CheckNAS
  1858         CheckX11
  1859         CheckGGI
  1860         CheckAAlib
  1861         CheckOpenGL
  1862         CheckPTHREAD
  1863         # Set up files for the main() stub
  1864         COPY_ARCH_SRC(src/main, linux, SDL_main.c)
  1865         # Set up files for the audio library
  1866         if test x$enable_audio = xyes; then
  1867             AUDIO_SUBDIRS="$AUDIO_SUBDIRS paudio"
  1868             AUDIO_DRIVERS="$AUDIO_DRIVERS paudio/libaudio_paudio.la"
  1869         fi
  1870         # Set up files for the joystick library
  1871         # (No joystick support yet)
  1872         if test x$enable_joystick = xyes; then
  1873             JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
  1874             JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
  1875         fi
  1876         # Set up files for the cdrom library
  1877         if test x$enable_cdrom = xyes; then
  1878             CDROM_SUBDIRS="$CDROM_SUBDIRS aix"
  1879             CDROM_DRIVERS="$CDROM_DRIVERS aix/libcdrom_aix.la"
  1880         fi
  1881         # Set up files for the thread library
  1882         if test x$enable_threads = xyes; then
  1883             COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
  1884             COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
  1885             COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
  1886             COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
  1887             COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
  1888             COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
  1889             COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
  1890             COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
  1891         fi
  1892         # Set up files for the timer library
  1893         if test x$enable_timers = xyes; then
  1894             COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
  1895         fi
  1896         ;;
  1897     *-*-osf*)
  1898         ARCH=osf
  1899         CheckDummyVideo
  1900         CheckDiskAudio
  1901         CheckNAS
  1902         CheckX11
  1903         CheckGGI
  1904         CheckAAlib
  1905         CheckOpenGL
  1906         CheckPTHREAD
  1907         # Set up files for the main() stub
  1908         COPY_ARCH_SRC(src/main, linux, SDL_main.c)
  1909         # Set up files for the audio library
  1910         if test x$enable_audio = xyes; then
  1911             CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
  1912             AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
  1913             AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
  1914         fi
  1915         # Set up files for the joystick library
  1916         # (No joystick support yet)
  1917         if test x$enable_joystick = xyes; then
  1918             JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
  1919             JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
  1920         fi
  1921         # Set up files for the cdrom library
  1922         # (No cdrom support yet)
  1923         if test x$enable_cdrom = xyes; then
  1924             CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
  1925             CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
  1926         fi
  1927         # Set up files for the thread library
  1928         if test x$enable_threads = xyes; then
  1929             COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
  1930             COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
  1931             COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
  1932             COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
  1933             COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
  1934             COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
  1935             COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
  1936             COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
  1937         fi
  1938         # Set up files for the timer library
  1939         if test x$enable_timers = xyes; then
  1940             COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
  1941         fi
  1942         ;;
  1943     *-*-qnx*)
  1944         ARCH=qnx
  1945         CheckDummyVideo
  1946         CheckDiskAudio
  1947         CheckNAS
  1948         CheckPHOTON
  1949         CheckX11
  1950         CheckOpenGL
  1951         CheckPTHREAD
  1952         # Set up files for the main() stub
  1953         COPY_ARCH_SRC(src/main, linux, SDL_main.c)
  1954         # Set up files for the audio library
  1955         if test x$enable_audio = xyes; then
  1956             CFLAGS="$CFLAGS -DALSA_SUPPORT"
  1957             SYSTEM_LIBS="$SYSTEM_LIBS -lasound"
  1958             AUDIO_SUBDIRS="$AUDIO_SUBDIRS nto"
  1959             AUDIO_DRIVERS="$AUDIO_DRIVERS nto/libaudio_nto.la"
  1960         fi
  1961         # Set up files for the joystick library
  1962         if test x$enable_joystick = xyes; then
  1963         # (No joystick support yet)
  1964             JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
  1965             JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
  1966         fi
  1967         # Set up files for the cdrom library
  1968         if test x$enable_cdrom = xyes; then
  1969             CDROM_SUBDIRS="$CDROM_SUBDIRS qnx"
  1970             CDROM_DRIVERS="$CDROM_DRIVERS qnx/libcdrom_qnx.la"
  1971         fi
  1972         # Set up files for the thread library
  1973         if test x$enable_threads = xyes; then
  1974             COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
  1975             COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
  1976             COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
  1977             COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
  1978             COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
  1979             COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
  1980             COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
  1981             COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
  1982         fi
  1983         # Set up files for the timer library
  1984         if test x$enable_timers = xyes; then
  1985             COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
  1986         fi
  1987         ;;
  1988     *-*-cygwin* | *-*-mingw32*)
  1989         ARCH=win32
  1990         if test "$build" != "$target"; then # cross-compiling
  1991             # Default cross-compile location
  1992             ac_default_prefix=/usr/local/cross-tools/i386-mingw32msvc
  1993         else
  1994             # Look for the location of the tools and install there
  1995             if [ "$BUILD_PREFIX" != "" ]; then
  1996                 ac_default_prefix=$BUILD_PREFIX
  1997             fi
  1998         fi
  1999         CheckDummyVideo
  2000         CheckDiskAudio
  2001         CheckWIN32
  2002         CheckDIRECTX
  2003         CheckNASM
  2004         # Set up files for the main() stub
  2005         COPY_ARCH_SRC(src/main, win32, SDL_main.c)
  2006         # Set up files for the audio library
  2007         if test x$enable_audio = xyes; then
  2008             AUDIO_SUBDIRS="$AUDIO_SUBDIRS windib"
  2009             AUDIO_DRIVERS="$AUDIO_DRIVERS windib/libaudio_windib.la"
  2010             if test x$use_directx = xyes; then
  2011                 AUDIO_SUBDIRS="$AUDIO_SUBDIRS windx5"
  2012                 AUDIO_DRIVERS="$AUDIO_DRIVERS windx5/libaudio_windx5.la"
  2013             fi
  2014         fi
  2015         # Set up files for the joystick library
  2016         if test x$enable_joystick = xyes; then
  2017             JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS win32"
  2018             JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS win32/libjoystick_winmm.la"
  2019         fi
  2020         # Set up files for the cdrom library
  2021         if test x$enable_cdrom = xyes; then
  2022             CDROM_SUBDIRS="$CDROM_SUBDIRS win32"
  2023             CDROM_DRIVERS="$CDROM_DRIVERS win32/libcdrom_win32.la"
  2024         fi
  2025         # Set up files for the thread library
  2026         if test x$enable_threads = xyes; then
  2027             COPY_ARCH_SRC(src/thread, win32, SDL_systhread.c)
  2028             COPY_ARCH_SRC(src/thread, win32, SDL_systhread_c.h)
  2029             COPY_ARCH_SRC(src/thread, win32, SDL_sysmutex.c)
  2030             COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
  2031             COPY_ARCH_SRC(src/thread, win32, SDL_syssem.c)
  2032             COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
  2033             COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
  2034             COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
  2035         fi
  2036         # Set up files for the timer library
  2037         if test x$enable_timers = xyes; then
  2038             COPY_ARCH_SRC(src/timer, win32, SDL_systimer.c)
  2039         fi
  2040         # The Win32 platform requires special setup
  2041         SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
  2042         case "$target" in
  2043             *-*-cygwin*)
  2044                 CFLAGS="$CFLAGS -I/usr/include/mingw -DWIN32 -Uunix -mno-cygwin"
  2045                 SDL_CFLAGS="$SDL_CFLAGS -I/usr/include/mingw -DWIN32 -Uunix -mno-cygwin"
  2046                 LIBS="$LIBS -mno-cygwin"
  2047                 SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows -mno-cygwin"
  2048                 ;;
  2049             *-*-mingw32*)
  2050                 SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows"
  2051                 ;;
  2052         esac
  2053         ;;
  2054     *-*-beos*)
  2055         ARCH=beos
  2056         ac_default_prefix=/boot/develop/tools/gnupro
  2057         CheckDummyVideo
  2058         CheckDiskAudio
  2059         CheckNASM
  2060         CheckBWINDOW
  2061         CheckBeGL
  2062         # Set up files for the main() stub
  2063         COPY_ARCH_SRC(src/main, linux, SDL_main.c)
  2064         COPY_ARCH_SRC(src/main, beos, SDL_BeApp.cc)
  2065         COPY_ARCH_SRC(src/main, beos, SDL_BeApp.h)
  2066         # Set up files for the audio library
  2067         if test x$enable_audio = xyes; then
  2068             AUDIO_SUBDIRS="$AUDIO_SUBDIRS baudio"
  2069             AUDIO_DRIVERS="$AUDIO_DRIVERS baudio/libaudio_baudio.la"
  2070         fi
  2071         # Set up files for the joystick library
  2072         if test x$enable_joystick = xyes; then
  2073             JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS beos"
  2074             JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS beos/libjoystick_beos.la"
  2075         fi
  2076         # Set up files for the cdrom library
  2077         if test x$enable_cdrom = xyes; then
  2078             CDROM_SUBDIRS="$CDROM_SUBDIRS beos"
  2079             CDROM_DRIVERS="$CDROM_DRIVERS beos/libcdrom_beos.la"
  2080         fi
  2081         # Set up files for the thread library
  2082         if test x$enable_threads = xyes; then
  2083             COPY_ARCH_SRC(src/thread, beos, SDL_systhread.c)
  2084             COPY_ARCH_SRC(src/thread, beos, SDL_systhread_c.h)
  2085             COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
  2086             COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
  2087             COPY_ARCH_SRC(src/thread, beos, SDL_syssem.c)
  2088             COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
  2089             COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
  2090             COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
  2091         fi
  2092         # Set up files for the timer library
  2093         if test x$enable_timers = xyes; then
  2094             COPY_ARCH_SRC(src/timer, beos, SDL_systimer.c)
  2095         fi
  2096         # The BeOS platform requires special libraries
  2097         SYSTEM_LIBS="$SYSTEM_LIBS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
  2098         ;;
  2099     *-*-macos*)
  2100         # This would be used if cross-compiling to MacOS 9.  No way to
  2101         # use it at present, but Apple is working on a X-to-9 compiler
  2102         # for which this case would be handy.
  2103         ARCH=macos
  2104         CheckDummyVideo
  2105         CheckDiskAudio
  2106         CheckTOOLBOX
  2107         CheckMacGL
  2108         # Set up files for the main() stub
  2109         COPY_ARCH_SRC(src/main, macos, SDL_main.c)
  2110         # Set up files for the audio library
  2111         if test x$enable_audio = xyes; then
  2112             AUDIO_SUBDIRS="$AUDIO_SUBDIRS macrom"
  2113             AUDIO_DRIVERS="$AUDIO_DRIVERS macrom/libaudio_macrom.la"
  2114         fi
  2115         # Set up files for the joystick library
  2116         if test x$enable_joystick = xyes; then
  2117             JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS macos"
  2118             JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS macos/libjoystick_macos.la"
  2119         fi
  2120         # Set up files for the cdrom library
  2121         if test x$enable_cdrom = xyes; then
  2122             CDROM_SUBDIRS="$CDROM_SUBDIRS macos"
  2123             CDROM_DRIVERS="$CDROM_DRIVERS macos/libcdrom_macos.la"
  2124         fi
  2125         # Set up files for the thread library
  2126         if test x$enable_threads = xyes; then
  2127             COPY_ARCH_SRC(src/thread, macos, SDL_systhread.c)
  2128             COPY_ARCH_SRC(src/thread, macos, SDL_systhread_c.h)
  2129             COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
  2130             COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
  2131             COPY_ARCH_SRC(src/thread, macos, SDL_syssem.c)
  2132             COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
  2133             COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
  2134             COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
  2135         fi
  2136         # Set up files for the timer library
  2137         if test x$enable_timers = xyes; then
  2138             COPY_ARCH_SRC(src/timer, macos, SDL_systimer.c)
  2139         fi
  2140         # The MacOS platform requires special setup
  2141         SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
  2142         SDL_LIBS="-lSDLmain $SDL_LIBS"
  2143         ;;
  2144     *-*-darwin* )
  2145         # Strictly speaking, we want "Mac OS X", not "Darwin", which is
  2146         # just the OS X kernel sans upper layers like Carbon and Cocoa.
  2147         # But config.guess comes back with "darwin", so go with the flow.
  2148         ARCH=macosx
  2149         CheckDummyVideo
  2150         CheckDiskAudio
  2151         CheckQUARTZ
  2152         CheckMacGL
  2153         CheckPTHREAD
  2154         # Set up files for the main() stub
  2155         COPY_ARCH_SRC(src/main, macosx, SDLMain.m)
  2156         COPY_ARCH_SRC(src/main, macosx, SDLMain.h)
  2157         # Set up files for the audio library
  2158         if test x$enable_audio = xyes; then
  2159             AUDIO_SUBDIRS="$AUDIO_SUBDIRS macrom"
  2160             AUDIO_DRIVERS="$AUDIO_DRIVERS macrom/libaudio_macrom.la"
  2161         fi
  2162         # Set up files for the joystick library
  2163         if test x$enable_joystick = xyes; then
  2164             JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS darwin"
  2165             JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS darwin/libjoystick_darwin.la"
  2166             SDL_LIBS="$SDL_LIBS -framework IOKit"
  2167         fi
  2168         # Set up files for the cdrom library
  2169         if test x$enable_cdrom = xyes; then
  2170             CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
  2171             CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
  2172         fi
  2173         # Set up files for the thread library
  2174         if test x$enable_threads = xyes; then
  2175             COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
  2176             COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
  2177             COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
  2178             COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
  2179             if test x$use_pthreads = xyes -a x$have_pthread_sem != xyes; then
  2180                 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
  2181             else
  2182                 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
  2183             fi
  2184             COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
  2185             COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
  2186             COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
  2187         fi
  2188         # Set up files for the timer library
  2189         if test x$enable_timers = xyes; then
  2190             COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
  2191         fi
  2192         # The MacOS X platform requires special setup
  2193         SDL_CFLAGS="$SDL_CFLAGS -F/System/Library/Frameworks/Carbon.framework -F/System/Library/Frameworks/Cocoa.framework"
  2194         SDL_LIBS="-lSDLmain $SDL_LIBS -framework Carbon -framework Cocoa"
  2195         ;;
  2196     *-*-mint*)
  2197         ARCH=mint
  2198         CheckDummyVideo
  2199         CheckDiskAudio
  2200         CheckAtariBiosEvent
  2201         CheckAtariXbiosVideo
  2202         CheckAtariGemVideo
  2203         CheckPTH
  2204         # Set up files for the main() stub
  2205         COPY_ARCH_SRC(src/main, linux, SDL_main.c)
  2206         # Set up files for the audio library
  2207         if test x$enable_audio = xyes; then
  2208             AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
  2209             AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
  2210         fi
  2211         # Set up files for the joystick library
  2212         # (No joystick support yet)
  2213         if test x$enable_joystick = xyes; then
  2214             JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
  2215             JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
  2216         fi
  2217         # Set up files for the cdrom library
  2218         if test x$enable_cdrom = xyes; then
  2219             CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
  2220             CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
  2221         fi
  2222         # Set up files for the thread library
  2223         if test x$enable_threads = xyes; then
  2224             if test x$enable_pth = xyes; then
  2225                 COPY_ARCH_SRC(src/thread, pth, SDL_systhread.c)
  2226                 COPY_ARCH_SRC(src/thread, pth, SDL_systhread_c.h)
  2227             else
  2228                 COPY_ARCH_SRC(src/thread, generic, SDL_systhread.c)
  2229                 COPY_ARCH_SRC(src/thread, generic, SDL_systhread_c.h)
  2230             fi
  2231             COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
  2232             COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
  2233             COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
  2234             COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
  2235             COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
  2236             COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
  2237         fi
  2238         # Set up files for the timer library
  2239         if test x$enable_timers = xyes; then
  2240             COPY_ARCH_SRC(src/timer, mint, SDL_systimer.c)
  2241             COPY_ARCH_SRC(src/timer, mint, SDL_vbltimer.S)
  2242             COPY_ARCH_SRC(src/timer, mint, SDL_vbltimer_s.h)
  2243         fi
  2244         # MiNT does not define "unix"
  2245         CFLAGS="$CFLAGS -Dunix"
  2246         ;;
  2247     *)
  2248         AC_MSG_ERROR(Unsupported target:  Please add to configure.in)
  2249         ;;
  2250 esac
  2251 AC_SUBST(ARCH)
  2252 
  2253 # Set the conditional variables for this target
  2254 AM_CONDITIONAL(TARGET_LINUX, test $ARCH = linux)
  2255 AM_CONDITIONAL(TARGET_SOLARIS, test $ARCH = solaris)
  2256 AM_CONDITIONAL(TARGET_IRIX, test $ARCH = irix)
  2257 AM_CONDITIONAL(TARGET_BSDI, test $ARCH = bsdi)
  2258 AM_CONDITIONAL(TARGET_FREEBSD, test $ARCH = freebsd)
  2259 AM_CONDITIONAL(TARGET_NETBSD, test $ARCH = netbsd)
  2260 AM_CONDITIONAL(TARGET_OPENBSD, test $ARCH = openbsd)
  2261 AM_CONDITIONAL(TARGET_AIX, test $ARCH = aix)
  2262 AM_CONDITIONAL(TARGET_WIN32, test $ARCH = win32)
  2263 AM_CONDITIONAL(TARGET_BEOS, test $ARCH = beos)
  2264 AM_CONDITIONAL(TARGET_MACOS, test $ARCH = macos)
  2265 AM_CONDITIONAL(TARGET_MACOSX, test $ARCH = macosx)
  2266 AM_CONDITIONAL(TARGET_QNX, test $ARCH = qnx)
  2267 AM_CONDITIONAL(TARGET_MINT, test $ARCH = mint)
  2268 
  2269 # Set conditional variables for shared and static library selection.
  2270 # These are not used in any Makefile.am but in sdl-config.in.
  2271 AM_CONDITIONAL([ENABLE_SHARED], [test "$enable_shared" = yes])
  2272 AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = yes])
  2273 
  2274 # Set runtime shared library paths as needed
  2275 
  2276 if test $ARCH = linux -o $ARCH = freebsd -o $ARCH = bsdi; then
  2277   SDL_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib"
  2278 fi
  2279 if test $ARCH = solaris; then
  2280   SDL_RLD_FLAGS="-R\${exec_prefix}/lib"
  2281 fi
  2282 if test $ARCH = openbsd -o $ARCH = bsdi; then
  2283     SHARED_SYSTEM_LIBS="$SYSTEM_LIBS"
  2284 else
  2285     SHARED_SYSTEM_LIBS=""
  2286 fi
  2287 STATIC_SYSTEM_LIBS="$SYSTEM_LIBS"
  2288 
  2289 dnl Output the video drivers we use
  2290 if test x$enable_video = xtrue; then
  2291     if test "$VIDEO_SUBDIRS" = ""; then
  2292         AC_MSG_ERROR(*** No video drivers are enabled!)
  2293     fi
  2294 fi
  2295 AC_SUBST(AUDIO_SUBDIRS)
  2296 AC_SUBST(AUDIO_DRIVERS)
  2297 AC_SUBST(VIDEO_SUBDIRS)
  2298 AC_SUBST(VIDEO_DRIVERS)
  2299 AC_SUBST(JOYSTICK_SUBDIRS)
  2300 AC_SUBST(JOYSTICK_DRIVERS)
  2301 AC_SUBST(CDROM_SUBDIRS)
  2302 AC_SUBST(CDROM_DRIVERS)
  2303 AC_SUBST(SDL_EXTRADIRS)
  2304 AC_SUBST(SDL_EXTRALIBS)
  2305 
  2306 dnl Expand the cflags and libraries needed by apps using SDL
  2307 AC_SUBST(SDL_CFLAGS)
  2308 AC_SUBST(SDL_LIBS)
  2309 AC_SUBST(SDL_RLD_FLAGS)
  2310 
  2311 dnl Expand the libraries needed for static and dynamic linking
  2312 AC_SUBST(STATIC_SYSTEM_LIBS)
  2313 AC_SUBST(SHARED_SYSTEM_LIBS)
  2314 AC_SUBST(SYSTEM_LIBS)
  2315 
  2316 dnl Expand the include directories for building SDL
  2317 CFLAGS="$CFLAGS -I\$(top_srcdir)/include"
  2318 CFLAGS="$CFLAGS -I\$(top_srcdir)/include/SDL"
  2319 CFLAGS="$CFLAGS -I\$(top_srcdir)/src -I\$(top_srcdir)/src/$ARCH"
  2320 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/main"
  2321 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/audio"
  2322 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video"
  2323 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video/XFree86/extensions"
  2324 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/events"
  2325 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/joystick"
  2326 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/cdrom"
  2327 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/thread"
  2328 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/timer"
  2329 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/endian"
  2330 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/file"
  2331 CXXFLAGS="$CFLAGS"
  2332 
  2333 
  2334 # Check for darwin at the very end and set up the Objective C compiler
  2335 # We do this here so that we get the full CFLAGS into OBJCFLAGS
  2336 case "$target" in
  2337     *-*-darwin*)
  2338         OBJC="cc"
  2339         OBJCFLAGS="$CFLAGS"
  2340         OBJCDEPMODE="$CCDEPMODE"
  2341         AC_SUBST(OBJC)
  2342         AC_SUBST(OBJCFLAGS)
  2343         AC_SUBST(OBJCDEPMODE)
  2344         ;;
  2345 esac
  2346 
  2347 # Finally create all the generated files
  2348 dnl Important: Any directory that you want to be in the distcheck should
  2349 dnl            have a file listed here, so that configure generates the
  2350 dnl            subdirectories on the build target.
  2351 AC_OUTPUT([
  2352 Makefile
  2353 docs/Makefile
  2354 docs/html/Makefile
  2355 docs/man3/Makefile
  2356 include/Makefile
  2357 src/Makefile
  2358 src/main/Makefile
  2359 src/main/macosx/Makefile
  2360 src/main/macosx/Info.plist
  2361 src/audio/Makefile
  2362 src/audio/alsa/Makefile
  2363 src/audio/arts/Makefile
  2364 src/audio/baudio/Makefile
  2365 src/audio/dma/Makefile
  2366 src/audio/dmedia/Makefile
  2367 src/audio/dsp/Makefile
  2368 src/audio/esd/Makefile
  2369 src/audio/macrom/Makefile
  2370 src/audio/nas/Makefile
  2371 src/audio/nto/Makefile
  2372 src/audio/openbsd/Makefile
  2373 src/audio/paudio/Makefile
  2374 src/audio/sun/Makefile
  2375 src/audio/ums/Makefile
  2376 src/audio/windib/Makefile
  2377 src/audio/windx5/Makefile
  2378 src/audio/disk/Makefile
  2379 src/video/Makefile
  2380 src/video/XFree86/Makefile
  2381 src/video/XFree86/extensions/Makefile
  2382 src/video/XFree86/Xinerama/Makefile
  2383 src/video/XFree86/Xv/Makefile
  2384 src/video/XFree86/Xxf86dga/Makefile
  2385 src/video/XFree86/Xxf86vm/Makefile
  2386 src/video/cybergfx/Makefile
  2387 src/video/x11/Makefile
  2388 src/video/dga/Makefile
  2389 src/video/nanox/Makefile
  2390 src/video/fbcon/Makefile
  2391 src/video/directfb/Makefile
  2392 src/video/ps2gs/Makefile
  2393 src/video/ggi/Makefile
  2394 src/video/maccommon/Makefile
  2395 src/video/macdsp/Makefile
  2396 src/video/macrom/Makefile
  2397 src/video/quartz/Makefile
  2398 src/video/svga/Makefile
  2399 src/video/vgl/Makefile
  2400 src/video/aalib/Makefile
  2401 src/video/wincommon/Makefile
  2402 src/video/windib/Makefile
  2403 src/video/windx5/Makefile
  2404 src/video/bwindow/Makefile
  2405 src/video/photon/Makefile
  2406 src/video/epoc/Makefile
  2407 src/video/dummy/Makefile
  2408 src/video/ataricommon/Makefile
  2409 src/video/xbios/Makefile
  2410 src/video/gem/Makefile
  2411 src/events/Makefile
  2412 src/joystick/Makefile
  2413 src/joystick/amigaos/Makefile
  2414 src/joystick/beos/Makefile
  2415 src/joystick/bsd/Makefile
  2416 src/joystick/darwin/Makefile
  2417 src/joystick/dummy/Makefile
  2418 src/joystick/linux/Makefile
  2419 src/joystick/macos/Makefile
  2420 src/joystick/win32/Makefile
  2421 src/cdrom/Makefile
  2422 src/cdrom/aix/Makefile
  2423 src/cdrom/beos/Makefile
  2424 src/cdrom/dummy/Makefile
  2425 src/cdrom/bsdi/Makefile
  2426 src/cdrom/freebsd/Makefile
  2427 src/cdrom/linux/Makefile
  2428 src/cdrom/macos/Makefile
  2429 src/cdrom/openbsd/Makefile
  2430 src/cdrom/qnx/Makefile
  2431 src/cdrom/win32/Makefile
  2432 src/thread/Makefile
  2433 src/timer/Makefile
  2434 src/endian/Makefile
  2435 src/file/Makefile
  2436 src/hermes/Makefile
  2437 sdl-config
  2438 SDL.spec
  2439 ], [chmod +x sdl-config])