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 CFLAGS="$CFLAGS -I/System/Library/Frameworks/Carbon.framework/Headers \
1200 -I/System/Library/Frameworks/Cocoa.framework/Headers -fpascal-strings \
1201 -DENABLE_QUARTZ -DMACOSX -DTARGET_API_MAC_CARBON=1 -I\$(top_srcdir)/src/video/quartz"
1202 VIDEO_SUBDIRS="$VIDEO_SUBDIRS quartz"
1203 VIDEO_DRIVERS="$VIDEO_DRIVERS quartz/libvideo_quartz.la"
1206 dnl Set up the kernel statistics library for Solaris
1209 CFLAGS="$CFLAGS -DHAVE_KSTAT"
1210 SYSTEM_LIBS="$SYSTEM_LIBS -lkstat"
1235 # Set up files for the main() stub
1236 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1237 # Set up files for the audio library
1238 # We use the OSS and ALSA API's, not the Sun audio API
1239 #if test x$enable_audio = xyes; then
1240 # CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1241 # AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1242 # AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1244 # Set up files for the joystick library
1245 if test x$enable_joystick = xyes; then
1246 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS linux"
1247 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS linux/libjoystick_linux.la"
1249 # Set up files for the cdrom library
1250 if test x$enable_cdrom = xyes; then
1251 CDROM_SUBDIRS="$CDROM_SUBDIRS linux"
1252 CDROM_DRIVERS="$CDROM_DRIVERS linux/libcdrom_linux.la"
1254 # Set up files for the thread library
1255 if test x$enable_threads = xyes; then
1256 if test x$use_pthreads != xyes; then
1257 COPY_ARCH_SRC(src/thread, linux, clone.S)
1259 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1260 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1261 if test x$use_pthreads = xyes -a x$have_pthread_sem != xyes; then
1262 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1264 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1266 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1267 if test x$glibc20_pthreads = xyes; then
1268 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
1269 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
1270 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1271 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1273 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1274 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1275 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1276 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1279 # Set up files for the timer library
1280 if test x$enable_timers = xyes; then
1281 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1299 # Set up files for the main() stub
1300 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1301 # Set up files for the audio library
1302 # We use the OSS and ALSA API's, not the Sun audio API
1303 #if test x$enable_audio = xyes; then
1304 # CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1305 # AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1306 # AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1308 # Set up files for the joystick library
1309 # (No joystick support yet)
1310 if test x$enable_joystick = xyes; then
1311 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1312 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1314 # Set up files for the cdrom library
1315 # (No cdrom support yet)
1316 if test x$enable_cdrom = xyes; then
1317 CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
1318 CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
1320 # Set up files for the thread library
1321 if test x$enable_threads = xyes; then
1322 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1323 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1324 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1325 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1326 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1327 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1328 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1329 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1331 # Set up files for the timer library
1332 if test x$enable_timers = xyes; then
1333 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1352 # Set up files for the main() stub
1353 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1354 # Set up files for the audio library
1355 # We use the OSS and ALSA API's, not the Sun audio API
1356 #if test x$enable_audio = xyes; then
1357 # CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1358 # AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1359 # AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1361 # Set up files for the joystick library
1362 # (No joystick support yet)
1363 if test x$enable_joystick = xyes; then
1364 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1365 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1367 # Set up files for the cdrom library
1368 if test x$enable_cdrom = xyes; then
1369 CDROM_SUBDIRS="$CDROM_SUBDIRS freebsd"
1370 CDROM_DRIVERS="$CDROM_DRIVERS freebsd/libcdrom_freebsd.la"
1372 # Set up files for the thread library
1373 if test x$enable_threads = xyes; then
1374 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1375 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1376 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1377 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1378 if test x$use_pthreads = xyes -a x$have_pthread_sem != xyes; then
1379 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1381 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1383 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1384 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1385 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1387 # Set up files for the timer library
1388 if test x$enable_timers = xyes; then
1389 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1405 # Set up files for the main() stub
1406 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1407 # Set up files for the audio library
1408 if test x$enable_audio = xyes; then
1409 CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1410 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1411 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1413 # Set up files for the joystick library
1414 # (No joystick support yet)
1415 if test x$enable_joystick = xyes; then
1416 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1417 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1419 # Set up files for the cdrom library
1420 if test x$enable_cdrom = xyes; then
1421 CDROM_SUBDIRS="$CDROM_SUBDIRS openbsd"
1422 CDROM_DRIVERS="$CDROM_DRIVERS openbsd/libcdrom_openbsd.la"
1424 # Set up files for the thread library
1425 if test x$enable_threads = xyes; then
1426 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1427 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1428 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1429 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1430 if test x$use_pthreads = xyes -a x$have_pthread_sem != xyes; then
1431 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1433 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1435 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1436 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1437 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1439 # Set up files for the timer library
1440 if test x$enable_timers = xyes; then
1441 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1443 # NetBSD does not define "unix"
1444 CFLAGS="$CFLAGS -Dunix -D_POSIX_THREAD_SYSCALL_SOFT=1"
1460 # Set up files for the main() stub
1461 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1462 # Set up files for the audio library
1463 # We use the OSS and native API's, not the Sun audio API
1464 #if test x$enable_audio = xyes; then
1465 # CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1466 # AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1467 # AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1469 # OpenBSD needs linking with ossaudio emulation library
1470 if test x$have_oss = xyes; then
1471 SYSTEM_LIBS="$SYSTEM_LIBS -lossaudio"
1473 # Set up files for the joystick library
1474 # (No joystick support yet)
1475 if test x$enable_joystick = xyes; then
1476 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1477 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1479 # Set up files for the cdrom library
1480 if test x$enable_cdrom = xyes; then
1481 CDROM_SUBDIRS="$CDROM_SUBDIRS openbsd"
1482 CDROM_DRIVERS="$CDROM_DRIVERS openbsd/libcdrom_openbsd.la"
1484 # Set up files for the thread library
1485 if test x$enable_threads = xyes; then
1486 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1487 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1488 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1489 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1490 if test x$use_pthreads = xyes -a x$have_pthread_sem != xyes; then
1491 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1493 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1495 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1496 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1497 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1499 # Set up files for the timer library
1500 if test x$enable_timers = xyes; then
1501 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1503 # OpenBSD does not define "unix"
1504 CFLAGS="$CFLAGS -Dunix"
1520 # Set up files for the main() stub
1521 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1522 # Set up files for the audio library
1523 if test x$enable_audio = xyes; then
1524 CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1525 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1526 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1528 # Set up files for the joystick library
1529 # (No joystick support yet)
1530 if test x$enable_joystick = xyes; then
1531 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1532 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1534 # Set up files for the cdrom library
1535 if test x$enable_cdrom = xyes; then
1536 CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
1537 CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
1539 # Set up files for the thread library
1540 if test x$enable_threads = xyes; then
1541 COPY_ARCH_SRC(src/thread, generic, SDL_systhread.c)
1542 COPY_ARCH_SRC(src/thread, generic, SDL_systhread_c.h)
1543 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
1544 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
1545 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1546 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1547 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1548 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1550 # Set up files for the timer library
1551 if test x$enable_timers = xyes; then
1552 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1557 CFLAGS="$CFLAGS -D__ELF__" # Fix for nasm on Solaris x86
1570 # Set up files for the main() stub
1571 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1572 # Set up files for the audio library
1573 if test x$enable_audio = xyes; then
1574 CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1575 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1576 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1578 # Set up files for the joystick library
1579 # (No joystick support yet)
1580 if test x$enable_joystick = xyes; then
1581 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1582 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1584 # Set up files for the cdrom library
1585 if test x$enable_cdrom = xyes; then
1586 CDROM_SUBDIRS="$CDROM_SUBDIRS linux"
1587 CDROM_DRIVERS="$CDROM_DRIVERS linux/libcdrom_linux.la"
1589 # Set up files for the thread library
1590 if test x$enable_threads = xyes; then
1591 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1592 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1593 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1594 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1595 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1596 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1597 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1598 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1600 # Set up files for the timer library
1601 if test x$enable_timers = xyes; then
1602 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1616 # Set up files for the main() stub
1617 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1618 # We use the dmedia audio API, not the Sun audio API
1619 #if test x$enable_audio = xyes; then
1620 # CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1621 # AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1622 # AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1624 # Set up files for the joystick library
1625 # (No joystick support yet)
1626 if test x$enable_joystick = xyes; then
1627 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1628 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1630 # Set up files for the cdrom library
1631 # (No CD-ROM support yet)
1632 if test x$enable_cdrom = xyes; then
1633 CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
1634 CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
1636 # Set up files for the thread library
1637 if test x$enable_threads = xyes; then
1638 if test x$use_pthreads = xyes; then
1639 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1640 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1641 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1642 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1643 if test x$have_pthread_sem != xyes; then
1644 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1646 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1648 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1649 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1650 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1652 COPY_ARCH_SRC(src/thread, irix, SDL_systhread.c)
1653 COPY_ARCH_SRC(src/thread, irix, SDL_systhread_c.h)
1654 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1655 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1656 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1657 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1658 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1659 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1662 # Set up files for the timer library
1663 if test x$enable_timers = xyes; then
1664 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1678 # Set up files for the main() stub
1679 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1680 # Set up files for the audio library
1681 if test x$enable_audio = xyes; then
1682 CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1683 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1684 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1686 # Set up files for the joystick library
1687 # (No joystick support yet)
1688 if test x$enable_joystick = xyes; then
1689 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1690 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1692 # Set up files for the cdrom library
1693 # (No CD-ROM support yet)
1694 if test x$enable_cdrom = xyes; then
1695 CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
1696 CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
1698 # Set up files for the thread library
1699 if test x$enable_threads = xyes; then
1700 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1701 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1702 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1703 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1704 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1705 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1706 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1707 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1709 # Set up files for the timer library
1710 if test x$enable_timers = xyes; then
1711 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1725 # Set up files for the main() stub
1726 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1727 # Set up files for the audio library
1728 if test x$enable_audio = xyes; then
1729 AUDIO_SUBDIRS="$AUDIO_SUBDIRS paudio"
1730 AUDIO_DRIVERS="$AUDIO_DRIVERS paudio/libaudio_paudio.la"
1732 # Set up files for the joystick library
1733 # (No joystick support yet)
1734 if test x$enable_joystick = xyes; then
1735 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1736 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1738 # Set up files for the cdrom library
1739 if test x$enable_cdrom = xyes; then
1740 CDROM_SUBDIRS="$CDROM_SUBDIRS aix"
1741 CDROM_DRIVERS="$CDROM_DRIVERS aix/libcdrom_aix.la"
1743 # Set up files for the thread library
1744 if test x$enable_threads = xyes; then
1745 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1746 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1747 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1748 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1749 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1750 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1751 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1752 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1754 # Set up files for the timer library
1755 if test x$enable_timers = xyes; then
1756 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1769 # Set up files for the main() stub
1770 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1771 # Set up files for the audio library
1772 if test x$enable_audio = xyes; then
1773 CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1774 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1775 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1777 # Set up files for the joystick library
1778 # (No joystick support yet)
1779 if test x$enable_joystick = xyes; then
1780 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1781 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1783 # Set up files for the cdrom library
1784 # (No cdrom support yet)
1785 if test x$enable_cdrom = xyes; then
1786 CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
1787 CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
1789 # Set up files for the thread library
1790 if test x$enable_threads = xyes; then
1791 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1792 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1793 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1794 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1795 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1796 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1797 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1798 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1800 # Set up files for the timer library
1801 if test x$enable_timers = xyes; then
1802 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1814 # Set up files for the main() stub
1815 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1816 # Set up files for the audio library
1817 if test x$enable_audio = xyes; then
1818 CFLAGS="$CFLAGS -DALSA_SUPPORT"
1819 SYSTEM_LIBS="$SYSTEM_LIBS -lasound"
1820 AUDIO_SUBDIRS="$AUDIO_SUBDIRS nto"
1821 AUDIO_DRIVERS="$AUDIO_DRIVERS nto/libaudio_nto.la"
1823 # Set up files for the joystick library
1824 if test x$enable_joystick = xyes; then
1825 # (No joystick support yet)
1826 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1827 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1829 # Set up files for the cdrom library
1830 if test x$enable_cdrom = xyes; then
1831 CDROM_SUBDIRS="$CDROM_SUBDIRS qnx"
1832 CDROM_DRIVERS="$CDROM_DRIVERS qnx/libcdrom_qnx.la"
1834 # Set up files for the thread library
1835 if test x$enable_threads = xyes; then
1836 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1837 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1838 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1839 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1840 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1841 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1842 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1843 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1845 # Set up files for the timer library
1846 if test x$enable_timers = xyes; then
1847 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1850 *-*-cygwin* | *-*-mingw32*)
1852 if test "$build" != "$target"; then # cross-compiling
1853 # Default cross-compile location
1854 ac_default_prefix=/usr/local/cross-tools/i386-mingw32msvc
1856 # Look for the location of the tools and install there
1857 if [ "$BUILD_PREFIX" != "" ]; then
1858 ac_default_prefix=$BUILD_PREFIX
1866 # Set up files for the main() stub
1867 COPY_ARCH_SRC(src/main, win32, SDL_main.c)
1868 # Set up files for the audio library
1869 if test x$enable_audio = xyes; then
1870 AUDIO_SUBDIRS="$AUDIO_SUBDIRS windib"
1871 AUDIO_DRIVERS="$AUDIO_DRIVERS windib/libaudio_windib.la"
1872 if test x$use_directx = xyes; then
1873 AUDIO_SUBDIRS="$AUDIO_SUBDIRS windx5"
1874 AUDIO_DRIVERS="$AUDIO_DRIVERS windx5/libaudio_windx5.la"
1877 # Set up files for the joystick library
1878 if test x$enable_joystick = xyes; then
1879 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS win32"
1880 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS win32/libjoystick_winmm.la"
1882 # Set up files for the cdrom library
1883 if test x$enable_cdrom = xyes; then
1884 CDROM_SUBDIRS="$CDROM_SUBDIRS win32"
1885 CDROM_DRIVERS="$CDROM_DRIVERS win32/libcdrom_win32.la"
1887 # Set up files for the thread library
1888 if test x$enable_threads = xyes; then
1889 COPY_ARCH_SRC(src/thread, win32, SDL_systhread.c)
1890 COPY_ARCH_SRC(src/thread, win32, SDL_systhread_c.h)
1891 COPY_ARCH_SRC(src/thread, win32, SDL_sysmutex.c)
1892 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
1893 COPY_ARCH_SRC(src/thread, win32, SDL_syssem.c)
1894 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1895 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1896 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1898 # Set up files for the timer library
1899 if test x$enable_timers = xyes; then
1900 COPY_ARCH_SRC(src/timer, win32, SDL_systimer.c)
1902 # The Win32 platform requires special setup
1903 SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
1906 CFLAGS="$CFLAGS -I/usr/include/mingw -DWIN32 -Uunix"
1907 SDL_CFLAGS="$SDL_CFLAGS -I/usr/include/mingw -DWIN32 -Uunix"
1908 LIBS="$LIBS -mno-cygwin"
1909 SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows -mno-cygwin"
1912 SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows"
1918 ac_default_prefix=/boot/develop/tools/gnupro
1924 # Set up files for the main() stub
1925 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1926 COPY_ARCH_SRC(src/main, beos, SDL_BeApp.cc)
1927 COPY_ARCH_SRC(src/main, beos, SDL_BeApp.h)
1928 # Set up files for the audio library
1929 if test x$enable_audio = xyes; then
1930 AUDIO_SUBDIRS="$AUDIO_SUBDIRS baudio"
1931 AUDIO_DRIVERS="$AUDIO_DRIVERS baudio/libaudio_baudio.la"
1933 # Set up files for the joystick library
1934 if test x$enable_joystick = xyes; then
1935 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS beos"
1936 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS beos/libjoystick_beos.la"
1938 # Set up files for the cdrom library
1939 if test x$enable_cdrom = xyes; then
1940 CDROM_SUBDIRS="$CDROM_SUBDIRS beos"
1941 CDROM_DRIVERS="$CDROM_DRIVERS beos/libcdrom_beos.la"
1943 # Set up files for the thread library
1944 if test x$enable_threads = xyes; then
1945 COPY_ARCH_SRC(src/thread, beos, SDL_systhread.c)
1946 COPY_ARCH_SRC(src/thread, beos, SDL_systhread_c.h)
1947 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
1948 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
1949 COPY_ARCH_SRC(src/thread, beos, SDL_syssem.c)
1950 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1951 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1952 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1954 # Set up files for the timer library
1955 if test x$enable_timers = xyes; then
1956 COPY_ARCH_SRC(src/timer, beos, SDL_systimer.c)
1958 # The BeOS platform requires special libraries
1959 SYSTEM_LIBS="$SYSTEM_LIBS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
1962 # This would be used if cross-compiling to MacOS 9. No way to
1963 # use it at present, but Apple is working on a X-to-9 compiler
1964 # for which this case would be handy.
1970 # Set up files for the main() stub
1971 COPY_ARCH_SRC(src/main, macos, SDL_main.c)
1972 # Set up files for the audio library
1973 if test x$enable_audio = xyes; then
1974 AUDIO_SUBDIRS="$AUDIO_SUBDIRS macrom"
1975 AUDIO_DRIVERS="$AUDIO_DRIVERS macrom/libaudio_macrom.la"
1977 # Set up files for the joystick library
1978 if test x$enable_joystick = xyes; then
1979 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS macos"
1980 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS macos/libjoystick_macos.la"
1982 # Set up files for the cdrom library
1983 if test x$enable_cdrom = xyes; then
1984 CDROM_SUBDIRS="$CDROM_SUBDIRS macos"
1985 CDROM_DRIVERS="$CDROM_DRIVERS macos/libcdrom_macos.la"
1987 # Set up files for the thread library
1988 if test x$enable_threads = xyes; then
1989 COPY_ARCH_SRC(src/thread, macos, SDL_systhread.c)
1990 COPY_ARCH_SRC(src/thread, macos, SDL_systhread_c.h)
1991 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
1992 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
1993 COPY_ARCH_SRC(src/thread, macos, SDL_syssem.c)
1994 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1995 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1996 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1998 # Set up files for the timer library
1999 if test x$enable_timers = xyes; then
2000 COPY_ARCH_SRC(src/timer, macos, SDL_systimer.c)
2002 # The MacOS platform requires special setup
2003 SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
2004 SDL_LIBS="-lSDLmain $SDL_LIBS"
2007 # Strictly speaking, we want "Mac OS X", not "Darwin", which is
2008 # just the OS X kernel sans upper layers like Carbon and Cocoa.
2009 # But config.guess comes back with "darwin", so go with the flow.
2016 # Set up files for the main() stub
2017 COPY_ARCH_SRC(src/main, macosx, SDLmain.m)
2018 COPY_ARCH_SRC(src/main, macosx, SDLmain.h)
2019 # Set up files for the audio library
2020 if test x$enable_audio = xyes; then
2021 AUDIO_SUBDIRS="$AUDIO_SUBDIRS macrom"
2022 AUDIO_DRIVERS="$AUDIO_DRIVERS macrom/libaudio_macrom.la"
2024 # Set up files for the joystick library
2025 if test x$enable_joystick = xyes; then
2026 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
2027 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
2029 # Set up files for the cdrom library
2030 if test x$enable_cdrom = xyes; then
2031 CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
2032 CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
2034 # Set up files for the thread library
2035 if test x$enable_threads = xyes; then
2036 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
2037 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
2038 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
2039 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
2040 if test x$use_pthreads = xyes -a x$have_pthread_sem != xyes; then
2041 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
2043 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
2045 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
2046 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
2047 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
2049 # Set up files for the timer library
2050 if test x$enable_timers = xyes; then
2051 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
2053 # The MacOS X platform requires special setup
2054 SDL_CFLAGS="$SDL_CFLAGS -F/System/Library/Frameworks/Carbon.framework -F/System/Library/Frameworks/Cocoa.framework"
2055 SDL_LIBS="-lSDLmain $SDL_LIBS -framework Carbon -framework Cocoa"
2058 AC_MSG_ERROR(Unsupported target: Please add to configure.in)
2063 # Set the conditional variables for this target
2064 AM_CONDITIONAL(TARGET_LINUX, test $ARCH = linux)
2065 AM_CONDITIONAL(TARGET_SOLARIS, test $ARCH = solaris)
2066 AM_CONDITIONAL(TARGET_IRIX, test $ARCH = irix)
2067 AM_CONDITIONAL(TARGET_BSDI, test $ARCH = bsdi)
2068 AM_CONDITIONAL(TARGET_FREEBSD, test $ARCH = freebsd)
2069 AM_CONDITIONAL(TARGET_NETBSD, test $ARCH = netbsd)
2070 AM_CONDITIONAL(TARGET_OPENBSD, test $ARCH = openbsd)
2071 AM_CONDITIONAL(TARGET_AIX, test $ARCH = aix)
2072 AM_CONDITIONAL(TARGET_WIN32, test $ARCH = win32)
2073 AM_CONDITIONAL(TARGET_BEOS, test $ARCH = beos)
2074 AM_CONDITIONAL(TARGET_MACOS, test $ARCH = macos)
2075 AM_CONDITIONAL(TARGET_MACOSX, test $ARCH = macosx)
2077 # Set conditional variables for shared and static library selection.
2078 # These are not used in any Makefile.am but in sdl-config.in.
2079 AM_CONDITIONAL([ENABLE_SHARED], [test "$enable_shared" = yes])
2080 AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = yes])
2082 # Set runtime shared library paths as needed
2084 if test $ARCH = linux -o $ARCH = freebsd -o $ARCH = bsdi; then
2085 SDL_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib"
2088 if test $ARCH = solaris; then
2089 SDL_RLD_FLAGS="-R\${exec_prefix}/lib"
2092 if test $ARCH = openbsd; then
2093 SDL_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib $SYSTEM_LIBS"
2096 dnl Output the video drivers we use
2097 if test x$enable_video = xtrue; then
2098 if test "$VIDEO_SUBDIRS" = ""; then
2099 AC_MSG_ERROR(*** No video drivers are enabled!)
2102 AC_SUBST(AUDIO_SUBDIRS)
2103 AC_SUBST(AUDIO_DRIVERS)
2104 AC_SUBST(VIDEO_SUBDIRS)
2105 AC_SUBST(VIDEO_DRIVERS)
2106 AC_SUBST(JOYSTICK_SUBDIRS)
2107 AC_SUBST(JOYSTICK_DRIVERS)
2108 AC_SUBST(CDROM_SUBDIRS)
2109 AC_SUBST(CDROM_DRIVERS)
2110 AC_SUBST(SDL_EXTRADIRS)
2111 AC_SUBST(SDL_EXTRALIBS)
2112 AC_SUBST(SYSTEM_LIBS)
2114 dnl Expand the cflags and libraries needed by apps using SDL
2115 AC_SUBST(SDL_CFLAGS)
2117 AC_SUBST(SDL_RLD_FLAGS)
2119 dnl Expand the libraries needed for static linking
2120 AC_SUBST(SYSTEM_LIBS)
2121 dnl Expand the include directories for building SDL
2122 CFLAGS="$CFLAGS -I\$(top_srcdir)/include"
2123 CFLAGS="$CFLAGS -I\$(top_srcdir)/include/SDL"
2124 CFLAGS="$CFLAGS -I\$(top_srcdir)/src -I\$(top_srcdir)/src/$ARCH"
2125 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/main"
2126 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/audio"
2127 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video"
2128 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/events"
2129 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/joystick"
2130 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/cdrom"
2131 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/thread"
2132 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/timer"
2133 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/endian"
2134 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/file"
2138 # Check for darwin at the very end and set up the Objective C compiler
2139 # We do this here so that we get the full CFLAGS into OBJCFLAGS
2149 # Finally create all the generated files
2150 dnl Important: Any directory that you want to be in the distcheck should
2151 dnl have a file listed here, so that configure generates the
2152 dnl subdirectories on the build target.
2162 src/audio/alsa/Makefile
2163 src/audio/arts/Makefile
2164 src/audio/baudio/Makefile
2165 src/audio/dma/Makefile
2166 src/audio/dmedia/Makefile
2167 src/audio/dsp/Makefile
2168 src/audio/esd/Makefile
2169 src/audio/macrom/Makefile
2170 src/audio/nas/Makefile
2171 src/audio/nto/Makefile
2172 src/audio/openbsd/Makefile
2173 src/audio/paudio/Makefile
2174 src/audio/sun/Makefile
2175 src/audio/ums/Makefile
2176 src/audio/windib/Makefile
2177 src/audio/windx5/Makefile
2178 src/audio/disk/Makefile
2180 src/video/cybergfx/Makefile
2181 src/video/x11/Makefile
2182 src/video/dga/Makefile
2183 src/video/nanox/Makefile
2184 src/video/fbcon/Makefile
2185 src/video/ps2gs/Makefile
2186 src/video/ggi/Makefile
2187 src/video/maccommon/Makefile
2188 src/video/macdsp/Makefile
2189 src/video/macrom/Makefile
2190 src/video/quartz/Makefile
2191 src/video/svga/Makefile
2192 src/video/vgl/Makefile
2193 src/video/aalib/Makefile
2194 src/video/wincommon/Makefile
2195 src/video/windib/Makefile
2196 src/video/windx5/Makefile
2197 src/video/bwindow/Makefile
2198 src/video/photon/Makefile
2199 src/video/dummy/Makefile
2201 src/joystick/Makefile
2202 src/joystick/amigaos/Makefile
2203 src/joystick/beos/Makefile
2204 src/joystick/dummy/Makefile
2205 src/joystick/linux/Makefile
2206 src/joystick/macos/Makefile
2207 src/joystick/win32/Makefile
2209 src/cdrom/aix/Makefile
2210 src/cdrom/beos/Makefile
2211 src/cdrom/dummy/Makefile
2212 src/cdrom/freebsd/Makefile
2213 src/cdrom/linux/Makefile
2214 src/cdrom/macos/Makefile
2215 src/cdrom/openbsd/Makefile
2216 src/cdrom/qnx/Makefile
2217 src/cdrom/win32/Makefile
2225 ], [chmod +x sdl-config])