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)
74 dnl The alpha architecture needs special flags for binary portability
77 if test x$ac_cv_prog_gcc = xyes; then
78 CFLAGS="$CFLAGS -mcpu=ev4 -Wa,-mall"
83 dnl Add compiler-specific optimization flags
85 dnl See if the user wants aggressive optimizations of the code
87 [ --enable-debug Disable aggressive optimizations [default=yes]],
89 if test x$enable_debug != xyes; then
90 if test x$ac_cv_prog_gcc = xyes; then
91 CFLAGS="$CFLAGS -fexpensive-optimizations"
92 # Ack! This breaks the MMX YV12 conversion on gcc 2.95.2
93 # CFLAGS="$CFLAGS -fomit-frame-pointer"
97 if test x$ac_cv_prog_gcc = xyes; then
98 CFLAGS="$CFLAGS -march=486"
102 if test x$ac_cv_prog_gcc = xyes; then
103 CFLAGS="$CFLAGS -march=pentium -mcpu=pentiumpro"
107 if test x$ac_cv_prog_gcc != xyes; then
108 CFLAGS="-g3 -fast -arch host"
114 dnl Add verbose warnings by default, and allow ANSI compliance checking
115 AC_ARG_ENABLE(strict-ansi,
116 [ --enable-strict-ansi Enable strict ANSI compliance build [default=no]],
117 , enable_strict_ansi=no)
118 if test x$ac_cv_prog_gcc = xyes; then
119 CFLAGS="$CFLAGS -Wall"
120 if test x$enable_strict_ansi = xyes; then
121 CFLAGS="$CFLAGS -ansi -pedantic -D_XOPEN_SOURCE"
125 dnl Initialize the compiler and linker flags for SDL applications
130 dnl Add the math library for the new gamma correction support
133 *-*-cygwin* | *-*-mingw32*)
146 SYSTEM_LIBS="$SYSTEM_LIBS $MATHLIB"
148 dnl Enable/disable various subsystems of the SDL library
151 [ --enable-audio Enable the audio subsystem [default=yes]],
153 if test x$enable_audio = xyes; then
154 SDL_EXTRADIRS="$SDL_EXTRADIRS audio"
155 SDL_EXTRALIBS="$SDL_EXTRALIBS audio/libaudio.la"
157 CFLAGS="$CFLAGS -DDISABLE_AUDIO"
160 [ --enable-video Enable the video subsystem [default=yes]],
162 if test x$enable_video = xyes; then
163 SDL_EXTRADIRS="$SDL_EXTRADIRS video"
164 SDL_EXTRALIBS="$SDL_EXTRALIBS video/libvideo.la"
166 CFLAGS="$CFLAGS -DDISABLE_VIDEO"
168 AC_ARG_ENABLE(events,
169 [ --enable-events Enable the events subsystem [default=yes]],
171 if test x$enable_video = xyes -a x$enable_events = xyes; then
172 SDL_EXTRADIRS="$SDL_EXTRADIRS events"
173 SDL_EXTRALIBS="$SDL_EXTRALIBS events/libevents.la"
175 CFLAGS="$CFLAGS -DDISABLE_EVENTS"
177 AC_ARG_ENABLE(joystick,
178 [ --enable-joystick Enable the joystick subsystem [default=yes]],
179 , enable_joystick=yes)
180 if test x$enable_joystick = xyes; then
181 SDL_EXTRADIRS="$SDL_EXTRADIRS joystick"
182 SDL_EXTRALIBS="$SDL_EXTRALIBS joystick/libjoystick.la"
184 CFLAGS="$CFLAGS -DDISABLE_JOYSTICK"
187 [ --enable-cdrom Enable the cdrom subsystem [default=yes]],
189 if test x$enable_cdrom = xyes; then
190 SDL_EXTRADIRS="$SDL_EXTRADIRS cdrom"
191 SDL_EXTRALIBS="$SDL_EXTRALIBS cdrom/libcdrom.la"
193 CFLAGS="$CFLAGS -DDISABLE_CDROM"
195 AC_ARG_ENABLE(threads,
196 [ --enable-threads Enable the threading subsystem [default=yes]],
197 , enable_threads=yes)
198 SDL_EXTRADIRS="$SDL_EXTRADIRS thread"
199 SDL_EXTRALIBS="$SDL_EXTRALIBS thread/libthread.la"
200 if test x$enable_threads != xyes; then
201 CFLAGS="$CFLAGS -DDISABLE_THREADS"
202 COPY_ARCH_SRC(src/thread, generic, SDL_systhread.c)
203 COPY_ARCH_SRC(src/thread, generic, SDL_systhread_c.h)
204 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
205 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
206 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
207 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
208 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
209 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
211 AC_ARG_ENABLE(timers,
212 [ --enable-timers Enable the timer subsystem [default=yes]],
214 if test x$enable_timers = xyes; then
215 SDL_EXTRADIRS="$SDL_EXTRADIRS timer"
216 SDL_EXTRALIBS="$SDL_EXTRALIBS timer/libtimer.la"
218 CFLAGS="$CFLAGS -DDISABLE_TIMERS"
220 AC_ARG_ENABLE(endian,
221 [ --enable-endian Enable the endian subsystem [default=yes]],
223 if test x$enable_endian = xyes; then
224 SDL_EXTRADIRS="$SDL_EXTRADIRS endian"
225 SDL_EXTRALIBS="$SDL_EXTRALIBS endian/libendian.la"
227 CFLAGS="$CFLAGS -DDISABLE_ENDIAN"
230 [ --enable-file Enable the file subsystem [default=yes]],
232 if test x$enable_file = xyes; then
233 SDL_EXTRADIRS="$SDL_EXTRADIRS file"
234 SDL_EXTRALIBS="$SDL_EXTRALIBS file/libfile.la"
236 CFLAGS="$CFLAGS -DDISABLE_FILE"
239 dnl See if the OSS audio interface is supported
243 [ --enable-oss support the OSS audio API [default=yes]],
245 if test x$enable_audio = xyes -a x$enable_oss = xyes; then
246 AC_MSG_CHECKING(for OSS audio support)
248 if test x$have_oss != xyes; then
250 #include <sys/soundcard.h>
252 int arg = SNDCTL_DSP_SETFRAGMENT;
257 if test x$have_oss != xyes; then
259 #include <soundcard.h>
261 int arg = SNDCTL_DSP_SETFRAGMENT;
264 CFLAGS="$CFLAGS -DOSS_USE_SOUNDCARD_H"
267 AC_MSG_RESULT($have_oss)
268 if test x$have_oss = xyes; then
269 CFLAGS="$CFLAGS -DOSS_SUPPORT"
270 AUDIO_SUBDIRS="$AUDIO_SUBDIRS dsp"
271 AUDIO_DRIVERS="$AUDIO_DRIVERS dsp/libaudio_dsp.la"
272 AUDIO_SUBDIRS="$AUDIO_SUBDIRS dma"
273 AUDIO_DRIVERS="$AUDIO_DRIVERS dma/libaudio_dma.la"
278 dnl See if the ALSA audio interface is supported
282 [ --enable-alsa support the ALSA audio API [default=yes]],
284 if test x$enable_audio = xyes -a x$enable_alsa = xyes; then
286 AC_CHECK_HEADER(sys/asoundlib.h, have_alsa_hdr=yes)
287 AC_CHECK_LIB(asound, snd_pcm_open, have_alsa_lib=yes)
288 if test x$have_alsa_hdr = xyes -a x$have_alsa_lib = xyes; then
289 CFLAGS="$CFLAGS -DALSA_SUPPORT"
290 SYSTEM_LIBS="$SYSTEM_LIBS -lasound"
291 AUDIO_SUBDIRS="$AUDIO_SUBDIRS alsa"
292 AUDIO_DRIVERS="$AUDIO_DRIVERS alsa/libaudio_alsa.la"
297 dnl Check whether we want to use OpenBSD native audio or not
300 AC_ARG_ENABLE(openbsdaudio,
301 [ --enable-openbsdaudio OpenBSD native audio support [default=yes]],
302 , enable_openbsdaudio=yes)
303 if test x$enable_audio = xyes -a x$enable_openbsdaudio = xyes; then
304 CFLAGS="$CFLAGS -DOPENBSD_AUDIO_SUPPORT"
305 AUDIO_SUBDIRS="$AUDIO_SUBDIRS openbsd"
306 AUDIO_DRIVERS="$AUDIO_DRIVERS openbsd/libaudio_openbsd.la"
310 dnl Check whether we want to use IRIX 6.5+ native audio or not
313 if test x$enable_audio = xyes; then
314 AC_MSG_CHECKING(for dmedia audio support)
317 #include <dmedia/audio.h>
323 # Set up files for the audio library
324 if test x$have_dmedia = xyes; then
325 CFLAGS="$CFLAGS -DDMEDIA_SUPPORT"
326 AUDIO_SUBDIRS="$AUDIO_SUBDIRS dmedia"
327 AUDIO_DRIVERS="$AUDIO_DRIVERS dmedia/libaudio_dmedia.la"
328 SYSTEM_LIBS="$SYSTEM_LIBS -laudio"
333 dnl Find the ESD includes and libraries
337 [ --enable-esd support the Enlightened Sound Daemon [default=yes]],
339 if test x$enable_audio = xyes -a x$enable_esd = xyes; then
341 CFLAGS="$CFLAGS -DESD_SUPPORT $ESD_CFLAGS"
342 SYSTEM_LIBS="$SYSTEM_LIBS $ESD_LIBS"
343 AUDIO_SUBDIRS="$AUDIO_SUBDIRS esd"
344 AUDIO_DRIVERS="$AUDIO_DRIVERS esd/libaudio_esd.la"
352 [ --enable-arts support the Analog Real Time Synthesizer [default=yes]],
354 if test x$enable_audio = xyes -a x$enable_arts = xyes; then
355 AC_PATH_PROG(ARTSCCONFIG, artsc-config)
356 if test x$ARTSCCONFIG = x -o x$ARTSCCONFIG = x'"$ARTSCCONFIG"'; then
357 : # arts isn't installed
359 ARTSC_CFLAGS=`$ARTSCCONFIG --cflags`
360 ARTSC_LIBS=`$ARTSCCONFIG --libs`
361 AC_MSG_CHECKING(for aRts development environment)
363 save_CFLAGS="$CFLAGS"
364 CFLAGS="$CFLAGS $ARTSC_CFLAGS"
368 arts_stream_t stream;
372 CFLAGS="$save_CFLAGS"
373 AC_MSG_RESULT($audio_arts)
374 if test x$audio_arts = xyes; then
375 CFLAGS="$CFLAGS -DARTSC_SUPPORT $ARTSC_CFLAGS"
376 SYSTEM_LIBS="$SYSTEM_LIBS $ARTSC_LIBS"
377 AUDIO_SUBDIRS="$AUDIO_SUBDIRS arts"
378 AUDIO_DRIVERS="$AUDIO_DRIVERS arts/libaudio_arts.la"
384 dnl See if the NAS audio interface is supported
388 [ --enable-nas support the NAS audio API [default=yes]],
390 if test x$enable_audio = xyes -a x$enable_nas = xyes; then
391 AC_MSG_CHECKING(for NAS audio support)
393 if test -r /usr/X11R6/include/audio/audiolib.h; then
396 AC_MSG_RESULT($have_nas)
397 if test x$have_nas = xyes; then
398 CFLAGS="$CFLAGS -DNAS_SUPPORT"
399 SYSTEM_LIBS="$SYSTEM_LIBS -laudio -lXt"
400 AUDIO_SUBDIRS="$AUDIO_SUBDIRS nas"
401 AUDIO_DRIVERS="$AUDIO_DRIVERS nas/libaudio_nas.la"
406 dnl rcg07142001 See if the user wants the disk writer audio driver...
409 AC_ARG_ENABLE(diskaudio,
410 [ --enable-diskaudio support the disk writer audio driver [default=yes]],
411 , enable_diskaudio=yes)
412 if test x$enable_audio = xyes -a x$enable_diskaudio = xyes; then
413 CFLAGS="$CFLAGS -DDISKAUD_SUPPORT"
414 AUDIO_SUBDIRS="$AUDIO_SUBDIRS disk"
415 AUDIO_DRIVERS="$AUDIO_DRIVERS disk/libaudio_disk.la"
419 dnl See if we can use x86 assembly blitters
422 dnl Make sure we are running on an x86 platform
431 dnl Check for NASM (for assembly blit routines)
433 [ --enable-nasm use nasm assembly blitters on x86 [default=yes]],
435 if test x$enable_video = xyes -a x$enable_nasm = xyes; then
436 AC_PATH_PROG(NASM, nasm)
437 if test x$NASM = x -o x$NASM = x'"$NASM"'; then
438 : # nasm isn't installed
440 CFLAGS="$CFLAGS -DUSE_ASMBLIT -I$srcdir/hermes"
450 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/hermes"
451 SDL_EXTRADIRS="$SDL_EXTRADIRS hermes"
452 SDL_EXTRALIBS="$SDL_EXTRALIBS hermes/libhermes.la"
457 dnl Find the nanox include and library directories
460 AC_ARG_ENABLE(video-nanox,
461 [ --enable-video-nanox use nanox video driver [default=no]],
462 , enable_video_nanox=no)
463 AC_ARG_ENABLE(nanox-debug,
464 [ --enable-nanox-debug print debug messages [default=no]],
465 , enable_nanox_debug=no)
466 AC_ARG_ENABLE(nanox-share-memory,
467 [ --enable-nanox-share-memory use share memory [default=no]],
468 , enable_nanox_share_memory=no)
470 AC_ARG_WITH(nanox_pixel_type,
471 [ --with-nanox-pixel-type=[rgb/0888/888/565/555/332/pal]])
473 if test x$enable_video = xyes -a x$enable_video_nanox = xyes; then
474 if test x$enable_nanox_debug = xyes; then
475 CFLAGS="$CFLAGS -DENABLE_NANOX_DEBUG"
478 if test x$enable_nanox_share_memory = xyes; then
479 CFLAGS="$CFLAGS -DNANOX_SHARE_MEMORY"
482 case "$with_nanox_pixel_type" in
483 rgb) CFLAGS="$CFLAGS -DNANOX_PIXEL_RGB" ;;
484 0888) CFLAGS="$CFLAGS -DNANOX_PIXEL_0888" ;;
485 888) CFLAGS="$CFLAGS -DNANOX_PIXEL_888" ;;
486 565) CFLAGS="$CFLAGS -DNANOX_PIXEL_565" ;;
487 555) CFLAGS="$CFLAGS -DNANOX_PIXEL_555" ;;
488 332) CFLAGS="$CFLAGS -DNANOX_PIXEL_332" ;;
489 pal) CFLAGS="$CFLAGS -DNANOX_PIXEL_PAL" ;;
490 *) AC_MSG_ERROR([Invalid nanox_pixel_type]);;
493 CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_NANOX"
494 SYSTEM_LIBS="$SYSTEM_LIBS -lnano-X"
495 VIDEO_SUBDIRS="$VIDEO_SUBDIRS nanox"
496 VIDEO_DRIVERS="$VIDEO_DRIVERS nanox/libvideo_nanox.la"
500 dnl Find the X11 include and library directories
503 AC_ARG_ENABLE(video-x11,
504 [ --enable-video-x11 use X11 video driver [default=yes]],
505 , enable_video_x11=yes)
506 if test x$enable_video = xyes -a x$enable_video_x11 = xyes; then
509 if test x$have_x = xyes; then
510 CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_X11"
511 if test x$ac_cv_func_shmat != xyes; then
512 CFLAGS="$CFLAGS -DNO_SHARED_MEMORY"
514 SYSTEM_LIBS="$SYSTEM_LIBS $X_LIBS -lX11 -lXext"
515 VIDEO_SUBDIRS="$VIDEO_SUBDIRS x11"
516 VIDEO_DRIVERS="$VIDEO_DRIVERS x11/libvideo_x11.la"
518 AC_ARG_ENABLE(video-x11-vm,
519 [ --enable-video-x11-vm use X11 VM extension for fullscreen [default=yes]],
520 , enable_video_x11_vm=yes)
521 if test x$enable_video_x11_vm = xyes; then
522 AC_MSG_CHECKING(for XFree86 VidMode 1.0 support)
525 #include <X11/Xlib.h>
526 #include <X11/extensions/xf86vmode.h>
531 AC_MSG_RESULT($video_x11_vm)
532 if test x$video_x11_vm = xyes; then
533 CFLAGS="$CFLAGS -DXFREE86_VM"
534 # Check for nasty XFree86 4.0/Glide hack
535 AC_ARG_ENABLE(xfree86_glidehack,
536 [ --enable-xfree86-glidehack Alternate vidmode lib for old Glide [default=no]],
537 , enable_xfreeglidehack=no)
538 if test x$enable_xfree86_glidehack = xyes; then
540 LIBS="$LIBS $X_LIBS -lX11 -lXext"
541 if test x$xfree86_glidehack = x; then
542 AC_CHECK_LIB(Xxf86vm, XF40VidModeQueryExtension, xfree86_glidehack=Xxf86vm)
544 if test x$xfree86_glidehack = x; then
545 AC_CHECK_LIB(Xxf86vm40, XF40VidModeQueryExtension, xfree86_glidehack=Xxf86vm40)
549 if test x$xfree86_glidehack != x; then
550 CFLAGS="$CFLAGS -DXFREE86_VM_DYNAMIC_HACK"
551 SYSTEM_LIBS="$SYSTEM_LIBS -l$xfree86_glidehack"
553 SYSTEM_LIBS="$SYSTEM_LIBS -lXxf86vm"
555 AC_MSG_CHECKING(for XFree86 VidMode gamma support)
558 #include <X11/Xlib.h>
559 #include <X11/extensions/xf86vmode.h>
561 XF86VidModeGamma gamma;
563 video_x11_vmgamma=yes
565 AC_MSG_RESULT($video_x11_vmgamma)
566 if test x$video_x11_vmgamma = xyes; then
567 CFLAGS="$CFLAGS -DXFREE86_VMGAMMA"
572 [ --enable-dga allow use of X11 DGA code [default=yes]],
574 AC_ARG_ENABLE(video-x11-dgamouse,
575 [ --enable-video-x11-dgamouse use X11 DGA for mouse events [default=yes]],
576 , enable_video_x11_dgamouse=yes)
577 if test x$enable_dga = xyes; then
578 AC_MSG_CHECKING(for XFree86 DGA 1.0 support)
581 #include <X11/Xlib.h>
582 #include <X11/extensions/xf86dga.h>
587 AC_MSG_RESULT($video_x11_dga)
588 if test x$video_x11_dga = xyes; then
589 CFLAGS="$CFLAGS -DXFREE86_DGAMOUSE"
590 if test x$enable_video_x11_dgamouse = xyes; then
591 CFLAGS="$CFLAGS -DDEFAULT_DGAMOUSE"
593 SYSTEM_LIBS="$SYSTEM_LIBS -lXxf86dga"
596 AC_ARG_ENABLE(video-x11-xv,
597 [ --enable-video-x11-xv use X11 XvImage extension for video [default=yes]],
598 , enable_video_x11_xv=yes)
599 if test x$enable_video_x11_xv = xyes; then
600 AC_MSG_CHECKING(for XFree86 XvImage support)
603 #include <X11/Xlib.h>
606 #include <X11/extensions/XShm.h>
607 #include <X11/extensions/Xvlib.h>
613 AC_MSG_RESULT($video_x11_xv)
614 if test x$video_x11_xv = xyes; then
615 CFLAGS="$CFLAGS -DXFREE86_XV"
616 SYSTEM_LIBS="$SYSTEM_LIBS -lXv"
624 AC_ARG_ENABLE(video-photon,
625 [ --enable-video-photon use QNX Photon video driver [default=yes]],
626 , enable_video_photon=yes)
627 if test x$enable_video = xyes -a x$enable_video_photon = xyes; then
628 AC_MSG_CHECKING(for QNX Photon support)
633 #include <photon/Pg.h>
634 #include <photon/PdDirect.h>
636 PgDisplaySettings_t *visual;
640 AC_MSG_RESULT($video_photon)
641 if test x$video_photon = xyes; then
642 CFLAGS="$CFLAGS -DENABLE_PHOTON"
643 SYSTEM_LIBS="$SYSTEM_LIBS -lph"
644 VIDEO_SUBDIRS="$VIDEO_SUBDIRS photon"
645 VIDEO_DRIVERS="$VIDEO_DRIVERS photon/libvideo_photon.la"
650 dnl Find the X11 DGA 2.0 include and library directories
653 AC_ARG_ENABLE(video-dga,
654 [ --enable-video-dga use DGA 2.0 video driver [default=yes]],
655 , enable_video_dga=yes)
656 if test x$video_x11_dga = xyes -a x$enable_video_dga = xyes; then
657 AC_MSG_CHECKING(for XFree86 DGA 2.0 support)
660 #include <X11/Xlib.h>
661 #include <X11/extensions/xf86dga.h>
667 AC_MSG_RESULT($video_x11_dga2)
668 if test x$video_x11_dga2 = xyes; then
669 CFLAGS="$CFLAGS -DENABLE_DGA"
670 VIDEO_SUBDIRS="$VIDEO_SUBDIRS dga"
671 VIDEO_DRIVERS="$VIDEO_DRIVERS dga/libvideo_dga.la"
676 dnl Find the framebuffer console includes
679 AC_ARG_ENABLE(video-fbcon,
680 [ --enable-video-fbcon use framebuffer console video driver [default=yes]],
681 , enable_video_fbcon=yes)
682 if test x$enable_video = xyes -a x$enable_video_fbcon = xyes; then
683 AC_MSG_CHECKING(for framebuffer console support)
686 #include <linux/fb.h>
687 #include <linux/kd.h>
688 #include <linux/keyboard.h>
693 AC_MSG_RESULT($video_fbcon)
694 if test x$video_fbcon = xyes; then
695 CFLAGS="$CFLAGS -DENABLE_FBCON"
696 VIDEO_SUBDIRS="$VIDEO_SUBDIRS fbcon"
697 VIDEO_DRIVERS="$VIDEO_DRIVERS fbcon/libvideo_fbcon.la"
702 dnl See if we're running on PlayStation 2 hardware
705 AC_ARG_ENABLE(video-ps2gs,
706 [ --enable-video-ps2gs use PlayStation 2 GS video driver [default=yes]],
707 , enable_video_ps2gs=yes)
708 if test x$enable_video = xyes -a x$enable_video_ps2gs = xyes; then
709 AC_MSG_CHECKING(for PlayStation 2 GS support)
712 #include <linux/ps2/dev.h>
713 #include <linux/ps2/gs.h>
718 AC_MSG_RESULT($video_ps2gs)
719 if test x$video_ps2gs = xyes; then
720 CFLAGS="$CFLAGS -DENABLE_PS2GS"
721 VIDEO_SUBDIRS="$VIDEO_SUBDIRS ps2gs"
722 VIDEO_DRIVERS="$VIDEO_DRIVERS ps2gs/libvideo_ps2gs.la"
727 dnl Find the GGI includes
730 AC_ARG_ENABLE(video-ggi,
731 [ --enable-video-ggi use GGI video driver [default=no]],
732 , enable_video_ggi=no)
733 if test x$enable_video = xyes -a x$enable_video_ggi = xyes; then
734 AC_MSG_CHECKING(for GGI support)
743 AC_MSG_RESULT($video_ggi)
744 if test x$video_ggi = xyes; then
745 CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_GGI"
746 SYSTEM_LIBS="$SYSTEM_LIBS -lggi -lgii -lgg"
748 VIDEO_SUBDIRS="$VIDEO_SUBDIRS ggi"
749 VIDEO_DRIVERS="$VIDEO_DRIVERS ggi/libvideo_ggi.la"
754 dnl Find the SVGAlib includes and libraries
757 AC_ARG_ENABLE(video-svga,
758 [ --enable-video-svga use SVGAlib video driver [default=no]],
759 , enable_video_svga=no)
760 if test x$enable_video = xyes -a x$enable_video_svga = xyes; then
761 AC_MSG_CHECKING(for SVGAlib (1.4.0+) support)
765 #include <vgamouse.h>
766 #include <vgakeyboard.h>
768 if ( SCANCODE_RIGHTWIN && SCANCODE_LEFTWIN ) {
774 AC_MSG_RESULT($video_svga)
775 if test x$video_svga = xyes; then
776 CFLAGS="$CFLAGS -DENABLE_SVGALIB"
777 SYSTEM_LIBS="$SYSTEM_LIBS -lvga"
779 VIDEO_SUBDIRS="$VIDEO_SUBDIRS svga"
780 VIDEO_DRIVERS="$VIDEO_DRIVERS svga/libvideo_svga.la"
785 dnl Find the VGL includes and libraries
788 AC_ARG_ENABLE(video-vgl,
789 [ --enable-video-vgl use VGL video driver [default=no]],
790 , enable_video_vgl=no)
791 if test x$enable_video = xyes -a x$enable_video_vgl = xyes; then
792 AC_MSG_CHECKING(for libVGL support)
795 #include <sys/fbio.h>
796 #include <sys/consio.h>
797 #include <sys/kbio.h>
805 AC_MSG_RESULT($video_vgl)
806 if test x$video_vgl = xyes; then
807 CFLAGS="$CFLAGS -DENABLE_VGL"
808 SYSTEM_LIBS="$SYSTEM_LIBS -lvgl"
810 VIDEO_SUBDIRS="$VIDEO_SUBDIRS vgl"
811 VIDEO_DRIVERS="$VIDEO_DRIVERS vgl/libvideo_vgl.la"
816 dnl Find the AAlib includes
819 AC_ARG_ENABLE(video-aalib,
820 [ --enable-video-aalib use AAlib video driver [default=no]],
821 , enable_video_aalib=no)
822 if test x$enable_video = xyes -a x$enable_video_aalib = xyes; then
823 AC_MSG_CHECKING(for AAlib support)
831 AC_MSG_RESULT($video_aalib)
832 if test x$video_aalib = xyes; then
833 CFLAGS="$CFLAGS -DENABLE_AALIB"
834 SYSTEM_LIBS="$SYSTEM_LIBS -laa"
836 VIDEO_SUBDIRS="$VIDEO_SUBDIRS aalib"
837 VIDEO_DRIVERS="$VIDEO_DRIVERS aalib/libvideo_aa.la"
842 dnl rcg04172001 Set up the Null video driver.
845 AC_ARG_ENABLE(video-dummy,
846 [ --enable-video-dummy use dummy video driver [default=yes]],
847 , enable_video_dummy=yes)
848 if test x$enable_video_dummy = xyes; then
849 CFLAGS="$CFLAGS -DENABLE_DUMMYVIDEO"
850 VIDEO_SUBDIRS="$VIDEO_SUBDIRS dummy"
851 VIDEO_DRIVERS="$VIDEO_DRIVERS dummy/libvideo_null.la"
855 dnl Check to see if OpenGL support is desired
856 AC_ARG_ENABLE(video-opengl,
857 [ --enable-video-opengl include OpenGL context creation [default=yes]],
858 , enable_video_opengl=yes)
863 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
864 AC_MSG_CHECKING(for OpenGL (GLX) support)
869 #include <dlfcn.h> /* For loading extensions */
874 AC_MSG_RESULT($video_opengl)
875 if test x$video_opengl = xyes; then
876 CFLAGS="$CFLAGS -DHAVE_OPENGL"
877 AC_CHECK_LIB(dl, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS -ldl")
882 dnl Check for BeOS OpenGL
885 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
886 CFLAGS="$CFLAGS -DHAVE_OPENGL"
887 SYSTEM_LIBS="$SYSTEM_LIBS -lGL"
891 dnl Check for MacOS OpenGL
894 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
895 CFLAGS="$CFLAGS -DHAVE_OPENGL"
898 SDL_LIBS="$SDL_LIBS -framework OpenGL -framework AGL"
903 dnl See if we can use the new unified event interface in Linux 2.4
906 dnl Check for Linux 2.4 unified input event interface support
907 AC_ARG_ENABLE(input-events,
908 [ --enable-input-events use Linux 2.4 unified input interface [default=no]],
909 , enable_input_events=no)
910 if test x$enable_input_events = xyes; then
911 AC_MSG_CHECKING(for Linux 2.4 unified input interface)
914 #include <linux/input.h>
917 #error EVIOCGNAME() ioctl not available
922 AC_MSG_RESULT($use_input_events)
923 if test x$use_input_events = xyes; then
924 CFLAGS="$CFLAGS -DUSE_INPUT_EVENTS"
929 dnl See what type of thread model to use on Linux and Solaris
932 dnl Check for pthread support
933 AC_ARG_ENABLE(pthreads,
934 [ --enable-pthreads use POSIX threads for multi-threading [default=yes]],
935 , enable_pthreads=yes)
936 dnl This is used on Linux for glibc binary compatibility (Doh!)
937 AC_ARG_ENABLE(pthread-sem,
938 [ --enable-pthread-sem use pthread semaphores [default=yes]],
939 , enable_pthread_sem=yes)
943 pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
947 pthread_cflags="-D_THREAD_SAFE"
948 # causes Carbon.p complaints?
949 # pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
952 pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
953 pthread_lib="-pthread"
956 pthread_cflags="-I/usr/pkg/include -D_REENTRANT"
957 pthread_lib="-L/usr/pkg/lib -lpthread -lsem"
960 pthread_cflags="-D_REENTRANT"
961 pthread_lib="-pthread"
964 pthread_cflags="-D_REENTRANT"
965 pthread_lib="-lpthread -lposix4"
968 pthread_cflags="-D_REENTRANT -Kthread"
972 pthread_cflags="-D_SGI_MP_SOURCE"
973 pthread_lib="-lpthread"
976 pthread_cflags="-D_REENTRANT -mthreads"
977 pthread_lib="-lpthread"
984 pthread_cflags="-D_REENTRANT"
985 pthread_lib="-lpthread"
988 LIBS="$LIBS $pthread_lib"
989 if test x$enable_threads = xyes -a x$enable_pthreads = xyes; then
990 AC_MSG_CHECKING(for pthreads)
996 pthread_attr_init(&type);
1000 AC_MSG_RESULT($use_pthreads)
1001 if test x$use_pthreads = xyes; then
1002 CFLAGS="$CFLAGS $pthread_cflags -DSDL_USE_PTHREADS"
1003 SDL_CFLAGS="$SDL_CFLAGS $pthread_cflags"
1004 SDL_LIBS="$SDL_LIBS $pthread_lib"
1006 # Check to see if recursive mutexes are available
1007 AC_MSG_CHECKING(for recursive mutexes)
1008 has_recursive_mutexes=no
1010 #include <pthread.h>
1012 pthread_mutexattr_t attr;
1014 pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
1016 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
1019 has_recursive_mutexes=yes
1021 # Some systems have broken recursive mutex implementations
1024 has_recursive_mutexes=no
1027 AC_MSG_RESULT($has_recursive_mutexes)
1028 if test x$has_recursive_mutexes != xyes; then
1029 CFLAGS="$CFLAGS -DPTHREAD_NO_RECURSIVE_MUTEX"
1032 # Check to see if pthread semaphore support is missing
1033 if test x$enable_pthread_sem = xyes; then
1034 AC_MSG_CHECKING(for pthread semaphores)
1037 #include <pthread.h>
1038 #include <semaphore.h>
1041 have_pthread_sem=yes
1043 AC_MSG_RESULT($have_pthread_sem)
1046 # Check to see if this is broken glibc 2.0 pthreads
1049 AC_MSG_CHECKING(for broken glibc 2.0 pthreads)
1052 #include <features.h>
1053 #if (__GLIBC__ == 2) && (__GLIBC_MINOR__ == 0)
1054 #warning Working around a bug in glibc 2.0 pthreads
1056 #error pthread implementation okay
1057 #endif /* glibc 2.0 */
1060 glibc20_pthreads=yes
1062 AC_MSG_RESULT($glibc20_pthreads)
1066 LIBS="$ac_save_libs"
1068 AC_MSG_CHECKING(whether semun is defined in /usr/include/sys/sem.h)
1071 #include <sys/types.h>
1072 #include <sys/sem.h>
1078 AC_MSG_RESULT($have_semun)
1079 if test x$have_semun = xyes; then
1080 CFLAGS="$CFLAGS -DHAVE_SEMUN"
1083 # See if we can use clone() on Linux directly
1085 if test x$enable_threads = xyes -a x$use_pthreads != xyes; then
1091 CFLAGS="$CFLAGS -DFORK_HACK"
1095 AM_CONDITIONAL(USE_CLONE, test x$use_clone = xyes)
1098 dnl Determine whether the compiler can produce Win32 executables
1101 AC_MSG_CHECKING(Win32 compiler)
1104 #include <windows.h>
1109 AC_MSG_RESULT($have_win32_gcc)
1110 if test x$have_win32_gcc != xyes; then
1112 *** Your compiler ($CC) does not produce Win32 executables!
1116 dnl See if the user wants to redirect standard output to files
1117 AC_ARG_ENABLE(stdio-redirect,
1118 [ --enable-stdio-redirect Redirect STDIO to files on Win32 [default=yes]],
1119 , enable_stdio_redirect=yes)
1120 if test x$enable_stdio_redirect != xyes; then
1121 CFLAGS="$CFLAGS -DNO_STDIO_REDIRECT"
1125 dnl Find the DirectX includes and libraries
1128 AC_ARG_ENABLE(directx,
1129 [ --enable-directx use DirectX for Win32 audio/video [default=yes]],
1130 , enable_directx=yes)
1131 if test x$enable_directx = xyes; then
1132 AC_MSG_CHECKING(for DirectX headers and libraries)
1135 #include "src/video/windx5/directx.h"
1140 AC_MSG_RESULT($use_directx)
1142 AM_CONDITIONAL(USE_DIRECTX, test x$use_directx = xyes)
1144 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video/wincommon"
1145 SYSTEM_LIBS="$SYSTEM_LIBS -luser32 -lgdi32 -lwinmm"
1146 VIDEO_SUBDIRS="$VIDEO_SUBDIRS wincommon"
1147 VIDEO_DRIVERS="$VIDEO_DRIVERS wincommon/libvideo_wincommon.la"
1148 # Enable the DIB driver
1149 CFLAGS="$CFLAGS -DENABLE_WINDIB"
1150 VIDEO_SUBDIRS="$VIDEO_SUBDIRS windib"
1151 VIDEO_DRIVERS="$VIDEO_DRIVERS windib/libvideo_windib.la"
1152 # See if we should enable the DirectX driver
1153 if test x$use_directx = xyes; then
1154 CFLAGS="$CFLAGS -DENABLE_DIRECTX"
1155 SYSTEM_LIBS="$SYSTEM_LIBS -ldxguid"
1156 VIDEO_SUBDIRS="$VIDEO_SUBDIRS windx5"
1157 VIDEO_DRIVERS="$VIDEO_DRIVERS windx5/libvideo_windx5.la"
1161 dnl Set up the BWindow video driver on BeOS
1164 CFLAGS="$CFLAGS -DENABLE_BWINDOW"
1165 VIDEO_SUBDIRS="$VIDEO_SUBDIRS bwindow"
1166 VIDEO_DRIVERS="$VIDEO_DRIVERS bwindow/libvideo_bwindow.la"
1169 dnl Set up the Mac toolbox video driver for Mac OS 7-9
1172 VIDEO_SUBDIRS="$VIDEO_SUBDIRS maccommon"
1173 VIDEO_DRIVERS="$VIDEO_DRIVERS maccommon/libvideo_maccommon.la"
1174 VIDEO_SUBDIRS="$VIDEO_SUBDIRS macrom"
1175 VIDEO_DRIVERS="$VIDEO_DRIVERS macrom/libvideo_macrom.la"
1178 dnl Set up the Mac toolbox video driver for Mac OS X
1181 # "MACOSX" is not an official definition, but it's commonly
1182 # accepted as a way to differentiate between what runs on X
1183 # and what runs on older Macs - while in theory "Carbon" defns
1184 # are consistent between the two, in practice Carbon is still
1185 # changing. -sts Aug 2000
1186 mac_autoconf_target_workaround="MAC"
1187 CFLAGS="$CFLAGS -I/System/Library/Frameworks/Carbon.framework/Headers \
1188 -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"
1189 VIDEO_SUBDIRS="$VIDEO_SUBDIRS maccommon"
1190 VIDEO_DRIVERS="$VIDEO_DRIVERS maccommon/libvideo_maccommon.la"
1191 VIDEO_SUBDIRS="$VIDEO_SUBDIRS macrom"
1192 VIDEO_DRIVERS="$VIDEO_DRIVERS macrom/libvideo_macrom.la"
1195 dnl Set up the kernel statistics library for Solaris
1198 CFLAGS="$CFLAGS -DHAVE_KSTAT"
1199 SYSTEM_LIBS="$SYSTEM_LIBS -lkstat"
1224 # Set up files for the main() stub
1225 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1226 # Set up files for the audio library
1227 # We use the OSS and ALSA API's, not the Sun audio API
1228 #if test x$enable_audio = xyes; then
1229 # CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1230 # AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1231 # AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1233 # Set up files for the joystick library
1234 if test x$enable_joystick = xyes; then
1235 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS linux"
1236 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS linux/libjoystick_linux.la"
1238 # Set up files for the cdrom library
1239 if test x$enable_cdrom = xyes; then
1240 COPY_ARCH_SRC(src/cdrom, linux, SDL_syscdrom.c)
1242 # Set up files for the thread library
1243 if test x$enable_threads = xyes; then
1244 if test x$use_pthreads != xyes; then
1245 COPY_ARCH_SRC(src/thread, linux, clone.S)
1247 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1248 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1249 if test x$use_pthreads = xyes -a x$have_pthread_sem != xyes; then
1250 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1252 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1254 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1255 if test x$glibc20_pthreads = xyes; then
1256 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
1257 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
1258 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1259 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1261 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1262 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1263 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1264 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1267 # Set up files for the timer library
1268 if test x$enable_timers = xyes; then
1269 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1287 # Set up files for the main() stub
1288 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1289 # Set up files for the audio library
1290 # We use the OSS and ALSA API's, not the Sun audio API
1291 #if test x$enable_audio = xyes; then
1292 # CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1293 # AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1294 # AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1296 # Set up files for the joystick library
1297 # (No joystick support yet)
1298 if test x$enable_joystick = xyes; then
1299 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1300 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1302 # Set up files for the cdrom library
1303 # (No cdrom support yet)
1304 if test x$enable_cdrom = xyes; then
1305 COPY_ARCH_SRC(src/cdrom, dummy, SDL_syscdrom.c)
1307 # Set up files for the thread library
1308 if test x$enable_threads = xyes; then
1309 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1310 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1311 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1312 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1313 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1314 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1315 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1316 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1318 # Set up files for the timer library
1319 if test x$enable_timers = xyes; then
1320 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1339 # Set up files for the main() stub
1340 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1341 # Set up files for the audio library
1342 # We use the OSS and ALSA API's, not the Sun audio API
1343 #if test x$enable_audio = xyes; then
1344 # CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1345 # AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1346 # AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1348 # Set up files for the joystick library
1349 # (No joystick support yet)
1350 if test x$enable_joystick = xyes; then
1351 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1352 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1354 # Set up files for the cdrom library
1355 if test x$enable_cdrom = xyes; then
1356 COPY_ARCH_SRC(src/cdrom, freebsd, SDL_syscdrom.c)
1358 # Set up files for the thread library
1359 if test x$enable_threads = xyes; then
1360 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1361 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1362 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1363 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1364 if test x$use_pthreads = xyes -a x$have_pthread_sem != xyes; then
1365 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1367 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1369 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1370 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1371 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1373 # Set up files for the timer library
1374 if test x$enable_timers = xyes; then
1375 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1391 # Set up files for the main() stub
1392 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1393 # Set up files for the audio library
1394 if test x$enable_audio = xyes; then
1395 CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1396 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1397 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1399 # Set up files for the joystick library
1400 # (No joystick support yet)
1401 if test x$enable_joystick = xyes; then
1402 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1403 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1405 # Set up files for the cdrom library
1406 if test x$enable_cdrom = xyes; then
1407 COPY_ARCH_SRC(src/cdrom, openbsd, SDL_syscdrom.c)
1409 # Set up files for the thread library
1410 if test x$enable_threads = xyes; then
1411 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1412 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1413 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1414 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1415 if test x$use_pthreads = xyes -a x$have_pthread_sem != xyes; then
1416 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1418 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1420 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1421 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1422 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1424 # Set up files for the timer library
1425 if test x$enable_timers = xyes; then
1426 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1428 # NetBSD does not define "unix"
1429 CFLAGS="$CFLAGS -Dunix -D_POSIX_THREAD_SYSCALL_SOFT=1"
1445 # Set up files for the main() stub
1446 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1447 # Set up files for the audio library
1448 # We use the OSS and native API's, not the Sun audio API
1449 #if test x$enable_audio = xyes; then
1450 # CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1451 # AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1452 # AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1454 # OpenBSD needs linking with ossaudio emulation library
1455 if test x$have_oss = xyes; then
1456 SYSTEM_LIBS="$SYSTEM_LIBS -lossaudio"
1458 # Set up files for the joystick library
1459 # (No joystick support yet)
1460 if test x$enable_joystick = xyes; then
1461 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1462 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1464 # Set up files for the cdrom library
1465 if test x$enable_cdrom = xyes; then
1466 COPY_ARCH_SRC(src/cdrom, openbsd, SDL_syscdrom.c)
1468 # Set up files for the thread library
1469 if test x$enable_threads = xyes; then
1470 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1471 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1472 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1473 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1474 if test x$use_pthreads = xyes -a x$have_pthread_sem != xyes; then
1475 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1477 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1479 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1480 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1481 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1483 # Set up files for the timer library
1484 if test x$enable_timers = xyes; then
1485 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1487 # OpenBSD does not define "unix"
1488 CFLAGS="$CFLAGS -Dunix"
1504 # Set up files for the main() stub
1505 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1506 # Set up files for the audio library
1507 if test x$enable_audio = xyes; then
1508 CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1509 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1510 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1512 # Set up files for the joystick library
1513 # (No joystick support yet)
1514 if test x$enable_joystick = xyes; then
1515 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1516 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1518 # Set up files for the cdrom library
1519 if test x$enable_cdrom = xyes; then
1520 COPY_ARCH_SRC(src/cdrom, dummy, SDL_syscdrom.c)
1522 # Set up files for the thread library
1523 if test x$enable_threads = xyes; then
1524 COPY_ARCH_SRC(src/thread, generic, SDL_systhread.c)
1525 COPY_ARCH_SRC(src/thread, generic, SDL_systhread_c.h)
1526 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
1527 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
1528 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1529 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1530 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1531 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1533 # Set up files for the timer library
1534 if test x$enable_timers = xyes; then
1535 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1540 CFLAGS="$CFLAGS -D__ELF__" # Fix for nasm on Solaris x86
1553 # Set up files for the main() stub
1554 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1555 # Set up files for the audio library
1556 if test x$enable_audio = xyes; then
1557 CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1558 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1559 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1561 # Set up files for the joystick library
1562 # (No joystick support yet)
1563 if test x$enable_joystick = xyes; then
1564 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1565 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1567 # Set up files for the cdrom library
1568 if test x$enable_cdrom = xyes; then
1569 COPY_ARCH_SRC(src/cdrom, linux, SDL_syscdrom.c)
1571 # Set up files for the thread library
1572 if test x$enable_threads = xyes; then
1573 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1574 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1575 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1576 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1577 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1578 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1579 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1580 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1582 # Set up files for the timer library
1583 if test x$enable_timers = xyes; then
1584 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1598 # Set up files for the main() stub
1599 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1600 # We use the dmedia audio API, not the Sun audio API
1601 #if test x$enable_audio = xyes; then
1602 # CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1603 # AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1604 # AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1606 # Set up files for the joystick library
1607 # (No joystick support yet)
1608 if test x$enable_joystick = xyes; then
1609 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1610 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1612 # Set up files for the cdrom library
1613 # (No CD-ROM support yet)
1614 if test x$enable_cdrom = xyes; then
1615 COPY_ARCH_SRC(src/cdrom, dummy, SDL_syscdrom.c)
1617 # Set up files for the thread library
1618 if test x$enable_threads = xyes; then
1619 if test x$use_pthreads = xyes; then
1620 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1621 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1622 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1623 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1624 if test x$have_pthread_sem != xyes; then
1625 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1627 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1629 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1630 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1631 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1633 COPY_ARCH_SRC(src/thread, irix, SDL_systhread.c)
1634 COPY_ARCH_SRC(src/thread, irix, SDL_systhread_c.h)
1635 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1636 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1637 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1638 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1639 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1640 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1643 # Set up files for the timer library
1644 if test x$enable_timers = xyes; then
1645 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1659 # Set up files for the main() stub
1660 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1661 # Set up files for the audio library
1662 if test x$enable_audio = xyes; then
1663 CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1664 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1665 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1667 # Set up files for the joystick library
1668 # (No joystick support yet)
1669 if test x$enable_joystick = xyes; then
1670 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1671 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1673 # Set up files for the cdrom library
1674 # (No CD-ROM support yet)
1675 if test x$enable_cdrom = xyes; then
1676 COPY_ARCH_SRC(src/cdrom, dummy, SDL_syscdrom.c)
1678 # Set up files for the thread library
1679 if test x$enable_threads = xyes; then
1680 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1681 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1682 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1683 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1684 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1685 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1686 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1687 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1689 # Set up files for the timer library
1690 if test x$enable_timers = xyes; then
1691 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1705 # Set up files for the main() stub
1706 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1707 # Set up files for the audio library
1708 if test x$enable_audio = xyes; then
1709 AUDIO_SUBDIRS="$AUDIO_SUBDIRS paudio"
1710 AUDIO_DRIVERS="$AUDIO_DRIVERS paudio/libaudio_paudio.la"
1712 # Set up files for the joystick library
1713 # (No joystick support yet)
1714 if test x$enable_joystick = xyes; then
1715 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1716 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1718 # Set up files for the cdrom library
1719 if test x$enable_cdrom = xyes; then
1720 COPY_ARCH_SRC(src/cdrom, aix, SDL_syscdrom.c)
1722 # Set up files for the thread library
1723 if test x$enable_threads = xyes; then
1724 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1725 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1726 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1727 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1728 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1729 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1730 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1731 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1733 # Set up files for the timer library
1734 if test x$enable_timers = xyes; then
1735 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1748 # Set up files for the main() stub
1749 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1750 # Set up files for the audio library
1751 if test x$enable_audio = xyes; then
1752 CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
1753 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
1754 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
1756 # Set up files for the joystick library
1757 # (No joystick support yet)
1758 if test x$enable_joystick = xyes; then
1759 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1760 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1762 # Set up files for the cdrom library
1763 # (No cdrom support yet)
1764 if test x$enable_cdrom = xyes; then
1765 COPY_ARCH_SRC(src/cdrom, dummy, SDL_syscdrom.c)
1767 # Set up files for the thread library
1768 if test x$enable_threads = xyes; then
1769 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1770 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1771 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1772 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1773 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1774 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1775 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1776 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1778 # Set up files for the timer library
1779 if test x$enable_timers = xyes; then
1780 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1792 # Set up files for the main() stub
1793 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1794 # Set up files for the audio library
1795 if test x$enable_audio = xyes; then
1796 CFLAGS="$CFLAGS -DALSA_SUPPORT"
1797 SYSTEM_LIBS="$SYSTEM_LIBS -lasound"
1798 AUDIO_SUBDIRS="$AUDIO_SUBDIRS nto"
1799 AUDIO_DRIVERS="$AUDIO_DRIVERS nto/libaudio_nto.la"
1801 # Set up files for the joystick library
1802 if test x$enable_joystick = xyes; then
1803 # (No joystick support yet)
1804 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
1805 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
1807 # Set up files for the cdrom library
1808 if test x$enable_cdrom = xyes; then
1809 COPY_ARCH_SRC(src/cdrom, qnx, SDL_syscdrom.c)
1811 # Set up files for the thread library
1812 if test x$enable_threads = xyes; then
1813 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1814 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1815 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1816 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1817 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1818 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1819 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1820 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1822 # Set up files for the timer library
1823 if test x$enable_timers = xyes; then
1824 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1827 *-*-cygwin* | *-*-mingw32*)
1829 if test "$build" != "$target"; then # cross-compiling
1830 # Default cross-compile location
1831 ac_default_prefix=/usr/local/cross-tools/i386-mingw32msvc
1833 # Look for the location of the tools and install there
1834 if [ "$BUILD_PREFIX" != "" ]; then
1835 ac_default_prefix=$BUILD_PREFIX
1843 # Set up files for the main() stub
1844 COPY_ARCH_SRC(src/main, win32, SDL_main.c)
1845 # Set up files for the audio library
1846 if test x$enable_audio = xyes; then
1847 AUDIO_SUBDIRS="$AUDIO_SUBDIRS windib"
1848 AUDIO_DRIVERS="$AUDIO_DRIVERS windib/libaudio_windib.la"
1849 if test x$use_directx = xyes; then
1850 AUDIO_SUBDIRS="$AUDIO_SUBDIRS windx5"
1851 AUDIO_DRIVERS="$AUDIO_DRIVERS windx5/libaudio_windx5.la"
1854 # Set up files for the joystick library
1855 if test x$enable_joystick = xyes; then
1856 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS win32"
1857 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS win32/libjoystick_winmm.la"
1859 # Set up files for the cdrom library
1860 if test x$enable_cdrom = xyes; then
1861 COPY_ARCH_SRC(src/cdrom, win32, SDL_syscdrom.c)
1863 # Set up files for the thread library
1864 if test x$enable_threads = xyes; then
1865 COPY_ARCH_SRC(src/thread, win32, SDL_systhread.c)
1866 COPY_ARCH_SRC(src/thread, win32, SDL_systhread_c.h)
1867 COPY_ARCH_SRC(src/thread, win32, SDL_sysmutex.c)
1868 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
1869 COPY_ARCH_SRC(src/thread, win32, SDL_syssem.c)
1870 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1871 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1872 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1874 # Set up files for the timer library
1875 if test x$enable_timers = xyes; then
1876 COPY_ARCH_SRC(src/timer, win32, SDL_systimer.c)
1878 # The Win32 platform requires special setup
1879 SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
1882 CFLAGS="$CFLAGS -I/usr/include/mingw -DWIN32 -Uunix"
1883 SDL_CFLAGS="$SDL_CFLAGS -I/usr/include/mingw -DWIN32 -Uunix"
1884 LIBS="$LIBS -mno-cygwin"
1885 SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows -mno-cygwin"
1888 SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows"
1894 ac_default_prefix=/boot/develop/tools/gnupro
1900 # Set up files for the main() stub
1901 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1902 COPY_ARCH_SRC(src/main, beos, SDL_BeApp.cc)
1903 COPY_ARCH_SRC(src/main, beos, SDL_BeApp.h)
1904 # Set up files for the audio library
1905 if test x$enable_audio = xyes; then
1906 AUDIO_SUBDIRS="$AUDIO_SUBDIRS baudio"
1907 AUDIO_DRIVERS="$AUDIO_DRIVERS baudio/libaudio_baudio.la"
1909 # Set up files for the joystick library
1910 if test x$enable_joystick = xyes; then
1911 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS beos"
1912 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS beos/libjoystick_beos.la"
1914 # Set up files for the cdrom library
1915 if test x$enable_cdrom = xyes; then
1916 COPY_ARCH_SRC(src/cdrom, beos, SDL_syscdrom.c)
1918 # Set up files for the thread library
1919 if test x$enable_threads = xyes; then
1920 COPY_ARCH_SRC(src/thread, beos, SDL_systhread.c)
1921 COPY_ARCH_SRC(src/thread, beos, SDL_systhread_c.h)
1922 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
1923 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
1924 COPY_ARCH_SRC(src/thread, beos, SDL_syssem.c)
1925 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1926 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1927 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1929 # Set up files for the timer library
1930 if test x$enable_timers = xyes; then
1931 COPY_ARCH_SRC(src/timer, beos, SDL_systimer.c)
1933 # The BeOS platform requires special libraries
1934 SYSTEM_LIBS="$SYSTEM_LIBS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
1937 # This would be used if cross-compiling to MacOS 9. No way to
1938 # use it at present, but Apple is working on a X-to-9 compiler
1939 # for which this case would be handy.
1945 # Set up files for the main() stub
1946 COPY_ARCH_SRC(src/main, macos, SDL_main.c)
1947 # Set up files for the audio library
1948 if test x$enable_audio = xyes; then
1949 AUDIO_SUBDIRS="$AUDIO_SUBDIRS macrom"
1950 AUDIO_DRIVERS="$AUDIO_DRIVERS macrom/libaudio_macrom.la"
1952 # Set up files for the joystick library
1953 if test x$enable_joystick = xyes; then
1954 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS macos"
1955 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS macos/libjoystick_macos.la"
1957 # Set up files for the cdrom library
1958 if test x$enable_cdrom = xyes; then
1959 COPY_ARCH_SRC(src/cdrom, macos, SDL_syscdrom.c)
1961 # Set up files for the thread library
1962 if test x$enable_threads = xyes; then
1963 COPY_ARCH_SRC(src/thread, macos, SDL_systhread.c)
1964 COPY_ARCH_SRC(src/thread, macos, SDL_systhread_c.h)
1965 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
1966 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
1967 COPY_ARCH_SRC(src/thread, macos, SDL_syssem.c)
1968 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1969 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1970 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1972 # Set up files for the timer library
1973 if test x$enable_timers = xyes; then
1974 COPY_ARCH_SRC(src/timer, macos, SDL_systimer.c)
1976 # The MacOS platform requires special setup
1977 SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
1978 SDL_LIBS="-lSDLmain $SDL_LIBS"
1981 # Strictly speaking, we want "Mac OS X", not "Darwin", which is
1982 # just the OS X kernel sans upper layers like Carbon. But
1983 # config.guess comes back with "darwin", so go with the flow.
1990 # Set up files for the main() stub
1991 # COPY_ARCH_SRC(src/main, macos, SDL_main.c)
1992 COPY_ARCH_SRC(src/main, linux, SDL_main.c)
1993 # Set up files for the audio library
1994 if test x$enable_audio = xyes; then
1995 AUDIO_SUBDIRS="$AUDIO_SUBDIRS macrom"
1996 AUDIO_DRIVERS="$AUDIO_DRIVERS macrom/libaudio_macrom.la"
1998 # Set up files for the joystick library
1999 if test x$enable_joystick = xyes; then
2000 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
2001 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
2003 # Set up files for the cdrom library
2004 if test x$enable_cdrom = xyes; then
2005 COPY_ARCH_SRC(src/cdrom, dummy, SDL_syscdrom.c)
2007 # Set up files for the thread library
2008 if test x$enable_threads = xyes; then
2009 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
2010 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
2011 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
2012 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
2013 if test x$use_pthreads = xyes -a x$have_pthread_sem != xyes; then
2014 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
2016 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
2018 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
2019 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
2020 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
2022 # Set up files for the timer library
2023 if test x$enable_timers = xyes; then
2024 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
2026 # The MacOS X platform requires special setup
2027 SDL_CFLAGS="$SDL_CFLAGS -F/System/Library/Frameworks/Carbon.framework"
2028 SDL_LIBS="-lSDLmain $SDL_LIBS -framework Carbon"
2031 AC_MSG_ERROR(Unsupported target: Please add to configure.in)
2036 # Set the conditional variables for this target
2037 AM_CONDITIONAL(TARGET_LINUX, test $ARCH = linux)
2038 AM_CONDITIONAL(TARGET_SOLARIS, test $ARCH = solaris)
2039 AM_CONDITIONAL(TARGET_IRIX, test $ARCH = irix)
2040 AM_CONDITIONAL(TARGET_BSDI, test $ARCH = bsdi)
2041 AM_CONDITIONAL(TARGET_FREEBSD, test $ARCH = freebsd)
2042 AM_CONDITIONAL(TARGET_NETBSD, test $ARCH = netbsd)
2043 AM_CONDITIONAL(TARGET_OPENBSD, test $ARCH = openbsd)
2044 AM_CONDITIONAL(TARGET_AIX, test $ARCH = aix)
2045 AM_CONDITIONAL(TARGET_WIN32, test $ARCH = win32)
2046 AM_CONDITIONAL(TARGET_BEOS, test $ARCH = beos)
2047 AM_CONDITIONAL(TARGET_MACOS, test $ARCH = macos)
2049 # Set conditional variables for shared and static library selection.
2050 # These are not used in any Makefile.am but in sdl-config.in.
2051 AM_CONDITIONAL([ENABLE_SHARED], [test "$enable_shared" = yes])
2052 AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = yes])
2054 # Set runtime shared library paths as needed
2056 if test $ARCH = linux -o $ARCH = freebsd -o $ARCH = bsdi; then
2057 SDL_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib"
2060 if test $ARCH = solaris; then
2061 SDL_RLD_FLAGS="-R\${exec_prefix}/lib"
2064 if test $ARCH = openbsd; then
2065 SDL_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib $SYSTEM_LIBS"
2068 dnl Output the video drivers we use
2069 if test x$enable_video = xtrue; then
2070 if test "$VIDEO_SUBDIRS" = ""; then
2071 AC_MSG_ERROR(*** No video drivers are enabled!)
2074 AC_SUBST(AUDIO_SUBDIRS)
2075 AC_SUBST(AUDIO_DRIVERS)
2076 AC_SUBST(VIDEO_SUBDIRS)
2077 AC_SUBST(VIDEO_DRIVERS)
2078 AC_SUBST(JOYSTICK_SUBDIRS)
2079 AC_SUBST(JOYSTICK_DRIVERS)
2080 AC_SUBST(SDL_EXTRADIRS)
2081 AC_SUBST(SDL_EXTRALIBS)
2082 AC_SUBST(SYSTEM_LIBS)
2084 dnl Expand the cflags and libraries needed by apps using SDL
2085 AC_SUBST(SDL_CFLAGS)
2087 AC_SUBST(SDL_RLD_FLAGS)
2089 dnl Expand the libraries needed for static linking
2090 AC_SUBST(SYSTEM_LIBS)
2091 dnl Expand the include directories for building SDL
2092 CFLAGS="$CFLAGS -I\$(top_srcdir)/include"
2093 CFLAGS="$CFLAGS -I\$(top_srcdir)/include/SDL"
2094 CFLAGS="$CFLAGS -I\$(top_srcdir)/src -I\$(top_srcdir)/src/$ARCH"
2095 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/main"
2096 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/audio"
2097 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video"
2098 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/events"
2099 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/joystick"
2100 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/cdrom"
2101 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/thread"
2102 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/timer"
2103 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/endian"
2104 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/file"
2107 # Finally create all the generated files
2108 dnl Important: Any directory that you want to be in the distcheck should
2109 dnl have a file listed here, so that configure generates the
2110 dnl subdirectories on the build target.
2120 src/audio/alsa/Makefile
2121 src/audio/arts/Makefile
2122 src/audio/baudio/Makefile
2123 src/audio/dma/Makefile
2124 src/audio/dmedia/Makefile
2125 src/audio/dsp/Makefile
2126 src/audio/esd/Makefile
2127 src/audio/macrom/Makefile
2128 src/audio/nas/Makefile
2129 src/audio/nto/Makefile
2130 src/audio/openbsd/Makefile
2131 src/audio/paudio/Makefile
2132 src/audio/sun/Makefile
2133 src/audio/ums/Makefile
2134 src/audio/windib/Makefile
2135 src/audio/windx5/Makefile
2136 src/audio/disk/Makefile
2138 src/video/cybergfx/Makefile
2139 src/video/x11/Makefile
2140 src/video/dga/Makefile
2141 src/video/nanox/Makefile
2142 src/video/fbcon/Makefile
2143 src/video/ps2gs/Makefile
2144 src/video/ggi/Makefile
2145 src/video/maccommon/Makefile
2146 src/video/macdsp/Makefile
2147 src/video/macrom/Makefile
2148 src/video/quartz/Makefile
2149 src/video/svga/Makefile
2150 src/video/vgl/Makefile
2151 src/video/aalib/Makefile
2152 src/video/wincommon/Makefile
2153 src/video/windib/Makefile
2154 src/video/windx5/Makefile
2155 src/video/bwindow/Makefile
2156 src/video/photon/Makefile
2157 src/video/dummy/Makefile
2159 src/joystick/Makefile
2160 src/joystick/amigaos/Makefile
2161 src/joystick/beos/Makefile
2162 src/joystick/dummy/Makefile
2163 src/joystick/linux/Makefile
2164 src/joystick/macos/Makefile
2165 src/joystick/win32/Makefile
2174 ], [chmod +x sdl-config])