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