1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/configure.in Thu Apr 26 16:45:43 2001 +0000
1.3 @@ -0,0 +1,1891 @@
1.4 +dnl Process this file with autoconf to produce a configure script.
1.5 +AC_INIT(README)
1.6 +
1.7 +dnl Set various version strings - taken gratefully from the GTk sources
1.8 +#
1.9 +# Making releases:
1.10 +# Edit include/SDL/SDL_version.h and change the version, then:
1.11 +# SDL_MICRO_VERSION += 1;
1.12 +# SDL_INTERFACE_AGE += 1;
1.13 +# SDL_BINARY_AGE += 1;
1.14 +# if any functions have been added, set SDL_INTERFACE_AGE to 0.
1.15 +# if backwards compatibility has been broken,
1.16 +# set SDL_BINARY_AGE and SDL_INTERFACE_AGE to 0.
1.17 +#
1.18 +SDL_MAJOR_VERSION=1
1.19 +SDL_MINOR_VERSION=2
1.20 +SDL_MICRO_VERSION=0
1.21 +SDL_INTERFACE_AGE=0
1.22 +SDL_BINARY_AGE=0
1.23 +SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
1.24 +
1.25 +AC_SUBST(SDL_MAJOR_VERSION)
1.26 +AC_SUBST(SDL_MINOR_VERSION)
1.27 +AC_SUBST(SDL_MICRO_VERSION)
1.28 +AC_SUBST(SDL_INTERFACE_AGE)
1.29 +AC_SUBST(SDL_BINARY_AGE)
1.30 +AC_SUBST(SDL_VERSION)
1.31 +
1.32 +# libtool versioning
1.33 +LT_RELEASE=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION
1.34 +LT_CURRENT=`expr $SDL_MICRO_VERSION - $SDL_INTERFACE_AGE`
1.35 +LT_REVISION=$SDL_INTERFACE_AGE
1.36 +LT_AGE=`expr $SDL_BINARY_AGE - $SDL_INTERFACE_AGE`
1.37 +
1.38 +AC_SUBST(LT_RELEASE)
1.39 +AC_SUBST(LT_CURRENT)
1.40 +AC_SUBST(LT_REVISION)
1.41 +AC_SUBST(LT_AGE)
1.42 +
1.43 +dnl Setup for automake
1.44 +AM_INIT_AUTOMAKE(SDL, $SDL_VERSION)
1.45 +
1.46 +dnl Detect the canonical host and target build environment
1.47 +AC_CANONICAL_HOST
1.48 +AC_CANONICAL_TARGET
1.49 +
1.50 +dnl Check for tools
1.51 +
1.52 +AC_LIBTOOL_WIN32_DLL
1.53 +AM_PROG_LIBTOOL
1.54 +AC_PROG_MAKE_SET
1.55 +AC_PROG_CC
1.56 +AC_C_INLINE
1.57 +AC_C_CONST
1.58 +case "$target" in
1.59 + *-*-beos*)
1.60 + AC_PROG_CXX
1.61 + ;;
1.62 + *-*-aix*)
1.63 + AC_PROG_CXX
1.64 + ;;
1.65 + # This is stupid, but necessary on some versions of Linux (joysticks)
1.66 + *-*-linux*)
1.67 + AC_PROG_CXX
1.68 + ;;
1.69 +esac
1.70 +AC_PROG_INSTALL
1.71 +AC_FUNC_ALLOCA
1.72 +
1.73 +dnl The alpha architecture needs special flags for binary portability
1.74 +case "$target" in
1.75 + alpha*-*-linux*)
1.76 + if test x$ac_cv_prog_gcc = xyes; then
1.77 + CFLAGS="$CFLAGS -mcpu=ev4 -Wa,-mall"
1.78 + fi
1.79 + ;;
1.80 +esac
1.81 +
1.82 +dnl Add compiler-specific optimization flags
1.83 +
1.84 +dnl See if the user wants aggressive optimizations of the code
1.85 +AC_ARG_ENABLE(debug,
1.86 +[ --enable-debug Disable aggressive optimizations [default=yes]],
1.87 + , enable_debug=yes)
1.88 +if test x$enable_debug != xyes; then
1.89 + if test x$ac_cv_prog_gcc = xyes; then
1.90 + CFLAGS="$CFLAGS -fexpensive-optimizations"
1.91 + # Ack! This breaks the MMX YV12 conversion on gcc 2.95.2
1.92 + # CFLAGS="$CFLAGS -fomit-frame-pointer"
1.93 + fi
1.94 + case "$target" in
1.95 + i486-*-*)
1.96 + if test x$ac_cv_prog_gcc = xyes; then
1.97 + CFLAGS="$CFLAGS -march=486"
1.98 + fi
1.99 + ;;
1.100 + i?86-*-*)
1.101 + if test x$ac_cv_prog_gcc = xyes; then
1.102 + CFLAGS="$CFLAGS -march=pentium -mcpu=pentiumpro"
1.103 + fi
1.104 + ;;
1.105 + *-*-osf*)
1.106 + if test x$ac_cv_prog_gcc != xyes; then
1.107 + CFLAGS="-g3 -fast -arch host"
1.108 + fi
1.109 + ;;
1.110 + esac
1.111 +fi
1.112 +
1.113 +dnl Add verbose warnings by default, and allow ANSI compliance checking
1.114 +AC_ARG_ENABLE(strict-ansi,
1.115 +[ --enable-strict-ansi Enable strict ANSI compliance build [default=no]],
1.116 + , enable_strict_ansi=no)
1.117 +if test x$ac_cv_prog_gcc = xyes; then
1.118 + CFLAGS="$CFLAGS -Wall"
1.119 + if test x$enable_strict_ansi = xyes; then
1.120 + CFLAGS="$CFLAGS -ansi -pedantic -D_XOPEN_SOURCE"
1.121 + fi
1.122 +fi
1.123 +
1.124 +dnl Initialize the compiler and linker flags for SDL applications
1.125 +
1.126 +SDL_CFLAGS=""
1.127 +SDL_LIBS="-lSDL"
1.128 +
1.129 +dnl Add the math library for the new gamma correction support
1.130 +
1.131 +case "$target" in
1.132 + *-*-cygwin* | *-*-mingw32*)
1.133 + MATHLIB=""
1.134 + ;;
1.135 + *-*-beos*)
1.136 + MATHLIB=""
1.137 + ;;
1.138 + *-*-darwin*)
1.139 + MATHLIB=""
1.140 + ;;
1.141 + *)
1.142 + MATHLIB="-lm"
1.143 + ;;
1.144 +esac
1.145 +SYSTEM_LIBS="$SYSTEM_LIBS $MATHLIB"
1.146 +
1.147 +dnl Enable/disable various subsystems of the SDL library
1.148 +
1.149 +AC_ARG_ENABLE(audio,
1.150 +[ --enable-audio Enable the audio subsystem [default=yes]],
1.151 + , enable_audio=yes)
1.152 +if test x$enable_audio = xyes; then
1.153 + SDL_EXTRADIRS="$SDL_EXTRADIRS audio"
1.154 + SDL_EXTRALIBS="$SDL_EXTRALIBS audio/libaudio.la"
1.155 +else
1.156 + CFLAGS="$CFLAGS -DDISABLE_AUDIO"
1.157 +fi
1.158 +AC_ARG_ENABLE(video,
1.159 +[ --enable-video Enable the video subsystem [default=yes]],
1.160 + , enable_video=yes)
1.161 +if test x$enable_video = xyes; then
1.162 + SDL_EXTRADIRS="$SDL_EXTRADIRS video"
1.163 + SDL_EXTRALIBS="$SDL_EXTRALIBS video/libvideo.la"
1.164 +else
1.165 + CFLAGS="$CFLAGS -DDISABLE_VIDEO"
1.166 +fi
1.167 +AC_ARG_ENABLE(events,
1.168 +[ --enable-events Enable the events subsystem [default=yes]],
1.169 + , enable_events=yes)
1.170 +if test x$enable_video = xyes -a x$enable_events = xyes; then
1.171 + SDL_EXTRADIRS="$SDL_EXTRADIRS events"
1.172 + SDL_EXTRALIBS="$SDL_EXTRALIBS events/libevents.la"
1.173 +else
1.174 + CFLAGS="$CFLAGS -DDISABLE_EVENTS"
1.175 +fi
1.176 +AC_ARG_ENABLE(joystick,
1.177 +[ --enable-joystick Enable the joystick subsystem [default=yes]],
1.178 + , enable_joystick=yes)
1.179 +if test x$enable_joystick = xyes; then
1.180 + SDL_EXTRADIRS="$SDL_EXTRADIRS joystick"
1.181 + SDL_EXTRALIBS="$SDL_EXTRALIBS joystick/libjoystick.la"
1.182 +else
1.183 + CFLAGS="$CFLAGS -DDISABLE_JOYSTICK"
1.184 +fi
1.185 +AC_ARG_ENABLE(cdrom,
1.186 +[ --enable-cdrom Enable the cdrom subsystem [default=yes]],
1.187 + , enable_cdrom=yes)
1.188 +if test x$enable_cdrom = xyes; then
1.189 + SDL_EXTRADIRS="$SDL_EXTRADIRS cdrom"
1.190 + SDL_EXTRALIBS="$SDL_EXTRALIBS cdrom/libcdrom.la"
1.191 +else
1.192 + CFLAGS="$CFLAGS -DDISABLE_CDROM"
1.193 +fi
1.194 +AC_ARG_ENABLE(threads,
1.195 +[ --enable-threads Enable the threading subsystem [default=yes]],
1.196 + , enable_threads=yes)
1.197 +SDL_EXTRADIRS="$SDL_EXTRADIRS thread"
1.198 +SDL_EXTRALIBS="$SDL_EXTRALIBS thread/libthread.la"
1.199 +if test x$enable_threads != xyes; then
1.200 + CFLAGS="$CFLAGS -DDISABLE_THREADS"
1.201 + COPY_ARCH_SRC(src/thread, generic, SDL_systhread.c)
1.202 + COPY_ARCH_SRC(src/thread, generic, SDL_systhread_c.h)
1.203 + COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
1.204 + COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
1.205 + COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1.206 + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1.207 + COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1.208 + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1.209 +fi
1.210 +AC_ARG_ENABLE(timers,
1.211 +[ --enable-timers Enable the timer subsystem [default=yes]],
1.212 + , enable_timers=yes)
1.213 +if test x$enable_timers = xyes; then
1.214 + SDL_EXTRADIRS="$SDL_EXTRADIRS timer"
1.215 + SDL_EXTRALIBS="$SDL_EXTRALIBS timer/libtimer.la"
1.216 +else
1.217 + CFLAGS="$CFLAGS -DDISABLE_TIMERS"
1.218 +fi
1.219 +AC_ARG_ENABLE(endian,
1.220 +[ --enable-endian Enable the endian subsystem [default=yes]],
1.221 + , enable_endian=yes)
1.222 +if test x$enable_endian = xyes; then
1.223 + SDL_EXTRADIRS="$SDL_EXTRADIRS endian"
1.224 + SDL_EXTRALIBS="$SDL_EXTRALIBS endian/libendian.la"
1.225 +else
1.226 + CFLAGS="$CFLAGS -DDISABLE_ENDIAN"
1.227 +fi
1.228 +AC_ARG_ENABLE(file,
1.229 +[ --enable-file Enable the file subsystem [default=yes]],
1.230 + , enable_file=yes)
1.231 +if test x$enable_file = xyes; then
1.232 + SDL_EXTRADIRS="$SDL_EXTRADIRS file"
1.233 + SDL_EXTRALIBS="$SDL_EXTRALIBS file/libfile.la"
1.234 +else
1.235 + CFLAGS="$CFLAGS -DDISABLE_FILE"
1.236 +fi
1.237 +
1.238 +dnl See if the OSS audio interface is supported
1.239 +CheckOSS()
1.240 +{
1.241 + AC_ARG_ENABLE(oss,
1.242 +[ --enable-oss support the OSS audio API [default=yes]],
1.243 + , enable_oss=yes)
1.244 + if test x$enable_audio = xyes -a x$enable_oss = xyes; then
1.245 + AC_MSG_CHECKING(for OSS audio support)
1.246 + have_oss=no
1.247 + AC_TRY_COMPILE([
1.248 + #ifdef linux
1.249 + #include <linux/soundcard.h>
1.250 + #endif
1.251 + #ifdef __FreeBSD__
1.252 + #include <machine/soundcard.h>
1.253 + #endif
1.254 + #ifdef __bsdi__
1.255 + #include <sys/soundcard.h>
1.256 + #endif
1.257 + #ifdef __USLC__
1.258 + #include <sys/soundcard.h>
1.259 + #endif
1.260 + ],[
1.261 + int arg = SNDCTL_DSP_SETFRAGMENT;
1.262 + ],[
1.263 + have_oss=yes
1.264 + ])
1.265 + AC_MSG_RESULT($have_oss)
1.266 + if test x$have_oss = xyes; then
1.267 + CFLAGS="$CFLAGS -DOSS_SUPPORT"
1.268 + AUDIO_SUBDIRS="$AUDIO_SUBDIRS dsp"
1.269 + AUDIO_DRIVERS="$AUDIO_DRIVERS dsp/libaudio_dsp.la"
1.270 + AUDIO_SUBDIRS="$AUDIO_SUBDIRS dma"
1.271 + AUDIO_DRIVERS="$AUDIO_DRIVERS dma/libaudio_dma.la"
1.272 + fi
1.273 + fi
1.274 +}
1.275 +
1.276 +dnl See if the ALSA audio interface is supported
1.277 +CheckALSA()
1.278 +{
1.279 + AC_ARG_ENABLE(alsa,
1.280 +[ --enable-alsa support the ALSA audio API [default=yes]],
1.281 + , enable_alsa=yes)
1.282 + if test x$enable_audio = xyes -a x$enable_alsa = xyes; then
1.283 + have_alsa=no
1.284 + AC_CHECK_HEADER(sys/asoundlib.h, have_alsa_hdr=yes)
1.285 + AC_CHECK_LIB(asound, snd_pcm_open, have_alsa_lib=yes)
1.286 + if test x$have_alsa_hdr = xyes -a x$have_alsa_lib = xyes; then
1.287 + CFLAGS="$CFLAGS -DALSA_SUPPORT"
1.288 + SYSTEM_LIBS="$SYSTEM_LIBS -lasound"
1.289 + AUDIO_SUBDIRS="$AUDIO_SUBDIRS alsa"
1.290 + AUDIO_DRIVERS="$AUDIO_DRIVERS alsa/libaudio_alsa.la"
1.291 + fi
1.292 + fi
1.293 +}
1.294 +
1.295 +dnl Find the ESD includes and libraries
1.296 +CheckESD()
1.297 +{
1.298 + AC_ARG_ENABLE(esd,
1.299 +[ --enable-esd support the Enlightened Sound Daemon [default=yes]],
1.300 + , enable_esd=yes)
1.301 + if test x$enable_audio = xyes -a x$enable_esd = xyes; then
1.302 + AM_PATH_ESD(0.2.8, [
1.303 + CFLAGS="$CFLAGS -DESD_SUPPORT $ESD_CFLAGS"
1.304 + SYSTEM_LIBS="$SYSTEM_LIBS $ESD_LIBS"
1.305 + AUDIO_SUBDIRS="$AUDIO_SUBDIRS esd"
1.306 + AUDIO_DRIVERS="$AUDIO_DRIVERS esd/libaudio_esd.la"
1.307 + ])
1.308 + fi
1.309 +}
1.310 +
1.311 +CheckARTSC()
1.312 +{
1.313 + AC_ARG_ENABLE(arts,
1.314 +[ --enable-arts support the Analog Real Time Synthesizer [default=yes]],
1.315 + , enable_arts=yes)
1.316 + if test x$enable_audio = xyes -a x$enable_arts = xyes; then
1.317 + AC_PATH_PROG(ARTSCCONFIG, artsc-config)
1.318 + if test x$ARTSCCONFIG = x -o x$ARTSCCONFIG = x'"$ARTSCCONFIG"'; then
1.319 + : # arts isn't installed
1.320 + else
1.321 + ARTSC_CFLAGS=`$ARTSCCONFIG --cflags`
1.322 + ARTSC_LIBS=`$ARTSCCONFIG --libs`
1.323 + AC_MSG_CHECKING(for aRts development environment)
1.324 + audio_arts=no
1.325 + save_CFLAGS="$CFLAGS"
1.326 + CFLAGS="$CFLAGS $ARTSC_CFLAGS"
1.327 + AC_TRY_COMPILE([
1.328 + #include <artsc.h>
1.329 + ],[
1.330 + arts_stream_t stream;
1.331 + ],[
1.332 + audio_arts=yes
1.333 + ])
1.334 + CFLAGS="$save_CFLAGS"
1.335 + AC_MSG_RESULT($audio_arts)
1.336 + if test x$audio_arts = xyes; then
1.337 + CFLAGS="$CFLAGS -DARTSC_SUPPORT $ARTSC_CFLAGS"
1.338 + SYSTEM_LIBS="$SYSTEM_LIBS $ARTSC_LIBS"
1.339 + AUDIO_SUBDIRS="$AUDIO_SUBDIRS arts"
1.340 + AUDIO_DRIVERS="$AUDIO_DRIVERS arts/libaudio_arts.la"
1.341 + fi
1.342 + fi
1.343 + fi
1.344 +}
1.345 +
1.346 +dnl See if the NAS audio interface is supported
1.347 +CheckNAS()
1.348 +{
1.349 + AC_ARG_ENABLE(nas,
1.350 +[ --enable-nas support the NAS audio API [default=yes]],
1.351 + , enable_nas=yes)
1.352 + if test x$enable_audio = xyes -a x$enable_nas = xyes; then
1.353 + AC_MSG_CHECKING(for NAS audio support)
1.354 + have_nas=no
1.355 + if test -r /usr/X11R6/include/audio/audiolib.h ; then
1.356 + have_nas=yes
1.357 + fi
1.358 + AC_MSG_RESULT($have_nas)
1.359 + if test x$have_nas = xyes; then
1.360 + CFLAGS="$CFLAGS -DNAS_SUPPORT"
1.361 + SYSTEM_LIBS="$SYSTEM_LIBS -laudio -lXt"
1.362 + AUDIO_SUBDIRS="$AUDIO_SUBDIRS nas"
1.363 + AUDIO_DRIVERS="$AUDIO_DRIVERS nas/libaudio_nas.la"
1.364 + fi
1.365 + fi
1.366 +}
1.367 +
1.368 +dnl See if we can use x86 assembly blitters
1.369 +CheckNASM()
1.370 +{
1.371 + dnl Make sure we are running on an x86 platform
1.372 + case $target in
1.373 + i?86*)
1.374 + ;;
1.375 + *)
1.376 + # Nope, bail early.
1.377 + return
1.378 + ;;
1.379 + esac
1.380 + dnl Check for NASM (for assembly blit routines)
1.381 + AC_ARG_ENABLE(nasm,
1.382 +[ --enable-nasm use nasm assembly blitters on x86 [default=yes]],
1.383 + , enable_nasm=yes)
1.384 + if test x$enable_video = xyes -a x$enable_nasm = xyes; then
1.385 + AC_PATH_PROG(NASM, nasm)
1.386 + if test x$NASM = x -o x$NASM = x'"$NASM"'; then
1.387 + : # nasm isn't installed
1.388 + else
1.389 + CFLAGS="$CFLAGS -DUSE_ASMBLIT -I$srcdir/hermes"
1.390 + case $ARCH in
1.391 + win32)
1.392 + NASMFLAGS="-f win32"
1.393 + ;;
1.394 + *)
1.395 + NASMFLAGS="-f elf"
1.396 + ;;
1.397 + esac
1.398 + AC_SUBST(NASMFLAGS)
1.399 + CFLAGS="$CFLAGS -I\$(top_srcdir)/src/hermes"
1.400 + SDL_EXTRADIRS="$SDL_EXTRADIRS hermes"
1.401 + SDL_EXTRALIBS="$SDL_EXTRALIBS hermes/libhermes.la"
1.402 + fi
1.403 + fi
1.404 +}
1.405 +
1.406 +dnl Find the X11 include and library directories
1.407 +CheckX11()
1.408 +{
1.409 + AC_ARG_ENABLE(video-x11,
1.410 +[ --enable-video-x11 use X11 video driver [default=yes]],
1.411 + , enable_video_x11=yes)
1.412 + if test x$enable_video = xyes -a x$enable_video_x11 = xyes; then
1.413 + AC_PATH_X
1.414 + AC_PATH_XTRA
1.415 + if test x$have_x = xyes; then
1.416 + CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_X11"
1.417 + if test x$ac_cv_func_shmat != xyes; then
1.418 + CFLAGS="$CFLAGS -DNO_SHARED_MEMORY"
1.419 + fi
1.420 + SYSTEM_LIBS="$SYSTEM_LIBS $X_LIBS -lX11 -lXext"
1.421 + VIDEO_SUBDIRS="$VIDEO_SUBDIRS x11"
1.422 + VIDEO_DRIVERS="$VIDEO_DRIVERS x11/libvideo_x11.la"
1.423 +
1.424 + AC_ARG_ENABLE(video-x11-vm,
1.425 +[ --enable-video-x11-vm use X11 VM extension for fullscreen [default=yes]],
1.426 + , enable_video_x11_vm=yes)
1.427 + if test x$enable_video_x11_vm = xyes; then
1.428 + AC_MSG_CHECKING(for XFree86 VidMode 1.0 support)
1.429 + video_x11_vm=no
1.430 + AC_TRY_COMPILE([
1.431 + #include <X11/Xlib.h>
1.432 + #include <X11/extensions/xf86vmode.h>
1.433 + ],[
1.434 + ],[
1.435 + video_x11_vm=yes
1.436 + ])
1.437 + AC_MSG_RESULT($video_x11_vm)
1.438 + if test x$video_x11_vm = xyes; then
1.439 + CFLAGS="$CFLAGS -DXFREE86_VM"
1.440 + # Check for nasty XFree86 4.0/Glide hack
1.441 + AC_ARG_ENABLE(xfree86_glidehack,
1.442 +[ --enable-xfree86-glidehack Alternate vidmode lib for old Glide [default=no]],
1.443 + , enable_xfreeglidehack=no)
1.444 + if test x$enable_xfree86_glidehack = xyes; then
1.445 + ac_save_libs="$LIBS"
1.446 + LIBS="$LIBS $X_LIBS -lX11 -lXext"
1.447 + if test x$xfree86_glidehack = x; then
1.448 + AC_CHECK_LIB(Xxf86vm, XF40VidModeQueryExtension, xfree86_glidehack=Xxf86vm)
1.449 + fi
1.450 + if test x$xfree86_glidehack = x; then
1.451 + AC_CHECK_LIB(Xxf86vm40, XF40VidModeQueryExtension, xfree86_glidehack=Xxf86vm40)
1.452 + fi
1.453 + LIBS="$ac_save_libs"
1.454 + fi
1.455 + if test x$xfree86_glidehack != x; then
1.456 + CFLAGS="$CFLAGS -DXFREE86_VM_DYNAMIC_HACK"
1.457 + SYSTEM_LIBS="$SYSTEM_LIBS -l$xfree86_glidehack"
1.458 + else
1.459 + SYSTEM_LIBS="$SYSTEM_LIBS -lXxf86vm"
1.460 + fi
1.461 + AC_MSG_CHECKING(for XFree86 VidMode gamma support)
1.462 + video_x11_vmgamma=no
1.463 + AC_TRY_COMPILE([
1.464 + #include <X11/Xlib.h>
1.465 + #include <X11/extensions/xf86vmode.h>
1.466 + ],[
1.467 + XF86VidModeGamma gamma;
1.468 + ],[
1.469 + video_x11_vmgamma=yes
1.470 + ])
1.471 + AC_MSG_RESULT($video_x11_vmgamma)
1.472 + if test x$video_x11_vmgamma = xyes; then
1.473 + CFLAGS="$CFLAGS -DXFREE86_VMGAMMA"
1.474 + fi
1.475 + fi
1.476 + fi
1.477 + AC_ARG_ENABLE(video-x11-dgamouse,
1.478 +[ --enable-video-x11-dgamouse use X11 DGA for mouse events [default=yes]],
1.479 + , enable_video_x11_dgamouse=yes)
1.480 + AC_MSG_CHECKING(for XFree86 DGA 1.0 support)
1.481 + video_x11_dga=no
1.482 + AC_TRY_COMPILE([
1.483 + #include <X11/Xlib.h>
1.484 + #include <X11/extensions/xf86dga.h>
1.485 + ],[
1.486 + ],[
1.487 + video_x11_dga=yes
1.488 + ])
1.489 + AC_MSG_RESULT($video_x11_dga)
1.490 + if test x$video_x11_dga = xyes; then
1.491 + CFLAGS="$CFLAGS -DXFREE86_DGAMOUSE"
1.492 + if test x$enable_video_x11_dgamouse = xyes; then
1.493 + CFLAGS="$CFLAGS -DDEFAULT_DGAMOUSE"
1.494 + fi
1.495 + SYSTEM_LIBS="$SYSTEM_LIBS -lXxf86dga"
1.496 + fi
1.497 + AC_ARG_ENABLE(video-x11-xv,
1.498 +[ --enable-video-x11-xv use X11 XvImage extension for video [default=yes]],
1.499 + , enable_video_x11_xv=yes)
1.500 + if test x$enable_video_x11_xv = xyes; then
1.501 + AC_MSG_CHECKING(for XFree86 XvImage support)
1.502 + video_x11_xv=no
1.503 + AC_TRY_COMPILE([
1.504 + #include <X11/Xlib.h>
1.505 + #include <sys/ipc.h>
1.506 + #include <sys/shm.h>
1.507 + #include <X11/extensions/XShm.h>
1.508 + #include <X11/extensions/Xvlib.h>
1.509 + ],[
1.510 + XvImage *image;
1.511 + ],[
1.512 + video_x11_xv=yes
1.513 + ])
1.514 + AC_MSG_RESULT($video_x11_xv)
1.515 + if test x$video_x11_xv = xyes; then
1.516 + CFLAGS="$CFLAGS -DXFREE86_XV"
1.517 + SYSTEM_LIBS="$SYSTEM_LIBS -lXv"
1.518 + fi
1.519 + fi
1.520 + fi
1.521 + fi
1.522 +}
1.523 +CheckPHOTON()
1.524 +{
1.525 + AC_ARG_ENABLE(video-photon,
1.526 +[ --enable-video-photon use QNX Photonvideo driver [default=yes]],
1.527 + , enable_video_photon=yes)
1.528 + if test x$enable_video = xyes -a x$enable_video_photon = xyes; then
1.529 + AC_MSG_CHECKING(for QNX Photon support)
1.530 + video_photon=no
1.531 + AC_TRY_COMPILE([
1.532 + #include <Ph.h>
1.533 + #include <Pt.h>
1.534 + #include <photon/Pg.h>
1.535 + #include <photon/PdDirect.h>
1.536 + ],[
1.537 + PgDisplaySettings_t *visual;
1.538 + ],[
1.539 + video_photon=yes
1.540 + ])
1.541 + AC_MSG_RESULT($video_photon)
1.542 + if test x$video_photon = xyes; then
1.543 + SYSTEM_LIBS="$SYSTEM_LIBS -lph"
1.544 + VIDEO_SUBDIRS="$VIDEO_SUBDIRS photon"
1.545 + VIDEO_DRIVERS="$VIDEO_DRIVERS photon/libvideo_photon.la"
1.546 + fi
1.547 + fi
1.548 +}
1.549 +
1.550 +dnl Find the X11 DGA 2.0 include and library directories
1.551 +CheckDGA()
1.552 +{
1.553 + AC_ARG_ENABLE(video-dga,
1.554 +[ --enable-video-dga use DGA 2.0 video driver [default=yes]],
1.555 + , enable_video_dga=yes)
1.556 + if test x$video_x11_dga = xyes -a x$enable_video_dga = xyes; then
1.557 + AC_MSG_CHECKING(for XFree86 DGA 2.0 support)
1.558 + video_x11_dga2=no
1.559 + AC_TRY_COMPILE([
1.560 + #include <X11/Xlib.h>
1.561 + #include <X11/extensions/xf86dga.h>
1.562 + ],[
1.563 + XDGAEvent xevent;
1.564 + ],[
1.565 + video_x11_dga2=yes
1.566 + ])
1.567 + AC_MSG_RESULT($video_x11_dga2)
1.568 + if test x$video_x11_dga2 = xyes; then
1.569 + CFLAGS="$CFLAGS -DENABLE_DGA"
1.570 + VIDEO_SUBDIRS="$VIDEO_SUBDIRS dga"
1.571 + VIDEO_DRIVERS="$VIDEO_DRIVERS dga/libvideo_dga.la"
1.572 + fi
1.573 + fi
1.574 +}
1.575 +
1.576 +dnl Find the framebuffer console includes
1.577 +CheckFBCON()
1.578 +{
1.579 + AC_ARG_ENABLE(video-fbcon,
1.580 +[ --enable-video-fbcon use framebuffer console video driver [default=yes]],
1.581 + , enable_video_fbcon=yes)
1.582 + if test x$enable_video = xyes -a x$enable_video_fbcon = xyes; then
1.583 + AC_MSG_CHECKING(for framebuffer console support)
1.584 + video_fbcon=no
1.585 + AC_TRY_COMPILE([
1.586 + #include <linux/fb.h>
1.587 + #include <linux/kd.h>
1.588 + #include <linux/keyboard.h>
1.589 + ],[
1.590 + ],[
1.591 + video_fbcon=yes
1.592 + ])
1.593 + AC_MSG_RESULT($video_fbcon)
1.594 + if test x$video_fbcon = xyes; then
1.595 + CFLAGS="$CFLAGS -DENABLE_FBCON"
1.596 + VIDEO_SUBDIRS="$VIDEO_SUBDIRS fbcon"
1.597 + VIDEO_DRIVERS="$VIDEO_DRIVERS fbcon/libvideo_fbcon.la"
1.598 + fi
1.599 + fi
1.600 +}
1.601 +
1.602 +dnl Find the GGI includes
1.603 +CheckGGI()
1.604 +{
1.605 + AC_ARG_ENABLE(video-ggi,
1.606 +[ --enable-video-ggi use GGI video driver [default=no]],
1.607 + , enable_video_ggi=no)
1.608 + if test x$enable_video = xyes -a x$enable_video_ggi = xyes; then
1.609 + AC_MSG_CHECKING(for GGI support)
1.610 + video_ggi=no
1.611 + AC_TRY_COMPILE([
1.612 + #include <ggi/ggi.h>
1.613 + #include <ggi/gii.h>
1.614 + ],[
1.615 + ],[
1.616 + video_ggi=yes
1.617 + ])
1.618 + AC_MSG_RESULT($video_ggi)
1.619 + if test x$video_ggi = xyes; then
1.620 + CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_GGI"
1.621 + SYSTEM_LIBS="$SYSTEM_LIBS -lggi -lgii -lgg"
1.622 +
1.623 + VIDEO_SUBDIRS="$VIDEO_SUBDIRS ggi"
1.624 + VIDEO_DRIVERS="$VIDEO_DRIVERS ggi/libvideo_ggi.la"
1.625 + fi
1.626 + fi
1.627 +}
1.628 +
1.629 +dnl Find the SVGAlib includes and libraries
1.630 +CheckSVGA()
1.631 +{
1.632 + AC_ARG_ENABLE(video-svga,
1.633 +[ --enable-video-svga use SVGAlib video driver [default=no]],
1.634 + , enable_video_svga=no)
1.635 + if test x$enable_video = xyes -a x$enable_video_svga = xyes; then
1.636 + AC_MSG_CHECKING(for SVGAlib (1.4.0+) support)
1.637 + video_svga=no
1.638 + AC_TRY_COMPILE([
1.639 + #include <vga.h>
1.640 + #include <vgamouse.h>
1.641 + #include <vgakeyboard.h>
1.642 + ],[
1.643 + if ( SCANCODE_RIGHTWIN && SCANCODE_LEFTWIN ) {
1.644 + exit(0);
1.645 + }
1.646 + ],[
1.647 + video_svga=yes
1.648 + ])
1.649 + AC_MSG_RESULT($video_svga)
1.650 + if test x$video_svga = xyes; then
1.651 + CFLAGS="$CFLAGS -DENABLE_SVGALIB"
1.652 + SYSTEM_LIBS="$SYSTEM_LIBS -lvga"
1.653 +
1.654 + VIDEO_SUBDIRS="$VIDEO_SUBDIRS svga"
1.655 + VIDEO_DRIVERS="$VIDEO_DRIVERS svga/libvideo_svga.la"
1.656 + fi
1.657 + fi
1.658 +}
1.659 +
1.660 +dnl Find the AAlib includes
1.661 +CheckAAlib()
1.662 +{
1.663 + AC_ARG_ENABLE(video-aalib,
1.664 +[ --enable-video-aalib use AAlib video driver [default=no]],
1.665 + , enable_video_aalib=no)
1.666 + if test x$enable_video = xyes -a x$enable_video_aalib = xyes; then
1.667 + AC_MSG_CHECKING(for AAlib support)
1.668 + video_aalib=no
1.669 + AC_TRY_COMPILE([
1.670 + #include <aalib.h>
1.671 + ],[
1.672 + ],[
1.673 + video_aalib=yes
1.674 + ])
1.675 + AC_MSG_RESULT($video_aalib)
1.676 + if test x$video_aalib = xyes; then
1.677 + CFLAGS="$CFLAGS -DENABLE_AALIB"
1.678 + SYSTEM_LIBS="$SYSTEM_LIBS -laa"
1.679 +
1.680 + VIDEO_SUBDIRS="$VIDEO_SUBDIRS aalib"
1.681 + VIDEO_DRIVERS="$VIDEO_DRIVERS aalib/libvideo_aa.la"
1.682 + fi
1.683 + fi
1.684 +}
1.685 +
1.686 +dnl Check to see if OpenGL support is desired
1.687 +AC_ARG_ENABLE(video-opengl,
1.688 +[ --enable-video-opengl include OpenGL context creation [default=yes]],
1.689 + , enable_video_opengl=yes)
1.690 +
1.691 +dnl Find OpenGL
1.692 +CheckOpenGL()
1.693 +{
1.694 + if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
1.695 + AC_MSG_CHECKING(for OpenGL (GLX) support)
1.696 + video_opengl=no
1.697 + AC_TRY_COMPILE([
1.698 + #include <GL/gl.h>
1.699 + #include <GL/glx.h>
1.700 + #include <dlfcn.h> /* For loading extensions */
1.701 + ],[
1.702 + ],[
1.703 + video_opengl=yes
1.704 + ])
1.705 + AC_MSG_RESULT($video_opengl)
1.706 + if test x$video_opengl = xyes; then
1.707 + CFLAGS="$CFLAGS -DHAVE_OPENGL"
1.708 + AC_CHECK_LIB(dl, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS -ldl")
1.709 + fi
1.710 + fi
1.711 +}
1.712 +
1.713 +dnl Check for BeOS OpenGL
1.714 +CheckBeGL()
1.715 +{
1.716 + if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
1.717 + CFLAGS="$CFLAGS -DHAVE_OPENGL"
1.718 + SYSTEM_LIBS="$SYSTEM_LIBS -lGL"
1.719 + fi
1.720 +}
1.721 +
1.722 +dnl Check for MacOS OpenGL
1.723 +CheckMacGL()
1.724 +{
1.725 + if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
1.726 + CFLAGS="$CFLAGS -DHAVE_OPENGL"
1.727 + case "$target" in
1.728 + *-*-darwin*)
1.729 + SDL_LIBS="$SDL_LIBS -framework OpenGL -framework AGL"
1.730 + esac
1.731 + fi
1.732 +}
1.733 +
1.734 +dnl See if we can use the new unified event interface in Linux 2.4
1.735 +CheckInputEvents()
1.736 +{
1.737 + dnl Check for Linux 2.4 unified input event interface support
1.738 + AC_ARG_ENABLE(input-events,
1.739 +[ --enable-input-events use Linux 2.4 unified input interface [default=yes]],
1.740 + , enable_input_events=yes)
1.741 + if test x$enable_input_events = xyes; then
1.742 + AC_MSG_CHECKING(for Linux 2.4 unified input interface)
1.743 + use_input_events=no
1.744 + AC_TRY_COMPILE([
1.745 + #include <linux/input.h>
1.746 + ],[
1.747 + #ifndef EVIOCGNAME
1.748 + #error EVIOCGNAME() ioctl not available
1.749 + #endif
1.750 + ],[
1.751 + use_input_events=yes
1.752 + ])
1.753 + AC_MSG_RESULT($use_input_events)
1.754 + if test x$use_input_events = xyes; then
1.755 + CFLAGS="$CFLAGS -DUSE_INPUT_EVENTS"
1.756 + fi
1.757 + fi
1.758 +}
1.759 +
1.760 +dnl See what type of thread model to use on Linux and Solaris
1.761 +CheckPTHREAD()
1.762 +{
1.763 + dnl Check for pthread support
1.764 + AC_ARG_ENABLE(pthreads,
1.765 +[ --enable-pthreads use POSIX threads for multi-threading [default=yes]],
1.766 + , enable_pthreads=yes)
1.767 + dnl This is used on Linux for glibc binary compatibility (Doh!)
1.768 + AC_ARG_ENABLE(pthread-sem,
1.769 +[ --enable-pthread-sem use pthread semaphores [default=yes]],
1.770 + , enable_pthread_sem=yes)
1.771 + ac_save_libs="$LIBS"
1.772 + case "$target" in
1.773 + *-*-bsdi*)
1.774 + pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
1.775 + pthread_lib=""
1.776 + ;;
1.777 + *-*-darwin*)
1.778 + pthread_cflags="-D_THREAD_SAFE"
1.779 +# causes Carbon.p complaints?
1.780 +# pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
1.781 + ;;
1.782 + *-*-freebsd*)
1.783 + pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
1.784 + pthread_lib="-pthread"
1.785 + ;;
1.786 + *-*-openbsd*)
1.787 + pthread_cflags="-D_REENTRANT"
1.788 + pthread_lib="-pthread"
1.789 + ;;
1.790 + *-*-solaris*)
1.791 + pthread_cflags="-D_REENTRANT"
1.792 + pthread_lib="-lpthread -lposix4"
1.793 + ;;
1.794 + *-*-sysv5*)
1.795 + pthread_cflags="-D_REENTRANT -Kthread"
1.796 + pthread_lib=""
1.797 + ;;
1.798 + *-*-irix*)
1.799 + pthread_cflags="-D_SGI_MP_SOURCE"
1.800 + pthread_lib="-lpthread"
1.801 + ;;
1.802 + *-*-aix*)
1.803 + pthread_cflags="-D_REENTRANT -mthreads"
1.804 + pthread_lib="-lpthread"
1.805 + ;;
1.806 + *-*-qnx*)
1.807 + pthread_cflags=""
1.808 + pthread_lib=""
1.809 + ;;
1.810 + *)
1.811 + pthread_cflags="-D_REENTRANT"
1.812 + pthread_lib="-lpthread"
1.813 + ;;
1.814 + esac
1.815 + LIBS="$LIBS $pthread_lib"
1.816 + if test x$enable_threads = xyes -a x$enable_pthreads = xyes; then
1.817 + AC_MSG_CHECKING(for pthreads)
1.818 + use_pthreads=no
1.819 + AC_TRY_LINK([
1.820 + #include <pthread.h>
1.821 + ],[
1.822 + pthread_attr_t type;
1.823 + pthread_attr_init(&type);
1.824 + ],[
1.825 + use_pthreads=yes
1.826 + ])
1.827 + AC_MSG_RESULT($use_pthreads)
1.828 + if test x$use_pthreads = xyes; then
1.829 + CFLAGS="$CFLAGS $pthread_cflags -DSDL_USE_PTHREADS"
1.830 + SDL_CFLAGS="$SDL_CFLAGS $pthread_cflags"
1.831 + SDL_LIBS="$SDL_LIBS $pthread_lib"
1.832 +
1.833 + # Check to see if recursive mutexes are available
1.834 + AC_MSG_CHECKING(for recursive mutexes)
1.835 + has_recursive_mutexes=no
1.836 + AC_TRY_LINK([
1.837 + #include <pthread.h>
1.838 + ],[
1.839 + pthread_mutexattr_t attr;
1.840 + #ifdef linux
1.841 + pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
1.842 + #else
1.843 + pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
1.844 + #endif
1.845 + ],[
1.846 + has_recursive_mutexes=yes
1.847 + ])
1.848 + # Some systems have broken recursive mutex implementations
1.849 + case "$target" in
1.850 + *-*-solaris*)
1.851 + has_recursive_mutexes=no
1.852 + ;;
1.853 + esac
1.854 + AC_MSG_RESULT($has_recursive_mutexes)
1.855 + if test x$has_recursive_mutexes != xyes; then
1.856 + CFLAGS="$CFLAGS -DPTHREAD_NO_RECURSIVE_MUTEX"
1.857 + fi
1.858 +
1.859 + # Check to see if this is broken glibc 2.0 pthreads
1.860 + case "$target" in
1.861 + *-*-linux*)
1.862 + AC_MSG_CHECKING(for broken glibc 2.0 pthreads)
1.863 + glibc20_pthreads=no
1.864 + AC_TRY_COMPILE([
1.865 + #include <features.h>
1.866 + #if (__GLIBC__ == 2) && (__GLIBC_MINOR__ == 0)
1.867 + #warning Working around a bug in glibc 2.0 pthreads
1.868 + #else
1.869 + #error pthread implementation okay
1.870 + #endif /* glibc 2.0 */
1.871 + ],[
1.872 + ],[
1.873 + glibc20_pthreads=yes
1.874 + ])
1.875 + AC_MSG_RESULT($glibc20_pthreads)
1.876 + esac
1.877 + fi
1.878 + fi
1.879 + LIBS="$ac_save_libs"
1.880 +
1.881 + AC_MSG_CHECKING(whether semun is defined in /usr/include/sys/sem.h)
1.882 + have_semun=no
1.883 + AC_TRY_COMPILE([
1.884 + #include <sys/types.h>
1.885 + #include <sys/sem.h>
1.886 + ],[
1.887 + union semun t;
1.888 + ],[
1.889 + have_semun=yes
1.890 + ])
1.891 + AC_MSG_RESULT($have_semun)
1.892 + if test x$have_semun = xyes; then
1.893 + CFLAGS="$CFLAGS -DHAVE_SEMUN"
1.894 + fi
1.895 +
1.896 + # See if we can use clone() on Linux directly
1.897 + use_clone=no
1.898 + if test x$enable_threads = xyes -a x$use_pthreads != xyes; then
1.899 + case "$target" in
1.900 + *-*-linux*)
1.901 + use_clone=yes
1.902 + ;;
1.903 + *)
1.904 + CFLAGS="$CFLAGS -DFORK_HACK"
1.905 + ;;
1.906 + esac
1.907 + fi
1.908 + AM_CONDITIONAL(USE_CLONE, test x$use_clone = xyes)
1.909 +}
1.910 +
1.911 +dnl Determine whether the compiler can produce Win32 executables
1.912 +CheckWIN32()
1.913 +{
1.914 + AC_MSG_CHECKING(Win32 compiler)
1.915 + have_win32_gcc=no
1.916 + AC_TRY_COMPILE([
1.917 + #include <windows.h>
1.918 + ],[
1.919 + ],[
1.920 + have_win32_gcc=yes
1.921 + ])
1.922 + AC_MSG_RESULT($have_win32_gcc)
1.923 + if test x$have_win32_gcc != xyes; then
1.924 + AC_MSG_ERROR([
1.925 +*** Your compiler ($CC) does not produce Win32 executables!
1.926 + ])
1.927 + fi
1.928 +
1.929 + dnl See if the user wants to redirect standard output to files
1.930 + AC_ARG_ENABLE(stdio-redirect,
1.931 +[ --enable-stdio-redirect Redirect STDIO to files on Win32 [default=yes]],
1.932 + , enable_stdio_redirect=yes)
1.933 + if test x$enable_stdio_redirect != xyes; then
1.934 + CFLAGS="$CFLAGS -DNO_STDIO_REDIRECT"
1.935 + fi
1.936 +}
1.937 +
1.938 +dnl Find the DirectX includes and libraries
1.939 +CheckDIRECTX()
1.940 +{
1.941 + AC_ARG_ENABLE(directx,
1.942 +[ --enable-directx use DirectX for Win32 audio/video [default=yes]],
1.943 + , enable_directx=yes)
1.944 + if test x$enable_directx = xyes; then
1.945 + AC_MSG_CHECKING(for DirectX headers and libraries)
1.946 + use_directx=no
1.947 + AC_TRY_COMPILE([
1.948 + #include "src/video/windx5/directx.h"
1.949 + ],[
1.950 + ],[
1.951 + use_directx=yes
1.952 + ])
1.953 + AC_MSG_RESULT($use_directx)
1.954 + fi
1.955 + AM_CONDITIONAL(USE_DIRECTX, test x$use_directx = xyes)
1.956 +
1.957 + CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video/wincommon"
1.958 + SYSTEM_LIBS="$SYSTEM_LIBS -luser32 -lgdi32 -lwinmm"
1.959 + VIDEO_SUBDIRS="$VIDEO_SUBDIRS wincommon"
1.960 + VIDEO_DRIVERS="$VIDEO_DRIVERS wincommon/libvideo_wincommon.la"
1.961 + # Enable the DIB driver
1.962 + CFLAGS="$CFLAGS -DENABLE_WINDIB"
1.963 + VIDEO_SUBDIRS="$VIDEO_SUBDIRS windib"
1.964 + VIDEO_DRIVERS="$VIDEO_DRIVERS windib/libvideo_windib.la"
1.965 + # See if we should enable the DirectX driver
1.966 + if test x$use_directx = xyes; then
1.967 + CFLAGS="$CFLAGS -DENABLE_DIRECTX"
1.968 + SYSTEM_LIBS="$SYSTEM_LIBS -ldxguid"
1.969 + VIDEO_SUBDIRS="$VIDEO_SUBDIRS windx5"
1.970 + VIDEO_DRIVERS="$VIDEO_DRIVERS windx5/libvideo_windx5.la"
1.971 + fi
1.972 +}
1.973 +
1.974 +dnl Set up the BWindow video driver on BeOS
1.975 +CheckBWINDOW()
1.976 +{
1.977 + CFLAGS="$CFLAGS -DENABLE_BWINDOW"
1.978 + VIDEO_SUBDIRS="$VIDEO_SUBDIRS bwindow"
1.979 + VIDEO_DRIVERS="$VIDEO_DRIVERS bwindow/libvideo_bwindow.la"
1.980 +}
1.981 +
1.982 +dnl Set up the Mac toolbox video driver for Mac OS 7-9
1.983 +CheckTOOLBOX()
1.984 +{
1.985 + VIDEO_SUBDIRS="$VIDEO_SUBDIRS maccommon"
1.986 + VIDEO_DRIVERS="$VIDEO_DRIVERS maccommon/libvideo_maccommon.la"
1.987 + VIDEO_SUBDIRS="$VIDEO_SUBDIRS macrom"
1.988 + VIDEO_DRIVERS="$VIDEO_DRIVERS macrom/libvideo_macrom.la"
1.989 +}
1.990 +
1.991 +dnl Set up the Mac toolbox video driver for Mac OS X
1.992 +CheckCARBON()
1.993 +{
1.994 + # "MACOSX" is not an official definition, but it's commonly
1.995 + # accepted as a way to differentiate between what runs on X
1.996 + # and what runs on older Macs - while in theory "Carbon" defns
1.997 + # are consistent between the two, in practice Carbon is still
1.998 + # changing. -sts Aug 2000
1.999 + mac_autoconf_target_workaround="MAC"
1.1000 + CFLAGS="$CFLAGS -I/System/Library/Frameworks/Carbon.framework/Headers \
1.1001 + -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"
1.1002 + VIDEO_SUBDIRS="$VIDEO_SUBDIRS maccommon"
1.1003 + VIDEO_DRIVERS="$VIDEO_DRIVERS maccommon/libvideo_maccommon.la"
1.1004 + VIDEO_SUBDIRS="$VIDEO_SUBDIRS macrom"
1.1005 + VIDEO_DRIVERS="$VIDEO_DRIVERS macrom/libvideo_macrom.la"
1.1006 +}
1.1007 +
1.1008 +dnl Set up the kernel statistics library for Solaris
1.1009 +CheckKSTAT()
1.1010 +{
1.1011 + CFLAGS="$CFLAGS -DHAVE_KSTAT"
1.1012 + SYSTEM_LIBS="$SYSTEM_LIBS -lkstat"
1.1013 +}
1.1014 +
1.1015 +case "$target" in
1.1016 + *-*-linux*)
1.1017 + ARCH=linux
1.1018 + CheckNASM
1.1019 + CheckOSS
1.1020 + CheckALSA
1.1021 + CheckARTSC
1.1022 + CheckESD
1.1023 + CheckNAS
1.1024 + CheckX11
1.1025 + CheckDGA
1.1026 + CheckFBCON
1.1027 + CheckGGI
1.1028 + CheckSVGA
1.1029 + CheckAAlib
1.1030 + CheckOpenGL
1.1031 + CheckInputEvents
1.1032 + CheckPTHREAD
1.1033 + # Set up files for the main() stub
1.1034 + COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1.1035 + # Set up files for the audio library
1.1036 + # We use the OSS and ALSA API's, not the Sun audio API
1.1037 + #if test x$enable_audio = xyes; then
1.1038 + # AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1.1039 + # AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1.1040 + #fi
1.1041 + # Set up files for the joystick library
1.1042 + if test x$enable_joystick = xyes; then
1.1043 + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS linux"
1.1044 + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS linux/libjoystick_linux.la"
1.1045 + fi
1.1046 + # Set up files for the cdrom library
1.1047 + if test x$enable_cdrom = xyes; then
1.1048 + COPY_ARCH_SRC(src/cdrom, linux, SDL_syscdrom.c)
1.1049 + fi
1.1050 + # Set up files for the thread library
1.1051 + if test x$enable_threads = xyes; then
1.1052 + if test x$use_pthreads != xyes; then
1.1053 + COPY_ARCH_SRC(src/thread, linux, clone.S)
1.1054 + fi
1.1055 + COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1.1056 + COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1.1057 + if test x$use_pthreads = xyes -a x$enable_pthread_sem != xyes; then
1.1058 + COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1.1059 + else
1.1060 + COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1.1061 + fi
1.1062 + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1.1063 + if test x$glibc20_pthreads = xyes; then
1.1064 + COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
1.1065 + COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
1.1066 + COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1.1067 + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1.1068 + else
1.1069 + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1.1070 + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1.1071 + COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1.1072 + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1.1073 + fi
1.1074 + fi
1.1075 + # Set up files for the timer library
1.1076 + if test x$enable_timers = xyes; then
1.1077 + COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1.1078 + fi
1.1079 + ;;
1.1080 + *-*-bsdi*)
1.1081 + ARCH=bsdi
1.1082 + CheckNASM
1.1083 + CheckOSS
1.1084 + CheckNAS
1.1085 + CheckX11
1.1086 + CheckDGA
1.1087 + CheckSVGA
1.1088 + CheckAAlib
1.1089 + CheckOpenGL
1.1090 + CheckPTHREAD
1.1091 + # Set up files for the main() stub
1.1092 + COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1.1093 + # Set up files for the joystick library
1.1094 + # (No joystick support yet)
1.1095 + if test x$enable_joystick = xyes; then
1.1096 + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1.1097 + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1.1098 + fi
1.1099 + # Set up files for the cdrom library
1.1100 + # (No cdrom support yet)
1.1101 + if test x$enable_cdrom = xyes; then
1.1102 + COPY_ARCH_SRC(src/cdrom, dummy, SDL_syscdrom.c)
1.1103 + fi
1.1104 + # Set up files for the thread library
1.1105 + if test x$enable_threads = xyes; then
1.1106 + COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1.1107 + COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1.1108 + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1.1109 + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1.1110 + COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1.1111 + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1.1112 + COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1.1113 + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1.1114 + fi
1.1115 + # Set up files for the timer library
1.1116 + if test x$enable_timers = xyes; then
1.1117 + COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1.1118 + fi
1.1119 + ;;
1.1120 + *-*-freebsd*)
1.1121 + ARCH=freebsd
1.1122 + CheckNASM
1.1123 + CheckOSS
1.1124 + CheckARTSC
1.1125 + CheckESD
1.1126 + CheckNAS
1.1127 + CheckX11
1.1128 + CheckDGA
1.1129 + CheckSVGA
1.1130 + CheckAAlib
1.1131 + CheckOpenGL
1.1132 + CheckPTHREAD
1.1133 + # Set up files for the main() stub
1.1134 + COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1.1135 + # Set up files for the audio library
1.1136 + # We use the OSS and ALSA API's, not the Sun audio API
1.1137 + #if test x$enable_audio = xyes; then
1.1138 + # AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1.1139 + # AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1.1140 + #fi
1.1141 + # Set up files for the joystick library
1.1142 + # (No joystick support yet)
1.1143 + if test x$enable_joystick = xyes; then
1.1144 + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1.1145 + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1.1146 + fi
1.1147 + # Set up files for the cdrom library
1.1148 + if test x$enable_cdrom = xyes; then
1.1149 + COPY_ARCH_SRC(src/cdrom, freebsd, SDL_syscdrom.c)
1.1150 + fi
1.1151 + # Set up files for the thread library
1.1152 + if test x$enable_threads = xyes; then
1.1153 + COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1.1154 + COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1.1155 + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1.1156 + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1.1157 + if test x$use_pthreads = xyes -a x$enable_pthread_sem != xyes; then
1.1158 + COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1.1159 + else
1.1160 + COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1.1161 + fi
1.1162 + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1.1163 + COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1.1164 + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1.1165 + fi
1.1166 + # Set up files for the timer library
1.1167 + if test x$enable_timers = xyes; then
1.1168 + COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1.1169 + fi
1.1170 + ;;
1.1171 + *-*-netbsd*)
1.1172 + ARCH=netbsd
1.1173 + CheckNASM
1.1174 + CheckOSS
1.1175 + CheckARTSC
1.1176 + CheckESD
1.1177 + CheckNAS
1.1178 + CheckX11
1.1179 + CheckAAlib
1.1180 + CheckOpenGL
1.1181 + CheckPTHREAD
1.1182 + # Set up files for the main() stub
1.1183 + COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1.1184 + # Set up files for the audio library
1.1185 + if test x$enable_audio = xyes; then
1.1186 + AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1.1187 + AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1.1188 + fi
1.1189 + # Set up files for the joystick library
1.1190 + # (No joystick support yet)
1.1191 + if test x$enable_joystick = xyes; then
1.1192 + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1.1193 + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1.1194 + fi
1.1195 + # Set up files for the cdrom library
1.1196 + if test x$enable_cdrom = xyes; then
1.1197 + COPY_ARCH_SRC(src/cdrom, openbsd, SDL_syscdrom.c)
1.1198 + fi
1.1199 + # Set up files for the thread library
1.1200 + if test x$enable_threads = xyes; then
1.1201 + COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1.1202 + COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1.1203 + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1.1204 + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1.1205 + COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1.1206 + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1.1207 + COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1.1208 + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1.1209 + fi
1.1210 + # Set up files for the timer library
1.1211 + if test x$enable_timers = xyes; then
1.1212 + COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1.1213 + fi
1.1214 + # NetBSD does not define "unix"
1.1215 + CFLAGS="$CFLAGS -Dunix"
1.1216 + ;;
1.1217 + *-*-openbsd*)
1.1218 + ARCH=openbsd
1.1219 + CheckNASM
1.1220 + CheckOSS
1.1221 + CheckARTSC
1.1222 + CheckESD
1.1223 + CheckNAS
1.1224 + CheckX11
1.1225 + CheckAAlib
1.1226 + CheckOpenGL
1.1227 + CheckPTHREAD
1.1228 + # Set up files for the main() stub
1.1229 + COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1.1230 + # Set up files for the audio library
1.1231 + if test x$enable_audio = xyes; then
1.1232 + AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1.1233 + AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1.1234 + fi
1.1235 + # Set up files for the joystick library
1.1236 + # (No joystick support yet)
1.1237 + if test x$enable_joystick = xyes; then
1.1238 + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1.1239 + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1.1240 + fi
1.1241 + # Set up files for the cdrom library
1.1242 + if test x$enable_cdrom = xyes; then
1.1243 + COPY_ARCH_SRC(src/cdrom, openbsd, SDL_syscdrom.c)
1.1244 + fi
1.1245 + # Set up files for the thread library
1.1246 + if test x$enable_threads = xyes; then
1.1247 + COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1.1248 + COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1.1249 + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1.1250 + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1.1251 + if test x$use_pthreads = xyes -a x$enable_pthread_sem != xyes; then
1.1252 + COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1.1253 + else
1.1254 + COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1.1255 + fi
1.1256 + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1.1257 + COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1.1258 + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1.1259 + fi
1.1260 + # Set up files for the timer library
1.1261 + if test x$enable_timers = xyes; then
1.1262 + COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1.1263 + fi
1.1264 + ;;
1.1265 + *-*-sysv5*)
1.1266 + ARCH=sysv5
1.1267 + CheckNASM
1.1268 + CheckOSS
1.1269 + CheckARTSC
1.1270 + CheckESD
1.1271 + CheckNAS
1.1272 + CheckX11
1.1273 + CheckAAlib
1.1274 + CheckOpenGL
1.1275 + CheckPTHREAD
1.1276 + CheckKSTAT
1.1277 + # Set up files for the main() stub
1.1278 + COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1.1279 + # Set up files for the audio library
1.1280 + if test x$enable_audio = xyes; then
1.1281 + AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1.1282 + AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1.1283 + fi
1.1284 + # Set up files for the joystick library
1.1285 + # (No joystick support yet)
1.1286 + if test x$enable_joystick = xyes; then
1.1287 + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1.1288 + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1.1289 + fi
1.1290 + # Set up files for the cdrom library
1.1291 + if test x$enable_cdrom = xyes; then
1.1292 + COPY_ARCH_SRC(src/cdrom, dummy, SDL_syscdrom.c)
1.1293 + fi
1.1294 + # Set up files for the thread library
1.1295 + if test x$enable_threads = xyes; then
1.1296 + COPY_ARCH_SRC(src/thread, generic, SDL_systhread.c)
1.1297 + COPY_ARCH_SRC(src/thread, generic, SDL_systhread_c.h)
1.1298 + COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
1.1299 + COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
1.1300 + COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1.1301 + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1.1302 + COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1.1303 + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1.1304 + fi
1.1305 + # Set up files for the timer library
1.1306 + if test x$enable_timers = xyes; then
1.1307 + COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1.1308 + fi
1.1309 + ;;
1.1310 + *-*-solaris*)
1.1311 + ARCH=solaris
1.1312 + CheckNASM
1.1313 + CheckARTSC
1.1314 + CheckESD
1.1315 + CheckNAS
1.1316 + CheckX11
1.1317 + CheckAAlib
1.1318 + CheckOpenGL
1.1319 + CheckPTHREAD
1.1320 + CheckKSTAT
1.1321 + # Set up files for the main() stub
1.1322 + COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1.1323 + # Set up files for the audio library
1.1324 + if test x$enable_audio = xyes; then
1.1325 + AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1.1326 + AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1.1327 + fi
1.1328 + # Set up files for the joystick library
1.1329 + # (No joystick support yet)
1.1330 + if test x$enable_joystick = xyes; then
1.1331 + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1.1332 + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1.1333 + fi
1.1334 + # Set up files for the cdrom library
1.1335 + if test x$enable_cdrom = xyes; then
1.1336 + COPY_ARCH_SRC(src/cdrom, linux, SDL_syscdrom.c)
1.1337 + fi
1.1338 + # Set up files for the thread library
1.1339 + if test x$enable_threads = xyes; then
1.1340 + COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1.1341 + COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1.1342 + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1.1343 + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1.1344 + COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1.1345 + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1.1346 + COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1.1347 + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1.1348 + fi
1.1349 + # Set up files for the timer library
1.1350 + if test x$enable_timers = xyes; then
1.1351 + COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1.1352 + fi
1.1353 + ;;
1.1354 + *-*-irix*)
1.1355 + ARCH=irix
1.1356 + CheckNAS
1.1357 + CheckX11
1.1358 + CheckAAlib
1.1359 + CheckOpenGL
1.1360 + CheckPTHREAD
1.1361 + # Set up files for the main() stub
1.1362 + COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1.1363 + # Set up files for the audio library
1.1364 + if test x$enable_audio = xyes; then
1.1365 + AUDIO_SUBDIRS="$AUDIO_SUBDIRS dmedia"
1.1366 + AUDIO_DRIVERS="$AUDIO_DRIVERS dmedia/libaudio_dmedia.la"
1.1367 + LIBS="$LIBS -laudio"
1.1368 + fi
1.1369 + # Set up files for the joystick library
1.1370 + # (No joystick support yet)
1.1371 + if test x$enable_joystick = xyes; then
1.1372 + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1.1373 + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1.1374 + fi
1.1375 + # Set up files for the cdrom library
1.1376 + # (No CD-ROM support yet)
1.1377 + if test x$enable_cdrom = xyes; then
1.1378 + COPY_ARCH_SRC(src/cdrom, dummy, SDL_syscdrom.c)
1.1379 + fi
1.1380 + # Set up files for the thread library
1.1381 + if test x$enable_threads = xyes; then
1.1382 + if test x$use_pthreads = xyes; then
1.1383 + COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1.1384 + COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1.1385 + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1.1386 + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1.1387 + if test x$enable_pthread_sem != xyes; then
1.1388 + COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1.1389 + else
1.1390 + COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1.1391 + fi
1.1392 + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1.1393 + COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1.1394 + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1.1395 + else
1.1396 + COPY_ARCH_SRC(src/thread, irix, SDL_systhread.c)
1.1397 + COPY_ARCH_SRC(src/thread, irix, SDL_systhread_c.h)
1.1398 + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1.1399 + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1.1400 + COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1.1401 + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1.1402 + COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1.1403 + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1.1404 + fi
1.1405 + fi
1.1406 + # Set up files for the timer library
1.1407 + if test x$enable_timers = xyes; then
1.1408 + COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1.1409 + fi
1.1410 + ;;
1.1411 + *-*-hpux*)
1.1412 + ARCH=hpux
1.1413 + CheckNAS
1.1414 + CheckX11
1.1415 + CheckGGI
1.1416 + CheckAAlib
1.1417 + CheckOpenGL
1.1418 + CheckPTHREAD
1.1419 + # Set up files for the main() stub
1.1420 + COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1.1421 + # Set up files for the audio library
1.1422 + if test x$enable_audio = xyes; then
1.1423 + AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1.1424 + AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1.1425 + fi
1.1426 + # Set up files for the joystick library
1.1427 + # (No joystick support yet)
1.1428 + if test x$enable_joystick = xyes; then
1.1429 + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1.1430 + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1.1431 + fi
1.1432 + # Set up files for the cdrom library
1.1433 + # (No CD-ROM support yet)
1.1434 + if test x$enable_cdrom = xyes; then
1.1435 + COPY_ARCH_SRC(src/cdrom, dummy, SDL_syscdrom.c)
1.1436 + fi
1.1437 + # Set up files for the thread library
1.1438 + if test x$enable_threads = xyes; then
1.1439 + COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1.1440 + COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1.1441 + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1.1442 + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1.1443 + COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1.1444 + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1.1445 + COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1.1446 + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1.1447 + fi
1.1448 + # Set up files for the timer library
1.1449 + if test x$enable_timers = xyes; then
1.1450 + COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1.1451 + fi
1.1452 + ;;
1.1453 + *-*-aix*)
1.1454 + ARCH=aix
1.1455 + CheckNAS
1.1456 + CheckX11
1.1457 + CheckGGI
1.1458 + CheckAAlib
1.1459 + CheckOpenGL
1.1460 + CheckPTHREAD
1.1461 + # Set up files for the main() stub
1.1462 + COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1.1463 + # Set up files for the audio library
1.1464 + if test x$enable_audio = xyes; then
1.1465 + AUDIO_SUBDIRS="$AUDIO_SUBDIRS paudio"
1.1466 + AUDIO_DRIVERS="$AUDIO_DRIVERS paudio/libaudio_paudio.la"
1.1467 + fi
1.1468 + # Set up files for the joystick library
1.1469 + # (No joystick support yet)
1.1470 + if test x$enable_joystick = xyes; then
1.1471 + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1.1472 + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1.1473 + fi
1.1474 + # Set up files for the cdrom library
1.1475 + if test x$enable_cdrom = xyes; then
1.1476 + COPY_ARCH_SRC(src/cdrom, aix, SDL_syscdrom.c)
1.1477 + fi
1.1478 + # Set up files for the thread library
1.1479 + if test x$enable_threads = xyes; then
1.1480 + COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1.1481 + COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1.1482 + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1.1483 + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1.1484 + COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1.1485 + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1.1486 + COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1.1487 + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1.1488 + fi
1.1489 + # Set up files for the timer library
1.1490 + if test x$enable_timers = xyes; then
1.1491 + COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1.1492 + fi
1.1493 + ;;
1.1494 + *-*-osf*)
1.1495 + ARCH=osf
1.1496 + CheckNAS
1.1497 + CheckX11
1.1498 + CheckGGI
1.1499 + CheckAAlib
1.1500 + CheckOpenGL
1.1501 + CheckPTHREAD
1.1502 + # Set up files for the main() stub
1.1503 + COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1.1504 + # Set up files for the audio library
1.1505 + if test x$enable_audio = xyes; then
1.1506 + AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1.1507 + AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1.1508 + fi
1.1509 + # Set up files for the joystick library
1.1510 + # (No joystick support yet)
1.1511 + if test x$enable_joystick = xyes; then
1.1512 + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1.1513 + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1.1514 + fi
1.1515 + # Set up files for the cdrom library
1.1516 + # (No cdrom support yet)
1.1517 + if test x$enable_cdrom = xyes; then
1.1518 + COPY_ARCH_SRC(src/cdrom, dummy, SDL_syscdrom.c)
1.1519 + fi
1.1520 + # Set up files for the thread library
1.1521 + if test x$enable_threads = xyes; then
1.1522 + COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1.1523 + COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1.1524 + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1.1525 + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1.1526 + COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1.1527 + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1.1528 + COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1.1529 + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1.1530 + fi
1.1531 + # Set up files for the timer library
1.1532 + if test x$enable_timers = xyes; then
1.1533 + COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1.1534 + fi
1.1535 + ;;
1.1536 + *-*-qnx*)
1.1537 + ARCH=qnx
1.1538 + CheckNAS
1.1539 + CheckPHOTON
1.1540 + CheckX11
1.1541 + CheckOpenGL
1.1542 + CheckPTHREAD
1.1543 + # Set up files for the main() stub
1.1544 + COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1.1545 + # Set up files for the audio library
1.1546 + if test x$enable_audio = xyes; then
1.1547 + CFLAGS="$CFLAGS -DALSA_SUPPORT"
1.1548 + SYSTEM_LIBS="$SYSTEM_LIBS -lasound"
1.1549 + AUDIO_SUBDIRS="$AUDIO_SUBDIRS nto"
1.1550 + AUDIO_DRIVERS="$AUDIO_DRIVERS nto/libaudio_nto.la"
1.1551 + AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1.1552 + AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1.1553 + fi
1.1554 + # Set up files for the joystick library
1.1555 + if test x$enable_joystick = xyes; then
1.1556 + # (No joystick support yet)
1.1557 + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1.1558 + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1.1559 + fi
1.1560 + # Set up files for the cdrom library
1.1561 + if test x$enable_cdrom = xyes; then
1.1562 + COPY_ARCH_SRC(src/cdrom, qnx, SDL_syscdrom.c)
1.1563 + fi
1.1564 + # Set up files for the thread library
1.1565 + if test x$enable_threads = xyes; then
1.1566 + COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1.1567 + COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1.1568 + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1.1569 + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1.1570 + COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1.1571 + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1.1572 + COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1.1573 + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1.1574 + fi
1.1575 + # Set up files for the timer library
1.1576 + if test x$enable_timers = xyes; then
1.1577 + COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1.1578 + fi
1.1579 + ;;
1.1580 + *-*-cygwin* | *-*-mingw32*)
1.1581 + ARCH=win32
1.1582 + if test "$build" != "$target"; then # cross-compiling
1.1583 + # Default cross-compile location
1.1584 + ac_default_prefix=/usr/local/cross-tools/i386-mingw32msvc
1.1585 + else
1.1586 + # Look for the location of the tools and install there
1.1587 + ac_default_prefix=$BUILD_PREFIX
1.1588 + fi
1.1589 + CheckWIN32
1.1590 + CheckDIRECTX
1.1591 + CheckNASM
1.1592 + # Set up files for the main() stub
1.1593 + COPY_ARCH_SRC(src/main, win32, SDL_main.c)
1.1594 + # Set up files for the audio library
1.1595 + if test x$enable_audio = xyes; then
1.1596 + AUDIO_SUBDIRS="$AUDIO_SUBDIRS windib"
1.1597 + AUDIO_DRIVERS="$AUDIO_DRIVERS windib/libaudio_windib.la"
1.1598 + if test x$use_directx = xyes; then
1.1599 + AUDIO_SUBDIRS="$AUDIO_SUBDIRS windx5"
1.1600 + AUDIO_DRIVERS="$AUDIO_DRIVERS windx5/libaudio_windx5.la"
1.1601 + fi
1.1602 + fi
1.1603 + # Set up files for the joystick library
1.1604 + if test x$enable_joystick = xyes; then
1.1605 + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS win32"
1.1606 + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS win32/libjoystick_winmm.la"
1.1607 + fi
1.1608 + # Set up files for the cdrom library
1.1609 + if test x$enable_cdrom = xyes; then
1.1610 + COPY_ARCH_SRC(src/cdrom, win32, SDL_syscdrom.c)
1.1611 + fi
1.1612 + # Set up files for the thread library
1.1613 + if test x$enable_threads = xyes; then
1.1614 + COPY_ARCH_SRC(src/thread, win32, SDL_systhread.c)
1.1615 + COPY_ARCH_SRC(src/thread, win32, SDL_systhread_c.h)
1.1616 + COPY_ARCH_SRC(src/thread, win32, SDL_sysmutex.c)
1.1617 + COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
1.1618 + COPY_ARCH_SRC(src/thread, win32, SDL_syssem.c)
1.1619 + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1.1620 + COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1.1621 + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1.1622 + fi
1.1623 + # Set up files for the timer library
1.1624 + if test x$enable_timers = xyes; then
1.1625 + COPY_ARCH_SRC(src/timer, win32, SDL_systimer.c)
1.1626 + fi
1.1627 + # The Win32 platform requires special setup
1.1628 + SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
1.1629 + SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows"
1.1630 + ;;
1.1631 + *-*-beos*)
1.1632 + ARCH=beos
1.1633 + ac_default_prefix=/boot/develop/tools/gnupro
1.1634 + CheckNASM
1.1635 + CheckBWINDOW
1.1636 + CheckBeGL
1.1637 + # Set up files for the main() stub
1.1638 + COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1.1639 + COPY_ARCH_SRC(src/main, beos, SDL_BeApp.cc)
1.1640 + COPY_ARCH_SRC(src/main, beos, SDL_BeApp.h)
1.1641 + # Set up files for the audio library
1.1642 + if test x$enable_audio = xyes; then
1.1643 + AUDIO_SUBDIRS="$AUDIO_SUBDIRS baudio"
1.1644 + AUDIO_DRIVERS="$AUDIO_DRIVERS baudio/libaudio_baudio.la"
1.1645 + fi
1.1646 + # Set up files for the joystick library
1.1647 + if test x$enable_joystick = xyes; then
1.1648 + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS beos"
1.1649 + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS beos/libjoystick_beos.la"
1.1650 + fi
1.1651 + # Set up files for the cdrom library
1.1652 + if test x$enable_cdrom = xyes; then
1.1653 + COPY_ARCH_SRC(src/cdrom, beos, SDL_syscdrom.c)
1.1654 + fi
1.1655 + # Set up files for the thread library
1.1656 + if test x$enable_threads = xyes; then
1.1657 + COPY_ARCH_SRC(src/thread, beos, SDL_systhread.c)
1.1658 + COPY_ARCH_SRC(src/thread, beos, SDL_systhread_c.h)
1.1659 + COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
1.1660 + COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
1.1661 + COPY_ARCH_SRC(src/thread, beos, SDL_syssem.c)
1.1662 + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1.1663 + COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1.1664 + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1.1665 + fi
1.1666 + # Set up files for the timer library
1.1667 + if test x$enable_timers = xyes; then
1.1668 + COPY_ARCH_SRC(src/timer, beos, SDL_systimer.c)
1.1669 + fi
1.1670 + # The BeOS platform requires special libraries
1.1671 + SYSTEM_LIBS="$SYSTEM_LIBS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
1.1672 + ;;
1.1673 + *-*-macos*)
1.1674 + # This would be used if cross-compiling to MacOS 9. No way to
1.1675 + # use it at present, but Apple is working on a X-to-9 compiler
1.1676 + # for which this case would be handy.
1.1677 + ARCH=macos
1.1678 + CheckTOOLBOX
1.1679 + CheckMacGL
1.1680 + # Set up files for the main() stub
1.1681 + COPY_ARCH_SRC(src/main, macos, SDL_main.c)
1.1682 + # Set up files for the audio library
1.1683 + if test x$enable_audio = xyes; then
1.1684 + AUDIO_SUBDIRS="$AUDIO_SUBDIRS macrom"
1.1685 + AUDIO_DRIVERS="$AUDIO_DRIVERS macrom/libaudio_macrom.la"
1.1686 + fi
1.1687 + # Set up files for the joystick library
1.1688 + if test x$enable_joystick = xyes; then
1.1689 + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS macos"
1.1690 + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS macos/libjoystick_macos.la"
1.1691 + fi
1.1692 + # Set up files for the cdrom library
1.1693 + if test x$enable_cdrom = xyes; then
1.1694 + COPY_ARCH_SRC(src/cdrom, macos, SDL_syscdrom.c)
1.1695 + fi
1.1696 + # Set up files for the thread library
1.1697 + if test x$enable_threads = xyes; then
1.1698 + COPY_ARCH_SRC(src/thread, macos, SDL_systhread.c)
1.1699 + COPY_ARCH_SRC(src/thread, macos, SDL_systhread_c.h)
1.1700 + COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
1.1701 + COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
1.1702 + COPY_ARCH_SRC(src/thread, macos, SDL_syssem.c)
1.1703 + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1.1704 + COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1.1705 + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1.1706 + fi
1.1707 + # Set up files for the timer library
1.1708 + if test x$enable_timers = xyes; then
1.1709 + COPY_ARCH_SRC(src/timer, macos, SDL_systimer.c)
1.1710 + fi
1.1711 + # The MacOS platform requires special setup
1.1712 + SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
1.1713 + SDL_LIBS="-lSDLmain $SDL_LIBS"
1.1714 + ;;
1.1715 + *-*-darwin* )
1.1716 + # Strictly speaking, we want "Mac OS X", not "Darwin", which is
1.1717 + # just the OS X kernel sans upper layers like Carbon. But
1.1718 + # config.guess comes back with "darwin", so go with the flow.
1.1719 + ARCH=macos
1.1720 + CheckCARBON
1.1721 + CheckMacGL
1.1722 + CheckPTHREAD
1.1723 + # Set up files for the main() stub
1.1724 + # COPY_ARCH_SRC(src/main, macos, SDL_main.c)
1.1725 + COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1.1726 + # Set up files for the audio library
1.1727 + if test x$enable_audio = xyes; then
1.1728 + AUDIO_SUBDIRS="$AUDIO_SUBDIRS macrom"
1.1729 + AUDIO_DRIVERS="$AUDIO_DRIVERS macrom/libaudio_macrom.la"
1.1730 + fi
1.1731 + # Set up files for the joystick library
1.1732 + if test x$enable_joystick = xyes; then
1.1733 + JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1.1734 + JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1.1735 + fi
1.1736 + # Set up files for the cdrom library
1.1737 + if test x$enable_cdrom = xyes; then
1.1738 + COPY_ARCH_SRC(src/cdrom, dummy, SDL_syscdrom.c)
1.1739 + fi
1.1740 + # Set up files for the thread library
1.1741 + if test x$enable_threads = xyes; then
1.1742 + COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1.1743 + COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1.1744 + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1.1745 + COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1.1746 + if test x$use_pthreads = xyes -a x$enable_pthread_sem != xyes; then
1.1747 + COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1.1748 + else
1.1749 + COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1.1750 + fi
1.1751 + COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1.1752 + COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1.1753 + COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1.1754 + fi
1.1755 + # Set up files for the timer library
1.1756 + if test x$enable_timers = xyes; then
1.1757 + COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1.1758 + fi
1.1759 + # The MacOS X platform requires special setup
1.1760 + SDL_CFLAGS="$SDL_CFLAGS -F/System/Library/Frameworks/Carbon.framework"
1.1761 + SDL_LIBS="$SDL_LIBS -framework Carbon"
1.1762 + ;;
1.1763 + *)
1.1764 + AC_MSG_ERROR(Unsupported target: Please add to configure.in)
1.1765 + ;;
1.1766 +esac
1.1767 +AC_SUBST(ARCH)
1.1768 +
1.1769 +# Set the conditional variables for this target
1.1770 +AM_CONDITIONAL(TARGET_LINUX, test $ARCH = linux)
1.1771 +AM_CONDITIONAL(TARGET_SOLARIS, test $ARCH = solaris)
1.1772 +AM_CONDITIONAL(TARGET_IRIX, test $ARCH = irix)
1.1773 +AM_CONDITIONAL(TARGET_BSDI, test $ARCH = bsdi)
1.1774 +AM_CONDITIONAL(TARGET_FREEBSD, test $ARCH = freebsd)
1.1775 +AM_CONDITIONAL(TARGET_OPENBSD, test $ARCH = openbsd)
1.1776 +AM_CONDITIONAL(TARGET_AIX, test $ARCH = aix)
1.1777 +AM_CONDITIONAL(TARGET_WIN32, test $ARCH = win32)
1.1778 +AM_CONDITIONAL(TARGET_BEOS, test $ARCH = beos)
1.1779 +AM_CONDITIONAL(TARGET_MACOS, test $ARCH = macos)
1.1780 +
1.1781 +# Set conditional variables for shared and static library selection.
1.1782 +# These are not used in any Makefile.am but in sdl-config.in.
1.1783 +AM_CONDITIONAL([ENABLE_SHARED], [test "$enable_shared" = yes])
1.1784 +AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = yes])
1.1785 +
1.1786 +# Set runtime shared library paths as needed
1.1787 +
1.1788 +if test $ARCH = linux -o $ARCH = freebsd -o $ARCH = bsdi; then
1.1789 + SDL_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib"
1.1790 +fi
1.1791 +
1.1792 +if test $ARCH = solaris; then
1.1793 + SDL_RLD_FLAGS="-R\${exec_prefix}/lib"
1.1794 +fi
1.1795 +
1.1796 +dnl Output the video drivers we use
1.1797 +if test x$enable_video = xtrue; then
1.1798 + if test "$VIDEO_SUBDIRS" = ""; then
1.1799 + AC_MSG_ERROR(*** No video drivers are enabled!)
1.1800 + fi
1.1801 +fi
1.1802 +AC_SUBST(AUDIO_SUBDIRS)
1.1803 +AC_SUBST(AUDIO_DRIVERS)
1.1804 +AC_SUBST(VIDEO_SUBDIRS)
1.1805 +AC_SUBST(VIDEO_DRIVERS)
1.1806 +AC_SUBST(JOYSTICK_SUBDIRS)
1.1807 +AC_SUBST(JOYSTICK_DRIVERS)
1.1808 +AC_SUBST(SDL_EXTRADIRS)
1.1809 +AC_SUBST(SDL_EXTRALIBS)
1.1810 +AC_SUBST(SYSTEM_LIBS)
1.1811 +
1.1812 +dnl Expand the cflags and libraries needed by apps using SDL
1.1813 +AC_SUBST(SDL_CFLAGS)
1.1814 +AC_SUBST(SDL_LIBS)
1.1815 +AC_SUBST(SDL_RLD_FLAGS)
1.1816 +
1.1817 +dnl Expand the libraries needed for static linking
1.1818 +AC_SUBST(SYSTEM_LIBS)
1.1819 +dnl Expand the include directories for building SDL
1.1820 +CFLAGS="$CFLAGS -I\$(top_srcdir)/include"
1.1821 +CFLAGS="$CFLAGS -I\$(top_srcdir)/include/SDL"
1.1822 +CFLAGS="$CFLAGS -I\$(top_srcdir)/src -I\$(top_srcdir)/src/$ARCH"
1.1823 +CFLAGS="$CFLAGS -I\$(top_srcdir)/src/main"
1.1824 +CFLAGS="$CFLAGS -I\$(top_srcdir)/src/audio"
1.1825 +CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video"
1.1826 +CFLAGS="$CFLAGS -I\$(top_srcdir)/src/events"
1.1827 +CFLAGS="$CFLAGS -I\$(top_srcdir)/src/joystick"
1.1828 +CFLAGS="$CFLAGS -I\$(top_srcdir)/src/cdrom"
1.1829 +CFLAGS="$CFLAGS -I\$(top_srcdir)/src/thread"
1.1830 +CFLAGS="$CFLAGS -I\$(top_srcdir)/src/timer"
1.1831 +CFLAGS="$CFLAGS -I\$(top_srcdir)/src/endian"
1.1832 +CFLAGS="$CFLAGS -I\$(top_srcdir)/src/file"
1.1833 +CXXFLAGS="$CFLAGS"
1.1834 +
1.1835 +# Finally create all the generated files
1.1836 +dnl Important: Any directory that you want to be in the distcheck should
1.1837 +dnl have a file listed here, so that configure generates the
1.1838 +dnl subdirectories on the build target.
1.1839 +AC_OUTPUT([
1.1840 +Makefile
1.1841 +docs/Makefile
1.1842 +docs/html/Makefile
1.1843 +docs/man3/Makefile
1.1844 +include/Makefile
1.1845 +src/Makefile
1.1846 +src/main/Makefile
1.1847 +src/audio/Makefile
1.1848 +src/audio/alsa/Makefile
1.1849 +src/audio/arts/Makefile
1.1850 +src/audio/baudio/Makefile
1.1851 +src/audio/dma/Makefile
1.1852 +src/audio/dmedia/Makefile
1.1853 +src/audio/dsp/Makefile
1.1854 +src/audio/esd/Makefile
1.1855 +src/audio/macrom/Makefile
1.1856 +src/audio/nas/Makefile
1.1857 +src/audio/nto/Makefile
1.1858 +src/audio/paudio/Makefile
1.1859 +src/audio/sun/Makefile
1.1860 +src/audio/ums/Makefile
1.1861 +src/audio/windib/Makefile
1.1862 +src/audio/windx5/Makefile
1.1863 +src/video/Makefile
1.1864 +src/video/cybergfx/Makefile
1.1865 +src/video/x11/Makefile
1.1866 +src/video/dga/Makefile
1.1867 +src/video/fbcon/Makefile
1.1868 +src/video/ggi/Makefile
1.1869 +src/video/maccommon/Makefile
1.1870 +src/video/macdsp/Makefile
1.1871 +src/video/macrom/Makefile
1.1872 +src/video/svga/Makefile
1.1873 +src/video/aalib/Makefile
1.1874 +src/video/wincommon/Makefile
1.1875 +src/video/windib/Makefile
1.1876 +src/video/windx5/Makefile
1.1877 +src/video/bwindow/Makefile
1.1878 +src/video/photon/Makefile
1.1879 +src/events/Makefile
1.1880 +src/joystick/Makefile
1.1881 +src/joystick/beos/Makefile
1.1882 +src/joystick/dummy/Makefile
1.1883 +src/joystick/linux/Makefile
1.1884 +src/joystick/macos/Makefile
1.1885 +src/joystick/win32/Makefile
1.1886 +src/cdrom/Makefile
1.1887 +src/thread/Makefile
1.1888 +src/timer/Makefile
1.1889 +src/endian/Makefile
1.1890 +src/file/Makefile
1.1891 +src/hermes/Makefile
1.1892 +sdl-config
1.1893 +SDL.spec
1.1894 +], [chmod +x sdl-config])