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