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
44 dnl Setup for automake
45 AM_INIT_AUTOMAKE(SDL, $SDL_VERSION)
62 # This is stupid, but necessary on some versions of Linux (joysticks)
70 dnl The alpha architecture needs special flags for binary portability
73 if test x$ac_cv_prog_gcc = xyes; then
74 CFLAGS="$CFLAGS -mcpu=ev4 -Wa,-mall"
79 dnl Add compiler-specific optimization flags
81 dnl See if the user wants aggressive optimizations of the code
83 [ --enable-debug Disable aggressive optimizations [default=yes]],
85 if test x$enable_debug != xyes; then
86 if test x$ac_cv_prog_gcc = xyes; then
87 CFLAGS="$CFLAGS -fexpensive-optimizations"
88 # Ack! This breaks the MMX YV12 conversion on gcc 2.95.2
89 # CFLAGS="$CFLAGS -fomit-frame-pointer"
93 if test x$ac_cv_prog_gcc = xyes; then
94 CFLAGS="$CFLAGS -march=486"
98 if test x$ac_cv_prog_gcc = xyes; then
99 CFLAGS="$CFLAGS -march=pentium -mcpu=pentiumpro"
103 if test x$ac_cv_prog_gcc != xyes; then
104 CFLAGS="-g3 -fast -arch host"
110 dnl Add verbose warnings by default, and allow ANSI compliance checking
111 AC_ARG_ENABLE(strict-ansi,
112 [ --enable-strict-ansi Enable strict ANSI compliance build [default=no]],
113 , enable_strict_ansi=no)
114 if test x$ac_cv_prog_gcc = xyes; then
115 CFLAGS="$CFLAGS -Wall"
116 if test x$enable_strict_ansi = xyes; then
117 CFLAGS="$CFLAGS -ansi -pedantic -D_XOPEN_SOURCE"
121 dnl Initialize the compiler and linker flags for SDL applications
126 dnl Add the math library for the new gamma correction support
129 *-*-cygwin* | *-*-mingw32*)
142 SYSTEM_LIBS="$SYSTEM_LIBS $MATHLIB"
144 dnl Enable/disable various subsystems of the SDL library
147 [ --enable-audio Enable the audio subsystem [default=yes]],
149 if test x$enable_audio = xyes; then
150 SDL_EXTRADIRS="$SDL_EXTRADIRS audio"
151 SDL_EXTRALIBS="$SDL_EXTRALIBS audio/libaudio.la"
153 CFLAGS="$CFLAGS -DDISABLE_AUDIO"
156 [ --enable-video Enable the video subsystem [default=yes]],
158 if test x$enable_video = xyes; then
159 SDL_EXTRADIRS="$SDL_EXTRADIRS video"
160 SDL_EXTRALIBS="$SDL_EXTRALIBS video/libvideo.la"
162 CFLAGS="$CFLAGS -DDISABLE_VIDEO"
164 AC_ARG_ENABLE(events,
165 [ --enable-events Enable the events subsystem [default=yes]],
167 if test x$enable_video = xyes -a x$enable_events = xyes; then
168 SDL_EXTRADIRS="$SDL_EXTRADIRS events"
169 SDL_EXTRALIBS="$SDL_EXTRALIBS events/libevents.la"
171 CFLAGS="$CFLAGS -DDISABLE_EVENTS"
173 AC_ARG_ENABLE(joystick,
174 [ --enable-joystick Enable the joystick subsystem [default=yes]],
175 , enable_joystick=yes)
176 if test x$enable_joystick = xyes; then
177 SDL_EXTRADIRS="$SDL_EXTRADIRS joystick"
178 SDL_EXTRALIBS="$SDL_EXTRALIBS joystick/libjoystick.la"
180 CFLAGS="$CFLAGS -DDISABLE_JOYSTICK"
183 [ --enable-cdrom Enable the cdrom subsystem [default=yes]],
185 if test x$enable_cdrom = xyes; then
186 SDL_EXTRADIRS="$SDL_EXTRADIRS cdrom"
187 SDL_EXTRALIBS="$SDL_EXTRALIBS cdrom/libcdrom.la"
189 CFLAGS="$CFLAGS -DDISABLE_CDROM"
191 AC_ARG_ENABLE(threads,
192 [ --enable-threads Enable the threading subsystem [default=yes]],
193 , enable_threads=yes)
194 SDL_EXTRADIRS="$SDL_EXTRADIRS thread"
195 SDL_EXTRALIBS="$SDL_EXTRALIBS thread/libthread.la"
196 if test x$enable_threads != xyes; then
197 CFLAGS="$CFLAGS -DDISABLE_THREADS"
198 COPY_ARCH_SRC(src/thread, generic, SDL_systhread.c)
199 COPY_ARCH_SRC(src/thread, generic, SDL_systhread_c.h)
200 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
201 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
202 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
203 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
204 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
205 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
207 AC_ARG_ENABLE(timers,
208 [ --enable-timers Enable the timer subsystem [default=yes]],
210 if test x$enable_timers = xyes; then
211 SDL_EXTRADIRS="$SDL_EXTRADIRS timer"
212 SDL_EXTRALIBS="$SDL_EXTRALIBS timer/libtimer.la"
214 CFLAGS="$CFLAGS -DDISABLE_TIMERS"
216 AC_ARG_ENABLE(endian,
217 [ --enable-endian Enable the endian subsystem [default=yes]],
219 if test x$enable_endian = xyes; then
220 SDL_EXTRADIRS="$SDL_EXTRADIRS endian"
221 SDL_EXTRALIBS="$SDL_EXTRALIBS endian/libendian.la"
223 CFLAGS="$CFLAGS -DDISABLE_ENDIAN"
226 [ --enable-file Enable the file subsystem [default=yes]],
228 if test x$enable_file = xyes; then
229 SDL_EXTRADIRS="$SDL_EXTRADIRS file"
230 SDL_EXTRALIBS="$SDL_EXTRALIBS file/libfile.la"
232 CFLAGS="$CFLAGS -DDISABLE_FILE"
235 dnl See if the OSS audio interface is supported
239 [ --enable-oss support the OSS audio API [default=yes]],
241 if test x$enable_audio = xyes -a x$enable_oss = xyes; then
242 AC_MSG_CHECKING(for OSS audio support)
244 if test x$have_oss != xyes; then
246 #include <sys/soundcard.h>
248 int arg = SNDCTL_DSP_SETFRAGMENT;
253 if test x$have_oss != xyes; then
255 #include <soundcard.h>
257 int arg = SNDCTL_DSP_SETFRAGMENT;
260 CFLAGS="$CFLAGS -DOSS_USE_SOUNDCARD_H"
263 AC_MSG_RESULT($have_oss)
264 if test x$have_oss = xyes; then
265 CFLAGS="$CFLAGS -DOSS_SUPPORT"
266 AUDIO_SUBDIRS="$AUDIO_SUBDIRS dsp"
267 AUDIO_DRIVERS="$AUDIO_DRIVERS dsp/libaudio_dsp.la"
268 AUDIO_SUBDIRS="$AUDIO_SUBDIRS dma"
269 AUDIO_DRIVERS="$AUDIO_DRIVERS dma/libaudio_dma.la"
274 dnl See if the ALSA audio interface is supported
278 [ --enable-alsa support the ALSA audio API [default=yes]],
280 if test x$enable_audio = xyes -a x$enable_alsa = xyes; then
282 AC_CHECK_HEADER(sys/asoundlib.h, have_alsa_hdr=yes)
283 AC_CHECK_LIB(asound, snd_pcm_open, have_alsa_lib=yes)
284 if test x$have_alsa_hdr = xyes -a x$have_alsa_lib = xyes; then
285 CFLAGS="$CFLAGS -DALSA_SUPPORT"
286 SYSTEM_LIBS="$SYSTEM_LIBS -lasound"
287 AUDIO_SUBDIRS="$AUDIO_SUBDIRS alsa"
288 AUDIO_DRIVERS="$AUDIO_DRIVERS alsa/libaudio_alsa.la"
293 dnl Check whether we want to use OpenBSD native audio or not
296 AC_ARG_ENABLE(openbsdaudio,
297 [ --enable-openbsdaudio OpenBSD native audio support [default=yes]],
298 , enable_openbsdaudio=yes)
299 if test x$enable_audio = xyes -a x$enable_openbsdaudio = xyes; then
300 CFLAGS="$CFLAGS -DOPENBSD_AUDIO_SUPPORT"
301 AUDIO_SUBDIRS="$AUDIO_SUBDIRS openbsd"
302 AUDIO_DRIVERS="$AUDIO_DRIVERS openbsd/libaudio_openbsd.la"
306 dnl Check whether we want to use IRIX 6.5+ native audio or not
309 if test x$enable_audio = xyes; then
310 AC_MSG_CHECKING(for dmedia audio support)
313 #include <dmedia/audio.h>
319 # Set up files for the audio library
320 if test x$have_dmedia = xyes; then
321 CFLAGS="$CFLAGS -DDMEDIA_SUPPORT"
322 AUDIO_SUBDIRS="$AUDIO_SUBDIRS dmedia"
323 AUDIO_DRIVERS="$AUDIO_DRIVERS dmedia/libaudio_dmedia.la"
324 SYSTEM_LIBS="$SYSTEM_LIBS -laudio"
329 dnl Find the ESD includes and libraries
333 [ --enable-esd support the Enlightened Sound Daemon [default=yes]],
335 if test x$enable_audio = xyes -a x$enable_esd = xyes; then
337 CFLAGS="$CFLAGS -DESD_SUPPORT $ESD_CFLAGS"
338 SYSTEM_LIBS="$SYSTEM_LIBS $ESD_LIBS"
339 AUDIO_SUBDIRS="$AUDIO_SUBDIRS esd"
340 AUDIO_DRIVERS="$AUDIO_DRIVERS esd/libaudio_esd.la"
348 [ --enable-arts support the Analog Real Time Synthesizer [default=yes]],
350 if test x$enable_audio = xyes -a x$enable_arts = xyes; then
351 AC_PATH_PROG(ARTSCCONFIG, artsc-config)
352 if test x$ARTSCCONFIG = x -o x$ARTSCCONFIG = x'"$ARTSCCONFIG"'; then
353 : # arts isn't installed
355 ARTSC_CFLAGS=`$ARTSCCONFIG --cflags`
356 ARTSC_LIBS=`$ARTSCCONFIG --libs`
357 AC_MSG_CHECKING(for aRts development environment)
359 save_CFLAGS="$CFLAGS"
360 CFLAGS="$CFLAGS $ARTSC_CFLAGS"
364 arts_stream_t stream;
368 CFLAGS="$save_CFLAGS"
369 AC_MSG_RESULT($audio_arts)
370 if test x$audio_arts = xyes; then
371 CFLAGS="$CFLAGS -DARTSC_SUPPORT $ARTSC_CFLAGS"
372 SYSTEM_LIBS="$SYSTEM_LIBS $ARTSC_LIBS"
373 AUDIO_SUBDIRS="$AUDIO_SUBDIRS arts"
374 AUDIO_DRIVERS="$AUDIO_DRIVERS arts/libaudio_arts.la"
380 dnl See if the NAS audio interface is supported
384 [ --enable-nas support the NAS audio API [default=yes]],
386 if test x$enable_audio = xyes -a x$enable_nas = xyes; then
387 AC_MSG_CHECKING(for NAS audio support)
389 if test -r /usr/X11R6/include/audio/audiolib.h; then
392 AC_MSG_RESULT($have_nas)
393 if test x$have_nas = xyes; then
394 CFLAGS="$CFLAGS -DNAS_SUPPORT"
395 SYSTEM_LIBS="$SYSTEM_LIBS -laudio -lXt"
396 AUDIO_SUBDIRS="$AUDIO_SUBDIRS nas"
397 AUDIO_DRIVERS="$AUDIO_DRIVERS nas/libaudio_nas.la"
402 dnl rcg07142001 See if the user wants the disk writer audio driver...
405 AC_ARG_ENABLE(diskaudio,
406 [ --enable-diskaudio support the disk writer audio driver [default=yes]],
407 , enable_diskaudio=yes)
408 if test x$enable_audio = xyes -a x$enable_diskaudio = xyes; then
409 CFLAGS="$CFLAGS -DDISKAUD_SUPPORT"
410 AUDIO_SUBDIRS="$AUDIO_SUBDIRS disk"
411 AUDIO_DRIVERS="$AUDIO_DRIVERS disk/libaudio_disk.la"
415 dnl See if we can use x86 assembly blitters
418 dnl Make sure we are running on an x86 platform
427 dnl Check for NASM (for assembly blit routines)
429 [ --enable-nasm use nasm assembly blitters on x86 [default=yes]],
431 if test x$enable_video = xyes -a x$enable_nasm = xyes; then
432 AC_PATH_PROG(NASM, nasm)
433 if test x$NASM = x -o x$NASM = x'"$NASM"'; then
434 : # nasm isn't installed
436 CFLAGS="$CFLAGS -DUSE_ASMBLIT -I$srcdir/hermes"
446 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/hermes"
447 SDL_EXTRADIRS="$SDL_EXTRADIRS hermes"
448 SDL_EXTRALIBS="$SDL_EXTRALIBS hermes/libhermes.la"
453 dnl Find the nanox include and library directories
456 AC_ARG_ENABLE(video-nanox,
457 [ --enable-video-nanox use nanox video driver [default=no]],
458 , enable_video_nanox=no)
459 AC_ARG_ENABLE(nanox-debug,
460 [ --enable-nanox-debug print debug messages [default=no]],
461 , enable_nanox_debug=no)
462 AC_ARG_ENABLE(nanox-share-memory,
463 [ --enable-nanox-share-memory use share memory [default=no]],
464 , enable_nanox_share_memory=no)
466 AC_ARG_WITH(nanox_pixel_type,
467 [ --with-nanox-pixel-type=[rgb/0888/888/565/555/332/pal]])
469 if test x$enable_video = xyes -a x$enable_video_nanox = xyes; then
470 if test x$enable_nanox_debug = xyes; then
471 CFLAGS="$CFLAGS -DENABLE_NANOX_DEBUG"
474 if test x$enable_nanox_share_memory = xyes; then
475 CFLAGS="$CFLAGS -DNANOX_SHARE_MEMORY"
478 case "$with_nanox_pixel_type" in
479 rgb) CFLAGS="$CFLAGS -DNANOX_PIXEL_RGB" ;;
480 0888) CFLAGS="$CFLAGS -DNANOX_PIXEL_0888" ;;
481 888) CFLAGS="$CFLAGS -DNANOX_PIXEL_888" ;;
482 565) CFLAGS="$CFLAGS -DNANOX_PIXEL_565" ;;
483 555) CFLAGS="$CFLAGS -DNANOX_PIXEL_555" ;;
484 332) CFLAGS="$CFLAGS -DNANOX_PIXEL_332" ;;
485 pal) CFLAGS="$CFLAGS -DNANOX_PIXEL_PAL" ;;
486 *) AC_MSG_ERROR([Invalid nanox_pixel_type]);;
489 CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_NANOX"
490 SYSTEM_LIBS="$SYSTEM_LIBS -lnano-X"
491 VIDEO_SUBDIRS="$VIDEO_SUBDIRS nanox"
492 VIDEO_DRIVERS="$VIDEO_DRIVERS nanox/libvideo_nanox.la"
496 dnl Find the X11 include and library directories
499 AC_ARG_ENABLE(video-x11,
500 [ --enable-video-x11 use X11 video driver [default=yes]],
501 , enable_video_x11=yes)
502 if test x$enable_video = xyes -a x$enable_video_x11 = xyes; then
505 if test x$have_x = xyes; then
506 CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_X11"
507 if test x$ac_cv_func_shmat != xyes; then
508 CFLAGS="$CFLAGS -DNO_SHARED_MEMORY"
510 SYSTEM_LIBS="$SYSTEM_LIBS $X_LIBS -lX11 -lXext"
511 VIDEO_SUBDIRS="$VIDEO_SUBDIRS x11"
512 VIDEO_DRIVERS="$VIDEO_DRIVERS x11/libvideo_x11.la"
514 AC_ARG_ENABLE(video-x11-vm,
515 [ --enable-video-x11-vm use X11 VM extension for fullscreen [default=yes]],
516 , enable_video_x11_vm=yes)
517 if test x$enable_video_x11_vm = xyes; then
518 AC_MSG_CHECKING(for XFree86 VidMode 1.0 support)
521 #include <X11/Xlib.h>
522 #include <X11/extensions/xf86vmode.h>
527 AC_MSG_RESULT($video_x11_vm)
528 if test x$video_x11_vm = xyes; then
529 CFLAGS="$CFLAGS -DXFREE86_VM"
530 # Check for nasty XFree86 4.0/Glide hack
531 AC_ARG_ENABLE(xfree86_glidehack,
532 [ --enable-xfree86-glidehack Alternate vidmode lib for old Glide [default=no]],
533 , enable_xfreeglidehack=no)
534 if test x$enable_xfree86_glidehack = xyes; then
536 LIBS="$LIBS $X_LIBS -lX11 -lXext"
537 if test x$xfree86_glidehack = x; then
538 AC_CHECK_LIB(Xxf86vm, XF40VidModeQueryExtension, xfree86_glidehack=Xxf86vm)
540 if test x$xfree86_glidehack = x; then
541 AC_CHECK_LIB(Xxf86vm40, XF40VidModeQueryExtension, xfree86_glidehack=Xxf86vm40)
545 if test x$xfree86_glidehack != x; then
546 CFLAGS="$CFLAGS -DXFREE86_VM_DYNAMIC_HACK"
547 SYSTEM_LIBS="$SYSTEM_LIBS -l$xfree86_glidehack"
549 SYSTEM_LIBS="$SYSTEM_LIBS -lXxf86vm"
551 AC_MSG_CHECKING(for XFree86 VidMode gamma support)
554 #include <X11/Xlib.h>
555 #include <X11/extensions/xf86vmode.h>
557 XF86VidModeGamma gamma;
559 video_x11_vmgamma=yes
561 AC_MSG_RESULT($video_x11_vmgamma)
562 if test x$video_x11_vmgamma = xyes; then
563 CFLAGS="$CFLAGS -DXFREE86_VMGAMMA"
568 [ --enable-dga allow use of X11 DGA code [default=yes]],
570 AC_ARG_ENABLE(video-x11-dgamouse,
571 [ --enable-video-x11-dgamouse use X11 DGA for mouse events [default=yes]],
572 , enable_video_x11_dgamouse=yes)
573 if test x$enable_dga = xyes; then
574 AC_MSG_CHECKING(for XFree86 DGA 1.0 support)
577 #include <X11/Xlib.h>
578 #include <X11/extensions/xf86dga.h>
583 AC_MSG_RESULT($video_x11_dga)
584 if test x$video_x11_dga = xyes; then
585 CFLAGS="$CFLAGS -DXFREE86_DGAMOUSE"
586 if test x$enable_video_x11_dgamouse = xyes; then
587 CFLAGS="$CFLAGS -DDEFAULT_DGAMOUSE"
589 SYSTEM_LIBS="$SYSTEM_LIBS -lXxf86dga"
592 AC_ARG_ENABLE(video-x11-xv,
593 [ --enable-video-x11-xv use X11 XvImage extension for video [default=yes]],
594 , enable_video_x11_xv=yes)
595 if test x$enable_video_x11_xv = xyes; then
596 AC_MSG_CHECKING(for XFree86 XvImage support)
599 #include <X11/Xlib.h>
602 #include <X11/extensions/XShm.h>
603 #include <X11/extensions/Xvlib.h>
609 AC_MSG_RESULT($video_x11_xv)
610 if test x$video_x11_xv = xyes; then
611 CFLAGS="$CFLAGS -DXFREE86_XV"
612 SYSTEM_LIBS="$SYSTEM_LIBS -lXv"
620 AC_ARG_ENABLE(video-photon,
621 [ --enable-video-photon use QNX Photon video driver [default=yes]],
622 , enable_video_photon=yes)
623 if test x$enable_video = xyes -a x$enable_video_photon = xyes; then
624 AC_MSG_CHECKING(for QNX Photon support)
629 #include <photon/Pg.h>
630 #include <photon/PdDirect.h>
632 PgDisplaySettings_t *visual;
636 AC_MSG_RESULT($video_photon)
637 if test x$video_photon = xyes; then
638 CFLAGS="$CFLAGS -DENABLE_PHOTON"
639 SYSTEM_LIBS="$SYSTEM_LIBS -lph"
640 VIDEO_SUBDIRS="$VIDEO_SUBDIRS photon"
641 VIDEO_DRIVERS="$VIDEO_DRIVERS photon/libvideo_photon.la"
646 dnl Find the X11 DGA 2.0 include and library directories
649 AC_ARG_ENABLE(video-dga,
650 [ --enable-video-dga use DGA 2.0 video driver [default=yes]],
651 , enable_video_dga=yes)
652 if test x$video_x11_dga = xyes -a x$enable_video_dga = xyes; then
653 AC_MSG_CHECKING(for XFree86 DGA 2.0 support)
656 #include <X11/Xlib.h>
657 #include <X11/extensions/xf86dga.h>
663 AC_MSG_RESULT($video_x11_dga2)
664 if test x$video_x11_dga2 = xyes; then
665 CFLAGS="$CFLAGS -DENABLE_DGA"
666 VIDEO_SUBDIRS="$VIDEO_SUBDIRS dga"
667 VIDEO_DRIVERS="$VIDEO_DRIVERS dga/libvideo_dga.la"
672 dnl Find the framebuffer console includes
675 AC_ARG_ENABLE(video-fbcon,
676 [ --enable-video-fbcon use framebuffer console video driver [default=yes]],
677 , enable_video_fbcon=yes)
678 if test x$enable_video = xyes -a x$enable_video_fbcon = xyes; then
679 AC_MSG_CHECKING(for framebuffer console support)
682 #include <linux/fb.h>
683 #include <linux/kd.h>
684 #include <linux/keyboard.h>
689 AC_MSG_RESULT($video_fbcon)
690 if test x$video_fbcon = xyes; then
691 CFLAGS="$CFLAGS -DENABLE_FBCON"
692 VIDEO_SUBDIRS="$VIDEO_SUBDIRS fbcon"
693 VIDEO_DRIVERS="$VIDEO_DRIVERS fbcon/libvideo_fbcon.la"
698 dnl See if we're running on PlayStation 2 hardware
701 AC_ARG_ENABLE(video-ps2gs,
702 [ --enable-video-ps2gs use PlayStation 2 GS video driver [default=yes]],
703 , enable_video_ps2gs=yes)
704 if test x$enable_video = xyes -a x$enable_video_ps2gs = xyes; then
705 AC_MSG_CHECKING(for PlayStation 2 GS support)
708 #include <linux/ps2/dev.h>
709 #include <linux/ps2/gs.h>
714 AC_MSG_RESULT($video_ps2gs)
715 if test x$video_ps2gs = xyes; then
716 CFLAGS="$CFLAGS -DENABLE_PS2GS"
717 VIDEO_SUBDIRS="$VIDEO_SUBDIRS ps2gs"
718 VIDEO_DRIVERS="$VIDEO_DRIVERS ps2gs/libvideo_ps2gs.la"
723 dnl Find the GGI includes
726 AC_ARG_ENABLE(video-ggi,
727 [ --enable-video-ggi use GGI video driver [default=no]],
728 , enable_video_ggi=no)
729 if test x$enable_video = xyes -a x$enable_video_ggi = xyes; then
730 AC_MSG_CHECKING(for GGI support)
739 AC_MSG_RESULT($video_ggi)
740 if test x$video_ggi = xyes; then
741 CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_GGI"
742 SYSTEM_LIBS="$SYSTEM_LIBS -lggi -lgii -lgg"
744 VIDEO_SUBDIRS="$VIDEO_SUBDIRS ggi"
745 VIDEO_DRIVERS="$VIDEO_DRIVERS ggi/libvideo_ggi.la"
750 dnl Find the SVGAlib includes and libraries
753 AC_ARG_ENABLE(video-svga,
754 [ --enable-video-svga use SVGAlib video driver [default=no]],
755 , enable_video_svga=no)
756 if test x$enable_video = xyes -a x$enable_video_svga = xyes; then
757 AC_MSG_CHECKING(for SVGAlib (1.4.0+) support)
761 #include <vgamouse.h>
762 #include <vgakeyboard.h>
764 if ( SCANCODE_RIGHTWIN && SCANCODE_LEFTWIN ) {
770 AC_MSG_RESULT($video_svga)
771 if test x$video_svga = xyes; then
772 CFLAGS="$CFLAGS -DENABLE_SVGALIB"
773 SYSTEM_LIBS="$SYSTEM_LIBS -lvga"
775 VIDEO_SUBDIRS="$VIDEO_SUBDIRS svga"
776 VIDEO_DRIVERS="$VIDEO_DRIVERS svga/libvideo_svga.la"
781 dnl Find the VGL includes and libraries
784 AC_ARG_ENABLE(video-vgl,
785 [ --enable-video-vgl use VGL video driver [default=no]],
786 , enable_video_vgl=no)
787 if test x$enable_video = xyes -a x$enable_video_vgl = xyes; then
788 AC_MSG_CHECKING(for libVGL support)
791 #include <sys/fbio.h>
792 #include <sys/consio.h>
793 #include <sys/kbio.h>
801 AC_MSG_RESULT($video_vgl)
802 if test x$video_vgl = xyes; then
803 CFLAGS="$CFLAGS -DENABLE_VGL"
804 SYSTEM_LIBS="$SYSTEM_LIBS -lvgl"
806 VIDEO_SUBDIRS="$VIDEO_SUBDIRS vgl"
807 VIDEO_DRIVERS="$VIDEO_DRIVERS vgl/libvideo_vgl.la"
812 dnl Find the AAlib includes
815 AC_ARG_ENABLE(video-aalib,
816 [ --enable-video-aalib use AAlib video driver [default=no]],
817 , enable_video_aalib=no)
818 if test x$enable_video = xyes -a x$enable_video_aalib = xyes; then
819 AC_MSG_CHECKING(for AAlib support)
827 AC_MSG_RESULT($video_aalib)
828 if test x$video_aalib = xyes; then
829 CFLAGS="$CFLAGS -DENABLE_AALIB"
830 SYSTEM_LIBS="$SYSTEM_LIBS -laa"
832 VIDEO_SUBDIRS="$VIDEO_SUBDIRS aalib"
833 VIDEO_DRIVERS="$VIDEO_DRIVERS aalib/libvideo_aa.la"
838 dnl rcg04172001 Set up the Null video driver.
841 AC_ARG_ENABLE(video-dummy,
842 [ --enable-video-dummy use dummy video driver [default=yes]],
843 , enable_video_dummy=yes)
844 if test x$enable_video_dummy = xyes; then
845 CFLAGS="$CFLAGS -DENABLE_DUMMYVIDEO"
846 VIDEO_SUBDIRS="$VIDEO_SUBDIRS dummy"
847 VIDEO_DRIVERS="$VIDEO_DRIVERS dummy/libvideo_null.la"
851 dnl Check to see if OpenGL support is desired
852 AC_ARG_ENABLE(video-opengl,
853 [ --enable-video-opengl include OpenGL context creation [default=yes]],
854 , enable_video_opengl=yes)
859 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
860 AC_MSG_CHECKING(for OpenGL (GLX) support)
865 #include <dlfcn.h> /* For loading extensions */
870 AC_MSG_RESULT($video_opengl)
871 if test x$video_opengl = xyes; then
872 CFLAGS="$CFLAGS -DHAVE_OPENGL"
873 AC_CHECK_LIB(dl, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS -ldl")
878 dnl Check for BeOS OpenGL
881 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
882 CFLAGS="$CFLAGS -DHAVE_OPENGL"
883 SYSTEM_LIBS="$SYSTEM_LIBS -lGL"
887 dnl Check for MacOS OpenGL
890 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
891 CFLAGS="$CFLAGS -DHAVE_OPENGL"
894 SDL_LIBS="$SDL_LIBS -framework OpenGL -framework AGL"
899 dnl See if we can use the new unified event interface in Linux 2.4
902 dnl Check for Linux 2.4 unified input event interface support
903 AC_ARG_ENABLE(input-events,
904 [ --enable-input-events use Linux 2.4 unified input interface [default=no]],
905 , enable_input_events=no)
906 if test x$enable_input_events = xyes; then
907 AC_MSG_CHECKING(for Linux 2.4 unified input interface)
910 #include <linux/input.h>
913 #error EVIOCGNAME() ioctl not available
918 AC_MSG_RESULT($use_input_events)
919 if test x$use_input_events = xyes; then
920 CFLAGS="$CFLAGS -DUSE_INPUT_EVENTS"
925 dnl See what type of thread model to use on Linux and Solaris
928 dnl Check for pthread support
929 AC_ARG_ENABLE(pthreads,
930 [ --enable-pthreads use POSIX threads for multi-threading [default=yes]],
931 , enable_pthreads=yes)
932 dnl This is used on Linux for glibc binary compatibility (Doh!)
933 AC_ARG_ENABLE(pthread-sem,
934 [ --enable-pthread-sem use pthread semaphores [default=yes]],
935 , enable_pthread_sem=yes)
939 pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
943 pthread_cflags="-D_THREAD_SAFE"
944 # causes Carbon.p complaints?
945 # pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
948 pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
949 pthread_lib="-pthread"
952 pthread_cflags="-I/usr/pkg/include -D_REENTRANT"
953 pthread_lib="-L/usr/pkg/lib -lpthread -lsem"
956 pthread_cflags="-D_REENTRANT"
957 pthread_lib="-pthread"
960 pthread_cflags="-D_REENTRANT"
961 pthread_lib="-lpthread -lposix4"
964 pthread_cflags="-D_REENTRANT -Kthread"
968 pthread_cflags="-D_SGI_MP_SOURCE"
969 pthread_lib="-lpthread"
972 pthread_cflags="-D_REENTRANT -mthreads"
973 pthread_lib="-lpthread"
980 pthread_cflags="-D_REENTRANT"
981 pthread_lib="-lpthread"
984 LIBS="$LIBS $pthread_lib"
985 if test x$enable_threads = xyes -a x$enable_pthreads = xyes; then
986 AC_MSG_CHECKING(for pthreads)
992 pthread_attr_init(&type);
996 AC_MSG_RESULT($use_pthreads)
997 if test x$use_pthreads = xyes; then
998 CFLAGS="$CFLAGS $pthread_cflags -DSDL_USE_PTHREADS"
999 SDL_CFLAGS="$SDL_CFLAGS $pthread_cflags"
1000 SDL_LIBS="$SDL_LIBS $pthread_lib"
1002 # Check to see if recursive mutexes are available
1003 AC_MSG_CHECKING(for recursive mutexes)
1004 has_recursive_mutexes=no
1006 #include <pthread.h>
1008 pthread_mutexattr_t attr;
1010 pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
1012 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
1015 has_recursive_mutexes=yes
1017 # Some systems have broken recursive mutex implementations
1020 has_recursive_mutexes=no
1023 AC_MSG_RESULT($has_recursive_mutexes)
1024 if test x$has_recursive_mutexes != xyes; then
1025 CFLAGS="$CFLAGS -DPTHREAD_NO_RECURSIVE_MUTEX"
1028 # Check to see if pthread semaphore support is missing
1029 if test x$enable_pthread_sem = xyes; then
1030 AC_MSG_CHECKING(for pthread semaphores)
1033 #include <pthread.h>
1034 #include <semaphore.h>
1037 have_pthread_sem=yes
1039 AC_MSG_RESULT($have_pthread_sem)
1042 # Check to see if this is broken glibc 2.0 pthreads
1045 AC_MSG_CHECKING(for broken glibc 2.0 pthreads)
1048 #include <features.h>
1049 #if (__GLIBC__ == 2) && (__GLIBC_MINOR__ == 0)
1050 #warning Working around a bug in glibc 2.0 pthreads
1052 #error pthread implementation okay
1053 #endif /* glibc 2.0 */
1056 glibc20_pthreads=yes
1058 AC_MSG_RESULT($glibc20_pthreads)
1062 LIBS="$ac_save_libs"
1064 AC_MSG_CHECKING(whether semun is defined in /usr/include/sys/sem.h)
1067 #include <sys/types.h>
1068 #include <sys/sem.h>
1074 AC_MSG_RESULT($have_semun)
1075 if test x$have_semun = xyes; then
1076 CFLAGS="$CFLAGS -DHAVE_SEMUN"
1079 # See if we can use clone() on Linux directly
1081 if test x$enable_threads = xyes -a x$use_pthreads != xyes; then
1087 CFLAGS="$CFLAGS -DFORK_HACK"
1091 AM_CONDITIONAL(USE_CLONE, test x$use_clone = xyes)
1094 dnl Determine whether the compiler can produce Win32 executables
1097 AC_MSG_CHECKING(Win32 compiler)
1100 #include <windows.h>
1105 AC_MSG_RESULT($have_win32_gcc)
1106 if test x$have_win32_gcc != xyes; then
1108 *** Your compiler ($CC) does not produce Win32 executables!
1112 dnl See if the user wants to redirect standard output to files
1113 AC_ARG_ENABLE(stdio-redirect,
1114 [ --enable-stdio-redirect Redirect STDIO to files on Win32 [default=yes]],
1115 , enable_stdio_redirect=yes)
1116 if test x$enable_stdio_redirect != xyes; then
1117 CFLAGS="$CFLAGS -DNO_STDIO_REDIRECT"
1121 dnl Find the DirectX includes and libraries
1124 AC_ARG_ENABLE(directx,
1125 [ --enable-directx use DirectX for Win32 audio/video [default=yes]],
1126 , enable_directx=yes)
1127 if test x$enable_directx = xyes; then
1128 AC_MSG_CHECKING(for DirectX headers and libraries)
1131 #include "src/video/windx5/directx.h"
1136 AC_MSG_RESULT($use_directx)
1138 AM_CONDITIONAL(USE_DIRECTX, test x$use_directx = xyes)
1140 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video/wincommon"
1141 SYSTEM_LIBS="$SYSTEM_LIBS -luser32 -lgdi32 -lwinmm"
1142 VIDEO_SUBDIRS="$VIDEO_SUBDIRS wincommon"
1143 VIDEO_DRIVERS="$VIDEO_DRIVERS wincommon/libvideo_wincommon.la"
1144 # Enable the DIB driver
1145 CFLAGS="$CFLAGS -DENABLE_WINDIB"
1146 VIDEO_SUBDIRS="$VIDEO_SUBDIRS windib"
1147 VIDEO_DRIVERS="$VIDEO_DRIVERS windib/libvideo_windib.la"
1148 # See if we should enable the DirectX driver
1149 if test x$use_directx = xyes; then
1150 CFLAGS="$CFLAGS -DENABLE_DIRECTX"
1151 SYSTEM_LIBS="$SYSTEM_LIBS -ldxguid"
1152 VIDEO_SUBDIRS="$VIDEO_SUBDIRS windx5"
1153 VIDEO_DRIVERS="$VIDEO_DRIVERS windx5/libvideo_windx5.la"
1157 dnl Set up the BWindow video driver on BeOS
1160 CFLAGS="$CFLAGS -DENABLE_BWINDOW"
1161 VIDEO_SUBDIRS="$VIDEO_SUBDIRS bwindow"
1162 VIDEO_DRIVERS="$VIDEO_DRIVERS bwindow/libvideo_bwindow.la"
1165 dnl Set up the Mac toolbox video driver for Mac OS 7-9
1168 VIDEO_SUBDIRS="$VIDEO_SUBDIRS maccommon"
1169 VIDEO_DRIVERS="$VIDEO_DRIVERS maccommon/libvideo_maccommon.la"
1170 VIDEO_SUBDIRS="$VIDEO_SUBDIRS macrom"
1171 VIDEO_DRIVERS="$VIDEO_DRIVERS macrom/libvideo_macrom.la"
1174 dnl Set up the Mac toolbox video driver for Mac OS X
1177 # "MACOSX" is not an official definition, but it's commonly
1178 # accepted as a way to differentiate between what runs on X
1179 # and what runs on older Macs - while in theory "Carbon" defns
1180 # are consistent between the two, in practice Carbon is still
1181 # changing. -sts Aug 2000
1182 mac_autoconf_target_workaround="MAC"
1183 CFLAGS="$CFLAGS -I/System/Library/Frameworks/Carbon.framework/Headers \
1184 -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"
1185 VIDEO_SUBDIRS="$VIDEO_SUBDIRS maccommon"
1186 VIDEO_DRIVERS="$VIDEO_DRIVERS maccommon/libvideo_maccommon.la"
1187 VIDEO_SUBDIRS="$VIDEO_SUBDIRS macrom"
1188 VIDEO_DRIVERS="$VIDEO_DRIVERS macrom/libvideo_macrom.la"
1191 dnl Set up the Mac toolbox video driver for Mac OS X
1194 # "MACOSX" is not an official definition, but it's commonly
1195 # accepted as a way to differentiate between what runs on X
1196 # and what runs on older Macs - while in theory "Carbon" defns
1197 # are consistent between the two, in practice Carbon is still
1198 # changing. -sts Aug 2000
1199 mac_autoconf_target_workaround="MAC"
1200 CFLAGS="$CFLAGS -I/System/Library/Frameworks/Carbon.framework/Headers \
1201 -I/System/Library/Frameworks/Cocoa.framework/Headers -fpascal-strings \
1202 -DENABLE_QUARTZ -DMACOSX -DTARGET_API_${mac_autoconf_target_workaround}_CARBON=1 -I\$(top_srcdir)/src/video/quartz"
1203 VIDEO_SUBDIRS="$VIDEO_SUBDIRS quartz"
1204 VIDEO_DRIVERS="$VIDEO_DRIVERS quartz/libvideo_quartz.la"
1229 # Set up files for the main() stub
1230 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1231 # Set up files for the audio library
1232 # We use the OSS and ALSA API's, not the Sun audio API
1233 #if test x$enable_audio = xyes; then
1234 # CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1235 # AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1236 # AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1238 # Set up files for the joystick library
1239 if test x$enable_joystick = xyes; then
1240 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS linux"
1241 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS linux/libjoystick_linux.la"
1243 # Set up files for the cdrom library
1244 if test x$enable_cdrom = xyes; then
1245 CDROM_SUBDIRS="$CDROM_SUBDIRS linux"
1246 CDROM_DRIVERS="$CDROM_DRIVERS linux/libcdrom_linux.la"
1248 # Set up files for the thread library
1249 if test x$enable_threads = xyes; then
1250 if test x$use_pthreads != xyes; then
1251 COPY_ARCH_SRC(src/thread, linux, clone.S)
1253 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1254 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1255 if test x$use_pthreads = xyes -a x$have_pthread_sem != xyes; then
1256 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1258 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1260 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1261 if test x$glibc20_pthreads = xyes; then
1262 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
1263 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
1264 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1265 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1267 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1268 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1269 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1270 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1273 # Set up files for the timer library
1274 if test x$enable_timers = xyes; then
1275 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1293 # Set up files for the main() stub
1294 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1295 # Set up files for the audio library
1296 # We use the OSS and ALSA API's, not the Sun audio API
1297 #if test x$enable_audio = xyes; then
1298 # CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1299 # AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1300 # AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1302 # Set up files for the joystick library
1303 # (No joystick support yet)
1304 if test x$enable_joystick = xyes; then
1305 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1306 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1308 # Set up files for the cdrom library
1309 # (No cdrom support yet)
1310 if test x$enable_cdrom = xyes; then
1311 CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
1312 CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
1314 # Set up files for the thread library
1315 if test x$enable_threads = xyes; then
1316 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1317 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1318 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1319 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1320 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1321 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1322 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1323 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1325 # Set up files for the timer library
1326 if test x$enable_timers = xyes; then
1327 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1346 # Set up files for the main() stub
1347 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1348 # Set up files for the audio library
1349 # We use the OSS and ALSA API's, not the Sun audio API
1350 #if test x$enable_audio = xyes; then
1351 # CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1352 # AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1353 # AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1355 # Set up files for the joystick library
1356 # (No joystick support yet)
1357 if test x$enable_joystick = xyes; then
1358 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1359 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1361 # Set up files for the cdrom library
1362 if test x$enable_cdrom = xyes; then
1363 CDROM_SUBDIRS="$CDROM_SUBDIRS freebsd"
1364 CDROM_DRIVERS="$CDROM_DRIVERS freebsd/libcdrom_freebsd.la"
1366 # Set up files for the thread library
1367 if test x$enable_threads = xyes; then
1368 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1369 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1370 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1371 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1372 if test x$use_pthreads = xyes -a x$have_pthread_sem != xyes; then
1373 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1375 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1377 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1378 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1379 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1381 # Set up files for the timer library
1382 if test x$enable_timers = xyes; then
1383 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1399 # Set up files for the main() stub
1400 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1401 # Set up files for the audio library
1402 if test x$enable_audio = xyes; then
1403 CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1404 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1405 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1407 # Set up files for the joystick library
1408 # (No joystick support yet)
1409 if test x$enable_joystick = xyes; then
1410 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1411 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1413 # Set up files for the cdrom library
1414 if test x$enable_cdrom = xyes; then
1415 CDROM_SUBDIRS="$CDROM_SUBDIRS openbsd"
1416 CDROM_DRIVERS="$CDROM_DRIVERS openbsd/libcdrom_openbsd.la"
1418 # Set up files for the thread library
1419 if test x$enable_threads = xyes; then
1420 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1421 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1422 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1423 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1424 if test x$use_pthreads = xyes -a x$have_pthread_sem != xyes; then
1425 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1427 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1429 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1430 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1431 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1433 # Set up files for the timer library
1434 if test x$enable_timers = xyes; then
1435 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1437 # NetBSD does not define "unix"
1438 CFLAGS="$CFLAGS -Dunix -D_POSIX_THREAD_SYSCALL_SOFT=1"
1454 # Set up files for the main() stub
1455 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1456 # Set up files for the audio library
1457 # We use the OSS and native API's, not the Sun audio API
1458 #if test x$enable_audio = xyes; then
1459 # CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1460 # AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1461 # AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1463 # OpenBSD needs linking with ossaudio emulation library
1464 if test x$have_oss = xyes; then
1465 SYSTEM_LIBS="$SYSTEM_LIBS -lossaudio"
1467 # Set up files for the joystick library
1468 # (No joystick support yet)
1469 if test x$enable_joystick = xyes; then
1470 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1471 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1473 # Set up files for the cdrom library
1474 if test x$enable_cdrom = xyes; then
1475 CDROM_SUBDIRS="$CDROM_SUBDIRS openbsd"
1476 CDROM_DRIVERS="$CDROM_DRIVERS openbsd/libcdrom_openbsd.la"
1478 # Set up files for the thread library
1479 if test x$enable_threads = xyes; then
1480 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1481 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1482 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1483 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1484 if test x$use_pthreads = xyes -a x$have_pthread_sem != xyes; then
1485 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1487 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1489 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1490 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1491 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1493 # Set up files for the timer library
1494 if test x$enable_timers = xyes; then
1495 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1497 # OpenBSD does not define "unix"
1498 CFLAGS="$CFLAGS -Dunix"
1513 # Set up files for the main() stub
1514 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1515 # Set up files for the audio library
1516 if test x$enable_audio = xyes; then
1517 CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1518 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1519 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1521 # Set up files for the joystick library
1522 # (No joystick support yet)
1523 if test x$enable_joystick = xyes; then
1524 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1525 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1527 # Set up files for the cdrom library
1528 if test x$enable_cdrom = xyes; then
1529 CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
1530 CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
1532 # Set up files for the thread library
1533 if test x$enable_threads = xyes; then
1534 COPY_ARCH_SRC(src/thread, generic, SDL_systhread.c)
1535 COPY_ARCH_SRC(src/thread, generic, SDL_systhread_c.h)
1536 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
1537 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
1538 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1539 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1540 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1541 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1543 # Set up files for the timer library
1544 if test x$enable_timers = xyes; then
1545 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1550 CFLAGS="$CFLAGS -D__ELF__" # Fix for nasm on Solaris x86
1562 # Set up files for the main() stub
1563 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1564 # Set up files for the audio library
1565 if test x$enable_audio = xyes; then
1566 CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1567 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1568 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1570 # Set up files for the joystick library
1571 # (No joystick support yet)
1572 if test x$enable_joystick = xyes; then
1573 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1574 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1576 # Set up files for the cdrom library
1577 if test x$enable_cdrom = xyes; then
1578 CDROM_SUBDIRS="$CDROM_SUBDIRS linux"
1579 CDROM_DRIVERS="$CDROM_DRIVERS linux/libcdrom_linux.la"
1581 # Set up files for the thread library
1582 if test x$enable_threads = xyes; then
1583 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1584 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1585 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1586 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1587 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1588 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1589 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1590 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1592 # Set up files for the timer library
1593 if test x$enable_timers = xyes; then
1594 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1608 # Set up files for the main() stub
1609 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1610 # We use the dmedia audio API, not the Sun audio API
1611 #if test x$enable_audio = xyes; then
1612 # CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1613 # AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1614 # AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1616 # Set up files for the joystick library
1617 # (No joystick support yet)
1618 if test x$enable_joystick = xyes; then
1619 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1620 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1622 # Set up files for the cdrom library
1623 # (No CD-ROM support yet)
1624 if test x$enable_cdrom = xyes; then
1625 CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
1626 CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
1628 # Set up files for the thread library
1629 if test x$enable_threads = xyes; then
1630 if test x$use_pthreads = xyes; then
1631 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1632 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1633 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1634 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1635 if test x$have_pthread_sem != xyes; then
1636 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1638 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1640 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1641 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1642 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1644 COPY_ARCH_SRC(src/thread, irix, SDL_systhread.c)
1645 COPY_ARCH_SRC(src/thread, irix, SDL_systhread_c.h)
1646 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1647 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1648 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1649 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1650 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1651 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1654 # Set up files for the timer library
1655 if test x$enable_timers = xyes; then
1656 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1670 # Set up files for the main() stub
1671 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1672 # Set up files for the audio library
1673 if test x$enable_audio = xyes; then
1674 CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1675 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1676 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1678 # Set up files for the joystick library
1679 # (No joystick support yet)
1680 if test x$enable_joystick = xyes; then
1681 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1682 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1684 # Set up files for the cdrom library
1685 # (No CD-ROM support yet)
1686 if test x$enable_cdrom = xyes; then
1687 CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
1688 CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
1690 # Set up files for the thread library
1691 if test x$enable_threads = xyes; then
1692 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1693 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1694 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1695 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1696 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1697 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1698 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1699 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1701 # Set up files for the timer library
1702 if test x$enable_timers = xyes; then
1703 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1717 # Set up files for the main() stub
1718 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1719 # Set up files for the audio library
1720 if test x$enable_audio = xyes; then
1721 AUDIO_SUBDIRS="$AUDIO_SUBDIRS paudio"
1722 AUDIO_DRIVERS="$AUDIO_DRIVERS paudio/libaudio_paudio.la"
1724 # Set up files for the joystick library
1725 # (No joystick support yet)
1726 if test x$enable_joystick = xyes; then
1727 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1728 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1730 # Set up files for the cdrom library
1731 if test x$enable_cdrom = xyes; then
1732 CDROM_SUBDIRS="$CDROM_SUBDIRS aix"
1733 CDROM_DRIVERS="$CDROM_DRIVERS aix/libcdrom_aix.la"
1735 # Set up files for the thread library
1736 if test x$enable_threads = xyes; then
1737 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1738 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1739 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1740 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1741 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1742 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1743 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1744 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1746 # Set up files for the timer library
1747 if test x$enable_timers = xyes; then
1748 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1761 # Set up files for the main() stub
1762 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1763 # Set up files for the audio library
1764 if test x$enable_audio = xyes; then
1765 CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1766 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1767 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1769 # Set up files for the joystick library
1770 # (No joystick support yet)
1771 if test x$enable_joystick = xyes; then
1772 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1773 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1775 # Set up files for the cdrom library
1776 # (No cdrom support yet)
1777 if test x$enable_cdrom = xyes; then
1778 CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
1779 CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
1781 # Set up files for the thread library
1782 if test x$enable_threads = xyes; then
1783 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1784 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1785 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1786 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1787 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1788 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1789 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1790 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1792 # Set up files for the timer library
1793 if test x$enable_timers = xyes; then
1794 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1806 # Set up files for the main() stub
1807 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1808 # Set up files for the audio library
1809 if test x$enable_audio = xyes; then
1810 CFLAGS="$CFLAGS -DALSA_SUPPORT"
1811 SYSTEM_LIBS="$SYSTEM_LIBS -lasound"
1812 AUDIO_SUBDIRS="$AUDIO_SUBDIRS nto"
1813 AUDIO_DRIVERS="$AUDIO_DRIVERS nto/libaudio_nto.la"
1815 # Set up files for the joystick library
1816 if test x$enable_joystick = xyes; then
1817 # (No joystick support yet)
1818 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1819 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1821 # Set up files for the cdrom library
1822 if test x$enable_cdrom = xyes; then
1823 CDROM_SUBDIRS="$CDROM_SUBDIRS qnx"
1824 CDROM_DRIVERS="$CDROM_DRIVERS qnx/libcdrom_qnx.la"
1826 # Set up files for the thread library
1827 if test x$enable_threads = xyes; then
1828 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1829 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1830 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1831 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1832 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1833 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1834 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1835 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1837 # Set up files for the timer library
1838 if test x$enable_timers = xyes; then
1839 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1842 *-*-cygwin* | *-*-mingw32*)
1844 if test "$build" != "$target"; then # cross-compiling
1845 # Default cross-compile location
1846 ac_default_prefix=/usr/local/cross-tools/i386-mingw32msvc
1848 # Look for the location of the tools and install there
1849 if [ "$BUILD_PREFIX" != "" ]; then
1850 ac_default_prefix=$BUILD_PREFIX
1858 # Set up files for the main() stub
1859 COPY_ARCH_SRC(src/main, win32, SDL_main.c)
1860 # Set up files for the audio library
1861 if test x$enable_audio = xyes; then
1862 AUDIO_SUBDIRS="$AUDIO_SUBDIRS windib"
1863 AUDIO_DRIVERS="$AUDIO_DRIVERS windib/libaudio_windib.la"
1864 if test x$use_directx = xyes; then
1865 AUDIO_SUBDIRS="$AUDIO_SUBDIRS windx5"
1866 AUDIO_DRIVERS="$AUDIO_DRIVERS windx5/libaudio_windx5.la"
1869 # Set up files for the joystick library
1870 if test x$enable_joystick = xyes; then
1871 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS win32"
1872 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS win32/libjoystick_winmm.la"
1874 # Set up files for the cdrom library
1875 if test x$enable_cdrom = xyes; then
1876 CDROM_SUBDIRS="$CDROM_SUBDIRS win32"
1877 CDROM_DRIVERS="$CDROM_DRIVERS win32/libcdrom_win32.la"
1879 # Set up files for the thread library
1880 if test x$enable_threads = xyes; then
1881 COPY_ARCH_SRC(src/thread, win32, SDL_systhread.c)
1882 COPY_ARCH_SRC(src/thread, win32, SDL_systhread_c.h)
1883 COPY_ARCH_SRC(src/thread, win32, SDL_sysmutex.c)
1884 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
1885 COPY_ARCH_SRC(src/thread, win32, SDL_syssem.c)
1886 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1887 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1888 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1890 # Set up files for the timer library
1891 if test x$enable_timers = xyes; then
1892 COPY_ARCH_SRC(src/timer, win32, SDL_systimer.c)
1894 # The Win32 platform requires special setup
1895 SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
1898 CFLAGS="$CFLAGS -I/usr/include/mingw -DWIN32 -Uunix"
1899 SDL_CFLAGS="$SDL_CFLAGS -I/usr/include/mingw -DWIN32 -Uunix"
1900 LIBS="$LIBS -mno-cygwin"
1901 SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows -mno-cygwin"
1904 SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows"
1910 ac_default_prefix=/boot/develop/tools/gnupro
1916 # Set up files for the main() stub
1917 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1918 COPY_ARCH_SRC(src/main, beos, SDL_BeApp.cc)
1919 COPY_ARCH_SRC(src/main, beos, SDL_BeApp.h)
1920 # Set up files for the audio library
1921 if test x$enable_audio = xyes; then
1922 AUDIO_SUBDIRS="$AUDIO_SUBDIRS baudio"
1923 AUDIO_DRIVERS="$AUDIO_DRIVERS baudio/libaudio_baudio.la"
1925 # Set up files for the joystick library
1926 if test x$enable_joystick = xyes; then
1927 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS beos"
1928 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS beos/libjoystick_beos.la"
1930 # Set up files for the cdrom library
1931 if test x$enable_cdrom = xyes; then
1932 CDROM_SUBDIRS="$CDROM_SUBDIRS beos"
1933 CDROM_DRIVERS="$CDROM_DRIVERS beos/libcdrom_beos.la"
1935 # Set up files for the thread library
1936 if test x$enable_threads = xyes; then
1937 COPY_ARCH_SRC(src/thread, beos, SDL_systhread.c)
1938 COPY_ARCH_SRC(src/thread, beos, SDL_systhread_c.h)
1939 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
1940 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
1941 COPY_ARCH_SRC(src/thread, beos, SDL_syssem.c)
1942 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1943 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1944 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1946 # Set up files for the timer library
1947 if test x$enable_timers = xyes; then
1948 COPY_ARCH_SRC(src/timer, beos, SDL_systimer.c)
1950 # The BeOS platform requires special libraries
1951 SYSTEM_LIBS="$SYSTEM_LIBS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
1954 # This would be used if cross-compiling to MacOS 9. No way to
1955 # use it at present, but Apple is working on a X-to-9 compiler
1956 # for which this case would be handy.
1962 # Set up files for the main() stub
1963 COPY_ARCH_SRC(src/main, macos, SDL_main.c)
1964 # Set up files for the audio library
1965 if test x$enable_audio = xyes; then
1966 AUDIO_SUBDIRS="$AUDIO_SUBDIRS macrom"
1967 AUDIO_DRIVERS="$AUDIO_DRIVERS macrom/libaudio_macrom.la"
1969 # Set up files for the joystick library
1970 if test x$enable_joystick = xyes; then
1971 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS macos"
1972 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS macos/libjoystick_macos.la"
1974 # Set up files for the cdrom library
1975 if test x$enable_cdrom = xyes; then
1976 CDROM_SUBDIRS="$CDROM_SUBDIRS macos"
1977 CDROM_DRIVERS="$CDROM_DRIVERS macos/libcdrom_macos.la"
1979 # Set up files for the thread library
1980 if test x$enable_threads = xyes; then
1981 COPY_ARCH_SRC(src/thread, macos, SDL_systhread.c)
1982 COPY_ARCH_SRC(src/thread, macos, SDL_systhread_c.h)
1983 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
1984 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
1985 COPY_ARCH_SRC(src/thread, macos, SDL_syssem.c)
1986 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1987 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1988 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1990 # Set up files for the timer library
1991 if test x$enable_timers = xyes; then
1992 COPY_ARCH_SRC(src/timer, macos, SDL_systimer.c)
1994 # The MacOS platform requires special setup
1995 SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
1996 SDL_LIBS="-lSDLmain $SDL_LIBS"
1999 # Strictly speaking, we want "Mac OS X", not "Darwin", which is
2000 # just the OS X kernel sans upper layers like Carbon and Cocoa.
2001 # But config.guess comes back with "darwin", so go with the flow.
2008 # Set up files for the main() stub
2009 COPY_ARCH_SRC(src/main, macosx, SDLmain.m)
2010 COPY_ARCH_SRC(src/main, macosx, SDLmain.h)
2011 # Set up files for the audio library
2012 if test x$enable_audio = xyes; then
2013 AUDIO_SUBDIRS="$AUDIO_SUBDIRS macrom"
2014 AUDIO_DRIVERS="$AUDIO_DRIVERS macrom/libaudio_macrom.la"
2016 # Set up files for the joystick library
2017 if test x$enable_joystick = xyes; then
2018 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
2019 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
2021 # Set up files for the cdrom library
2022 if test x$enable_cdrom = xyes; then
2023 CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
2024 CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
2026 # Set up files for the thread library
2027 if test x$enable_threads = xyes; then
2028 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
2029 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
2030 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
2031 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
2032 if test x$use_pthreads = xyes -a x$have_pthread_sem != xyes; then
2033 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
2035 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
2037 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
2038 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
2039 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
2041 # Set up files for the timer library
2042 if test x$enable_timers = xyes; then
2043 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
2045 # The MacOS X platform requires special setup
2046 SDL_CFLAGS="$SDL_CFLAGS -F/System/Library/Frameworks/Carbon.framework -F/System/Library/Frameworks/Cocoa.framework"
2047 SDL_LIBS="-lSDLmain $SDL_LIBS -framework Carbon -framework Cocoa"
2050 AC_MSG_ERROR(Unsupported target: Please add to configure.in)
2055 # Set the conditional variables for this target
2056 AM_CONDITIONAL(TARGET_LINUX, test $ARCH = linux)
2057 AM_CONDITIONAL(TARGET_SOLARIS, test $ARCH = solaris)
2058 AM_CONDITIONAL(TARGET_IRIX, test $ARCH = irix)
2059 AM_CONDITIONAL(TARGET_BSDI, test $ARCH = bsdi)
2060 AM_CONDITIONAL(TARGET_FREEBSD, test $ARCH = freebsd)
2061 AM_CONDITIONAL(TARGET_NETBSD, test $ARCH = netbsd)
2062 AM_CONDITIONAL(TARGET_OPENBSD, test $ARCH = openbsd)
2063 AM_CONDITIONAL(TARGET_AIX, test $ARCH = aix)
2064 AM_CONDITIONAL(TARGET_WIN32, test $ARCH = win32)
2065 AM_CONDITIONAL(TARGET_BEOS, test $ARCH = beos)
2066 AM_CONDITIONAL(TARGET_MACOS, test $ARCH = macos)
2067 AM_CONDITIONAL(TARGET_MACOSX, test $ARCH = macosx)
2069 # Set conditional variables for shared and static library selection.
2070 # These are not used in any Makefile.am but in sdl-config.in.
2071 AM_CONDITIONAL([ENABLE_SHARED], [test "$enable_shared" = yes])
2072 AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = yes])
2074 # Set runtime shared library paths as needed
2076 if test $ARCH = linux -o $ARCH = freebsd -o $ARCH = bsdi; then
2077 SDL_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib"
2080 if test $ARCH = solaris; then
2081 SDL_RLD_FLAGS="-R\${exec_prefix}/lib"
2084 if test $ARCH = openbsd; then
2085 SDL_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib $SYSTEM_LIBS"
2088 dnl Output the video drivers we use
2089 if test x$enable_video = xtrue; then
2090 if test "$VIDEO_SUBDIRS" = ""; then
2091 AC_MSG_ERROR(*** No video drivers are enabled!)
2094 AC_SUBST(AUDIO_SUBDIRS)
2095 AC_SUBST(AUDIO_DRIVERS)
2096 AC_SUBST(VIDEO_SUBDIRS)
2097 AC_SUBST(VIDEO_DRIVERS)
2098 AC_SUBST(JOYSTICK_SUBDIRS)
2099 AC_SUBST(JOYSTICK_DRIVERS)
2100 AC_SUBST(CDROM_SUBDIRS)
2101 AC_SUBST(CDROM_DRIVERS)
2102 AC_SUBST(SDL_EXTRADIRS)
2103 AC_SUBST(SDL_EXTRALIBS)
2104 AC_SUBST(SYSTEM_LIBS)
2106 dnl Expand the cflags and libraries needed by apps using SDL
2107 AC_SUBST(SDL_CFLAGS)
2109 AC_SUBST(SDL_RLD_FLAGS)
2111 dnl Expand the libraries needed for static linking
2112 AC_SUBST(SYSTEM_LIBS)
2113 dnl Expand the include directories for building SDL
2114 CFLAGS="$CFLAGS -I\$(top_srcdir)/include"
2115 CFLAGS="$CFLAGS -I\$(top_srcdir)/include/SDL"
2116 CFLAGS="$CFLAGS -I\$(top_srcdir)/src -I\$(top_srcdir)/src/$ARCH"
2117 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/main"
2118 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/audio"
2119 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video"
2120 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/events"
2121 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/joystick"
2122 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/cdrom"
2123 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/thread"
2124 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/timer"
2125 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/endian"
2126 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/file"
2130 # Check for darwin at the very end and set up the Objective C compiler
2131 # We do this here so that we get the full CFLAGS into OBJCFLAGS
2141 # Finally create all the generated files
2142 dnl Important: Any directory that you want to be in the distcheck should
2143 dnl have a file listed here, so that configure generates the
2144 dnl subdirectories on the build target.
2154 src/audio/alsa/Makefile
2155 src/audio/arts/Makefile
2156 src/audio/baudio/Makefile
2157 src/audio/dma/Makefile
2158 src/audio/dmedia/Makefile
2159 src/audio/dsp/Makefile
2160 src/audio/esd/Makefile
2161 src/audio/macrom/Makefile
2162 src/audio/nas/Makefile
2163 src/audio/nto/Makefile
2164 src/audio/openbsd/Makefile
2165 src/audio/paudio/Makefile
2166 src/audio/sun/Makefile
2167 src/audio/ums/Makefile
2168 src/audio/windib/Makefile
2169 src/audio/windx5/Makefile
2170 src/audio/disk/Makefile
2172 src/video/cybergfx/Makefile
2173 src/video/x11/Makefile
2174 src/video/dga/Makefile
2175 src/video/nanox/Makefile
2176 src/video/fbcon/Makefile
2177 src/video/ps2gs/Makefile
2178 src/video/ggi/Makefile
2179 src/video/maccommon/Makefile
2180 src/video/macdsp/Makefile
2181 src/video/macrom/Makefile
2182 src/video/quartz/Makefile
2183 src/video/svga/Makefile
2184 src/video/vgl/Makefile
2185 src/video/aalib/Makefile
2186 src/video/wincommon/Makefile
2187 src/video/windib/Makefile
2188 src/video/windx5/Makefile
2189 src/video/bwindow/Makefile
2190 src/video/photon/Makefile
2191 src/video/dummy/Makefile
2193 src/joystick/Makefile
2194 src/joystick/amigaos/Makefile
2195 src/joystick/beos/Makefile
2196 src/joystick/dummy/Makefile
2197 src/joystick/linux/Makefile
2198 src/joystick/macos/Makefile
2199 src/joystick/win32/Makefile
2201 src/cdrom/aix/Makefile
2202 src/cdrom/beos/Makefile
2203 src/cdrom/dummy/Makefile
2204 src/cdrom/freebsd/Makefile
2205 src/cdrom/linux/Makefile
2206 src/cdrom/macos/Makefile
2207 src/cdrom/openbsd/Makefile
2208 src/cdrom/qnx/Makefile
2209 src/cdrom/win32/Makefile
2217 ], [chmod +x sdl-config])