1 dnl Process this file with autoconf to produce a configure script.
4 dnl Set various version strings - taken gratefully from the GTk sources
7 # Edit include/SDL/SDL_version.h and change the version, then:
8 # SDL_MICRO_VERSION += 1;
9 # SDL_INTERFACE_AGE += 1;
10 # SDL_BINARY_AGE += 1;
11 # if any functions have been added, set SDL_INTERFACE_AGE to 0.
12 # if backwards compatibility has been broken,
13 # set SDL_BINARY_AGE and SDL_INTERFACE_AGE to 0.
20 SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
22 AC_SUBST(SDL_MAJOR_VERSION)
23 AC_SUBST(SDL_MINOR_VERSION)
24 AC_SUBST(SDL_MICRO_VERSION)
25 AC_SUBST(SDL_INTERFACE_AGE)
26 AC_SUBST(SDL_BINARY_AGE)
30 LT_RELEASE=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION
31 LT_CURRENT=`expr $SDL_MICRO_VERSION - $SDL_INTERFACE_AGE`
32 LT_REVISION=$SDL_INTERFACE_AGE
33 LT_AGE=`expr $SDL_BINARY_AGE - $SDL_INTERFACE_AGE`
40 dnl Detect the canonical host and target build environment
43 dnl Setup for automake
44 AM_INIT_AUTOMAKE(SDL, $SDL_VERSION)
63 AM_CONDITIONAL([am__fastdepOBJC], false)
65 dnl The alpha architecture needs special flags for binary portability
68 if test x$ac_cv_prog_gcc = xyes; then
69 CFLAGS="$CFLAGS -mcpu=ev4 -Wa,-mall"
74 dnl Add compiler-specific optimization flags
76 dnl See if the user wants aggressive optimizations of the code
78 [ --enable-debug Disable aggressive optimizations [default=yes]],
80 if test x$enable_debug != xyes; then
81 if test x$ac_cv_prog_gcc = xyes; then
82 CFLAGS="$CFLAGS -fexpensive-optimizations"
83 # Ack! This breaks the MMX YV12 conversion on gcc 2.95.2
84 # CFLAGS="$CFLAGS -fomit-frame-pointer"
88 if test x$ac_cv_prog_gcc = xyes; then
89 CFLAGS="$CFLAGS -march=i486"
93 if test x$ac_cv_prog_gcc = xyes; then
94 CFLAGS="$CFLAGS -march=pentium -mcpu=pentiumpro"
98 if test x$ac_cv_prog_gcc != xyes; then
99 CFLAGS="-g3 -fast -arch host"
105 dnl Add verbose warnings by default, and allow ANSI compliance checking
106 AC_ARG_ENABLE(strict-ansi,
107 [ --enable-strict-ansi Enable strict ANSI compliance build [default=no]],
108 , enable_strict_ansi=no)
109 if test x$ac_cv_prog_gcc = xyes; then
110 CFLAGS="$CFLAGS -Wall"
111 if test x$enable_strict_ansi = xyes; then
112 CFLAGS="$CFLAGS -ansi -pedantic -D_XOPEN_SOURCE"
116 dnl Initialize the compiler and linker flags for SDL applications
121 dnl Add the math library for the new gamma correction support
124 *-*-cygwin* | *-*-mingw32*)
137 SYSTEM_LIBS="$SYSTEM_LIBS $MATHLIB"
139 dnl Enable/disable various subsystems of the SDL library
142 [ --enable-audio Enable the audio subsystem [default=yes]],
144 if test x$enable_audio = xyes; then
145 SDL_EXTRADIRS="$SDL_EXTRADIRS audio"
146 SDL_EXTRALIBS="$SDL_EXTRALIBS audio/libaudio.la"
148 CFLAGS="$CFLAGS -DDISABLE_AUDIO"
151 [ --enable-video Enable the video subsystem [default=yes]],
153 if test x$enable_video = xyes; then
154 SDL_EXTRADIRS="$SDL_EXTRADIRS video"
155 SDL_EXTRALIBS="$SDL_EXTRALIBS video/libvideo.la"
157 CFLAGS="$CFLAGS -DDISABLE_VIDEO"
159 AC_ARG_ENABLE(events,
160 [ --enable-events Enable the events subsystem [default=yes]],
162 if test x$enable_video = xyes -a x$enable_events = xyes; then
163 SDL_EXTRADIRS="$SDL_EXTRADIRS events"
164 SDL_EXTRALIBS="$SDL_EXTRALIBS events/libevents.la"
166 CFLAGS="$CFLAGS -DDISABLE_EVENTS"
168 AC_ARG_ENABLE(joystick,
169 [ --enable-joystick Enable the joystick subsystem [default=yes]],
170 , enable_joystick=yes)
171 if test x$enable_joystick = xyes; then
172 SDL_EXTRADIRS="$SDL_EXTRADIRS joystick"
173 SDL_EXTRALIBS="$SDL_EXTRALIBS joystick/libjoystick.la"
175 CFLAGS="$CFLAGS -DDISABLE_JOYSTICK"
178 [ --enable-cdrom Enable the cdrom subsystem [default=yes]],
180 if test x$enable_cdrom = xyes; then
181 SDL_EXTRADIRS="$SDL_EXTRADIRS cdrom"
182 SDL_EXTRALIBS="$SDL_EXTRALIBS cdrom/libcdrom.la"
184 CFLAGS="$CFLAGS -DDISABLE_CDROM"
186 AC_ARG_ENABLE(threads,
187 [ --enable-threads Enable the threading subsystem [default=yes]],
188 , enable_threads=yes)
189 SDL_EXTRADIRS="$SDL_EXTRADIRS thread"
190 SDL_EXTRALIBS="$SDL_EXTRALIBS thread/libthread.la"
191 if test x$enable_threads != xyes; then
192 CFLAGS="$CFLAGS -DDISABLE_THREADS"
193 COPY_ARCH_SRC(src/thread, generic, SDL_systhread.c)
194 COPY_ARCH_SRC(src/thread, generic, SDL_systhread_c.h)
195 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
196 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
197 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
198 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
199 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
200 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
202 AC_ARG_ENABLE(timers,
203 [ --enable-timers Enable the timer subsystem [default=yes]],
205 if test x$enable_timers = xyes; then
206 SDL_EXTRADIRS="$SDL_EXTRADIRS timer"
207 SDL_EXTRALIBS="$SDL_EXTRALIBS timer/libtimer.la"
209 CFLAGS="$CFLAGS -DDISABLE_TIMERS"
211 AC_ARG_ENABLE(endian,
212 [ --enable-endian Enable the endian subsystem [default=yes]],
214 if test x$enable_endian = xyes; then
215 SDL_EXTRADIRS="$SDL_EXTRADIRS endian"
216 SDL_EXTRALIBS="$SDL_EXTRALIBS endian/libendian.la"
218 CFLAGS="$CFLAGS -DDISABLE_ENDIAN"
221 [ --enable-file Enable the file subsystem [default=yes]],
223 if test x$enable_file = xyes; then
224 SDL_EXTRADIRS="$SDL_EXTRADIRS file"
225 SDL_EXTRALIBS="$SDL_EXTRALIBS file/libfile.la"
227 CFLAGS="$CFLAGS -DDISABLE_FILE"
229 AC_ARG_ENABLE(cpuinfo,
230 [ --enable-cpuinfo Enable the cpuinfo subsystem [default=yes]],
231 , enable_cpuinfo=yes)
232 if test x$enable_cpuinfo = xyes; then
233 SDL_EXTRADIRS="$SDL_EXTRADIRS cpuinfo"
234 SDL_EXTRALIBS="$SDL_EXTRALIBS cpuinfo/libcpuinfo.la"
236 CFLAGS="$CFLAGS -DDISABLE_CPUINFO"
239 dnl See if the OSS audio interface is supported
243 [ --enable-oss support the OSS audio API [default=yes]],
245 if test x$enable_audio = xyes -a x$enable_oss = xyes; then
246 AC_MSG_CHECKING(for OSS audio support)
248 if test x$have_oss != xyes; then
250 #include <sys/soundcard.h>
252 int arg = SNDCTL_DSP_SETFRAGMENT;
257 if test x$have_oss != xyes; then
259 #include <soundcard.h>
261 int arg = SNDCTL_DSP_SETFRAGMENT;
264 CFLAGS="$CFLAGS -DOSS_USE_SOUNDCARD_H"
267 AC_MSG_RESULT($have_oss)
268 if test x$have_oss = xyes; then
269 CFLAGS="$CFLAGS -DOSS_SUPPORT"
270 AUDIO_SUBDIRS="$AUDIO_SUBDIRS dsp"
271 AUDIO_DRIVERS="$AUDIO_DRIVERS dsp/libaudio_dsp.la"
272 AUDIO_SUBDIRS="$AUDIO_SUBDIRS dma"
273 AUDIO_DRIVERS="$AUDIO_DRIVERS dma/libaudio_dma.la"
278 dnl See if the ALSA audio interface is supported
282 [ --enable-alsa support the ALSA audio API [default=yes]],
284 if test x$enable_audio = xyes -a x$enable_alsa = xyes; then
285 AM_PATH_ALSA(0.9.0, have_alsa=yes, have_alsa=no)
286 if test x$have_alsa = xyes; then
287 AC_ARG_ENABLE(alsa-shared,
288 [ --enable-alsa-shared dynamically load ALSA audio support [default=yes]],
289 , enable_alsa_shared=yes)
290 if test "x`echo $ALSA_LIBS | grep -- -L`" = "x"; then
291 if test "x`ls /lib/libasound.so.* 2> /dev/null`" != "x"; then
292 ALSA_LIBS="-L/lib $ALSA_LIBS"
293 elif test "x`ls /usr/lib/libasound.so.* 2> /dev/null`" != "x"; then
294 ALSA_LIBS="-L/usr/lib $ALSA_LIBS"
295 elif test "x`ls /usr/local/lib/libasound.so.* 2> /dev/null`" != "x"; then
296 ALSA_LIBS="-L/usr/local/lib $ALSA_LIBS"
299 alsa_lib_spec=`echo $ALSA_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libasound.so.*/'`
300 alsa_lib=`ls $alsa_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
301 echo "-- $alsa_lib_spec -> $alsa_lib"
303 if test x$use_dlopen != xyes && \
304 test x$enable_alsa_shared = xyes; then
305 AC_MSG_ERROR([You must have dlopen() support and use the --enable-dlopen option])
307 if test x$use_dlopen = xyes && \
308 test x$enable_alsa_shared = xyes && test x$alsa_lib != x; then
309 CFLAGS="$CFLAGS -DALSA_SUPPORT -DALSA_DYNAMIC=\$(alsa_lib) $ALSA_CFLAGS"
312 AC_MSG_CHECKING(for dlvsym)
323 AC_MSG_RESULT($use_dlvsym);
324 if test x$use_dlvsym = xyes; then
325 CFLAGS="$CFLAGS -DUSE_DLVSYM"
328 CFLAGS="$CFLAGS -DALSA_SUPPORT $ALSA_CFLAGS"
329 SYSTEM_LIBS="$SYSTEM_LIBS $ALSA_LIBS"
331 AUDIO_SUBDIRS="$AUDIO_SUBDIRS alsa"
332 AUDIO_DRIVERS="$AUDIO_DRIVERS alsa/libaudio_alsa.la"
337 dnl Check whether we want to use IRIX 6.5+ native audio or not
340 if test x$enable_audio = xyes; then
341 AC_MSG_CHECKING(for dmedia audio support)
344 #include <dmedia/audio.h>
350 AC_MSG_RESULT($have_dmedia)
351 # Set up files for the audio library
352 if test x$have_dmedia = xyes; then
353 CFLAGS="$CFLAGS -DDMEDIA_SUPPORT"
354 AUDIO_SUBDIRS="$AUDIO_SUBDIRS dmedia"
355 AUDIO_DRIVERS="$AUDIO_DRIVERS dmedia/libaudio_dmedia.la"
356 SYSTEM_LIBS="$SYSTEM_LIBS -laudio"
361 dnl Find the ESD includes and libraries
365 [ --enable-esd support the Enlightened Sound Daemon [default=yes]],
367 if test x$enable_audio = xyes -a x$enable_esd = xyes; then
368 AM_PATH_ESD(0.2.8, have_esd=yes, have_esd=no)
369 if test x$have_esd = xyes; then
370 AC_ARG_ENABLE(esd-shared,
371 [ --enable-esd-shared dynamically load ESD audio support [default=yes]],
372 , enable_esd_shared=yes)
373 esd_lib_spec=`echo $ESD_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libesd.so.*/'`
374 esd_lib=`ls $esd_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
375 echo "-- $esd_lib_spec -> $esd_lib"
376 if test x$use_dlopen != xyes && \
377 test x$enable_esd_shared = xyes; then
378 AC_MSG_ERROR([You must have dlopen() support and use the --enable-dlopen option])
380 if test x$use_dlopen = xyes && \
381 test x$enable_esd_shared = xyes && test x$esd_lib != x; then
382 CFLAGS="$CFLAGS -DESD_SUPPORT -DESD_DYNAMIC=\$(esd_lib) $ESD_CFLAGS"
385 CFLAGS="$CFLAGS -DESD_SUPPORT $ESD_CFLAGS"
386 SYSTEM_LIBS="$SYSTEM_LIBS $ESD_LIBS"
388 AUDIO_SUBDIRS="$AUDIO_SUBDIRS esd"
389 AUDIO_DRIVERS="$AUDIO_DRIVERS esd/libaudio_esd.la"
397 [ --enable-arts support the Analog Real Time Synthesizer [default=yes]],
399 if test x$enable_audio = xyes -a x$enable_arts = xyes; then
400 AC_PATH_PROG(ARTSCCONFIG, artsc-config)
401 if test x$ARTSCCONFIG = x -o x$ARTSCCONFIG = x'"$ARTSCCONFIG"'; then
402 : # arts isn't installed
404 ARTSC_CFLAGS=`$ARTSCCONFIG --cflags`
405 ARTSC_LIBS=`$ARTSCCONFIG --libs`
406 ARTSC_PREFIX=`$ARTSCCONFIG --arts-prefix`
407 AC_MSG_CHECKING(for aRts development environment)
409 save_CFLAGS="$CFLAGS"
410 CFLAGS="$CFLAGS $ARTSC_CFLAGS"
414 arts_stream_t stream;
418 CFLAGS="$save_CFLAGS"
419 AC_MSG_RESULT($audio_arts)
420 if test x$audio_arts = xyes; then
421 AC_ARG_ENABLE(arts-shared,
422 [ --enable-arts-shared dynamically load aRts audio support [default=yes]],
423 , enable_arts_shared=yes)
424 arts_lib_spec="$ARTSC_PREFIX/lib/libartsc.so.*"
425 arts_lib=`ls $arts_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
426 echo "-- $arts_lib_spec -> $arts_lib"
427 if test x$use_dlopen != xyes && \
428 test x$enable_arts_shared = xyes; then
429 AC_MSG_ERROR([You must have dlopen() support and use the --enable-dlopen option])
431 if test x$use_dlopen = xyes && \
432 test x$enable_arts_shared = xyes && test x$arts_lib != x; then
433 CFLAGS="$CFLAGS -DARTSC_SUPPORT -DARTSC_DYNAMIC=\$(arts_lib) $ARTSC_CFLAGS"
436 CFLAGS="$CFLAGS -DARTSC_SUPPORT $ARTSC_CFLAGS"
437 SYSTEM_LIBS="$SYSTEM_LIBS $ARTSC_LIBS"
439 AUDIO_SUBDIRS="$AUDIO_SUBDIRS arts"
440 AUDIO_DRIVERS="$AUDIO_DRIVERS arts/libaudio_arts.la"
446 dnl See if the NAS audio interface is supported
450 [ --enable-nas support the NAS audio API [default=yes]],
452 if test x$enable_audio = xyes -a x$enable_nas = xyes; then
453 AC_MSG_CHECKING(for NAS audio support)
455 if test -r /usr/X11R6/include/audio/audiolib.h; then
457 CFLAGS="$CFLAGS -DNAS_SUPPORT -I/usr/X11R6/include/"
458 SYSTEM_LIBS="$SYSTEM_LIBS -laudio -lXt"
459 AUDIO_SUBDIRS="$AUDIO_SUBDIRS nas"
460 AUDIO_DRIVERS="$AUDIO_DRIVERS nas/libaudio_nas.la"
462 dnl On IRIX, the NAS includes are in a different directory,
463 dnl and libnas must be explicitly linked in
465 elif test -r /usr/freeware/include/nas/audiolib.h; then
467 CFLAGS="$CFLAGS -DNAS_SUPPORT"
468 SYSTEM_LIBS="$SYSTEM_LIBS -lnas -lXt"
469 AUDIO_SUBDIRS="$AUDIO_SUBDIRS nas"
470 AUDIO_DRIVERS="$AUDIO_DRIVERS nas/libaudio_nas.la"
472 AC_MSG_RESULT($have_nas)
476 dnl rcg07142001 See if the user wants the disk writer audio driver...
479 AC_ARG_ENABLE(diskaudio,
480 [ --enable-diskaudio support the disk writer audio driver [default=yes]],
481 , enable_diskaudio=yes)
482 if test x$enable_audio = xyes -a x$enable_diskaudio = xyes; then
483 CFLAGS="$CFLAGS -DDISKAUD_SUPPORT"
484 AUDIO_SUBDIRS="$AUDIO_SUBDIRS disk"
485 AUDIO_DRIVERS="$AUDIO_DRIVERS disk/libaudio_disk.la"
489 dnl Set up the Atari Audio driver
492 AC_ARG_ENABLE(mintaudio,
493 [ --enable-mintaudio support Atari audio driver [default=yes]],
494 , enable_mintaudio=yes)
495 if test x$enable_audio = xyes -a x$enable_mintaudio = xyes; then
497 AC_CHECK_HEADER(mint/falcon.h, have_mint_falcon_hdr=yes)
498 if test x$have_mint_falcon_hdr = xyes; then
500 CFLAGS="$CFLAGS -DMINTAUDIO_SUPPORT"
501 AUDIO_SUBDIRS="$AUDIO_SUBDIRS mint"
502 AUDIO_DRIVERS="$AUDIO_DRIVERS mint/libaudio_mintaudio.la"
507 dnl See if we can use x86 assembly blitters
508 # NASM is available from: http://nasm.octium.net/
511 dnl Make sure we are running on an x86 platform
520 dnl Check for NASM (for assembly blit routines)
522 [ --enable-nasm use nasm assembly blitters on x86 [default=yes]],
524 if test x$enable_video = xyes -a x$enable_nasm = xyes; then
525 AC_PATH_PROG(NASM, nasm)
526 if test x$NASM = x -o x$NASM = x'"$NASM"'; then
527 : # nasm isn't installed
529 CFLAGS="$CFLAGS -DUSE_ASMBLIT -I$srcdir/hermes"
542 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/hermes"
543 SDL_EXTRADIRS="$SDL_EXTRADIRS hermes"
544 SDL_EXTRALIBS="$SDL_EXTRALIBS hermes/libhermes.la"
548 # this line is needed for QNX, because it's not defined the __ELF__
549 *-*-qnx*) CFLAGS="$CFLAGS -D__ELF__"
558 dnl Find the nanox include and library directories
561 AC_ARG_ENABLE(video-nanox,
562 [ --enable-video-nanox use nanox video driver [default=no]],
563 , enable_video_nanox=no)
564 AC_ARG_ENABLE(nanox-debug,
565 [ --enable-nanox-debug print debug messages [default=no]],
566 , enable_nanox_debug=no)
567 AC_ARG_ENABLE(nanox-share-memory,
568 [ --enable-nanox-share-memory use share memory [default=no]],
569 , enable_nanox_share_memory=no)
570 AC_ARG_ENABLE(nanox_direct_fb,
571 [ --enable-nanox-direct-fb use direct framebuffer access [default=no]],
572 , enable_nanox_direct_fb=no)
574 if test x$enable_video = xyes -a x$enable_video_nanox = xyes; then
575 if test x$enable_nanox_debug = xyes; then
576 CFLAGS="$CFLAGS -DENABLE_NANOX_DEBUG"
579 if test x$enable_nanox_share_memory = xyes; then
580 CFLAGS="$CFLAGS -DNANOX_SHARE_MEMORY"
583 if test x$enable_nanox_direct_fb = xyes; then
584 CFLAGS="$CFLAGS -DENABLE_NANOX_DIRECT_FB"
587 CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_NANOX"
588 SYSTEM_LIBS="$SYSTEM_LIBS -lnano-X"
589 VIDEO_SUBDIRS="$VIDEO_SUBDIRS nanox"
590 VIDEO_DRIVERS="$VIDEO_DRIVERS nanox/libvideo_nanox.la"
594 dnl Find the X11 include and library directories
597 AC_ARG_ENABLE(video-x11,
598 [ --enable-video-x11 use X11 video driver [default=yes]],
599 , enable_video_x11=yes)
600 if test x$enable_video = xyes -a x$enable_video_x11 = xyes; then
603 if test x$have_x = xyes; then
604 CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_X11 -DXTHREADS -I$srcdir/include -I$srcdir/src/video"
605 if test x$ac_cv_func_shmat != xyes; then
606 CFLAGS="$CFLAGS -DNO_SHARED_MEMORY"
608 SYSTEM_LIBS="$SYSTEM_LIBS $X_LIBS -lX11 -lXext"
609 VIDEO_SUBDIRS="$VIDEO_SUBDIRS x11"
610 VIDEO_DRIVERS="$VIDEO_DRIVERS x11/libvideo_x11.la"
612 AC_ARG_ENABLE(video-x11-vm,
613 [ --enable-video-x11-vm use X11 VM extension for fullscreen [default=yes]],
614 , enable_video_x11_vm=yes)
615 if test x$enable_video_x11_vm = xyes; then
616 AC_MSG_CHECKING(for XFree86 VidMode 1.0 support)
619 #include <X11/Xlib.h>
620 #include <XFree86/extensions/xf86vmode.h>
625 AC_MSG_RESULT($video_x11_vm)
626 if test x$video_x11_vm = xyes; then
627 CFLAGS="$CFLAGS -DXFREE86_VM"
628 VIDEO_SUBDIRS="$VIDEO_SUBDIRS XFree86/Xxf86vm"
629 VIDEO_DRIVERS="$VIDEO_DRIVERS XFree86/Xxf86vm/libXFree86_Xxf86vm.la"
630 AC_MSG_CHECKING(for XFree86 VidMode gamma support)
633 #include <X11/Xlib.h>
634 #include <XFree86/extensions/xf86vmode.h>
636 SDL_NAME(XF86VidModeGamma) gamma;
638 video_x11_vmgamma=yes
640 AC_MSG_RESULT($video_x11_vmgamma)
641 if test x$video_x11_vmgamma = xyes; then
642 CFLAGS="$CFLAGS -DXFREE86_VMGAMMA"
647 [ --enable-dga allow use of X11 DGA code [default=yes]],
649 AC_ARG_ENABLE(video-x11-dgamouse,
650 [ --enable-video-x11-dgamouse use X11 DGA for mouse events [default=yes]],
651 , enable_video_x11_dgamouse=yes)
652 if test x$enable_dga = xyes; then
653 AC_MSG_CHECKING(for XFree86 DGA 1.0 support)
656 #include <X11/Xlib.h>
657 #include <XFree86/extensions/xf86dga.h>
662 AC_MSG_RESULT($video_x11_dga)
663 if test x$video_x11_dga = xyes; then
664 CFLAGS="$CFLAGS -DXFREE86_DGAMOUSE"
665 if test x$enable_video_x11_dgamouse = xyes; then
666 CFLAGS="$CFLAGS -DDEFAULT_DGAMOUSE"
668 VIDEO_SUBDIRS="$VIDEO_SUBDIRS XFree86/Xxf86dga"
669 VIDEO_DRIVERS="$VIDEO_DRIVERS XFree86/Xxf86dga/libXFree86_Xxf86dga.la"
672 AC_ARG_ENABLE(video-x11-xv,
673 [ --enable-video-x11-xv use X11 XvImage extension for video [default=yes]],
674 , enable_video_x11_xv=yes)
675 if test x$enable_video_x11_xv = xyes; then
676 AC_MSG_CHECKING(for XFree86 XvImage support)
679 #include <X11/Xlib.h>
682 #include <X11/extensions/XShm.h>
683 #include <XFree86/extensions/Xvlib.h>
685 SDL_NAME(XvImage) *image;
689 AC_MSG_RESULT($video_x11_xv)
690 if test x$video_x11_xv = xyes; then
691 CFLAGS="$CFLAGS -DXFREE86_XV"
692 VIDEO_SUBDIRS="$VIDEO_SUBDIRS XFree86/Xv"
693 VIDEO_DRIVERS="$VIDEO_DRIVERS XFree86/Xv/libXFree86_Xv.la"
696 AC_ARG_ENABLE(video-x11-xinerama,
697 [ --enable-video-x11-xinerama enable X11 Xinerama support [default=yes]],
698 , enable_video_x11_xinerama=yes)
699 if test x$enable_video_x11_xinerama = xyes; then
700 AC_MSG_CHECKING(for X11 Xinerama support)
701 video_x11_xinerama=no
703 #include <X11/Xlib.h>
704 #include <XFree86/extensions/Xinerama.h>
706 SDL_NAME(XineramaScreenInfo) *xinerama;
708 video_x11_xinerama=yes
710 AC_MSG_RESULT($video_x11_xinerama)
711 if test x$video_x11_xinerama = xyes; then
712 CFLAGS="$CFLAGS -DHAVE_XINERAMA"
713 VIDEO_SUBDIRS="$VIDEO_SUBDIRS XFree86/Xinerama"
714 VIDEO_DRIVERS="$VIDEO_DRIVERS XFree86/Xinerama/libXFree86_Xinerama.la"
717 AC_ARG_ENABLE(video-x11-xme,
718 [ --enable-video-x11-xme enable Xi Graphics XME for fullscreen [default=yes]],
719 , enable_video_x11_xme=yes)
720 if test x$enable_video_x11_xme = xyes; then
721 AC_MSG_CHECKING(for Xi Graphics XiGMiscExtension support)
724 #include <X11/Xlib.h>
725 #include <X11/extensions/xme.h>
727 XiGMiscResolutionInfo *resolutions;
731 AC_MSG_RESULT($video_x11_xme)
732 if test x$video_x11_xme = xyes; then
733 CFLAGS="$CFLAGS -DHAVE_XIGXME"
734 SYSTEM_LIBS="$SYSTEM_LIBS -lxme"
741 dnl Find the X11 DGA 2.0 include and library directories
744 AC_ARG_ENABLE(video-dga,
745 [ --enable-video-dga use DGA 2.0 video driver [default=yes]],
746 , enable_video_dga=yes)
747 if test x$video_x11_dga = xyes -a x$enable_video_dga = xyes; then
748 save_CFLAGS="$CFLAGS"; CFLAGS="$CFLAGS -Isrc/video"
749 AC_MSG_CHECKING(for XFree86 DGA 2.0 support)
752 #include <X11/Xlib.h>
753 #include <XFree86/extensions/xf86dga.h>
755 SDL_NAME(XDGAEvent) xevent;
759 AC_MSG_RESULT($video_x11_dga2)
760 if test x$video_x11_dga2 = xyes; then
761 CFLAGS="$CFLAGS -DENABLE_DGA"
762 VIDEO_SUBDIRS="$VIDEO_SUBDIRS dga"
763 VIDEO_DRIVERS="$VIDEO_DRIVERS dga/libvideo_dga.la"
770 AC_ARG_ENABLE(video-photon,
771 [ --enable-video-photon use QNX Photon video driver [default=yes]],
772 , enable_video_photon=yes)
773 if test x$enable_video = xyes -a x$enable_video_photon = xyes; then
774 AC_MSG_CHECKING(for QNX Photon support)
779 #include <photon/Pg.h>
780 #include <photon/PdDirect.h>
782 PgDisplaySettings_t *visual;
786 AC_MSG_RESULT($video_photon)
787 if test x$video_photon = xyes; then
788 CFLAGS="$CFLAGS -DENABLE_PHOTON"
789 SYSTEM_LIBS="$SYSTEM_LIBS -lph"
790 VIDEO_SUBDIRS="$VIDEO_SUBDIRS photon"
791 VIDEO_DRIVERS="$VIDEO_DRIVERS photon/libvideo_photon.la"
797 dnl Find the framebuffer console includes
800 AC_ARG_ENABLE(video-fbcon,
801 [ --enable-video-fbcon use framebuffer console video driver [default=yes]],
802 , enable_video_fbcon=yes)
803 if test x$enable_video = xyes -a x$enable_video_fbcon = xyes; then
804 AC_MSG_CHECKING(for framebuffer console support)
807 #include <linux/fb.h>
808 #include <linux/kd.h>
809 #include <linux/keyboard.h>
814 AC_MSG_RESULT($video_fbcon)
815 if test x$video_fbcon = xyes; then
816 CFLAGS="$CFLAGS -DENABLE_FBCON"
817 VIDEO_SUBDIRS="$VIDEO_SUBDIRS fbcon"
818 VIDEO_DRIVERS="$VIDEO_DRIVERS fbcon/libvideo_fbcon.la"
826 AC_ARG_ENABLE(video-directfb,
827 [ --enable-video-directfb use DirectFB video driver [default=no]],
828 , enable_video_directfb=no)
829 if test x$enable_video = xyes -a x$enable_video_directfb = xyes; then
832 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
833 if test x$PKG_CONFIG = xno ; then
834 AC_MSG_WARN([*** pkg-config is required to build the DirectFB video driver.])
836 AC_MSG_CHECKING(for DirectFB support)
838 if ! $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then
839 AC_MSG_ERROR([*** pkg-config too old; version 0.7 or better required.])
842 DIRECTFB_REQUIRED_VERSION=0.9.15
844 if $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb ; then
845 DIRECTFB_CFLAGS=`$PKG_CONFIG --cflags directfb`
846 DIRECTFB_LIBS=`$PKG_CONFIG --libs directfb`
851 AC_MSG_RESULT($video_directfb)
852 if test x$video_directfb = xyes; then
853 CFLAGS="$CFLAGS -DENABLE_DIRECTFB"
854 VIDEO_SUBDIRS="$VIDEO_SUBDIRS directfb"
855 VIDEO_DRIVERS="$VIDEO_DRIVERS directfb/libvideo_directfb.la"
857 AC_SUBST(DIRECTFB_CFLAGS)
858 AC_SUBST(DIRECTFB_LIBS)
863 dnl See if we're running on PlayStation 2 hardware
866 AC_ARG_ENABLE(video-ps2gs,
867 [ --enable-video-ps2gs use PlayStation 2 GS video driver [default=yes]],
868 , enable_video_ps2gs=yes)
869 if test x$enable_video = xyes -a x$enable_video_ps2gs = xyes; then
870 AC_MSG_CHECKING(for PlayStation 2 GS support)
873 #include <linux/ps2/dev.h>
874 #include <linux/ps2/gs.h>
879 AC_MSG_RESULT($video_ps2gs)
880 if test x$video_ps2gs = xyes; then
881 CFLAGS="$CFLAGS -DENABLE_PS2GS"
882 VIDEO_SUBDIRS="$VIDEO_SUBDIRS ps2gs"
883 VIDEO_DRIVERS="$VIDEO_DRIVERS ps2gs/libvideo_ps2gs.la"
888 dnl Find the GGI includes
891 AC_ARG_ENABLE(video-ggi,
892 [ --enable-video-ggi use GGI video driver [default=no]],
893 , enable_video_ggi=no)
894 if test x$enable_video = xyes -a x$enable_video_ggi = xyes; then
895 AC_MSG_CHECKING(for GGI support)
904 AC_MSG_RESULT($video_ggi)
905 if test x$video_ggi = xyes; then
906 CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_GGI"
907 SYSTEM_LIBS="$SYSTEM_LIBS -lggi -lgii -lgg"
909 VIDEO_SUBDIRS="$VIDEO_SUBDIRS ggi"
910 VIDEO_DRIVERS="$VIDEO_DRIVERS ggi/libvideo_ggi.la"
915 dnl Find the SVGAlib includes and libraries
918 AC_ARG_ENABLE(video-svga,
919 [ --enable-video-svga use SVGAlib video driver [default=no]],
920 , enable_video_svga=no)
921 if test x$enable_video = xyes -a x$enable_video_svga = xyes; then
922 AC_MSG_CHECKING(for SVGAlib (1.4.0+) support)
926 #include <vgamouse.h>
927 #include <vgakeyboard.h>
929 if ( SCANCODE_RIGHTWIN && SCANCODE_LEFTWIN ) {
935 AC_MSG_RESULT($video_svga)
936 if test x$video_svga = xyes; then
937 CFLAGS="$CFLAGS -DENABLE_SVGALIB"
938 SYSTEM_LIBS="$SYSTEM_LIBS -lvga"
940 VIDEO_SUBDIRS="$VIDEO_SUBDIRS svga"
941 VIDEO_DRIVERS="$VIDEO_DRIVERS svga/libvideo_svga.la"
946 dnl Find the VGL includes and libraries
949 AC_ARG_ENABLE(video-vgl,
950 [ --enable-video-vgl use VGL video driver [default=no]],
951 , enable_video_vgl=no)
952 if test x$enable_video = xyes -a x$enable_video_vgl = xyes; then
953 AC_MSG_CHECKING(for libVGL support)
956 #include <sys/fbio.h>
957 #include <sys/consio.h>
958 #include <sys/kbio.h>
966 AC_MSG_RESULT($video_vgl)
967 if test x$video_vgl = xyes; then
968 CFLAGS="$CFLAGS -DENABLE_VGL"
969 SYSTEM_LIBS="$SYSTEM_LIBS -lvgl"
971 VIDEO_SUBDIRS="$VIDEO_SUBDIRS vgl"
972 VIDEO_DRIVERS="$VIDEO_DRIVERS vgl/libvideo_vgl.la"
977 dnl Find the AAlib includes
980 AC_ARG_ENABLE(video-aalib,
981 [ --enable-video-aalib use AAlib video driver [default=no]],
982 , enable_video_aalib=no)
983 if test x$enable_video = xyes -a x$enable_video_aalib = xyes; then
984 AC_MSG_CHECKING(for AAlib support)
992 AC_MSG_RESULT($video_aalib)
993 if test x$video_aalib = xyes; then
994 CFLAGS="$CFLAGS -DENABLE_AALIB"
995 SYSTEM_LIBS="$SYSTEM_LIBS -laa"
997 VIDEO_SUBDIRS="$VIDEO_SUBDIRS aalib"
998 VIDEO_DRIVERS="$VIDEO_DRIVERS aalib/libvideo_aa.la"
1003 dnl Set up the Atari Xbios driver
1004 CheckAtariXbiosVideo()
1006 AC_ARG_ENABLE(xbios,
1007 [ --enable-video-xbios use Atari Xbios video driver [default=yes]],
1008 , enable_video_xbios=yes)
1010 if test x$enable_video = xyes -a x$enable_video_xbios = xyes; then
1012 CFLAGS="$CFLAGS -DENABLE_XBIOS"
1013 VIDEO_SUBDIRS="$VIDEO_SUBDIRS xbios"
1014 VIDEO_DRIVERS="$VIDEO_DRIVERS xbios/libvideo_xbios.la"
1018 dnl Set up the Atari Gem driver
1019 CheckAtariGemVideo()
1022 [ --enable-video-gem use Atari Gem video driver [default=yes]],
1023 , enable_video_gem=yes)
1024 if test x$enable_video = xyes -a x$enable_video_gem = xyes; then
1026 AC_CHECK_HEADER(gem.h, have_gem_hdr=yes)
1027 AC_CHECK_LIB(gem, appl_init, have_gem_lib=yes)
1028 if test x$have_gem_hdr = xyes -a x$have_gem_lib = xyes; then
1030 CFLAGS="$CFLAGS -DENABLE_GEM"
1031 SYSTEM_LIBS="$SYSTEM_LIBS -lgem"
1032 VIDEO_SUBDIRS="$VIDEO_SUBDIRS gem"
1033 VIDEO_DRIVERS="$VIDEO_DRIVERS gem/libvideo_gem.la"
1038 dnl Set up the Atari Bios keyboard driver
1039 CheckAtariBiosEvent()
1041 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video/ataricommon"
1042 VIDEO_SUBDIRS="$VIDEO_SUBDIRS ataricommon"
1043 VIDEO_DRIVERS="$VIDEO_DRIVERS ataricommon/libvideo_ataricommon.la"
1046 dnl rcg04172001 Set up the Null video driver.
1049 AC_ARG_ENABLE(video-dummy,
1050 [ --enable-video-dummy use dummy video driver [default=yes]],
1051 , enable_video_dummy=yes)
1052 if test x$enable_video_dummy = xyes; then
1053 CFLAGS="$CFLAGS -DENABLE_DUMMYVIDEO"
1054 VIDEO_SUBDIRS="$VIDEO_SUBDIRS dummy"
1055 VIDEO_DRIVERS="$VIDEO_DRIVERS dummy/libvideo_null.la"
1059 dnl Check to see if OpenGL support is desired
1060 AC_ARG_ENABLE(video-opengl,
1061 [ --enable-video-opengl include OpenGL context creation [default=yes]],
1062 , enable_video_opengl=yes)
1067 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
1068 AC_MSG_CHECKING(for OpenGL (GLX) support)
1073 #include <dlfcn.h> /* For loading extensions */
1078 AC_MSG_RESULT($video_opengl)
1079 if test x$video_opengl = xyes; then
1080 CFLAGS="$CFLAGS -DHAVE_OPENGL"
1081 if test x$use_dlopen != xyes; then
1082 AC_CHECK_LIB(dl, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS -ldl")
1088 dnl Find QNX RtP OpenGL
1091 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
1092 AC_MSG_CHECKING(for OpenGL (Photon) support)
1100 AC_MSG_RESULT($video_opengl)
1101 if test x$video_opengl = xyes; then
1102 CFLAGS="$CFLAGS -DHAVE_OPENGL"
1103 SYSTEM_LIBS="$SYSTEM_LIBS -lGL"
1104 if test x$use_dlopen != xyes; then
1105 AC_CHECK_LIB(c, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS", AC_CHECK_LIB(ltdl, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS -lltdl"))
1111 dnl Check for BeOS OpenGL
1114 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
1115 CFLAGS="$CFLAGS -DHAVE_OPENGL"
1116 SYSTEM_LIBS="$SYSTEM_LIBS -lGL"
1120 dnl Check for MacOS OpenGL
1123 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
1124 CFLAGS="$CFLAGS -DHAVE_OPENGL"
1127 SYSTEM_LIBS="$SYSTEM_LIBS -framework OpenGL -framework AGL"
1132 dnl See if we can use the new unified event interface in Linux 2.4
1135 dnl Check for Linux 2.4 unified input event interface support
1136 AC_ARG_ENABLE(input-events,
1137 [ --enable-input-events use Linux 2.4 unified input interface [default=yes]],
1138 , enable_input_events=yes)
1139 if test x$enable_input_events = xyes; then
1140 AC_MSG_CHECKING(for Linux 2.4 unified input interface)
1143 #include <linux/input.h>
1146 #error EVIOCGNAME() ioctl not available
1149 use_input_events=yes
1151 AC_MSG_RESULT($use_input_events)
1152 if test x$use_input_events = xyes; then
1153 CFLAGS="$CFLAGS -DUSE_INPUT_EVENTS"
1158 dnl See if we can use GNU pth library for threads
1161 dnl Check for pth support
1163 [ --enable-pth use GNU pth library for multi-threading [default=yes]],
1165 if test x$enable_threads = xyes -a x$enable_pth = xyes; then
1166 AC_PATH_PROG(PTH_CONFIG, pth-config, no)
1167 if test "$PTH_CONFIG" = "no"; then
1170 PTH_CFLAGS=`$PTH_CONFIG --cflags`
1171 PTH_LIBS=`$PTH_CONFIG --libs --all`
1172 SDL_CFLAGS="$SDL_CFLAGS $PTH_CFLAGS"
1173 SDL_LIBS="$SDL_LIBS $PTH_LIBS"
1174 CFLAGS="$CFLAGS -DENABLE_PTH"
1177 AC_MSG_CHECKING(pth)
1178 if test "x$use_pth" = xyes; then
1186 dnl See what type of thread model to use on Linux and Solaris
1189 dnl Check for pthread support
1190 AC_ARG_ENABLE(pthreads,
1191 [ --enable-pthreads use POSIX threads for multi-threading [default=yes]],
1192 , enable_pthreads=yes)
1193 dnl This is used on Linux for glibc binary compatibility (Doh!)
1194 AC_ARG_ENABLE(pthread-sem,
1195 [ --enable-pthread-sem use pthread semaphores [default=yes]],
1196 , enable_pthread_sem=yes)
1199 pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
1203 pthread_cflags="-D_THREAD_SAFE"
1204 # causes Carbon.p complaints?
1205 # pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
1208 pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
1209 pthread_lib="-pthread"
1212 pthread_cflags="-I/usr/pkg/include -D_REENTRANT"
1213 pthread_lib="-L/usr/pkg/lib -lpthread -lsem"
1216 pthread_cflags="-D_REENTRANT"
1217 pthread_lib="-pthread"
1220 pthread_cflags="-D_REENTRANT"
1221 pthread_lib="-lpthread -lposix4"
1224 pthread_cflags="-D_REENTRANT -Kthread"
1228 pthread_cflags="-D_SGI_MP_SOURCE"
1229 pthread_lib="-lpthread"
1232 pthread_cflags="-D_REENTRANT -mthreads"
1233 pthread_lib="-lpthread"
1236 pthread_cflags="-D_REENTRANT"
1237 pthread_lib="-L/usr/lib -lpthread"
1244 if test x$ac_cv_prog_gcc = xyes; then
1245 pthread_cflags="-D_REENTRANT"
1246 pthread_lib="-lpthread -lrt"
1248 pthread_cflags="-pthread"
1249 pthread_lib="-lpthread -lrt"
1253 pthread_cflags="-D_REENTRANT"
1254 pthread_lib="-lpthread"
1257 if test x$enable_threads = xyes -a x$enable_pthreads = xyes; then
1258 # Save the original compiler flags and libraries
1259 ac_save_cflags="$CFLAGS"; ac_save_libs="$LIBS"
1260 # Add the pthread compiler flags and libraries
1261 CFLAGS="$CFLAGS $pthread_cflags"; LIBS="$LIBS $pthread_lib"
1262 # Check to see if we have pthread support on this system
1263 AC_MSG_CHECKING(for pthreads)
1266 #include <pthread.h>
1268 pthread_attr_t type;
1269 pthread_attr_init(&type);
1273 AC_MSG_RESULT($use_pthreads)
1274 # Restore the compiler flags and libraries
1275 CFLAGS="$ac_save_cflags"; LIBS="$ac_save_libs"
1276 # Do futher testing if we have pthread support...
1277 if test x$use_pthreads = xyes; then
1278 CFLAGS="$CFLAGS $pthread_cflags -DSDL_USE_PTHREADS"
1279 LIBS="$LIBS $pthread_lib"
1280 SDL_CFLAGS="$SDL_CFLAGS $pthread_cflags"
1281 SDL_LIBS="$SDL_LIBS $pthread_lib"
1283 # Check to see if recursive mutexes are available
1284 AC_MSG_CHECKING(for recursive mutexes)
1285 has_recursive_mutexes=no
1287 #include <pthread.h>
1289 pthread_mutexattr_t attr;
1290 #if defined(linux) && !(defined(__arm__) && defined(QWS))
1291 pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
1293 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
1296 has_recursive_mutexes=yes
1298 # Some systems have broken recursive mutex implementations
1301 has_recursive_mutexes=no
1304 has_recursive_mutexes=no
1307 AC_MSG_RESULT($has_recursive_mutexes)
1308 if test x$has_recursive_mutexes != xyes; then
1309 CFLAGS="$CFLAGS -DPTHREAD_NO_RECURSIVE_MUTEX"
1312 # Check to see if pthread semaphore support is missing
1313 if test x$enable_pthread_sem = xyes; then
1314 AC_MSG_CHECKING(for pthread semaphores)
1317 #include <pthread.h>
1318 #include <semaphore.h>
1321 have_pthread_sem=yes
1323 AC_MSG_RESULT($have_pthread_sem)
1326 # Check to see if this is broken glibc 2.0 pthreads
1329 AC_MSG_CHECKING(for broken glibc 2.0 pthreads)
1332 #include <features.h>
1333 #if (__GLIBC__ == 2) && (__GLIBC_MINOR__ == 0)
1334 #warning Working around a bug in glibc 2.0 pthreads
1336 #error pthread implementation okay
1337 #endif /* glibc 2.0 */
1340 glibc20_pthreads=yes
1342 AC_MSG_RESULT($glibc20_pthreads)
1347 AC_MSG_CHECKING(whether semun is defined in /usr/include/sys/sem.h)
1350 #include <sys/types.h>
1351 #include <sys/sem.h>
1357 AC_MSG_RESULT($have_semun)
1358 if test x$have_semun = xyes; then
1359 CFLAGS="$CFLAGS -DHAVE_SEMUN"
1362 # See if we can use GNU Pth or clone() on Linux directly
1363 if test x$enable_threads = xyes -a x$use_pthreads != xyes; then
1365 if test x$use_pth != xyes; then
1375 # Note that we need to have either semaphores or to have mutexes and
1376 # condition variables to implement all thread synchronization primitives
1377 CopyUnixThreadSource()
1379 if test x$use_pthreads = xyes -o x$use_clone = xyes; then
1380 # Basic thread creation functions
1381 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1382 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1385 # We can fake these with mutexes and condition variables if necessary
1386 if test x$use_pthreads = xyes -a x$have_pthread_sem != xyes; then
1387 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1389 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1391 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1394 # We can fake these with semaphores if necessary
1397 COPY_ARCH_SRC(src/thread, bsdi, SDL_syssem.c)
1398 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1399 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1400 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1403 if test x$glibc20_pthreads = xyes; then
1404 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
1405 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
1407 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1408 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1413 # Condition variables
1414 # We can fake these with semaphores and mutexes if necessary
1415 if test x$glibc20_pthreads = xyes -o x$has_recursive_mutexes != xyes; then
1416 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1418 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1420 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1422 elif test x$use_pth = xyes; then
1423 COPY_ARCH_SRC(src/thread, pth, SDL_systhread.c)
1424 COPY_ARCH_SRC(src/thread, pth, SDL_systhread_c.h)
1425 COPY_ARCH_SRC(src/thread, pth, SDL_sysmutex.c)
1426 COPY_ARCH_SRC(src/thread, pth, SDL_sysmutex_c.h)
1427 COPY_ARCH_SRC(src/thread, pth, SDL_syscond.c)
1428 COPY_ARCH_SRC(src/thread, pth, SDL_syscond_c.h)
1429 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1430 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1433 *** No thread support detected
1438 dnl See if we can use sigaction() instead of signal()
1441 dnl Check for sigaction support
1442 AC_ARG_ENABLE(sigaction,
1443 [ --enable-sigaction use sigaction instead of signal [default=yes]],
1444 , enable_sigaction=yes)
1445 if test x$enable_sigaction = xyes; then
1446 AC_MSG_CHECKING(sigaction)
1451 struct sigaction junk;
1452 sigaction(0, &junk, &junk);
1456 AC_MSG_RESULT($have_sigaction)
1457 if test x$have_sigaction = xyes; then
1458 CFLAGS="$CFLAGS -DHAVE_SIGACTION"
1463 dnl Determine whether the compiler can produce Win32 executables
1466 AC_MSG_CHECKING(Win32 compiler)
1469 #include <windows.h>
1474 AC_MSG_RESULT($have_win32_gcc)
1475 if test x$have_win32_gcc != xyes; then
1477 *** Your compiler ($CC) does not produce Win32 executables!
1481 dnl See if the user wants to redirect standard output to files
1482 AC_ARG_ENABLE(stdio-redirect,
1483 [ --enable-stdio-redirect Redirect STDIO to files on Win32 [default=yes]],
1484 , enable_stdio_redirect=yes)
1485 if test x$enable_stdio_redirect != xyes; then
1486 CFLAGS="$CFLAGS -DNO_STDIO_REDIRECT"
1490 dnl Find the DirectX includes and libraries
1493 AC_ARG_ENABLE(directx,
1494 [ --enable-directx use DirectX for Win32 audio/video [default=yes]],
1495 , enable_directx=yes)
1496 if test x$enable_directx = xyes; then
1497 AC_MSG_CHECKING(for DirectX headers and libraries)
1500 CFLAGS="$CFLAGS -I$srcdir"
1502 #include "src/video/windx5/directx.h"
1508 AC_MSG_RESULT($use_directx)
1511 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video/wincommon"
1512 SYSTEM_LIBS="$SYSTEM_LIBS -luser32 -lgdi32 -lwinmm"
1513 VIDEO_SUBDIRS="$VIDEO_SUBDIRS wincommon"
1514 VIDEO_DRIVERS="$VIDEO_DRIVERS wincommon/libvideo_wincommon.la"
1515 # Enable the DIB driver
1516 CFLAGS="$CFLAGS -DENABLE_WINDIB"
1517 VIDEO_SUBDIRS="$VIDEO_SUBDIRS windib"
1518 VIDEO_DRIVERS="$VIDEO_DRIVERS windib/libvideo_windib.la"
1519 # See if we should enable the DirectX driver
1520 if test x$use_directx = xyes; then
1521 CFLAGS="$CFLAGS -DENABLE_DIRECTX"
1522 SYSTEM_LIBS="$SYSTEM_LIBS -ldxguid"
1523 VIDEO_SUBDIRS="$VIDEO_SUBDIRS windx5"
1524 VIDEO_DRIVERS="$VIDEO_DRIVERS windx5/libvideo_windx5.la"
1528 dnl Set up the BWindow video driver on BeOS
1531 CFLAGS="$CFLAGS -DENABLE_BWINDOW"
1532 VIDEO_SUBDIRS="$VIDEO_SUBDIRS bwindow"
1533 VIDEO_DRIVERS="$VIDEO_DRIVERS bwindow/libvideo_bwindow.la"
1536 dnl Set up the QTopia video driver if enabled
1539 AC_ARG_ENABLE(video-qtopia,
1540 [ --enable-video-qtopia use Qtopia video driver [default=no]],
1541 , enable_video_qtopia=no)
1542 if test x$enable_video = xyes -a x$enable_video_qtopia = xyes; then
1543 AC_MSG_CHECKING(for Qtopia support)
1547 CXXFLAGS="-DQT_QWS_EBX -fno-rtti -fno-exceptions -DQT_QWS_CUSTOM -DQWS -I${QPEDIR}/include -I${QTDIR}/include/ -DNO_DEBUG"
1549 #include <qpe/qpeapplication.h>
1555 AC_MSG_RESULT($video_qtopia)
1556 if test x$video_qtopia = xyes; then
1557 CFLAGS="$CFLAGS -DENABLE_QTOPIA -DQT_QWS_EBX -DQT_QWS_CUSTOM -DQWS -I${QPEDIR}/include -I${QTDIR}/include/ -DNO_DEBUG -fno-rtti -fno-exceptions"
1558 SDL_LIBS="$SDL_LIBS -L${QPEDIR}/lib -L${QTDIR}/lib/ -lqpe -lqte"
1559 SDL_CFLAGS="$SDL_CFLAGS -DQWS"
1560 VIDEO_SUBDIRS="$VIDEO_SUBDIRS qtopia"
1561 VIDEO_DRIVERS="$VIDEO_DRIVERS qtopia/libvideo_qtopia.la"
1564 *** Failed to find Qtopia includes. Make sure that the QTDIR and QPEDIR
1565 *** environment variables are set correctly.])
1571 dnl Set up the PicoGUI video driver if enabled
1574 AC_ARG_ENABLE(video-picogui,
1575 [ --enable-video-picogui use PicoGUI video driver [default=no]],
1576 , enable_video_picogui=no)
1577 if test x$enable_video = xyes -a x$enable_video_picogui = xyes; then
1578 AC_MSG_CHECKING(for PicoGUI support)
1581 #include <picogui.h>
1586 AC_MSG_RESULT($video_picogui)
1587 if test x$video_picogui = xyes; then
1588 SDL_LIBS="$SDL_LIBS -lpgui"
1589 CFLAGS="$CFLAGS -DENABLE_PICOGUI"
1590 VIDEO_SUBDIRS="$VIDEO_SUBDIRS picogui"
1591 VIDEO_DRIVERS="$VIDEO_DRIVERS picogui/libvideo_picogui.la"
1597 dnl Set up the Mac toolbox video driver for Mac OS 7-9
1600 VIDEO_SUBDIRS="$VIDEO_SUBDIRS maccommon"
1601 VIDEO_DRIVERS="$VIDEO_DRIVERS maccommon/libvideo_maccommon.la"
1602 VIDEO_SUBDIRS="$VIDEO_SUBDIRS macrom"
1603 VIDEO_DRIVERS="$VIDEO_DRIVERS macrom/libvideo_macrom.la"
1606 dnl Set up the Mac toolbox video driver for Mac OS X
1609 # "MACOSX" is not an official definition, but it's commonly
1610 # accepted as a way to differentiate between what runs on X
1611 # and what runs on older Macs - while in theory "Carbon" defns
1612 # are consistent between the two, in practice Carbon is still
1613 # changing. -sts Aug 2000
1614 mac_autoconf_target_workaround="MAC"
1615 CFLAGS="$CFLAGS -I/System/Library/Frameworks/Carbon.framework/Headers \
1616 -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"
1617 VIDEO_SUBDIRS="$VIDEO_SUBDIRS maccommon"
1618 VIDEO_DRIVERS="$VIDEO_DRIVERS maccommon/libvideo_maccommon.la"
1619 VIDEO_SUBDIRS="$VIDEO_SUBDIRS macrom"
1620 VIDEO_DRIVERS="$VIDEO_DRIVERS macrom/libvideo_macrom.la"
1623 dnl Set up the Mac toolbox video driver for Mac OS X
1626 # "MACOSX" is not an official definition, but it's commonly
1627 # accepted as a way to differentiate between what runs on X
1628 # and what runs on older Macs - while in theory "Carbon" defns
1629 # are consistent between the two, in practice Carbon is still
1630 # changing. -sts Aug 2000
1631 mac_autoconf_target_workaround="MAC"
1632 CFLAGS="$CFLAGS -I/System/Library/Frameworks/Carbon.framework/Headers \
1633 -I/System/Library/Frameworks/Cocoa.framework/Headers -fpascal-strings \
1634 -DENABLE_QUARTZ -DMACOSX -DTARGET_API_${mac_autoconf_target_workaround}_CARBON=1 -I\$(top_srcdir)/src/video/quartz"
1635 VIDEO_SUBDIRS="$VIDEO_SUBDIRS quartz"
1636 VIDEO_DRIVERS="$VIDEO_DRIVERS quartz/libvideo_quartz.la"
1639 dnl Check for the dlfcn.h interface for dynamically loading objects
1642 AC_ARG_ENABLE(sdl-dlopen,
1643 [ --enable-sdl-dlopen use dlopen for shared object loading [default=yes]],
1644 , enable_sdl_dlopen=yes)
1645 if test x$enable_sdl_dlopen = xyes; then
1646 AC_MSG_CHECKING(for dlopen)
1654 AC_MSG_RESULT($use_dlopen)
1656 if test x$use_dlopen = xyes; then
1657 CFLAGS="$CFLAGS -DUSE_DLOPEN"
1658 AC_CHECK_LIB(c, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS",
1659 AC_CHECK_LIB(dl, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS -ldl",
1660 AC_CHECK_LIB(ltdl, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS -lltdl")))
1665 dnl Set up the Atari LDG (shared object loader)
1668 AC_ARG_ENABLE(atari-ldg,
1669 [ --enable-atari-ldg use Atari LDG for shared object loading [default=yes]],
1670 , enable_atari_ldg=yes)
1671 if test x$video_gem = xyes -a x$enable_atari_ldg = xyes; then
1672 AC_CHECK_HEADER(ldg.h, have_ldg_hdr=yes)
1673 AC_CHECK_LIB(ldg, ldg_open, have_ldg_lib=yes, have_ldg_lib=no, -lgem)
1674 if test x$have_ldg_hdr = xyes -a x$have_ldg_lib = xyes; then
1675 CFLAGS="$CFLAGS -DENABLE_LDG"
1676 SYSTEM_LIBS="$SYSTEM_LIBS -lldg -lgem"
1681 dnl Check for the usbhid(3) library on *BSD
1684 if test x$enable_joystick = xyes; then
1687 AC_CHECK_LIB(usbhid, hid_init, have_libusbhid=yes)
1688 AC_CHECK_LIB(usb, hid_init, have_libusb=yes)
1689 if test x$have_libusbhid = xyes; then
1690 SYSTEM_LIBS="$SYSTEM_LIBS -lusbhid"
1692 if test x$have_libusb = xyes; then
1693 SYSTEM_LIBS="$SYSTEM_LIBS -lusb"
1696 AC_CHECK_HEADER(usb.h, have_usb_h=yes)
1697 AC_CHECK_HEADER(usbhid.h, have_usbhid_h=yes)
1698 AC_CHECK_HEADER(libusb.h, have_libusb_h=yes)
1699 AC_CHECK_HEADER(libusbhid.h, have_libusbhid_h=yes)
1700 if test x$have_usb_h = xyes; then
1701 CFLAGS="$CFLAGS -DHAVE_USB_H"
1703 if test x$have_usbhid_h = xyes; then
1704 CFLAGS="$CFLAGS -DHAVE_USBHID_H"
1706 if test x$have_libusb_h = xyes; then
1707 CFLAGS="$CFLAGS -DHAVE_LIBUSB_H"
1709 if test x$have_libusbhid_h = xyes; then
1710 CFLAGS="$CFLAGS -DHAVE_LIBUSBHID_H"
1713 AC_MSG_CHECKING(for usbhid)
1716 #include <sys/types.h>
1717 #if defined(HAVE_USB_H)
1720 #include <dev/usb/usb.h>
1721 #include <dev/usb/usbhid.h>
1722 #if defined(HAVE_USBHID_H)
1724 #elif defined(HAVE_LIBUSB_H)
1726 #elif defined(HAVE_LIBUSBHID_H)
1727 #include <libusbhid.h>
1730 struct report_desc *repdesc;
1731 struct usb_ctl_report *repbuf;
1736 AC_MSG_RESULT($have_usbhid)
1738 if test x$have_usbhid = xyes; then
1739 AC_MSG_CHECKING(for ucr_data member of usb_ctl_report)
1740 have_usbhid_ucr_data=no
1742 #include <sys/types.h>
1743 #if defined(HAVE_USB_H)
1746 #include <dev/usb/usb.h>
1747 #include <dev/usb/usbhid.h>
1748 #if defined(HAVE_USBHID_H)
1750 #elif defined(HAVE_LIBUSB_H)
1752 #elif defined(HAVE_LIBUSBHID_H)
1753 #include <libusbhid.h>
1756 struct usb_ctl_report buf;
1757 if (buf.ucr_data) { }
1759 have_usbhid_ucr_data=yes
1761 if test x$have_usbhid_ucr_data = xyes; then
1762 CFLAGS="$CFLAGS -DUSBHID_UCR_DATA"
1764 AC_MSG_RESULT($have_usbhid_ucr_data)
1766 AC_MSG_CHECKING(for new usbhid API)
1769 #include <sys/types.h>
1770 #if defined(HAVE_USB_H)
1773 #include <dev/usb/usb.h>
1774 #include <dev/usb/usbhid.h>
1775 #if defined(HAVE_USBHID_H)
1777 #elif defined(HAVE_LIBUSB_H)
1779 #elif defined(HAVE_LIBUSBHID_H)
1780 #include <libusbhid.h>
1784 hid_start_parse(d, 1, 1);
1788 if test x$have_usbhid_new = xyes; then
1789 CFLAGS="$CFLAGS -DUSBHID_NEW"
1791 AC_MSG_RESULT($have_usbhid_new)
1793 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS bsd"
1794 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS bsd/libjoystick_bsd.la"
1799 dnl Check for altivec instruction support using gas syntax
1802 AC_MSG_CHECKING(for GCC Altivec instruction support)
1806 asm volatile ("mtspr 256, %0\n\t"
1807 "vand %%v0, %%v0, %%v0"
1811 have_gcc_altivec=yes
1813 if test x$have_gcc_altivec = xyes; then
1814 CFLAGS="$CFLAGS -DGCC_ALTIVEC"
1816 AC_MSG_RESULT($have_gcc_altivec)
1820 *-*-linux*|*-*-gnu*|*-*-k*bsd*-gnu)
1822 *-*-linux*) ARCH=linux ;;
1823 *-*-kfreebsd*-gnu) ARCH=kfreebsd-gnu ;;
1824 *-*-knetbsd*-gnu) ARCH=knetbsd-gnu ;;
1825 *-*-kopenbsd*-gnu) ARCH=kopenbsd-gnu ;;
1826 *-*-gnu*) ARCH=gnu ;; # must be last
1853 # Set up files for the main() stub
1854 if test "x$video_qtopia" = "xyes"; then
1855 SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
1856 SDL_LIBS="-lSDLmain $SDL_LIBS"
1858 # Set up files for the audio library
1859 # We use the OSS and ALSA API's, not the Sun audio API
1860 #if test x$enable_audio = xyes; then
1861 # CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1862 # AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1863 # AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1865 # Set up files for the joystick library
1866 if test x$enable_joystick = xyes; then
1869 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS linux"
1870 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS linux/libjoystick_linux.la"
1873 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1874 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1877 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS bsd"
1878 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS bsd/libjoystick_bsd.la"
1882 # Set up files for the cdrom library
1883 if test x$enable_cdrom = xyes; then
1886 CDROM_SUBDIRS="$CDROM_SUBDIRS linux"
1887 CDROM_DRIVERS="$CDROM_DRIVERS linux/libcdrom_linux.la"
1890 CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
1891 CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
1894 CDROM_SUBDIRS="$CDROM_SUBDIRS freebsd"
1895 CDROM_DRIVERS="$CDROM_DRIVERS freebsd/libcdrom_freebsd.la"
1897 knetbsd-gnu|kopenbsd-gnu)
1898 CDROM_SUBDIRS="$CDROM_SUBDIRS openbsd"
1899 CDROM_DRIVERS="$CDROM_DRIVERS openbsd/libcdrom_openbsd.la"
1903 # Set up files for the thread library
1904 if test x$enable_threads = xyes; then
1905 CopyUnixThreadSource
1907 # Set up files for the timer library
1908 if test x$enable_timers = xyes; then
1909 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1929 # Set up files for the audio library
1930 # We use the OSS and ALSA API's, not the Sun audio API
1931 #if test x$enable_audio = xyes; then
1932 # CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1933 # AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1934 # AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1936 # Set up files for the joystick library
1937 # (No joystick support yet)
1938 if test x$enable_joystick = xyes; then
1939 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1940 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1942 # Set up files for the cdrom library
1943 if test x$enable_cdrom = xyes; then
1944 CDROM_SUBDIRS="$CDROM_SUBDIRS bsdi"
1945 CDROM_DRIVERS="$CDROM_DRIVERS bsdi/libcdrom_bsdi.la"
1947 # Set up files for the thread library
1948 if test x$enable_threads = xyes; then
1949 CopyUnixThreadSource
1951 # Set up files for the timer library
1952 if test x$enable_timers = xyes; then
1953 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1975 # Set up files for the audio library
1976 # We use the OSS and ALSA API's, not the Sun audio API
1977 #if test x$enable_audio = xyes; then
1978 # CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1979 # AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1980 # AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1982 # Set up files for the cdrom library
1983 if test x$enable_cdrom = xyes; then
1984 CDROM_SUBDIRS="$CDROM_SUBDIRS freebsd"
1985 CDROM_DRIVERS="$CDROM_DRIVERS freebsd/libcdrom_freebsd.la"
1987 # Set up files for the thread library
1988 if test x$enable_threads = xyes; then
1989 CopyUnixThreadSource
1991 # Set up files for the timer library
1992 if test x$enable_timers = xyes; then
1993 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
2012 # Set up files for the audio library
2013 if test x$enable_audio = xyes; then
2014 CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
2015 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
2016 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
2018 # Set up files for the cdrom library
2019 if test x$enable_cdrom = xyes; then
2020 CDROM_SUBDIRS="$CDROM_SUBDIRS openbsd"
2021 CDROM_DRIVERS="$CDROM_DRIVERS openbsd/libcdrom_openbsd.la"
2023 # Set up files for the thread library
2024 if test x$enable_threads = xyes; then
2025 if test x$use_pthreads = xyes; then
2026 CFLAGS="$CFLAGS -D_POSIX_THREAD_SYSCALL_SOFT=1"
2028 CopyUnixThreadSource
2030 # Set up files for the timer library
2031 if test x$enable_timers = xyes; then
2032 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
2034 # NetBSD does not define "unix"
2035 CFLAGS="$CFLAGS -Dunix"
2053 # Set up files for the audio library
2054 if test x$enable_audio = xyes; then
2055 CFLAGS="$CFLAGS -DOPENBSD_AUDIO_SUPPORT"
2056 AUDIO_SUBDIRS="$AUDIO_SUBDIRS openbsd"
2057 AUDIO_DRIVERS="$AUDIO_DRIVERS openbsd/libaudio_openbsd.la"
2059 # OpenBSD needs linking with ossaudio emulation library
2060 if test x$have_oss = xyes; then
2061 SYSTEM_LIBS="$SYSTEM_LIBS -lossaudio"
2063 # Set up files for the cdrom library
2064 if test x$enable_cdrom = xyes; then
2065 CDROM_SUBDIRS="$CDROM_SUBDIRS openbsd"
2066 CDROM_DRIVERS="$CDROM_DRIVERS openbsd/libcdrom_openbsd.la"
2068 # Set up files for the thread library
2069 if test x$enable_threads = xyes; then
2070 CopyUnixThreadSource
2072 # Set up files for the timer library
2073 if test x$enable_timers = xyes; then
2074 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
2076 # OpenBSD does not define "unix"
2077 CFLAGS="$CFLAGS -Dunix"
2094 # Set up files for the audio library
2095 if test x$enable_audio = xyes; then
2096 CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
2097 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
2098 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
2100 # Set up files for the joystick library
2101 # (No joystick support yet)
2102 if test x$enable_joystick = xyes; then
2103 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
2104 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
2106 # Set up files for the cdrom library
2107 if test x$enable_cdrom = xyes; then
2108 CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
2109 CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
2111 # Set up files for the thread library
2112 if test x$enable_threads = xyes; then
2113 CopyUnixThreadSource
2115 # Set up files for the timer library
2116 if test x$enable_timers = xyes; then
2117 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
2122 CFLAGS="$CFLAGS -D__ELF__" # Fix for nasm on Solaris x86
2136 # Set up files for the audio library
2137 if test x$enable_audio = xyes; then
2138 CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
2139 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
2140 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
2142 # Set up files for the joystick library
2143 # (No joystick support yet)
2144 if test x$enable_joystick = xyes; then
2145 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
2146 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
2148 # Set up files for the cdrom library
2149 if test x$enable_cdrom = xyes; then
2150 CDROM_SUBDIRS="$CDROM_SUBDIRS linux"
2151 CDROM_DRIVERS="$CDROM_DRIVERS linux/libcdrom_linux.la"
2153 # Set up files for the thread library
2154 if test x$enable_threads = xyes; then
2155 CopyUnixThreadSource
2157 # Set up files for the timer library
2158 if test x$enable_timers = xyes; then
2159 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
2175 # We use the dmedia audio API, not the Sun audio API
2176 #if test x$enable_audio = xyes; then
2177 # CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
2178 # AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
2179 # AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
2181 # Set up files for the joystick library
2182 # (No joystick support yet)
2183 if test x$enable_joystick = xyes; then
2184 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
2185 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
2187 # Set up files for the cdrom library
2188 # (No CD-ROM support yet)
2189 if test x$enable_cdrom = xyes; then
2190 CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
2191 CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
2193 # Set up files for the thread library
2194 if test x$enable_threads = xyes; then
2195 if test x$use_pthreads = xyes -o x$use_pth = xyes; then
2196 CopyUnixThreadSource
2198 COPY_ARCH_SRC(src/thread, irix, SDL_systhread.c)
2199 COPY_ARCH_SRC(src/thread, irix, SDL_systhread_c.h)
2200 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
2201 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
2202 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
2203 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
2204 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
2205 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
2208 # Set up files for the timer library
2209 if test x$enable_timers = xyes; then
2210 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
2226 # Set up files for the audio library
2227 if test x$enable_audio = xyes; then
2228 CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
2229 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
2230 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
2232 # Set up files for the joystick library
2233 # (No joystick support yet)
2234 if test x$enable_joystick = xyes; then
2235 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
2236 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
2238 # Set up files for the cdrom library
2239 # (No CD-ROM support yet)
2240 if test x$enable_cdrom = xyes; then
2241 CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
2242 CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
2244 # Set up files for the thread library
2245 if test x$enable_threads = xyes; then
2246 CopyUnixThreadSource
2248 # Set up files for the timer library
2249 if test x$enable_timers = xyes; then
2250 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
2266 # Set up files for the audio library
2267 if test x$enable_audio = xyes; then
2268 AUDIO_SUBDIRS="$AUDIO_SUBDIRS paudio"
2269 AUDIO_DRIVERS="$AUDIO_DRIVERS paudio/libaudio_paudio.la"
2271 # Set up files for the joystick library
2272 # (No joystick support yet)
2273 if test x$enable_joystick = xyes; then
2274 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
2275 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
2277 # Set up files for the cdrom library
2278 if test x$enable_cdrom = xyes; then
2279 CDROM_SUBDIRS="$CDROM_SUBDIRS aix"
2280 CDROM_DRIVERS="$CDROM_DRIVERS aix/libcdrom_aix.la"
2282 # Set up files for the thread library
2283 if test x$enable_threads = xyes; then
2284 CopyUnixThreadSource
2286 # Set up files for the timer library
2287 if test x$enable_timers = xyes; then
2288 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
2303 # Set up files for the audio library
2304 if test x$enable_audio = xyes; then
2305 CFLAGS="$CFLAGS -I/usr/include/mme -DMMEAUDIO_SUPPORT"
2306 SYSTEM_LIBS="$SYSTEM_LIBS -lmme"
2307 AUDIO_SUBDIRS="$AUDIO_SUBDIRS mme"
2308 AUDIO_DRIVERS="$AUDIO_DRIVERS mme/libaudio_mme.la"
2310 # Set up files for the joystick library
2311 # (No joystick support yet)
2312 if test x$enable_joystick = xyes; then
2313 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
2314 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
2316 # Set up files for the cdrom library
2317 # (No cdrom support yet)
2318 if test x$enable_cdrom = xyes; then
2319 CDROM_SUBDIRS="$CDROM_SUBDIRS osf"
2320 CDROM_DRIVERS="$CDROM_DRIVERS osf/libcdrom_osf.la"
2322 # Set up files for the thread library
2323 if test x$enable_threads = xyes; then
2324 CopyUnixThreadSource
2326 # Set up files for the timer library
2327 if test x$enable_timers = xyes; then
2328 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
2343 # Set up files for the audio library
2344 if test x$enable_audio = xyes; then
2345 CFLAGS="$CFLAGS -DQNXNTOAUDIO_SUPPORT"
2346 SYSTEM_LIBS="$SYSTEM_LIBS -lasound"
2347 AUDIO_SUBDIRS="$AUDIO_SUBDIRS nto"
2348 AUDIO_DRIVERS="$AUDIO_DRIVERS nto/libaudio_nto.la"
2350 # Set up files for the joystick library
2351 if test x$enable_joystick = xyes; then
2352 # (No joystick support yet)
2353 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
2354 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
2356 # Set up files for the cdrom library
2357 if test x$enable_cdrom = xyes; then
2358 CDROM_SUBDIRS="$CDROM_SUBDIRS qnx"
2359 CDROM_DRIVERS="$CDROM_DRIVERS qnx/libcdrom_qnx.la"
2361 # Set up files for the thread library
2362 if test x$enable_threads = xyes; then
2363 CopyUnixThreadSource
2365 # Set up files for the timer library
2366 if test x$enable_timers = xyes; then
2367 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
2370 *-*-cygwin* | *-*-mingw32*)
2372 if test "$build" != "$target"; then # cross-compiling
2373 # Default cross-compile location
2374 ac_default_prefix=/usr/local/cross-tools/i386-mingw32msvc
2376 # Look for the location of the tools and install there
2377 if test "$BUILD_PREFIX" != ""; then
2378 ac_default_prefix=$BUILD_PREFIX
2386 # Set up files for the audio library
2387 if test x$enable_audio = xyes; then
2388 AUDIO_SUBDIRS="$AUDIO_SUBDIRS windib"
2389 AUDIO_DRIVERS="$AUDIO_DRIVERS windib/libaudio_windib.la"
2390 if test x$use_directx = xyes; then
2391 AUDIO_SUBDIRS="$AUDIO_SUBDIRS windx5"
2392 AUDIO_DRIVERS="$AUDIO_DRIVERS windx5/libaudio_windx5.la"
2395 # Set up files for the joystick library
2396 if test x$enable_joystick = xyes; then
2397 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS win32"
2398 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS win32/libjoystick_winmm.la"
2400 # Set up files for the cdrom library
2401 if test x$enable_cdrom = xyes; then
2402 CDROM_SUBDIRS="$CDROM_SUBDIRS win32"
2403 CDROM_DRIVERS="$CDROM_DRIVERS win32/libcdrom_win32.la"
2405 # Set up files for the thread library
2406 if test x$enable_threads = xyes; then
2407 COPY_ARCH_SRC(src/thread, win32, SDL_systhread.c)
2408 COPY_ARCH_SRC(src/thread, win32, SDL_systhread_c.h)
2409 COPY_ARCH_SRC(src/thread, win32, SDL_sysmutex.c)
2410 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
2411 COPY_ARCH_SRC(src/thread, win32, SDL_syssem.c)
2412 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
2413 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
2414 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
2416 # Set up files for the timer library
2417 if test x$enable_timers = xyes; then
2418 COPY_ARCH_SRC(src/timer, win32, SDL_systimer.c)
2420 # The Win32 platform requires special setup
2421 SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
2424 CFLAGS="$CFLAGS -I/usr/include/mingw -DWIN32 -Uunix -mno-cygwin"
2425 SDL_CFLAGS="$SDL_CFLAGS -I/usr/include/mingw -DWIN32 -Uunix -mno-cygwin"
2426 LIBS="$LIBS -mno-cygwin"
2427 SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows -mno-cygwin"
2430 SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows"
2436 ac_default_prefix=/boot/develop/tools/gnupro
2442 # Set up files for the audio library
2443 if test x$enable_audio = xyes; then
2444 AUDIO_SUBDIRS="$AUDIO_SUBDIRS baudio"
2445 AUDIO_DRIVERS="$AUDIO_DRIVERS baudio/libaudio_baudio.la"
2447 # Set up files for the joystick library
2448 if test x$enable_joystick = xyes; then
2449 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS beos"
2450 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS beos/libjoystick_beos.la"
2452 # Set up files for the cdrom library
2453 if test x$enable_cdrom = xyes; then
2454 CDROM_SUBDIRS="$CDROM_SUBDIRS beos"
2455 CDROM_DRIVERS="$CDROM_DRIVERS beos/libcdrom_beos.la"
2457 # Set up files for the thread library
2458 if test x$enable_threads = xyes; then
2459 COPY_ARCH_SRC(src/thread, beos, SDL_systhread.c)
2460 COPY_ARCH_SRC(src/thread, beos, SDL_systhread_c.h)
2461 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
2462 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
2463 COPY_ARCH_SRC(src/thread, beos, SDL_syssem.c)
2464 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
2465 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
2466 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
2468 # Set up files for the timer library
2469 if test x$enable_timers = xyes; then
2470 COPY_ARCH_SRC(src/timer, beos, SDL_systimer.c)
2472 # The BeOS platform requires special libraries
2473 SYSTEM_LIBS="$SYSTEM_LIBS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
2476 # This would be used if cross-compiling to MacOS 9. No way to
2477 # use it at present, but Apple is working on a X-to-9 compiler
2478 # for which this case would be handy.
2484 # Set up files for the audio library
2485 if test x$enable_audio = xyes; then
2486 AUDIO_SUBDIRS="$AUDIO_SUBDIRS macrom"
2487 AUDIO_DRIVERS="$AUDIO_DRIVERS macrom/libaudio_macrom.la"
2489 # Set up files for the joystick library
2490 if test x$enable_joystick = xyes; then
2491 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS macos"
2492 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS macos/libjoystick_macos.la"
2494 # Set up files for the cdrom library
2495 if test x$enable_cdrom = xyes; then
2496 CDROM_SUBDIRS="$CDROM_SUBDIRS macos"
2497 CDROM_DRIVERS="$CDROM_DRIVERS macos/libcdrom_macos.la"
2499 # Set up files for the thread library
2500 if test x$enable_threads = xyes; then
2501 COPY_ARCH_SRC(src/thread, macos, SDL_systhread.c)
2502 COPY_ARCH_SRC(src/thread, macos, SDL_systhread_c.h)
2503 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
2504 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
2505 COPY_ARCH_SRC(src/thread, macos, SDL_syssem.c)
2506 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
2507 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
2508 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
2510 # Set up files for the timer library
2511 if test x$enable_timers = xyes; then
2512 COPY_ARCH_SRC(src/timer, macos, SDL_systimer.c)
2514 # The MacOS platform requires special setup
2515 SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
2516 SDL_LIBS="-lSDLmain $SDL_LIBS"
2519 # Strictly speaking, we want "Mac OS X", not "Darwin", which is
2520 # just the OS X kernel sans upper layers like Carbon and Cocoa.
2521 # But config.guess comes back with "darwin", so go with the flow.
2529 # If either the audio or CD driver is used, add the AudioUnit framework
2530 if test x$enable_audio = xyes -o x$enable_cdrom = xyes; then
2531 SYSTEM_LIBS="$SYSTEM_LIBS -framework AudioToolbox -framework AudioUnit"
2533 # Set up files for the audio library
2534 if test x$enable_audio = xyes; then
2535 AUDIO_SUBDIRS="$AUDIO_SUBDIRS macosx"
2536 AUDIO_DRIVERS="$AUDIO_DRIVERS macosx/libaudio_macosx.la"
2537 AUDIO_SUBDIRS="$AUDIO_SUBDIRS macrom"
2538 AUDIO_DRIVERS="$AUDIO_DRIVERS macrom/libaudio_macrom.la"
2540 # Set up files for the joystick library
2541 if test x$enable_joystick = xyes; then
2542 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS darwin"
2543 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS darwin/libjoystick_darwin.la"
2544 SYSTEM_LIBS="$SYSTEM_LIBS -framework IOKit"
2546 # Set up files for the cdrom library
2547 if test x$enable_cdrom = xyes; then
2548 CDROM_SUBDIRS="$CDROM_SUBDIRS macosx"
2549 CDROM_DRIVERS="$CDROM_DRIVERS macosx/libcdrom_macosx.la"
2550 SYSTEM_LIBS="$SYSTEM_LIBS -lstdc++"
2552 # Set up files for the thread library
2553 if test x$enable_threads = xyes; then
2554 CopyUnixThreadSource
2556 # Set up files for the timer library
2557 if test x$enable_timers = xyes; then
2558 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
2560 # The MacOS X platform requires special setup.
2561 SDL_LIBS="-lSDLmain $SDL_LIBS"
2562 # The Cocoa backend still needs Carbon, and the YUV code QuickTime
2563 SYSTEM_LIBS="$SYSTEM_LIBS -framework Cocoa -framework Carbon -framework QuickTime"
2570 CheckAtariXbiosVideo
2575 # Set up files for the audio library
2576 if test x$enable_threads = xyes -a x$enable_pth = xyes; then
2577 if test x$enable_audio = xyes; then
2578 CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
2579 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
2580 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
2583 # Set up files for the joystick library
2584 if test x$enable_joystick = xyes; then
2585 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS mint"
2586 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS mint/libjoystick_mint.la"
2588 # Set up files for the cdrom library
2589 if test x$enable_cdrom = xyes; then
2590 CDROM_SUBDIRS="$CDROM_SUBDIRS mint"
2591 CDROM_DRIVERS="$CDROM_DRIVERS mint/libcdrom_mint.la"
2593 # Set up files for the thread library
2594 if test x$enable_threads = xyes; then
2595 CopyUnixThreadSource
2597 # Set up files for the timer library
2598 if test x$enable_timers = xyes; then
2599 if test x$enable_threads = xyes -a x$enable_pth = xyes; then
2600 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
2602 COPY_ARCH_SRC(src/timer, mint, SDL_systimer.c)
2605 # MiNT does not define "unix"
2606 CFLAGS="$CFLAGS -Dunix"
2610 # Set up files for the video library
2611 if test x$enable_video = xyes; then
2612 VIDEO_SUBDIRS="$VIDEO_SUBDIRS riscos"
2613 VIDEO_DRIVERS="$VIDEO_DRIVERS riscos/libvideo_riscos.la"
2615 # Set up files for the audio library
2616 if test x$enable_audio = xyes; then
2617 AUDIO_SUBDIRS="$AUDIO_SUBDIRS riscos"
2618 AUDIO_DRIVERS="$AUDIO_DRIVERS riscos/libaudio_riscos.la"
2620 # Set up files for the joystick library
2621 if test x$enable_joystick = xyes; then
2622 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS riscos"
2623 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS riscos/libjoystick_riscos.la"
2625 # Set up files for the cdrom library
2626 if test x$enable_cdrom = xyes; then
2627 CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
2628 CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
2630 # Set up files for the thread library
2631 if test x$enable_threads = xyes; then
2632 COPY_ARCH_SRC(src/thread, riscos, SDL_systhread.c)
2633 COPY_ARCH_SRC(src/thread, riscos, SDL_systhread_c.h)
2634 COPY_ARCH_SRC(src/thread, riscos, SDL_sysmutex.c)
2635 COPY_ARCH_SRC(src/thread, riscos, SDL_sysmutex_c.h)
2636 COPY_ARCH_SRC(src/thread, riscos, SDL_syssem.c)
2637 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
2638 COPY_ARCH_SRC(src/thread, riscos, SDL_syscond.c)
2639 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
2641 CFLAGS="$CFLAGS -DDISABLE_THREADS"
2643 # Set up files for the timer library
2644 if test x$enable_timers = xyes; then
2645 COPY_ARCH_SRC(src/timer, riscos, SDL_systimer.c)
2648 CFLAGS="$CFLAGS -DENABLE_RISCOS -DDRENDERER_SUPPORT"
2650 SYSTEM_LIBS="$SYSTEM_LIBS -ljpeg -ltiff -lpng -lz"
2653 AC_MSG_ERROR(Unsupported target: Please add to configure.in)
2658 # Set the conditional variables for this target
2659 AM_CONDITIONAL(TARGET_LINUX, test $ARCH = linux)
2660 AM_CONDITIONAL(TARGET_QTOPIA, test "x$video_qtopia" = "xyes")
2661 AM_CONDITIONAL(TARGET_SOLARIS, test $ARCH = solaris)
2662 AM_CONDITIONAL(TARGET_IRIX, test $ARCH = irix)
2663 AM_CONDITIONAL(TARGET_BSDI, test $ARCH = bsdi)
2664 AM_CONDITIONAL(TARGET_FREEBSD, test $ARCH = freebsd)
2665 AM_CONDITIONAL(TARGET_NETBSD, test $ARCH = netbsd)
2666 AM_CONDITIONAL(TARGET_OPENBSD, test $ARCH = openbsd)
2667 AM_CONDITIONAL(TARGET_AIX, test $ARCH = aix)
2668 AM_CONDITIONAL(TARGET_WIN32, test $ARCH = win32)
2669 AM_CONDITIONAL(TARGET_BEOS, test $ARCH = beos)
2670 AM_CONDITIONAL(TARGET_MACOS, test $ARCH = macos)
2671 AM_CONDITIONAL(TARGET_MACOSX, test $ARCH = macosx)
2672 AM_CONDITIONAL(TARGET_QNX, test $ARCH = qnx)
2673 AM_CONDITIONAL(TARGET_MINT, test $ARCH = mint)
2675 # More automake conditionals
2676 AM_CONDITIONAL(USE_DIRECTX, test x$use_directx = xyes)
2677 AM_CONDITIONAL(USE_CLONE, test x$use_clone = xyes)
2678 AM_CONDITIONAL(HAVE_NASM, test x$use_nasm = xyes)
2680 # Set conditional variables for shared and static library selection.
2681 # These are not used in any Makefile.am but in sdl-config.in.
2682 AM_CONDITIONAL([ENABLE_SHARED], [test "$enable_shared" = yes])
2683 AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = yes])
2685 # Set runtime shared library paths as needed
2687 if test $ARCH = linux -o $ARCH = freebsd -o $ARCH = bsdi; then
2688 SDL_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib"
2690 if test $ARCH = solaris; then
2691 SDL_RLD_FLAGS="-R\${exec_prefix}/lib"
2695 openbsd | netbsd | bsdi)
2696 SHARED_SYSTEM_LIBS="$SYSTEM_LIBS"
2699 SHARED_SYSTEM_LIBS="$SYSTEM_LIBS"
2702 SHARED_SYSTEM_LIBS="-framework Cocoa"
2703 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
2704 SHARED_SYSTEM_LIBS="$SHARED_SYSTEM_LIBS -framework OpenGL"
2708 SHARED_SYSTEM_LIBS=""
2714 # Evil hack to allow static linking on Mac OS X
2715 SDL_STATIC_LIBS="\${exec_prefix}/lib/libSDLmain.a \${exec_prefix}/lib/libSDL.a"
2718 SDL_STATIC_LIBS="$SDL_LIBS"
2723 STATIC_SYSTEM_LIBS="$SYSTEM_LIBS"
2725 dnl Output the video drivers we use
2726 if test x$enable_video = xtrue; then
2727 if test "$VIDEO_SUBDIRS" = ""; then
2728 AC_MSG_ERROR(*** No video drivers are enabled!)
2731 AC_SUBST(AUDIO_SUBDIRS)
2732 AC_SUBST(AUDIO_DRIVERS)
2733 AC_SUBST(VIDEO_SUBDIRS)
2734 AC_SUBST(VIDEO_DRIVERS)
2735 AC_SUBST(JOYSTICK_SUBDIRS)
2736 AC_SUBST(JOYSTICK_DRIVERS)
2737 AC_SUBST(CDROM_SUBDIRS)
2738 AC_SUBST(CDROM_DRIVERS)
2739 AC_SUBST(SDL_EXTRADIRS)
2740 AC_SUBST(SDL_EXTRALIBS)
2742 dnl Expand the cflags and libraries needed by apps using SDL
2743 AC_SUBST(SDL_CFLAGS)
2745 AC_SUBST(SDL_STATIC_LIBS)
2746 AC_SUBST(SDL_RLD_FLAGS)
2748 dnl Expand the libraries needed for static and dynamic linking
2749 AC_SUBST(STATIC_SYSTEM_LIBS)
2750 AC_SUBST(SHARED_SYSTEM_LIBS)
2751 AC_SUBST(SYSTEM_LIBS)
2753 dnl Expand the include directories for building SDL
2754 CFLAGS="$CFLAGS -I\$(top_srcdir)/include"
2755 CFLAGS="$CFLAGS -I\$(top_srcdir)/include/SDL"
2756 CFLAGS="$CFLAGS -I\$(top_srcdir)/src -I\$(top_srcdir)/src/main/$ARCH"
2757 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/audio"
2758 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video"
2759 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video/XFree86/extensions"
2760 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/events"
2761 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/joystick"
2762 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/cdrom"
2763 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/thread"
2764 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/timer"
2765 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/endian"
2766 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/file"
2767 CFLAGS="$CFLAGS -I\$(top_builddir)/src/thread"
2771 # Check for darwin at the very end and set up the Objective C compiler
2772 # We do this here so that we get the full CFLAGS into OBJCFLAGS
2775 dnl AC_PROG_OBJC doesn't seem to exist, this is the SDL workaround
2776 AC_MSG_CHECKING(for an Objective-C compiler)
2781 dnl _AM_DEPENDENCIES(OBJC) doesn't work, so hard code OBJCDEPMODE here
2782 dnl _AM_DEPENDENCIES(OBJC)
2783 dnl Of course, hard coding doesn't work for some versions of automake
2784 OBJCDEPMODE="depmode=gcc"
2785 AC_SUBST(OBJCDEPMODE)
2786 dnl Trying this to satisfy everybody...
2787 AC_MSG_RESULT(not implemented yet)
2791 # Finally create all the generated files
2792 dnl Important: Any directory that you want to be in the distcheck should
2793 dnl have a file listed here, so that configure generates the
2794 dnl subdirectories on the build target.
2803 src/main/macosx/Makefile
2804 src/main/macosx/Info.plist
2806 src/audio/alsa/Makefile
2807 src/audio/arts/Makefile
2808 src/audio/baudio/Makefile
2809 src/audio/dc/Makefile
2810 src/audio/disk/Makefile
2811 src/audio/dma/Makefile
2812 src/audio/dmedia/Makefile
2813 src/audio/dsp/Makefile
2814 src/audio/esd/Makefile
2815 src/audio/macosx/Makefile
2816 src/audio/macrom/Makefile
2817 src/audio/mint/Makefile
2818 src/audio/mme/Makefile
2819 src/audio/nas/Makefile
2820 src/audio/nto/Makefile
2821 src/audio/openbsd/Makefile
2822 src/audio/paudio/Makefile
2823 src/audio/riscos/Makefile
2824 src/audio/sun/Makefile
2825 src/audio/ums/Makefile
2826 src/audio/windib/Makefile
2827 src/audio/windx5/Makefile
2829 src/video/aalib/Makefile
2830 src/video/ataricommon/Makefile
2831 src/video/bwindow/Makefile
2832 src/video/cybergfx/Makefile
2833 src/video/dc/Makefile
2834 src/video/dga/Makefile
2835 src/video/directfb/Makefile
2836 src/video/dummy/Makefile
2837 src/video/epoc/Makefile
2838 src/video/fbcon/Makefile
2839 src/video/gem/Makefile
2840 src/video/ggi/Makefile
2841 src/video/maccommon/Makefile
2842 src/video/macdsp/Makefile
2843 src/video/macrom/Makefile
2844 src/video/nanox/Makefile
2845 src/video/photon/Makefile
2846 src/video/picogui/Makefile
2847 src/video/ps2gs/Makefile
2848 src/video/qtopia/Makefile
2849 src/video/quartz/Makefile
2850 src/video/riscos/Makefile
2851 src/video/svga/Makefile
2852 src/video/vgl/Makefile
2853 src/video/wincommon/Makefile
2854 src/video/windib/Makefile
2855 src/video/windx5/Makefile
2856 src/video/x11/Makefile
2857 src/video/xbios/Makefile
2858 src/video/XFree86/Makefile
2859 src/video/XFree86/extensions/Makefile
2860 src/video/XFree86/Xinerama/Makefile
2861 src/video/XFree86/Xv/Makefile
2862 src/video/XFree86/Xxf86dga/Makefile
2863 src/video/XFree86/Xxf86vm/Makefile
2865 src/joystick/Makefile
2866 src/joystick/amigaos/Makefile
2867 src/joystick/beos/Makefile
2868 src/joystick/bsd/Makefile
2869 src/joystick/darwin/Makefile
2870 src/joystick/dc/Makefile
2871 src/joystick/dummy/Makefile
2872 src/joystick/linux/Makefile
2873 src/joystick/macos/Makefile
2874 src/joystick/mint/Makefile
2875 src/joystick/riscos/Makefile
2876 src/joystick/win32/Makefile
2878 src/cdrom/aix/Makefile
2879 src/cdrom/beos/Makefile
2880 src/cdrom/dc/Makefile
2881 src/cdrom/dummy/Makefile
2882 src/cdrom/bsdi/Makefile
2883 src/cdrom/freebsd/Makefile
2884 src/cdrom/linux/Makefile
2885 src/cdrom/macos/Makefile
2886 src/cdrom/macosx/Makefile
2887 src/cdrom/mint/Makefile
2888 src/cdrom/openbsd/Makefile
2889 src/cdrom/osf/Makefile
2890 src/cdrom/qnx/Makefile
2891 src/cdrom/win32/Makefile
2896 src/cpuinfo/Makefile
2901 ], [chmod +x sdl-config])