2001-04-26 16:45:43 +00:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
AC_INIT(README)
|
|
|
|
|
|
|
|
dnl Set various version strings - taken gratefully from the GTk sources
|
|
|
|
#
|
|
|
|
# Making releases:
|
|
|
|
# Edit include/SDL/SDL_version.h and change the version, then:
|
|
|
|
# SDL_MICRO_VERSION += 1;
|
|
|
|
# SDL_INTERFACE_AGE += 1;
|
|
|
|
# SDL_BINARY_AGE += 1;
|
|
|
|
# if any functions have been added, set SDL_INTERFACE_AGE to 0.
|
|
|
|
# if backwards compatibility has been broken,
|
|
|
|
# set SDL_BINARY_AGE and SDL_INTERFACE_AGE to 0.
|
|
|
|
#
|
|
|
|
SDL_MAJOR_VERSION=1
|
|
|
|
SDL_MINOR_VERSION=2
|
2004-04-23 14:00:08 +00:00
|
|
|
SDL_MICRO_VERSION=8
|
|
|
|
SDL_INTERFACE_AGE=1
|
|
|
|
SDL_BINARY_AGE=8
|
2001-04-26 16:45:43 +00:00
|
|
|
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
|
|
|
|
|
|
|
|
AC_SUBST(SDL_MAJOR_VERSION)
|
|
|
|
AC_SUBST(SDL_MINOR_VERSION)
|
|
|
|
AC_SUBST(SDL_MICRO_VERSION)
|
|
|
|
AC_SUBST(SDL_INTERFACE_AGE)
|
|
|
|
AC_SUBST(SDL_BINARY_AGE)
|
|
|
|
AC_SUBST(SDL_VERSION)
|
|
|
|
|
|
|
|
# libtool versioning
|
|
|
|
LT_RELEASE=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION
|
|
|
|
LT_CURRENT=`expr $SDL_MICRO_VERSION - $SDL_INTERFACE_AGE`
|
|
|
|
LT_REVISION=$SDL_INTERFACE_AGE
|
|
|
|
LT_AGE=`expr $SDL_BINARY_AGE - $SDL_INTERFACE_AGE`
|
|
|
|
|
|
|
|
AC_SUBST(LT_RELEASE)
|
|
|
|
AC_SUBST(LT_CURRENT)
|
|
|
|
AC_SUBST(LT_REVISION)
|
|
|
|
AC_SUBST(LT_AGE)
|
|
|
|
|
|
|
|
dnl Detect the canonical host and target build environment
|
2002-12-07 06:54:47 +00:00
|
|
|
AC_CANONICAL_SYSTEM
|
2001-04-26 16:45:43 +00:00
|
|
|
|
2001-06-10 04:54:53 +00:00
|
|
|
dnl Setup for automake
|
|
|
|
AM_INIT_AUTOMAKE(SDL, $SDL_VERSION)
|
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
dnl Check for tools
|
|
|
|
|
|
|
|
AC_LIBTOOL_WIN32_DLL
|
|
|
|
AM_PROG_LIBTOOL
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_C_INLINE
|
|
|
|
AC_C_CONST
|
2001-09-30 18:55:08 +00:00
|
|
|
AC_PROG_CXX
|
2001-04-26 16:45:43 +00:00
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_FUNC_ALLOCA
|
2001-12-18 02:29:58 +00:00
|
|
|
ASFLAGS=""
|
|
|
|
AC_SUBST(ASFLAGS)
|
2002-08-17 16:58:31 +00:00
|
|
|
CCAS="$CC"
|
|
|
|
AC_SUBST(CCAS)
|
|
|
|
CCASFLAGS=""
|
|
|
|
AC_SUBST(CCASFLAGS)
|
2003-08-09 22:49:28 +00:00
|
|
|
AM_CONDITIONAL([am__fastdepOBJC], false)
|
2001-04-26 16:45:43 +00:00
|
|
|
|
|
|
|
dnl The alpha architecture needs special flags for binary portability
|
|
|
|
case "$target" in
|
|
|
|
alpha*-*-linux*)
|
|
|
|
if test x$ac_cv_prog_gcc = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -mcpu=ev4 -Wa,-mall"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
dnl Add compiler-specific optimization flags
|
|
|
|
|
|
|
|
dnl See if the user wants aggressive optimizations of the code
|
|
|
|
AC_ARG_ENABLE(debug,
|
|
|
|
[ --enable-debug Disable aggressive optimizations [default=yes]],
|
|
|
|
, enable_debug=yes)
|
|
|
|
if test x$enable_debug != xyes; then
|
|
|
|
if test x$ac_cv_prog_gcc = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -fexpensive-optimizations"
|
|
|
|
# Ack! This breaks the MMX YV12 conversion on gcc 2.95.2
|
|
|
|
# CFLAGS="$CFLAGS -fomit-frame-pointer"
|
|
|
|
fi
|
|
|
|
case "$target" in
|
|
|
|
i486-*-*)
|
|
|
|
if test x$ac_cv_prog_gcc = xyes; then
|
2004-02-08 22:21:30 +00:00
|
|
|
CFLAGS="$CFLAGS -march=i486"
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
;;
|
|
|
|
i?86-*-*)
|
|
|
|
if test x$ac_cv_prog_gcc = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -march=pentium -mcpu=pentiumpro"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*-*-osf*)
|
|
|
|
if test x$ac_cv_prog_gcc != xyes; then
|
|
|
|
CFLAGS="-g3 -fast -arch host"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl Add verbose warnings by default, and allow ANSI compliance checking
|
|
|
|
AC_ARG_ENABLE(strict-ansi,
|
|
|
|
[ --enable-strict-ansi Enable strict ANSI compliance build [default=no]],
|
|
|
|
, enable_strict_ansi=no)
|
|
|
|
if test x$ac_cv_prog_gcc = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -Wall"
|
|
|
|
if test x$enable_strict_ansi = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -ansi -pedantic -D_XOPEN_SOURCE"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl Initialize the compiler and linker flags for SDL applications
|
|
|
|
|
|
|
|
SDL_CFLAGS=""
|
|
|
|
SDL_LIBS="-lSDL"
|
|
|
|
|
|
|
|
dnl Add the math library for the new gamma correction support
|
|
|
|
|
|
|
|
case "$target" in
|
|
|
|
*-*-cygwin* | *-*-mingw32*)
|
|
|
|
MATHLIB=""
|
|
|
|
;;
|
|
|
|
*-*-beos*)
|
|
|
|
MATHLIB=""
|
|
|
|
;;
|
|
|
|
*-*-darwin*)
|
|
|
|
MATHLIB=""
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
MATHLIB="-lm"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS $MATHLIB"
|
|
|
|
|
|
|
|
dnl Enable/disable various subsystems of the SDL library
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(audio,
|
|
|
|
[ --enable-audio Enable the audio subsystem [default=yes]],
|
|
|
|
, enable_audio=yes)
|
|
|
|
if test x$enable_audio = xyes; then
|
|
|
|
SDL_EXTRADIRS="$SDL_EXTRADIRS audio"
|
|
|
|
SDL_EXTRALIBS="$SDL_EXTRALIBS audio/libaudio.la"
|
|
|
|
else
|
|
|
|
CFLAGS="$CFLAGS -DDISABLE_AUDIO"
|
|
|
|
fi
|
|
|
|
AC_ARG_ENABLE(video,
|
|
|
|
[ --enable-video Enable the video subsystem [default=yes]],
|
|
|
|
, enable_video=yes)
|
|
|
|
if test x$enable_video = xyes; then
|
|
|
|
SDL_EXTRADIRS="$SDL_EXTRADIRS video"
|
|
|
|
SDL_EXTRALIBS="$SDL_EXTRALIBS video/libvideo.la"
|
|
|
|
else
|
|
|
|
CFLAGS="$CFLAGS -DDISABLE_VIDEO"
|
|
|
|
fi
|
|
|
|
AC_ARG_ENABLE(events,
|
|
|
|
[ --enable-events Enable the events subsystem [default=yes]],
|
|
|
|
, enable_events=yes)
|
|
|
|
if test x$enable_video = xyes -a x$enable_events = xyes; then
|
|
|
|
SDL_EXTRADIRS="$SDL_EXTRADIRS events"
|
|
|
|
SDL_EXTRALIBS="$SDL_EXTRALIBS events/libevents.la"
|
|
|
|
else
|
|
|
|
CFLAGS="$CFLAGS -DDISABLE_EVENTS"
|
|
|
|
fi
|
|
|
|
AC_ARG_ENABLE(joystick,
|
|
|
|
[ --enable-joystick Enable the joystick subsystem [default=yes]],
|
|
|
|
, enable_joystick=yes)
|
|
|
|
if test x$enable_joystick = xyes; then
|
|
|
|
SDL_EXTRADIRS="$SDL_EXTRADIRS joystick"
|
|
|
|
SDL_EXTRALIBS="$SDL_EXTRALIBS joystick/libjoystick.la"
|
|
|
|
else
|
|
|
|
CFLAGS="$CFLAGS -DDISABLE_JOYSTICK"
|
|
|
|
fi
|
|
|
|
AC_ARG_ENABLE(cdrom,
|
|
|
|
[ --enable-cdrom Enable the cdrom subsystem [default=yes]],
|
|
|
|
, enable_cdrom=yes)
|
|
|
|
if test x$enable_cdrom = xyes; then
|
|
|
|
SDL_EXTRADIRS="$SDL_EXTRADIRS cdrom"
|
|
|
|
SDL_EXTRALIBS="$SDL_EXTRALIBS cdrom/libcdrom.la"
|
|
|
|
else
|
|
|
|
CFLAGS="$CFLAGS -DDISABLE_CDROM"
|
|
|
|
fi
|
|
|
|
AC_ARG_ENABLE(threads,
|
|
|
|
[ --enable-threads Enable the threading subsystem [default=yes]],
|
|
|
|
, enable_threads=yes)
|
|
|
|
SDL_EXTRADIRS="$SDL_EXTRADIRS thread"
|
|
|
|
SDL_EXTRALIBS="$SDL_EXTRALIBS thread/libthread.la"
|
|
|
|
if test x$enable_threads != xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DDISABLE_THREADS"
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_systhread.c)
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_systhread_c.h)
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
|
|
|
|
fi
|
|
|
|
AC_ARG_ENABLE(timers,
|
|
|
|
[ --enable-timers Enable the timer subsystem [default=yes]],
|
|
|
|
, enable_timers=yes)
|
|
|
|
if test x$enable_timers = xyes; then
|
|
|
|
SDL_EXTRADIRS="$SDL_EXTRADIRS timer"
|
|
|
|
SDL_EXTRALIBS="$SDL_EXTRALIBS timer/libtimer.la"
|
|
|
|
else
|
|
|
|
CFLAGS="$CFLAGS -DDISABLE_TIMERS"
|
|
|
|
fi
|
|
|
|
AC_ARG_ENABLE(endian,
|
|
|
|
[ --enable-endian Enable the endian subsystem [default=yes]],
|
|
|
|
, enable_endian=yes)
|
|
|
|
if test x$enable_endian = xyes; then
|
|
|
|
SDL_EXTRADIRS="$SDL_EXTRADIRS endian"
|
|
|
|
SDL_EXTRALIBS="$SDL_EXTRALIBS endian/libendian.la"
|
|
|
|
else
|
|
|
|
CFLAGS="$CFLAGS -DDISABLE_ENDIAN"
|
|
|
|
fi
|
|
|
|
AC_ARG_ENABLE(file,
|
|
|
|
[ --enable-file Enable the file subsystem [default=yes]],
|
|
|
|
, enable_file=yes)
|
|
|
|
if test x$enable_file = xyes; then
|
|
|
|
SDL_EXTRADIRS="$SDL_EXTRADIRS file"
|
|
|
|
SDL_EXTRALIBS="$SDL_EXTRALIBS file/libfile.la"
|
|
|
|
else
|
|
|
|
CFLAGS="$CFLAGS -DDISABLE_FILE"
|
|
|
|
fi
|
2003-11-18 02:16:57 +00:00
|
|
|
AC_ARG_ENABLE(cpuinfo,
|
|
|
|
[ --enable-cpuinfo Enable the cpuinfo subsystem [default=yes]],
|
|
|
|
, enable_cpuinfo=yes)
|
|
|
|
if test x$enable_cpuinfo = xyes; then
|
|
|
|
SDL_EXTRADIRS="$SDL_EXTRADIRS cpuinfo"
|
|
|
|
SDL_EXTRALIBS="$SDL_EXTRALIBS cpuinfo/libcpuinfo.la"
|
|
|
|
else
|
|
|
|
CFLAGS="$CFLAGS -DDISABLE_CPUINFO"
|
|
|
|
fi
|
2001-04-26 16:45:43 +00:00
|
|
|
|
|
|
|
dnl See if the OSS audio interface is supported
|
|
|
|
CheckOSS()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(oss,
|
|
|
|
[ --enable-oss support the OSS audio API [default=yes]],
|
|
|
|
, enable_oss=yes)
|
|
|
|
if test x$enable_audio = xyes -a x$enable_oss = xyes; then
|
|
|
|
AC_MSG_CHECKING(for OSS audio support)
|
|
|
|
have_oss=no
|
2001-07-08 09:00:06 +00:00
|
|
|
if test x$have_oss != xyes; then
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <sys/soundcard.h>
|
|
|
|
],[
|
|
|
|
int arg = SNDCTL_DSP_SETFRAGMENT;
|
|
|
|
],[
|
|
|
|
have_oss=yes
|
|
|
|
])
|
|
|
|
fi
|
|
|
|
if test x$have_oss != xyes; then
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <soundcard.h>
|
|
|
|
],[
|
|
|
|
int arg = SNDCTL_DSP_SETFRAGMENT;
|
|
|
|
],[
|
|
|
|
have_oss=yes
|
|
|
|
CFLAGS="$CFLAGS -DOSS_USE_SOUNDCARD_H"
|
|
|
|
])
|
|
|
|
fi
|
2001-04-26 16:45:43 +00:00
|
|
|
AC_MSG_RESULT($have_oss)
|
|
|
|
if test x$have_oss = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DOSS_SUPPORT"
|
|
|
|
AUDIO_SUBDIRS="$AUDIO_SUBDIRS dsp"
|
|
|
|
AUDIO_DRIVERS="$AUDIO_DRIVERS dsp/libaudio_dsp.la"
|
|
|
|
AUDIO_SUBDIRS="$AUDIO_SUBDIRS dma"
|
|
|
|
AUDIO_DRIVERS="$AUDIO_DRIVERS dma/libaudio_dma.la"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
dnl See if the ALSA audio interface is supported
|
|
|
|
CheckALSA()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(alsa,
|
|
|
|
[ --enable-alsa support the ALSA audio API [default=yes]],
|
|
|
|
, enable_alsa=yes)
|
|
|
|
if test x$enable_audio = xyes -a x$enable_alsa = xyes; then
|
2004-08-24 06:32:50 +00:00
|
|
|
AM_PATH_ALSA(0.9.0, have_alsa=yes, have_alsa=no)
|
2002-04-15 07:38:54 +00:00
|
|
|
if test x$have_alsa = xyes; then
|
2004-03-02 12:49:16 +00:00
|
|
|
AC_ARG_ENABLE(alsa-shared,
|
|
|
|
[ --enable-alsa-shared dynamically load ALSA audio support [default=yes]],
|
|
|
|
, enable_alsa_shared=yes)
|
2004-08-21 04:20:00 +00:00
|
|
|
if test "x`echo $ALSA_LIBS | grep -- -L`" = "x"; then
|
|
|
|
if test "x`ls /usr/lib/libasound.so.* 2> /dev/null`" != "x"; then
|
|
|
|
ALSA_LIBS="-L/usr/lib $ALSA_LIBS"
|
|
|
|
else if test "x`ls /usr/local/lib/libasound.so.* 2> /dev/null`" != "x"; then
|
|
|
|
ALSA_LIBS="-L/usr/local/lib $ALSA_LIBS"
|
|
|
|
fi; fi
|
|
|
|
fi
|
|
|
|
alsa_lib_spec=`echo $ALSA_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libasound.so.*/'`
|
|
|
|
alsa_lib=`ls $alsa_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
|
|
|
|
echo "-- $alsa_lib_spec -> $alsa_lib"
|
|
|
|
|
2004-03-02 12:49:16 +00:00
|
|
|
if test x$use_dlopen != xyes && \
|
|
|
|
test x$enable_alsa_shared = xyes; then
|
|
|
|
AC_MSG_ERROR([You must have dlopen() support and use the --enable-dlopen option])
|
|
|
|
fi
|
|
|
|
if test x$use_dlopen = xyes && \
|
|
|
|
test x$enable_alsa_shared = xyes && test x$alsa_lib != x; then
|
2004-08-21 04:20:00 +00:00
|
|
|
CFLAGS="$CFLAGS -DALSA_SUPPORT -DALSA_DYNAMIC=\$(alsa_lib) $ALSA_CFLAGS"
|
2004-03-02 12:49:16 +00:00
|
|
|
AC_SUBST(alsa_lib)
|
2004-08-21 04:20:00 +00:00
|
|
|
|
|
|
|
AC_MSG_CHECKING(for dlvsym)
|
|
|
|
use_dlvsym=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <stdio.h>
|
|
|
|
#define __USE_GNU
|
|
|
|
#include <dlfcn.h>
|
|
|
|
],[
|
|
|
|
dlvsym(NULL,"","");
|
|
|
|
],[
|
|
|
|
use_dlvsym=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($use_dlvsym);
|
|
|
|
if test x$use_dlvsym = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DUSE_DLVSYM"
|
|
|
|
fi
|
2004-03-02 12:49:16 +00:00
|
|
|
else
|
2004-08-21 04:20:00 +00:00
|
|
|
CFLAGS="$CFLAGS -DALSA_SUPPORT $ALSA_CFLAGS"
|
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS $ALSA_LIBS"
|
2004-03-02 12:49:16 +00:00
|
|
|
fi
|
2001-04-26 16:45:43 +00:00
|
|
|
AUDIO_SUBDIRS="$AUDIO_SUBDIRS alsa"
|
|
|
|
AUDIO_DRIVERS="$AUDIO_DRIVERS alsa/libaudio_alsa.la"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2001-08-09 13:09:47 +00:00
|
|
|
dnl Check whether we want to use IRIX 6.5+ native audio or not
|
|
|
|
CheckDMEDIA()
|
|
|
|
{
|
|
|
|
if test x$enable_audio = xyes; then
|
|
|
|
AC_MSG_CHECKING(for dmedia audio support)
|
|
|
|
have_dmedia=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <dmedia/audio.h>
|
|
|
|
],[
|
|
|
|
ALport audio_port;
|
|
|
|
],[
|
|
|
|
have_dmedia=yes
|
|
|
|
])
|
2004-08-21 02:06:30 +00:00
|
|
|
AC_MSG_RESULT($have_dmedia)
|
2001-08-09 13:09:47 +00:00
|
|
|
# Set up files for the audio library
|
|
|
|
if test x$have_dmedia = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DDMEDIA_SUPPORT"
|
|
|
|
AUDIO_SUBDIRS="$AUDIO_SUBDIRS dmedia"
|
|
|
|
AUDIO_DRIVERS="$AUDIO_DRIVERS dmedia/libaudio_dmedia.la"
|
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS -laudio"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
dnl Find the ESD includes and libraries
|
|
|
|
CheckESD()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(esd,
|
|
|
|
[ --enable-esd support the Enlightened Sound Daemon [default=yes]],
|
|
|
|
, enable_esd=yes)
|
|
|
|
if test x$enable_audio = xyes -a x$enable_esd = xyes; then
|
2004-08-24 06:32:50 +00:00
|
|
|
AM_PATH_ESD(0.2.8, have_esd=yes, have_esd=no)
|
|
|
|
if test x$have_esd = xyes; then
|
2002-03-06 05:20:11 +00:00
|
|
|
AC_ARG_ENABLE(esd-shared,
|
2003-08-09 20:36:29 +00:00
|
|
|
[ --enable-esd-shared dynamically load ESD audio support [default=yes]],
|
|
|
|
, enable_esd_shared=yes)
|
2002-03-06 05:20:11 +00:00
|
|
|
esd_lib_spec=`echo $ESD_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libesd.so.*/'`
|
2004-03-03 06:56:04 +00:00
|
|
|
esd_lib=`ls $esd_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
|
2002-05-19 20:06:01 +00:00
|
|
|
echo "-- $esd_lib_spec -> $esd_lib"
|
2003-10-06 09:03:02 +00:00
|
|
|
if test x$use_dlopen != xyes && \
|
2002-03-06 11:05:47 +00:00
|
|
|
test x$enable_esd_shared = xyes; then
|
|
|
|
AC_MSG_ERROR([You must have dlopen() support and use the --enable-dlopen option])
|
|
|
|
fi
|
2003-10-06 09:03:02 +00:00
|
|
|
if test x$use_dlopen = xyes && \
|
2002-03-06 05:20:11 +00:00
|
|
|
test x$enable_esd_shared = xyes && test x$esd_lib != x; then
|
|
|
|
CFLAGS="$CFLAGS -DESD_SUPPORT -DESD_DYNAMIC=\$(esd_lib) $ESD_CFLAGS"
|
2002-05-19 20:06:01 +00:00
|
|
|
AC_SUBST(esd_lib)
|
2002-03-06 05:20:11 +00:00
|
|
|
else
|
|
|
|
CFLAGS="$CFLAGS -DESD_SUPPORT $ESD_CFLAGS"
|
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS $ESD_LIBS"
|
|
|
|
fi
|
2001-04-26 16:45:43 +00:00
|
|
|
AUDIO_SUBDIRS="$AUDIO_SUBDIRS esd"
|
|
|
|
AUDIO_DRIVERS="$AUDIO_DRIVERS esd/libaudio_esd.la"
|
2002-03-06 05:20:11 +00:00
|
|
|
fi
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
CheckARTSC()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(arts,
|
|
|
|
[ --enable-arts support the Analog Real Time Synthesizer [default=yes]],
|
|
|
|
, enable_arts=yes)
|
|
|
|
if test x$enable_audio = xyes -a x$enable_arts = xyes; then
|
|
|
|
AC_PATH_PROG(ARTSCCONFIG, artsc-config)
|
|
|
|
if test x$ARTSCCONFIG = x -o x$ARTSCCONFIG = x'"$ARTSCCONFIG"'; then
|
|
|
|
: # arts isn't installed
|
|
|
|
else
|
|
|
|
ARTSC_CFLAGS=`$ARTSCCONFIG --cflags`
|
|
|
|
ARTSC_LIBS=`$ARTSCCONFIG --libs`
|
2004-02-24 19:22:22 +00:00
|
|
|
ARTSC_PREFIX=`$ARTSCCONFIG --arts-prefix`
|
2001-04-26 16:45:43 +00:00
|
|
|
AC_MSG_CHECKING(for aRts development environment)
|
|
|
|
audio_arts=no
|
|
|
|
save_CFLAGS="$CFLAGS"
|
|
|
|
CFLAGS="$CFLAGS $ARTSC_CFLAGS"
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <artsc.h>
|
|
|
|
],[
|
|
|
|
arts_stream_t stream;
|
|
|
|
],[
|
|
|
|
audio_arts=yes
|
|
|
|
])
|
|
|
|
CFLAGS="$save_CFLAGS"
|
|
|
|
AC_MSG_RESULT($audio_arts)
|
|
|
|
if test x$audio_arts = xyes; then
|
2002-03-06 05:20:11 +00:00
|
|
|
AC_ARG_ENABLE(arts-shared,
|
2003-08-09 20:36:29 +00:00
|
|
|
[ --enable-arts-shared dynamically load aRts audio support [default=yes]],
|
|
|
|
, enable_arts_shared=yes)
|
2004-02-24 19:22:22 +00:00
|
|
|
arts_lib_spec="$ARTSC_PREFIX/lib/libartsc.so.*"
|
2004-03-03 06:56:04 +00:00
|
|
|
arts_lib=`ls $arts_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
|
2002-05-19 20:06:01 +00:00
|
|
|
echo "-- $arts_lib_spec -> $arts_lib"
|
2003-10-06 09:03:02 +00:00
|
|
|
if test x$use_dlopen != xyes && \
|
2002-03-06 11:05:47 +00:00
|
|
|
test x$enable_arts_shared = xyes; then
|
|
|
|
AC_MSG_ERROR([You must have dlopen() support and use the --enable-dlopen option])
|
|
|
|
fi
|
2003-10-06 09:03:02 +00:00
|
|
|
if test x$use_dlopen = xyes && \
|
2002-03-06 05:20:11 +00:00
|
|
|
test x$enable_arts_shared = xyes && test x$arts_lib != x; then
|
|
|
|
CFLAGS="$CFLAGS -DARTSC_SUPPORT -DARTSC_DYNAMIC=\$(arts_lib) $ARTSC_CFLAGS"
|
2002-05-19 20:06:01 +00:00
|
|
|
AC_SUBST(arts_lib)
|
2002-03-06 05:20:11 +00:00
|
|
|
else
|
|
|
|
CFLAGS="$CFLAGS -DARTSC_SUPPORT $ARTSC_CFLAGS"
|
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS $ARTSC_LIBS"
|
|
|
|
fi
|
2001-04-26 16:45:43 +00:00
|
|
|
AUDIO_SUBDIRS="$AUDIO_SUBDIRS arts"
|
|
|
|
AUDIO_DRIVERS="$AUDIO_DRIVERS arts/libaudio_arts.la"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
dnl See if the NAS audio interface is supported
|
|
|
|
CheckNAS()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(nas,
|
2003-07-16 11:54:13 +00:00
|
|
|
[ --enable-nas support the NAS audio API [default=yes]],
|
2001-05-27 00:24:43 +00:00
|
|
|
, enable_nas=yes)
|
2001-04-26 16:45:43 +00:00
|
|
|
if test x$enable_audio = xyes -a x$enable_nas = xyes; then
|
2001-05-27 00:24:43 +00:00
|
|
|
AC_MSG_CHECKING(for NAS audio support)
|
|
|
|
have_nas=no
|
|
|
|
if test -r /usr/X11R6/include/audio/audiolib.h; then
|
|
|
|
have_nas=yes
|
2003-09-21 18:32:04 +00:00
|
|
|
CFLAGS="$CFLAGS -DNAS_SUPPORT -I/usr/X11R6/include/"
|
2001-05-27 00:24:43 +00:00
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS -laudio -lXt"
|
|
|
|
AUDIO_SUBDIRS="$AUDIO_SUBDIRS nas"
|
|
|
|
AUDIO_DRIVERS="$AUDIO_DRIVERS nas/libaudio_nas.la"
|
2003-03-06 06:12:41 +00:00
|
|
|
|
|
|
|
dnl On IRIX, the NAS includes are in a different directory,
|
|
|
|
dnl and libnas must be explicitly linked in
|
|
|
|
|
|
|
|
elif test -r /usr/freeware/include/nas/audiolib.h; then
|
|
|
|
have_nas=yes
|
|
|
|
CFLAGS="$CFLAGS -DNAS_SUPPORT"
|
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS -lnas -lXt"
|
|
|
|
AUDIO_SUBDIRS="$AUDIO_SUBDIRS nas"
|
|
|
|
AUDIO_DRIVERS="$AUDIO_DRIVERS nas/libaudio_nas.la"
|
2001-05-27 00:24:43 +00:00
|
|
|
fi
|
2003-03-06 06:12:41 +00:00
|
|
|
AC_MSG_RESULT($have_nas)
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2001-06-16 01:51:42 +00:00
|
|
|
dnl rcg07142001 See if the user wants the disk writer audio driver...
|
|
|
|
CheckDiskAudio()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(diskaudio,
|
2003-07-16 11:54:13 +00:00
|
|
|
[ --enable-diskaudio support the disk writer audio driver [default=yes]],
|
2001-07-02 00:20:29 +00:00
|
|
|
, enable_diskaudio=yes)
|
2001-06-16 01:51:42 +00:00
|
|
|
if test x$enable_audio = xyes -a x$enable_diskaudio = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DDISKAUD_SUPPORT"
|
|
|
|
AUDIO_SUBDIRS="$AUDIO_SUBDIRS disk"
|
|
|
|
AUDIO_DRIVERS="$AUDIO_DRIVERS disk/libaudio_disk.la"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2002-06-10 20:42:53 +00:00
|
|
|
dnl Set up the Atari Audio driver
|
|
|
|
CheckAtariAudio()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(mintaudio,
|
|
|
|
[ --enable-mintaudio support Atari audio driver [default=yes]],
|
|
|
|
, enable_mintaudio=yes)
|
|
|
|
if test x$enable_audio = xyes -a x$enable_mintaudio = xyes; then
|
|
|
|
mintaudio=no
|
|
|
|
AC_CHECK_HEADER(mint/falcon.h, have_mint_falcon_hdr=yes)
|
|
|
|
if test x$have_mint_falcon_hdr = xyes; then
|
|
|
|
mintaudio=yes
|
|
|
|
CFLAGS="$CFLAGS -DMINTAUDIO_SUPPORT"
|
|
|
|
AUDIO_SUBDIRS="$AUDIO_SUBDIRS mint"
|
|
|
|
AUDIO_DRIVERS="$AUDIO_DRIVERS mint/libaudio_mintaudio.la"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
dnl See if we can use x86 assembly blitters
|
2001-10-23 00:50:44 +00:00
|
|
|
# NASM is available from: http://nasm.octium.net/
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckNASM()
|
|
|
|
{
|
|
|
|
dnl Make sure we are running on an x86 platform
|
|
|
|
case $target in
|
|
|
|
i?86*)
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
# Nope, bail early.
|
|
|
|
return
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
dnl Check for NASM (for assembly blit routines)
|
|
|
|
AC_ARG_ENABLE(nasm,
|
|
|
|
[ --enable-nasm use nasm assembly blitters on x86 [default=yes]],
|
|
|
|
, enable_nasm=yes)
|
|
|
|
if test x$enable_video = xyes -a x$enable_nasm = xyes; then
|
|
|
|
AC_PATH_PROG(NASM, nasm)
|
|
|
|
if test x$NASM = x -o x$NASM = x'"$NASM"'; then
|
|
|
|
: # nasm isn't installed
|
|
|
|
else
|
|
|
|
CFLAGS="$CFLAGS -DUSE_ASMBLIT -I$srcdir/hermes"
|
|
|
|
case $ARCH in
|
|
|
|
win32)
|
|
|
|
NASMFLAGS="-f win32"
|
|
|
|
;;
|
2002-04-18 04:28:58 +00:00
|
|
|
openbsd)
|
|
|
|
NASMFLAGS="-f aoutb"
|
|
|
|
;;
|
2001-04-26 16:45:43 +00:00
|
|
|
*)
|
2003-12-14 06:25:53 +00:00
|
|
|
NASMFLAGS="-f elf"
|
2001-04-26 16:45:43 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
AC_SUBST(NASMFLAGS)
|
|
|
|
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/hermes"
|
|
|
|
SDL_EXTRADIRS="$SDL_EXTRADIRS hermes"
|
|
|
|
SDL_EXTRALIBS="$SDL_EXTRALIBS hermes/libhermes.la"
|
2003-11-18 01:27:06 +00:00
|
|
|
use_nasm=yes
|
2004-05-06 15:55:06 +00:00
|
|
|
|
|
|
|
case "$target" in
|
|
|
|
# this line is needed for QNX, because it's not defined the __ELF__
|
|
|
|
*-*-qnx*) CFLAGS="$CFLAGS -D__ELF__"
|
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2001-05-11 01:13:35 +00:00
|
|
|
dnl Find the nanox include and library directories
|
|
|
|
CheckNANOX()
|
|
|
|
{
|
2002-03-05 19:55:32 +00:00
|
|
|
AC_ARG_ENABLE(video-nanox,
|
|
|
|
[ --enable-video-nanox use nanox video driver [default=no]],
|
|
|
|
, enable_video_nanox=no)
|
|
|
|
AC_ARG_ENABLE(nanox-debug,
|
|
|
|
[ --enable-nanox-debug print debug messages [default=no]],
|
|
|
|
, enable_nanox_debug=no)
|
|
|
|
AC_ARG_ENABLE(nanox-share-memory,
|
|
|
|
[ --enable-nanox-share-memory use share memory [default=no]],
|
|
|
|
, enable_nanox_share_memory=no)
|
2002-08-25 06:21:49 +00:00
|
|
|
AC_ARG_ENABLE(nanox_direct_fb,
|
|
|
|
[ --enable-nanox-direct-fb use direct framebuffer access [default=no]],
|
|
|
|
, enable_nanox_direct_fb=no)
|
2002-03-05 19:55:32 +00:00
|
|
|
|
|
|
|
if test x$enable_video = xyes -a x$enable_video_nanox = xyes; then
|
|
|
|
if test x$enable_nanox_debug = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DENABLE_NANOX_DEBUG"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$enable_nanox_share_memory = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DNANOX_SHARE_MEMORY"
|
|
|
|
fi
|
|
|
|
|
2002-08-25 06:21:49 +00:00
|
|
|
if test x$enable_nanox_direct_fb = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DENABLE_NANOX_DIRECT_FB"
|
|
|
|
fi
|
2002-03-05 19:55:32 +00:00
|
|
|
|
|
|
|
CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_NANOX"
|
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS -lnano-X"
|
|
|
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS nanox"
|
|
|
|
VIDEO_DRIVERS="$VIDEO_DRIVERS nanox/libvideo_nanox.la"
|
|
|
|
fi
|
2001-05-11 01:13:35 +00:00
|
|
|
}
|
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
dnl Find the X11 include and library directories
|
|
|
|
CheckX11()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(video-x11,
|
|
|
|
[ --enable-video-x11 use X11 video driver [default=yes]],
|
|
|
|
, enable_video_x11=yes)
|
|
|
|
if test x$enable_video = xyes -a x$enable_video_x11 = xyes; then
|
|
|
|
AC_PATH_X
|
|
|
|
AC_PATH_XTRA
|
|
|
|
if test x$have_x = xyes; then
|
2003-08-23 23:12:19 +00:00
|
|
|
CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_X11 -DXTHREADS -I$srcdir/include -I$srcdir/src/video"
|
2001-04-26 16:45:43 +00:00
|
|
|
if test x$ac_cv_func_shmat != xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DNO_SHARED_MEMORY"
|
|
|
|
fi
|
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS $X_LIBS -lX11 -lXext"
|
|
|
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS x11"
|
|
|
|
VIDEO_DRIVERS="$VIDEO_DRIVERS x11/libvideo_x11.la"
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(video-x11-vm,
|
|
|
|
[ --enable-video-x11-vm use X11 VM extension for fullscreen [default=yes]],
|
|
|
|
, enable_video_x11_vm=yes)
|
|
|
|
if test x$enable_video_x11_vm = xyes; then
|
|
|
|
AC_MSG_CHECKING(for XFree86 VidMode 1.0 support)
|
|
|
|
video_x11_vm=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <X11/Xlib.h>
|
2002-03-05 19:55:32 +00:00
|
|
|
#include <XFree86/extensions/xf86vmode.h>
|
2001-04-26 16:45:43 +00:00
|
|
|
],[
|
|
|
|
],[
|
|
|
|
video_x11_vm=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($video_x11_vm)
|
|
|
|
if test x$video_x11_vm = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DXFREE86_VM"
|
2002-03-05 19:55:32 +00:00
|
|
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS XFree86/Xxf86vm"
|
|
|
|
VIDEO_DRIVERS="$VIDEO_DRIVERS XFree86/Xxf86vm/libXFree86_Xxf86vm.la"
|
2001-04-26 16:45:43 +00:00
|
|
|
AC_MSG_CHECKING(for XFree86 VidMode gamma support)
|
|
|
|
video_x11_vmgamma=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <X11/Xlib.h>
|
2002-03-05 19:55:32 +00:00
|
|
|
#include <XFree86/extensions/xf86vmode.h>
|
2001-04-26 16:45:43 +00:00
|
|
|
],[
|
2002-03-05 19:55:32 +00:00
|
|
|
SDL_NAME(XF86VidModeGamma) gamma;
|
2001-04-26 16:45:43 +00:00
|
|
|
],[
|
|
|
|
video_x11_vmgamma=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($video_x11_vmgamma)
|
|
|
|
if test x$video_x11_vmgamma = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DXFREE86_VMGAMMA"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
2001-05-10 18:04:03 +00:00
|
|
|
AC_ARG_ENABLE(dga,
|
|
|
|
[ --enable-dga allow use of X11 DGA code [default=yes]],
|
|
|
|
, enable_dga=yes)
|
2001-04-26 16:45:43 +00:00
|
|
|
AC_ARG_ENABLE(video-x11-dgamouse,
|
|
|
|
[ --enable-video-x11-dgamouse use X11 DGA for mouse events [default=yes]],
|
|
|
|
, enable_video_x11_dgamouse=yes)
|
2001-05-10 18:04:03 +00:00
|
|
|
if test x$enable_dga = xyes; then
|
|
|
|
AC_MSG_CHECKING(for XFree86 DGA 1.0 support)
|
|
|
|
video_x11_dga=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <X11/Xlib.h>
|
2002-03-05 19:55:32 +00:00
|
|
|
#include <XFree86/extensions/xf86dga.h>
|
2001-05-10 18:04:03 +00:00
|
|
|
],[
|
|
|
|
],[
|
|
|
|
video_x11_dga=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($video_x11_dga)
|
|
|
|
if test x$video_x11_dga = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DXFREE86_DGAMOUSE"
|
|
|
|
if test x$enable_video_x11_dgamouse = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DDEFAULT_DGAMOUSE"
|
|
|
|
fi
|
2002-03-05 19:55:32 +00:00
|
|
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS XFree86/Xxf86dga"
|
|
|
|
VIDEO_DRIVERS="$VIDEO_DRIVERS XFree86/Xxf86dga/libXFree86_Xxf86dga.la"
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
AC_ARG_ENABLE(video-x11-xv,
|
|
|
|
[ --enable-video-x11-xv use X11 XvImage extension for video [default=yes]],
|
|
|
|
, enable_video_x11_xv=yes)
|
|
|
|
if test x$enable_video_x11_xv = xyes; then
|
|
|
|
AC_MSG_CHECKING(for XFree86 XvImage support)
|
|
|
|
video_x11_xv=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <sys/ipc.h>
|
|
|
|
#include <sys/shm.h>
|
|
|
|
#include <X11/extensions/XShm.h>
|
2002-03-05 19:55:32 +00:00
|
|
|
#include <XFree86/extensions/Xvlib.h>
|
2001-04-26 16:45:43 +00:00
|
|
|
],[
|
2002-03-05 19:55:32 +00:00
|
|
|
SDL_NAME(XvImage) *image;
|
2001-04-26 16:45:43 +00:00
|
|
|
],[
|
|
|
|
video_x11_xv=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($video_x11_xv)
|
|
|
|
if test x$video_x11_xv = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DXFREE86_XV"
|
2002-03-05 19:55:32 +00:00
|
|
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS XFree86/Xv"
|
|
|
|
VIDEO_DRIVERS="$VIDEO_DRIVERS XFree86/Xv/libXFree86_Xv.la"
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
2001-11-03 17:03:16 +00:00
|
|
|
AC_ARG_ENABLE(video-x11-xinerama,
|
|
|
|
[ --enable-video-x11-xinerama enable X11 Xinerama support [default=yes]],
|
|
|
|
, enable_video_x11_xinerama=yes)
|
|
|
|
if test x$enable_video_x11_xinerama = xyes; then
|
|
|
|
AC_MSG_CHECKING(for X11 Xinerama support)
|
|
|
|
video_x11_xinerama=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <X11/Xlib.h>
|
2002-03-05 19:55:32 +00:00
|
|
|
#include <XFree86/extensions/Xinerama.h>
|
2001-11-03 17:03:16 +00:00
|
|
|
],[
|
2002-03-05 19:55:32 +00:00
|
|
|
SDL_NAME(XineramaScreenInfo) *xinerama;
|
2001-11-03 17:03:16 +00:00
|
|
|
],[
|
|
|
|
video_x11_xinerama=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($video_x11_xinerama)
|
|
|
|
if test x$video_x11_xinerama = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DHAVE_XINERAMA"
|
2002-03-05 19:55:32 +00:00
|
|
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS XFree86/Xinerama"
|
|
|
|
VIDEO_DRIVERS="$VIDEO_DRIVERS XFree86/Xinerama/libXFree86_Xinerama.la"
|
2001-11-03 17:03:16 +00:00
|
|
|
fi
|
|
|
|
fi
|
2001-11-22 04:55:38 +00:00
|
|
|
AC_ARG_ENABLE(video-x11-xme,
|
|
|
|
[ --enable-video-x11-xme enable Xi Graphics XME for fullscreen [default=yes]],
|
|
|
|
, enable_video_x11_xme=yes)
|
|
|
|
if test x$enable_video_x11_xme = xyes; then
|
|
|
|
AC_MSG_CHECKING(for Xi Graphics XiGMiscExtension support)
|
|
|
|
video_x11_xme=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <X11/extensions/xme.h>
|
|
|
|
],[
|
|
|
|
XiGMiscResolutionInfo *resolutions;
|
|
|
|
],[
|
|
|
|
video_x11_xme=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($video_x11_xme)
|
|
|
|
if test x$video_x11_xme = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DHAVE_XIGXME"
|
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS -lxme"
|
|
|
|
fi
|
|
|
|
fi
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
2002-02-14 02:15:15 +00:00
|
|
|
|
2002-03-05 19:55:32 +00:00
|
|
|
dnl Find the X11 DGA 2.0 include and library directories
|
|
|
|
CheckDGA()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(video-dga,
|
|
|
|
[ --enable-video-dga use DGA 2.0 video driver [default=yes]],
|
|
|
|
, enable_video_dga=yes)
|
|
|
|
if test x$video_x11_dga = xyes -a x$enable_video_dga = xyes; then
|
|
|
|
save_CFLAGS="$CFLAGS"; CFLAGS="$CFLAGS -Isrc/video"
|
|
|
|
AC_MSG_CHECKING(for XFree86 DGA 2.0 support)
|
|
|
|
video_x11_dga2=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <XFree86/extensions/xf86dga.h>
|
|
|
|
],[
|
|
|
|
SDL_NAME(XDGAEvent) xevent;
|
|
|
|
],[
|
|
|
|
video_x11_dga2=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($video_x11_dga2)
|
|
|
|
if test x$video_x11_dga2 = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DENABLE_DGA"
|
|
|
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS dga"
|
|
|
|
VIDEO_DRIVERS="$VIDEO_DRIVERS dga/libvideo_dga.la"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckPHOTON()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(video-photon,
|
2001-06-16 06:35:36 +00:00
|
|
|
[ --enable-video-photon use QNX Photon video driver [default=yes]],
|
2001-04-26 16:45:43 +00:00
|
|
|
, enable_video_photon=yes)
|
|
|
|
if test x$enable_video = xyes -a x$enable_video_photon = xyes; then
|
|
|
|
AC_MSG_CHECKING(for QNX Photon support)
|
|
|
|
video_photon=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <Ph.h>
|
|
|
|
#include <Pt.h>
|
|
|
|
#include <photon/Pg.h>
|
|
|
|
#include <photon/PdDirect.h>
|
|
|
|
],[
|
|
|
|
PgDisplaySettings_t *visual;
|
|
|
|
],[
|
|
|
|
video_photon=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($video_photon)
|
|
|
|
if test x$video_photon = xyes; then
|
2001-05-10 18:42:17 +00:00
|
|
|
CFLAGS="$CFLAGS -DENABLE_PHOTON"
|
2001-04-26 16:45:43 +00:00
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS -lph"
|
|
|
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS photon"
|
|
|
|
VIDEO_DRIVERS="$VIDEO_DRIVERS photon/libvideo_photon.la"
|
2002-02-14 02:15:15 +00:00
|
|
|
CheckOpenGLQNX
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
dnl Find the framebuffer console includes
|
|
|
|
CheckFBCON()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(video-fbcon,
|
|
|
|
[ --enable-video-fbcon use framebuffer console video driver [default=yes]],
|
|
|
|
, enable_video_fbcon=yes)
|
|
|
|
if test x$enable_video = xyes -a x$enable_video_fbcon = xyes; then
|
|
|
|
AC_MSG_CHECKING(for framebuffer console support)
|
|
|
|
video_fbcon=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <linux/fb.h>
|
|
|
|
#include <linux/kd.h>
|
|
|
|
#include <linux/keyboard.h>
|
|
|
|
],[
|
|
|
|
],[
|
|
|
|
video_fbcon=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($video_fbcon)
|
|
|
|
if test x$video_fbcon = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DENABLE_FBCON"
|
|
|
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS fbcon"
|
|
|
|
VIDEO_DRIVERS="$VIDEO_DRIVERS fbcon/libvideo_fbcon.la"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2001-09-04 22:53:46 +00:00
|
|
|
dnl Find DirectFB
|
|
|
|
CheckDirectFB()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(video-directfb,
|
2003-08-09 20:36:29 +00:00
|
|
|
[ --enable-video-directfb use DirectFB video driver [default=no]],
|
|
|
|
, enable_video_directfb=no)
|
2001-09-04 22:53:46 +00:00
|
|
|
if test x$enable_video = xyes -a x$enable_video_directfb = xyes; then
|
|
|
|
video_directfb=no
|
|
|
|
|
|
|
|
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
|
|
|
if test x$PKG_CONFIG = xno ; then
|
|
|
|
AC_MSG_WARN([*** pkg-config is required to build the DirectFB video driver.])
|
|
|
|
else
|
|
|
|
AC_MSG_CHECKING(for DirectFB support)
|
|
|
|
|
2002-08-31 04:06:37 +00:00
|
|
|
if ! $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then
|
|
|
|
AC_MSG_ERROR([*** pkg-config too old; version 0.7 or better required.])
|
2001-09-04 22:53:46 +00:00
|
|
|
fi
|
|
|
|
|
2002-11-17 19:36:49 +00:00
|
|
|
DIRECTFB_REQUIRED_VERSION=0.9.15
|
2001-09-04 22:53:46 +00:00
|
|
|
|
|
|
|
if $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb ; then
|
|
|
|
DIRECTFB_CFLAGS=`$PKG_CONFIG --cflags directfb`
|
|
|
|
DIRECTFB_LIBS=`$PKG_CONFIG --libs directfb`
|
|
|
|
video_directfb=yes
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_MSG_RESULT($video_directfb)
|
|
|
|
if test x$video_directfb = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DENABLE_DIRECTFB"
|
|
|
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS directfb"
|
|
|
|
VIDEO_DRIVERS="$VIDEO_DRIVERS directfb/libvideo_directfb.la"
|
|
|
|
|
|
|
|
AC_SUBST(DIRECTFB_CFLAGS)
|
|
|
|
AC_SUBST(DIRECTFB_LIBS)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2001-06-16 03:17:45 +00:00
|
|
|
dnl See if we're running on PlayStation 2 hardware
|
|
|
|
CheckPS2GS()
|
|
|
|
{
|
2001-06-16 06:35:36 +00:00
|
|
|
AC_ARG_ENABLE(video-ps2gs,
|
|
|
|
[ --enable-video-ps2gs use PlayStation 2 GS video driver [default=yes]],
|
|
|
|
, enable_video_ps2gs=yes)
|
2001-06-16 03:17:45 +00:00
|
|
|
if test x$enable_video = xyes -a x$enable_video_ps2gs = xyes; then
|
2001-06-16 06:35:36 +00:00
|
|
|
AC_MSG_CHECKING(for PlayStation 2 GS support)
|
2001-06-16 03:17:45 +00:00
|
|
|
video_ps2gs=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <linux/ps2/dev.h>
|
|
|
|
#include <linux/ps2/gs.h>
|
|
|
|
],[
|
|
|
|
],[
|
|
|
|
video_ps2gs=yes
|
|
|
|
])
|
2001-06-16 06:35:36 +00:00
|
|
|
AC_MSG_RESULT($video_ps2gs)
|
2001-06-16 03:17:45 +00:00
|
|
|
if test x$video_ps2gs = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DENABLE_PS2GS"
|
|
|
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS ps2gs"
|
|
|
|
VIDEO_DRIVERS="$VIDEO_DRIVERS ps2gs/libvideo_ps2gs.la"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
dnl Find the GGI includes
|
|
|
|
CheckGGI()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(video-ggi,
|
|
|
|
[ --enable-video-ggi use GGI video driver [default=no]],
|
|
|
|
, enable_video_ggi=no)
|
|
|
|
if test x$enable_video = xyes -a x$enable_video_ggi = xyes; then
|
|
|
|
AC_MSG_CHECKING(for GGI support)
|
|
|
|
video_ggi=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <ggi/ggi.h>
|
|
|
|
#include <ggi/gii.h>
|
|
|
|
],[
|
|
|
|
],[
|
|
|
|
video_ggi=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($video_ggi)
|
|
|
|
if test x$video_ggi = xyes; then
|
|
|
|
CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_GGI"
|
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS -lggi -lgii -lgg"
|
|
|
|
|
|
|
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS ggi"
|
|
|
|
VIDEO_DRIVERS="$VIDEO_DRIVERS ggi/libvideo_ggi.la"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
dnl Find the SVGAlib includes and libraries
|
|
|
|
CheckSVGA()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(video-svga,
|
|
|
|
[ --enable-video-svga use SVGAlib video driver [default=no]],
|
|
|
|
, enable_video_svga=no)
|
|
|
|
if test x$enable_video = xyes -a x$enable_video_svga = xyes; then
|
|
|
|
AC_MSG_CHECKING(for SVGAlib (1.4.0+) support)
|
|
|
|
video_svga=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <vga.h>
|
|
|
|
#include <vgamouse.h>
|
|
|
|
#include <vgakeyboard.h>
|
|
|
|
],[
|
|
|
|
if ( SCANCODE_RIGHTWIN && SCANCODE_LEFTWIN ) {
|
|
|
|
exit(0);
|
|
|
|
}
|
|
|
|
],[
|
|
|
|
video_svga=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($video_svga)
|
|
|
|
if test x$video_svga = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DENABLE_SVGALIB"
|
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS -lvga"
|
|
|
|
|
|
|
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS svga"
|
|
|
|
VIDEO_DRIVERS="$VIDEO_DRIVERS svga/libvideo_svga.la"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2001-06-19 13:33:54 +00:00
|
|
|
dnl Find the VGL includes and libraries
|
|
|
|
CheckVGL()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(video-vgl,
|
2003-07-16 11:54:13 +00:00
|
|
|
[ --enable-video-vgl use VGL video driver [default=no]],
|
2001-06-19 13:33:54 +00:00
|
|
|
, enable_video_vgl=no)
|
|
|
|
if test x$enable_video = xyes -a x$enable_video_vgl = xyes; then
|
|
|
|
AC_MSG_CHECKING(for libVGL support)
|
|
|
|
video_vgl=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <sys/fbio.h>
|
|
|
|
#include <sys/consio.h>
|
|
|
|
#include <sys/kbio.h>
|
|
|
|
#include <vgl.h>
|
|
|
|
],[
|
|
|
|
VGLBitmap bitmap;
|
2001-08-09 06:14:06 +00:00
|
|
|
exit(bitmap.Bitmap);
|
2001-06-19 13:33:54 +00:00
|
|
|
],[
|
|
|
|
video_vgl=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($video_vgl)
|
|
|
|
if test x$video_vgl = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DENABLE_VGL"
|
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS -lvgl"
|
|
|
|
|
|
|
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS vgl"
|
|
|
|
VIDEO_DRIVERS="$VIDEO_DRIVERS vgl/libvideo_vgl.la"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
dnl Find the AAlib includes
|
|
|
|
CheckAAlib()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(video-aalib,
|
|
|
|
[ --enable-video-aalib use AAlib video driver [default=no]],
|
|
|
|
, enable_video_aalib=no)
|
|
|
|
if test x$enable_video = xyes -a x$enable_video_aalib = xyes; then
|
|
|
|
AC_MSG_CHECKING(for AAlib support)
|
|
|
|
video_aalib=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <aalib.h>
|
|
|
|
],[
|
|
|
|
],[
|
|
|
|
video_aalib=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($video_aalib)
|
|
|
|
if test x$video_aalib = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DENABLE_AALIB"
|
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS -laa"
|
|
|
|
|
|
|
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS aalib"
|
|
|
|
VIDEO_DRIVERS="$VIDEO_DRIVERS aalib/libvideo_aa.la"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2002-02-17 19:54:28 +00:00
|
|
|
dnl Set up the Atari Xbios driver
|
|
|
|
CheckAtariXbiosVideo()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(xbios,
|
|
|
|
[ --enable-video-xbios use Atari Xbios video driver [default=yes]],
|
|
|
|
, enable_video_xbios=yes)
|
|
|
|
video_xbios=no
|
|
|
|
if test x$enable_video = xyes -a x$enable_video_xbios = xyes; then
|
|
|
|
video_xbios=yes
|
|
|
|
CFLAGS="$CFLAGS -DENABLE_XBIOS"
|
|
|
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS xbios"
|
|
|
|
VIDEO_DRIVERS="$VIDEO_DRIVERS xbios/libvideo_xbios.la"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
dnl Set up the Atari Gem driver
|
|
|
|
CheckAtariGemVideo()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(gem,
|
|
|
|
[ --enable-video-gem use Atari Gem video driver [default=yes]],
|
|
|
|
, enable_video_gem=yes)
|
|
|
|
if test x$enable_video = xyes -a x$enable_video_gem = xyes; then
|
|
|
|
video_gem=no
|
|
|
|
AC_CHECK_HEADER(gem.h, have_gem_hdr=yes)
|
|
|
|
AC_CHECK_LIB(gem, appl_init, have_gem_lib=yes)
|
|
|
|
if test x$have_gem_hdr = xyes -a x$have_gem_lib = xyes; then
|
|
|
|
video_gem=yes
|
|
|
|
CFLAGS="$CFLAGS -DENABLE_GEM"
|
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS -lgem"
|
|
|
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS gem"
|
|
|
|
VIDEO_DRIVERS="$VIDEO_DRIVERS gem/libvideo_gem.la"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
dnl Set up the Atari Bios keyboard driver
|
|
|
|
CheckAtariBiosEvent()
|
|
|
|
{
|
|
|
|
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video/ataricommon"
|
|
|
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS ataricommon"
|
|
|
|
VIDEO_DRIVERS="$VIDEO_DRIVERS ataricommon/libvideo_ataricommon.la"
|
|
|
|
}
|
|
|
|
|
2001-04-26 16:50:19 +00:00
|
|
|
dnl rcg04172001 Set up the Null video driver.
|
|
|
|
CheckDummyVideo()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(video-dummy,
|
2001-07-02 00:20:29 +00:00
|
|
|
[ --enable-video-dummy use dummy video driver [default=yes]],
|
|
|
|
, enable_video_dummy=yes)
|
2001-04-26 16:50:19 +00:00
|
|
|
if test x$enable_video_dummy = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DENABLE_DUMMYVIDEO"
|
|
|
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS dummy"
|
|
|
|
VIDEO_DRIVERS="$VIDEO_DRIVERS dummy/libvideo_null.la"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
dnl Check to see if OpenGL support is desired
|
|
|
|
AC_ARG_ENABLE(video-opengl,
|
|
|
|
[ --enable-video-opengl include OpenGL context creation [default=yes]],
|
|
|
|
, enable_video_opengl=yes)
|
|
|
|
|
|
|
|
dnl Find OpenGL
|
|
|
|
CheckOpenGL()
|
|
|
|
{
|
|
|
|
if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
|
|
|
|
AC_MSG_CHECKING(for OpenGL (GLX) support)
|
|
|
|
video_opengl=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <GL/gl.h>
|
|
|
|
#include <GL/glx.h>
|
|
|
|
#include <dlfcn.h> /* For loading extensions */
|
|
|
|
],[
|
|
|
|
],[
|
|
|
|
video_opengl=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($video_opengl)
|
|
|
|
if test x$video_opengl = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DHAVE_OPENGL"
|
2002-03-06 11:05:47 +00:00
|
|
|
if test x$use_dlopen != xyes; then
|
|
|
|
AC_CHECK_LIB(dl, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS -ldl")
|
|
|
|
fi
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2002-02-14 02:15:15 +00:00
|
|
|
dnl Find QNX RtP OpenGL
|
|
|
|
CheckOpenGLQNX()
|
|
|
|
{
|
|
|
|
if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
|
|
|
|
AC_MSG_CHECKING(for OpenGL (Photon) support)
|
|
|
|
video_opengl=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <GL/gl.h>
|
|
|
|
],[
|
|
|
|
],[
|
|
|
|
video_opengl=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($video_opengl)
|
|
|
|
if test x$video_opengl = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DHAVE_OPENGL"
|
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS -lGL"
|
2003-01-20 01:37:07 +00:00
|
|
|
if test x$use_dlopen != xyes; then
|
2003-08-06 20:20:30 +00:00
|
|
|
AC_CHECK_LIB(c, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS", AC_CHECK_LIB(ltdl, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS -lltdl"))
|
2003-01-20 01:37:07 +00:00
|
|
|
fi
|
2002-02-14 02:15:15 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
dnl Check for BeOS OpenGL
|
|
|
|
CheckBeGL()
|
|
|
|
{
|
|
|
|
if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DHAVE_OPENGL"
|
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS -lGL"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
dnl Check for MacOS OpenGL
|
|
|
|
CheckMacGL()
|
|
|
|
{
|
|
|
|
if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DHAVE_OPENGL"
|
|
|
|
case "$target" in
|
|
|
|
*-*-darwin*)
|
2002-06-01 18:48:13 +00:00
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS -framework OpenGL -framework AGL"
|
2001-04-26 16:45:43 +00:00
|
|
|
esac
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
dnl See if we can use the new unified event interface in Linux 2.4
|
|
|
|
CheckInputEvents()
|
|
|
|
{
|
|
|
|
dnl Check for Linux 2.4 unified input event interface support
|
|
|
|
AC_ARG_ENABLE(input-events,
|
2001-10-22 21:34:50 +00:00
|
|
|
[ --enable-input-events use Linux 2.4 unified input interface [default=yes]],
|
|
|
|
, enable_input_events=yes)
|
2001-04-26 16:45:43 +00:00
|
|
|
if test x$enable_input_events = xyes; then
|
|
|
|
AC_MSG_CHECKING(for Linux 2.4 unified input interface)
|
|
|
|
use_input_events=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <linux/input.h>
|
|
|
|
],[
|
|
|
|
#ifndef EVIOCGNAME
|
|
|
|
#error EVIOCGNAME() ioctl not available
|
|
|
|
#endif
|
|
|
|
],[
|
|
|
|
use_input_events=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($use_input_events)
|
|
|
|
if test x$use_input_events = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DUSE_INPUT_EVENTS"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2002-06-10 21:39:49 +00:00
|
|
|
dnl See if we can use GNU pth library for threads
|
|
|
|
CheckPTH()
|
|
|
|
{
|
|
|
|
dnl Check for pth support
|
|
|
|
AC_ARG_ENABLE(pth,
|
|
|
|
[ --enable-pth use GNU pth library for multi-threading [default=yes]],
|
|
|
|
, enable_pth=yes)
|
|
|
|
if test x$enable_threads = xyes -a x$enable_pth = xyes; then
|
|
|
|
AC_PATH_PROG(PTH_CONFIG, pth-config, no)
|
|
|
|
if test "$PTH_CONFIG" = "no"; then
|
|
|
|
use_pth=no
|
|
|
|
else
|
|
|
|
PTH_CFLAGS=`$PTH_CONFIG --cflags`
|
|
|
|
PTH_LIBS=`$PTH_CONFIG --libs --all`
|
|
|
|
SDL_CFLAGS="$SDL_CFLAGS $PTH_CFLAGS"
|
|
|
|
SDL_LIBS="$SDL_LIBS $PTH_LIBS"
|
|
|
|
CFLAGS="$CFLAGS -DENABLE_PTH"
|
|
|
|
use_pth=yes
|
|
|
|
fi
|
|
|
|
AC_MSG_CHECKING(pth)
|
|
|
|
if test "x$use_pth" = xyes; then
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
dnl See what type of thread model to use on Linux and Solaris
|
|
|
|
CheckPTHREAD()
|
|
|
|
{
|
|
|
|
dnl Check for pthread support
|
|
|
|
AC_ARG_ENABLE(pthreads,
|
|
|
|
[ --enable-pthreads use POSIX threads for multi-threading [default=yes]],
|
|
|
|
, enable_pthreads=yes)
|
|
|
|
dnl This is used on Linux for glibc binary compatibility (Doh!)
|
|
|
|
AC_ARG_ENABLE(pthread-sem,
|
2001-07-02 00:20:29 +00:00
|
|
|
[ --enable-pthread-sem use pthread semaphores [default=yes]],
|
2001-04-26 16:45:43 +00:00
|
|
|
, enable_pthread_sem=yes)
|
|
|
|
case "$target" in
|
|
|
|
*-*-bsdi*)
|
|
|
|
pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
|
|
|
|
pthread_lib=""
|
|
|
|
;;
|
|
|
|
*-*-darwin*)
|
|
|
|
pthread_cflags="-D_THREAD_SAFE"
|
|
|
|
# causes Carbon.p complaints?
|
|
|
|
# pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
|
|
|
|
;;
|
|
|
|
*-*-freebsd*)
|
|
|
|
pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
|
|
|
|
pthread_lib="-pthread"
|
|
|
|
;;
|
2001-05-27 01:03:39 +00:00
|
|
|
*-*-netbsd*)
|
|
|
|
pthread_cflags="-I/usr/pkg/include -D_REENTRANT"
|
|
|
|
pthread_lib="-L/usr/pkg/lib -lpthread -lsem"
|
|
|
|
;;
|
2001-04-26 16:45:43 +00:00
|
|
|
*-*-openbsd*)
|
|
|
|
pthread_cflags="-D_REENTRANT"
|
|
|
|
pthread_lib="-pthread"
|
|
|
|
;;
|
|
|
|
*-*-solaris*)
|
|
|
|
pthread_cflags="-D_REENTRANT"
|
|
|
|
pthread_lib="-lpthread -lposix4"
|
|
|
|
;;
|
|
|
|
*-*-sysv5*)
|
|
|
|
pthread_cflags="-D_REENTRANT -Kthread"
|
|
|
|
pthread_lib=""
|
|
|
|
;;
|
|
|
|
*-*-irix*)
|
|
|
|
pthread_cflags="-D_SGI_MP_SOURCE"
|
|
|
|
pthread_lib="-lpthread"
|
|
|
|
;;
|
|
|
|
*-*-aix*)
|
|
|
|
pthread_cflags="-D_REENTRANT -mthreads"
|
|
|
|
pthread_lib="-lpthread"
|
|
|
|
;;
|
2002-07-22 09:49:52 +00:00
|
|
|
*-*-hpux11*)
|
|
|
|
pthread_cflags="-D_REENTRANT"
|
|
|
|
pthread_lib="-L/usr/lib -lpthread"
|
|
|
|
;;
|
2001-04-26 16:45:43 +00:00
|
|
|
*-*-qnx*)
|
|
|
|
pthread_cflags=""
|
|
|
|
pthread_lib=""
|
|
|
|
;;
|
2004-03-07 16:40:15 +00:00
|
|
|
*-*-osf*)
|
|
|
|
if test x$ac_cv_prog_gcc = xyes; then
|
|
|
|
pthread_cflags="-D_REENTRANT"
|
|
|
|
pthread_lib="-lpthread -lrt"
|
|
|
|
else
|
|
|
|
pthread_cflags="-pthread"
|
|
|
|
pthread_lib="-lpthread -lrt"
|
|
|
|
fi
|
|
|
|
;;
|
2001-04-26 16:45:43 +00:00
|
|
|
*)
|
|
|
|
pthread_cflags="-D_REENTRANT"
|
|
|
|
pthread_lib="-lpthread"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
if test x$enable_threads = xyes -a x$enable_pthreads = xyes; then
|
2002-06-13 21:36:25 +00:00
|
|
|
# Save the original compiler flags and libraries
|
|
|
|
ac_save_cflags="$CFLAGS"; ac_save_libs="$LIBS"
|
|
|
|
# Add the pthread compiler flags and libraries
|
|
|
|
CFLAGS="$CFLAGS $pthread_cflags"; LIBS="$LIBS $pthread_lib"
|
|
|
|
# Check to see if we have pthread support on this system
|
2001-04-26 16:45:43 +00:00
|
|
|
AC_MSG_CHECKING(for pthreads)
|
|
|
|
use_pthreads=no
|
|
|
|
AC_TRY_LINK([
|
|
|
|
#include <pthread.h>
|
|
|
|
],[
|
|
|
|
pthread_attr_t type;
|
|
|
|
pthread_attr_init(&type);
|
|
|
|
],[
|
|
|
|
use_pthreads=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($use_pthreads)
|
2002-06-13 21:36:25 +00:00
|
|
|
# Restore the compiler flags and libraries
|
|
|
|
CFLAGS="$ac_save_cflags"; LIBS="$ac_save_libs"
|
|
|
|
# Do futher testing if we have pthread support...
|
2001-04-26 16:45:43 +00:00
|
|
|
if test x$use_pthreads = xyes; then
|
|
|
|
CFLAGS="$CFLAGS $pthread_cflags -DSDL_USE_PTHREADS"
|
2004-02-20 18:18:20 +00:00
|
|
|
LIBS="$LIBS $pthread_lib"
|
2001-04-26 16:45:43 +00:00
|
|
|
SDL_CFLAGS="$SDL_CFLAGS $pthread_cflags"
|
|
|
|
SDL_LIBS="$SDL_LIBS $pthread_lib"
|
|
|
|
|
|
|
|
# Check to see if recursive mutexes are available
|
|
|
|
AC_MSG_CHECKING(for recursive mutexes)
|
|
|
|
has_recursive_mutexes=no
|
|
|
|
AC_TRY_LINK([
|
|
|
|
#include <pthread.h>
|
|
|
|
],[
|
|
|
|
pthread_mutexattr_t attr;
|
2002-05-19 20:06:01 +00:00
|
|
|
#if defined(linux) && !(defined(__arm__) && defined(QWS))
|
2001-04-26 16:45:43 +00:00
|
|
|
pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
|
|
|
|
#else
|
|
|
|
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
|
|
|
#endif
|
|
|
|
],[
|
|
|
|
has_recursive_mutexes=yes
|
|
|
|
])
|
|
|
|
# Some systems have broken recursive mutex implementations
|
|
|
|
case "$target" in
|
2002-06-10 21:39:49 +00:00
|
|
|
*-*-darwin*)
|
|
|
|
has_recursive_mutexes=no
|
|
|
|
;;
|
2001-04-26 16:45:43 +00:00
|
|
|
*-*-solaris*)
|
|
|
|
has_recursive_mutexes=no
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
AC_MSG_RESULT($has_recursive_mutexes)
|
|
|
|
if test x$has_recursive_mutexes != xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DPTHREAD_NO_RECURSIVE_MUTEX"
|
|
|
|
fi
|
|
|
|
|
2001-07-08 09:00:06 +00:00
|
|
|
# Check to see if pthread semaphore support is missing
|
|
|
|
if test x$enable_pthread_sem = xyes; then
|
|
|
|
AC_MSG_CHECKING(for pthread semaphores)
|
|
|
|
have_pthread_sem=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <pthread.h>
|
|
|
|
#include <semaphore.h>
|
|
|
|
],[
|
|
|
|
],[
|
|
|
|
have_pthread_sem=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($have_pthread_sem)
|
|
|
|
fi
|
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
# Check to see if this is broken glibc 2.0 pthreads
|
|
|
|
case "$target" in
|
|
|
|
*-*-linux*)
|
|
|
|
AC_MSG_CHECKING(for broken glibc 2.0 pthreads)
|
|
|
|
glibc20_pthreads=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <features.h>
|
|
|
|
#if (__GLIBC__ == 2) && (__GLIBC_MINOR__ == 0)
|
|
|
|
#warning Working around a bug in glibc 2.0 pthreads
|
|
|
|
#else
|
|
|
|
#error pthread implementation okay
|
|
|
|
#endif /* glibc 2.0 */
|
|
|
|
],[
|
|
|
|
],[
|
|
|
|
glibc20_pthreads=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($glibc20_pthreads)
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(whether semun is defined in /usr/include/sys/sem.h)
|
|
|
|
have_semun=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/sem.h>
|
|
|
|
],[
|
|
|
|
union semun t;
|
|
|
|
],[
|
|
|
|
have_semun=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($have_semun)
|
|
|
|
if test x$have_semun = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DHAVE_SEMUN"
|
|
|
|
fi
|
|
|
|
|
2002-06-10 21:39:49 +00:00
|
|
|
# See if we can use GNU Pth or clone() on Linux directly
|
2001-04-26 16:45:43 +00:00
|
|
|
if test x$enable_threads = xyes -a x$use_pthreads != xyes; then
|
2002-06-10 21:39:49 +00:00
|
|
|
CheckPTH
|
|
|
|
if test x$use_pth != xyes; then
|
|
|
|
case "$target" in
|
|
|
|
*-*-linux*)
|
|
|
|
use_clone=yes
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2002-06-10 21:39:49 +00:00
|
|
|
# Note that we need to have either semaphores or to have mutexes and
|
|
|
|
# condition variables to implement all thread synchronization primitives
|
|
|
|
CopyUnixThreadSource()
|
2001-09-14 04:34:15 +00:00
|
|
|
{
|
2002-06-10 21:39:49 +00:00
|
|
|
if test x$use_pthreads = xyes -o x$use_clone = xyes; then
|
|
|
|
# Basic thread creation functions
|
|
|
|
COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
|
|
|
|
COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
|
|
|
|
|
|
|
|
# Semaphores
|
|
|
|
# We can fake these with mutexes and condition variables if necessary
|
|
|
|
if test x$use_pthreads = xyes -a x$have_pthread_sem != xyes; then
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
|
2001-09-14 04:34:15 +00:00
|
|
|
else
|
2002-06-10 21:39:49 +00:00
|
|
|
COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
|
2001-09-14 04:34:15 +00:00
|
|
|
fi
|
2002-06-10 21:39:49 +00:00
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
|
|
|
|
|
|
|
|
# Mutexes
|
|
|
|
# We can fake these with semaphores if necessary
|
|
|
|
case "$target" in
|
|
|
|
*-*-bsdi*)
|
|
|
|
COPY_ARCH_SRC(src/thread, bsdi, SDL_syssem.c)
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
|
2003-02-21 17:16:38 +00:00
|
|
|
COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
|
|
|
|
COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
|
2002-06-10 21:39:49 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
if test x$glibc20_pthreads = xyes; then
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
|
|
|
|
else
|
|
|
|
COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
|
|
|
|
COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# Condition variables
|
|
|
|
# We can fake these with semaphores and mutexes if necessary
|
|
|
|
if test x$glibc20_pthreads = xyes -o x$has_recursive_mutexes != xyes; then
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
|
2001-09-14 04:34:15 +00:00
|
|
|
else
|
2002-06-10 21:39:49 +00:00
|
|
|
COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
|
2001-09-14 04:34:15 +00:00
|
|
|
fi
|
2002-06-10 21:39:49 +00:00
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
|
|
|
|
|
2002-06-11 19:00:11 +00:00
|
|
|
elif test x$use_pth = xyes; then
|
2002-06-10 21:39:49 +00:00
|
|
|
COPY_ARCH_SRC(src/thread, pth, SDL_systhread.c)
|
|
|
|
COPY_ARCH_SRC(src/thread, pth, SDL_systhread_c.h)
|
|
|
|
COPY_ARCH_SRC(src/thread, pth, SDL_sysmutex.c)
|
|
|
|
COPY_ARCH_SRC(src/thread, pth, SDL_sysmutex_c.h)
|
|
|
|
COPY_ARCH_SRC(src/thread, pth, SDL_syscond.c)
|
|
|
|
COPY_ARCH_SRC(src/thread, pth, SDL_syscond_c.h)
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
|
|
|
|
else
|
|
|
|
AC_MSG_ERROR([
|
|
|
|
*** No thread support detected
|
|
|
|
])
|
2001-09-14 04:34:15 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2004-02-12 16:29:24 +00:00
|
|
|
dnl See if we can use sigaction() instead of signal()
|
|
|
|
CheckSIGACTION()
|
|
|
|
{
|
|
|
|
dnl Check for sigaction support
|
|
|
|
AC_ARG_ENABLE(sigaction,
|
|
|
|
[ --enable-sigaction use sigaction instead of signal [default=yes]],
|
|
|
|
, enable_sigaction=yes)
|
|
|
|
if test x$enable_sigaction = xyes; then
|
|
|
|
AC_MSG_CHECKING(sigaction)
|
|
|
|
have_sigaction=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <signal.h>
|
|
|
|
],[
|
|
|
|
struct sigaction junk;
|
|
|
|
sigaction(0, &junk, &junk);
|
|
|
|
],[
|
|
|
|
have_sigaction=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($have_sigaction)
|
|
|
|
if test x$have_sigaction = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DHAVE_SIGACTION"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
dnl Determine whether the compiler can produce Win32 executables
|
|
|
|
CheckWIN32()
|
|
|
|
{
|
|
|
|
AC_MSG_CHECKING(Win32 compiler)
|
|
|
|
have_win32_gcc=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <windows.h>
|
|
|
|
],[
|
|
|
|
],[
|
|
|
|
have_win32_gcc=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($have_win32_gcc)
|
|
|
|
if test x$have_win32_gcc != xyes; then
|
|
|
|
AC_MSG_ERROR([
|
|
|
|
*** Your compiler ($CC) does not produce Win32 executables!
|
|
|
|
])
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl See if the user wants to redirect standard output to files
|
|
|
|
AC_ARG_ENABLE(stdio-redirect,
|
|
|
|
[ --enable-stdio-redirect Redirect STDIO to files on Win32 [default=yes]],
|
|
|
|
, enable_stdio_redirect=yes)
|
|
|
|
if test x$enable_stdio_redirect != xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DNO_STDIO_REDIRECT"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
dnl Find the DirectX includes and libraries
|
|
|
|
CheckDIRECTX()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(directx,
|
|
|
|
[ --enable-directx use DirectX for Win32 audio/video [default=yes]],
|
|
|
|
, enable_directx=yes)
|
|
|
|
if test x$enable_directx = xyes; then
|
|
|
|
AC_MSG_CHECKING(for DirectX headers and libraries)
|
|
|
|
use_directx=no
|
2004-01-07 18:24:06 +00:00
|
|
|
tmp_cflags=$CFLAGS
|
|
|
|
CFLAGS="$CFLAGS -I$srcdir"
|
2001-04-26 16:45:43 +00:00
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include "src/video/windx5/directx.h"
|
|
|
|
],[
|
|
|
|
],[
|
|
|
|
use_directx=yes
|
|
|
|
])
|
2004-01-07 18:24:06 +00:00
|
|
|
CFLAGS=$tmp_cflags
|
2001-04-26 16:45:43 +00:00
|
|
|
AC_MSG_RESULT($use_directx)
|
|
|
|
fi
|
|
|
|
|
|
|
|
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video/wincommon"
|
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS -luser32 -lgdi32 -lwinmm"
|
|
|
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS wincommon"
|
|
|
|
VIDEO_DRIVERS="$VIDEO_DRIVERS wincommon/libvideo_wincommon.la"
|
|
|
|
# Enable the DIB driver
|
|
|
|
CFLAGS="$CFLAGS -DENABLE_WINDIB"
|
|
|
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS windib"
|
|
|
|
VIDEO_DRIVERS="$VIDEO_DRIVERS windib/libvideo_windib.la"
|
|
|
|
# See if we should enable the DirectX driver
|
|
|
|
if test x$use_directx = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DENABLE_DIRECTX"
|
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS -ldxguid"
|
|
|
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS windx5"
|
|
|
|
VIDEO_DRIVERS="$VIDEO_DRIVERS windx5/libvideo_windx5.la"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
dnl Set up the BWindow video driver on BeOS
|
|
|
|
CheckBWINDOW()
|
|
|
|
{
|
|
|
|
CFLAGS="$CFLAGS -DENABLE_BWINDOW"
|
|
|
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS bwindow"
|
|
|
|
VIDEO_DRIVERS="$VIDEO_DRIVERS bwindow/libvideo_bwindow.la"
|
|
|
|
}
|
|
|
|
|
2002-05-19 20:06:01 +00:00
|
|
|
dnl Set up the QTopia video driver if enabled
|
|
|
|
CheckQtopia()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(video-qtopia,
|
|
|
|
[ --enable-video-qtopia use Qtopia video driver [default=no]],
|
|
|
|
, enable_video_qtopia=no)
|
|
|
|
if test x$enable_video = xyes -a x$enable_video_qtopia = xyes; then
|
|
|
|
AC_MSG_CHECKING(for Qtopia support)
|
|
|
|
video_qtopia=no
|
|
|
|
AC_LANG_CPLUSPLUS
|
|
|
|
OLD_CXX="$CXXFLAGS"
|
|
|
|
CXXFLAGS="-DQT_QWS_EBX -fno-rtti -fno-exceptions -DQT_QWS_CUSTOM -DQWS -I${QPEDIR}/include -I${QTDIR}/include/ -DNO_DEBUG"
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <qpe/qpeapplication.h>
|
|
|
|
],[
|
|
|
|
],[
|
|
|
|
video_qtopia=yes
|
|
|
|
])
|
|
|
|
CXXFLAGS="$OLD_CXX"
|
|
|
|
AC_MSG_RESULT($video_qtopia)
|
|
|
|
if test x$video_qtopia = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DENABLE_QTOPIA -DQT_QWS_EBX -DQT_QWS_CUSTOM -DQWS -I${QPEDIR}/include -I${QTDIR}/include/ -DNO_DEBUG -fno-rtti -fno-exceptions"
|
2002-05-20 18:36:48 +00:00
|
|
|
SDL_LIBS="$SDL_LIBS -L${QPEDIR}/lib -L${QTDIR}/lib/ -lqpe -lqte"
|
2003-01-20 01:08:20 +00:00
|
|
|
SDL_CFLAGS="$SDL_CFLAGS -DQWS"
|
2002-05-19 20:06:01 +00:00
|
|
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS qtopia"
|
|
|
|
VIDEO_DRIVERS="$VIDEO_DRIVERS qtopia/libvideo_qtopia.la"
|
2003-01-20 01:08:20 +00:00
|
|
|
else
|
|
|
|
AC_MSG_ERROR([
|
|
|
|
*** Failed to find Qtopia includes. Make sure that the QTDIR and QPEDIR
|
|
|
|
*** environment variables are set correctly.])
|
2002-05-19 20:06:01 +00:00
|
|
|
fi
|
|
|
|
AC_LANG_C
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2002-08-01 23:24:13 +00:00
|
|
|
dnl Set up the PicoGUI video driver if enabled
|
|
|
|
CheckPicoGUI()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(video-picogui,
|
|
|
|
[ --enable-video-picogui use PicoGUI video driver [default=no]],
|
|
|
|
, enable_video_picogui=no)
|
|
|
|
if test x$enable_video = xyes -a x$enable_video_picogui = xyes; then
|
|
|
|
AC_MSG_CHECKING(for PicoGUI support)
|
|
|
|
video_picogui=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <picogui.h>
|
|
|
|
],[
|
|
|
|
],[
|
|
|
|
video_picogui=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($video_picogui)
|
|
|
|
if test x$video_picogui = xyes; then
|
|
|
|
SDL_LIBS="$SDL_LIBS -lpgui"
|
|
|
|
CFLAGS="$CFLAGS -DENABLE_PICOGUI"
|
|
|
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS picogui"
|
|
|
|
VIDEO_DRIVERS="$VIDEO_DRIVERS picogui/libvideo_picogui.la"
|
|
|
|
fi
|
|
|
|
AC_LANG_C
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
dnl Set up the Mac toolbox video driver for Mac OS 7-9
|
|
|
|
CheckTOOLBOX()
|
|
|
|
{
|
|
|
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS maccommon"
|
|
|
|
VIDEO_DRIVERS="$VIDEO_DRIVERS maccommon/libvideo_maccommon.la"
|
|
|
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS macrom"
|
|
|
|
VIDEO_DRIVERS="$VIDEO_DRIVERS macrom/libvideo_macrom.la"
|
|
|
|
}
|
|
|
|
|
|
|
|
dnl Set up the Mac toolbox video driver for Mac OS X
|
|
|
|
CheckCARBON()
|
|
|
|
{
|
|
|
|
# "MACOSX" is not an official definition, but it's commonly
|
|
|
|
# accepted as a way to differentiate between what runs on X
|
|
|
|
# and what runs on older Macs - while in theory "Carbon" defns
|
|
|
|
# are consistent between the two, in practice Carbon is still
|
|
|
|
# changing. -sts Aug 2000
|
|
|
|
mac_autoconf_target_workaround="MAC"
|
|
|
|
CFLAGS="$CFLAGS -I/System/Library/Frameworks/Carbon.framework/Headers \
|
|
|
|
-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"
|
|
|
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS maccommon"
|
|
|
|
VIDEO_DRIVERS="$VIDEO_DRIVERS maccommon/libvideo_maccommon.la"
|
|
|
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS macrom"
|
|
|
|
VIDEO_DRIVERS="$VIDEO_DRIVERS macrom/libvideo_macrom.la"
|
|
|
|
}
|
|
|
|
|
2001-08-21 07:19:59 +00:00
|
|
|
dnl Set up the Mac toolbox video driver for Mac OS X
|
|
|
|
CheckQUARTZ()
|
|
|
|
{
|
|
|
|
# "MACOSX" is not an official definition, but it's commonly
|
|
|
|
# accepted as a way to differentiate between what runs on X
|
|
|
|
# and what runs on older Macs - while in theory "Carbon" defns
|
|
|
|
# are consistent between the two, in practice Carbon is still
|
|
|
|
# changing. -sts Aug 2000
|
2001-09-04 22:48:09 +00:00
|
|
|
mac_autoconf_target_workaround="MAC"
|
2001-08-21 07:19:59 +00:00
|
|
|
CFLAGS="$CFLAGS -I/System/Library/Frameworks/Carbon.framework/Headers \
|
|
|
|
-I/System/Library/Frameworks/Cocoa.framework/Headers -fpascal-strings \
|
2001-09-04 22:48:09 +00:00
|
|
|
-DENABLE_QUARTZ -DMACOSX -DTARGET_API_${mac_autoconf_target_workaround}_CARBON=1 -I\$(top_srcdir)/src/video/quartz"
|
2001-08-21 07:19:59 +00:00
|
|
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS quartz"
|
|
|
|
VIDEO_DRIVERS="$VIDEO_DRIVERS quartz/libvideo_quartz.la"
|
|
|
|
}
|
|
|
|
|
2002-03-06 05:20:11 +00:00
|
|
|
dnl Check for the dlfcn.h interface for dynamically loading objects
|
|
|
|
CheckDLOPEN()
|
|
|
|
{
|
2003-10-06 09:03:02 +00:00
|
|
|
AC_ARG_ENABLE(sdl-dlopen,
|
|
|
|
[ --enable-sdl-dlopen use dlopen for shared object loading [default=yes]],
|
|
|
|
, enable_sdl_dlopen=yes)
|
|
|
|
if test x$enable_sdl_dlopen = xyes; then
|
2002-03-06 05:20:11 +00:00
|
|
|
AC_MSG_CHECKING(for dlopen)
|
|
|
|
use_dlopen=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <dlfcn.h>
|
|
|
|
],[
|
|
|
|
],[
|
|
|
|
use_dlopen=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($use_dlopen)
|
|
|
|
|
|
|
|
if test x$use_dlopen = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DUSE_DLOPEN"
|
2003-12-10 12:35:56 +00:00
|
|
|
AC_CHECK_LIB(c, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS",
|
|
|
|
AC_CHECK_LIB(dl, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS -ldl",
|
|
|
|
AC_CHECK_LIB(ltdl, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS -lltdl")))
|
2002-03-06 05:20:11 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2003-07-16 11:54:13 +00:00
|
|
|
dnl Set up the Atari LDG (shared object loader)
|
|
|
|
CheckAtariLdg()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(atari-ldg,
|
|
|
|
[ --enable-atari-ldg use Atari LDG for shared object loading [default=yes]],
|
|
|
|
, enable_atari_ldg=yes)
|
|
|
|
if test x$video_gem = xyes -a x$enable_atari_ldg = xyes; then
|
|
|
|
AC_CHECK_HEADER(ldg.h, have_ldg_hdr=yes)
|
|
|
|
AC_CHECK_LIB(ldg, ldg_open, have_ldg_lib=yes, have_ldg_lib=no, -lgem)
|
|
|
|
if test x$have_ldg_hdr = xyes -a x$have_ldg_lib = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DENABLE_LDG"
|
2004-02-15 08:32:25 +00:00
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS -lldg -lgem"
|
2003-07-16 11:54:13 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2002-05-28 20:01:29 +00:00
|
|
|
dnl Check for the usbhid(3) library on *BSD
|
|
|
|
CheckUSBHID()
|
|
|
|
{
|
|
|
|
if test x$enable_joystick = xyes; then
|
|
|
|
have_libusbhid=no
|
|
|
|
have_libusb=no
|
|
|
|
AC_CHECK_LIB(usbhid, hid_init, have_libusbhid=yes)
|
|
|
|
AC_CHECK_LIB(usb, hid_init, have_libusb=yes)
|
|
|
|
if test x$have_libusbhid = xyes; then
|
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS -lusbhid"
|
|
|
|
fi
|
|
|
|
if test x$have_libusb = xyes; then
|
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS -lusb"
|
|
|
|
fi
|
|
|
|
|
2002-06-11 19:56:41 +00:00
|
|
|
AC_CHECK_HEADER(usb.h, have_usb_h=yes)
|
2002-05-28 20:01:29 +00:00
|
|
|
AC_CHECK_HEADER(usbhid.h, have_usbhid_h=yes)
|
|
|
|
AC_CHECK_HEADER(libusb.h, have_libusb_h=yes)
|
|
|
|
AC_CHECK_HEADER(libusbhid.h, have_libusbhid_h=yes)
|
2002-06-11 19:56:41 +00:00
|
|
|
if test x$have_usb_h = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DHAVE_USB_H"
|
|
|
|
fi
|
2002-05-28 20:01:29 +00:00
|
|
|
if test x$have_usbhid_h = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DHAVE_USBHID_H"
|
|
|
|
fi
|
|
|
|
if test x$have_libusb_h = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DHAVE_LIBUSB_H"
|
|
|
|
fi
|
|
|
|
if test x$have_libusbhid_h = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DHAVE_LIBUSBHID_H"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(for usbhid)
|
|
|
|
have_usbhid=no
|
|
|
|
AC_TRY_COMPILE([
|
2002-06-11 20:06:42 +00:00
|
|
|
#include <sys/types.h>
|
2002-06-11 19:56:41 +00:00
|
|
|
#if defined(HAVE_USB_H)
|
|
|
|
#include <usb.h>
|
|
|
|
#endif
|
2002-05-28 20:01:29 +00:00
|
|
|
#include <dev/usb/usb.h>
|
|
|
|
#include <dev/usb/usbhid.h>
|
|
|
|
#if defined(HAVE_USBHID_H)
|
|
|
|
#include <usbhid.h>
|
|
|
|
#elif defined(HAVE_LIBUSB_H)
|
|
|
|
#include <libusb.h>
|
|
|
|
#elif defined(HAVE_LIBUSBHID_H)
|
|
|
|
#include <libusbhid.h>
|
2002-06-11 20:06:42 +00:00
|
|
|
#endif
|
2002-05-28 20:01:29 +00:00
|
|
|
],[
|
|
|
|
struct report_desc *repdesc;
|
|
|
|
struct usb_ctl_report *repbuf;
|
2002-06-11 19:43:04 +00:00
|
|
|
hid_kind_t hidkind;
|
2002-05-28 20:01:29 +00:00
|
|
|
],[
|
|
|
|
have_usbhid=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($have_usbhid)
|
|
|
|
|
|
|
|
if test x$have_usbhid = xyes; then
|
|
|
|
AC_MSG_CHECKING(for ucr_data member of usb_ctl_report)
|
|
|
|
have_usbhid_ucr_data=no
|
|
|
|
AC_TRY_COMPILE([
|
2002-06-11 20:06:42 +00:00
|
|
|
#include <sys/types.h>
|
|
|
|
#if defined(HAVE_USB_H)
|
|
|
|
#include <usb.h>
|
|
|
|
#endif
|
2002-05-28 20:01:29 +00:00
|
|
|
#include <dev/usb/usb.h>
|
|
|
|
#include <dev/usb/usbhid.h>
|
|
|
|
#if defined(HAVE_USBHID_H)
|
|
|
|
#include <usbhid.h>
|
|
|
|
#elif defined(HAVE_LIBUSB_H)
|
|
|
|
#include <libusb.h>
|
|
|
|
#elif defined(HAVE_LIBUSBHID_H)
|
|
|
|
#include <libusbhid.h>
|
|
|
|
#endif
|
|
|
|
],[
|
|
|
|
struct usb_ctl_report buf;
|
|
|
|
if (buf.ucr_data) { }
|
|
|
|
],[
|
|
|
|
have_usbhid_ucr_data=yes
|
|
|
|
])
|
|
|
|
if test x$have_usbhid_ucr_data = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DUSBHID_UCR_DATA"
|
|
|
|
fi
|
|
|
|
AC_MSG_RESULT($have_usbhid_ucr_data)
|
2002-06-12 03:32:01 +00:00
|
|
|
|
|
|
|
AC_MSG_CHECKING(for new usbhid API)
|
|
|
|
have_usbhid_new=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <sys/types.h>
|
|
|
|
#if defined(HAVE_USB_H)
|
|
|
|
#include <usb.h>
|
|
|
|
#endif
|
|
|
|
#include <dev/usb/usb.h>
|
|
|
|
#include <dev/usb/usbhid.h>
|
|
|
|
#if defined(HAVE_USBHID_H)
|
|
|
|
#include <usbhid.h>
|
|
|
|
#elif defined(HAVE_LIBUSB_H)
|
|
|
|
#include <libusb.h>
|
|
|
|
#elif defined(HAVE_LIBUSBHID_H)
|
|
|
|
#include <libusbhid.h>
|
|
|
|
#endif
|
|
|
|
],[
|
|
|
|
report_desc_t d;
|
|
|
|
hid_start_parse(d, 1, 1);
|
|
|
|
],[
|
|
|
|
have_usbhid_new=yes
|
|
|
|
])
|
|
|
|
if test x$have_usbhid_new = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DUSBHID_NEW"
|
|
|
|
fi
|
|
|
|
AC_MSG_RESULT($have_usbhid_new)
|
2002-05-28 20:01:29 +00:00
|
|
|
|
|
|
|
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS bsd"
|
|
|
|
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS bsd/libjoystick_bsd.la"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2004-01-29 16:15:12 +00:00
|
|
|
dnl Check for altivec instruction support using gas syntax
|
|
|
|
CheckAltivec()
|
|
|
|
{
|
|
|
|
AC_MSG_CHECKING(for GCC Altivec instruction support)
|
|
|
|
have_gcc_altivec=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
],[
|
|
|
|
asm volatile ("mtspr 256, %0\n\t"
|
|
|
|
"vand %%v0, %%v0, %%v0"
|
|
|
|
:
|
|
|
|
: "r" (-1));
|
|
|
|
],[
|
|
|
|
have_gcc_altivec=yes
|
|
|
|
])
|
|
|
|
if test x$have_gcc_altivec = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DGCC_ALTIVEC"
|
|
|
|
fi
|
|
|
|
AC_MSG_RESULT($have_gcc_altivec)
|
|
|
|
}
|
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
case "$target" in
|
2003-09-21 18:18:17 +00:00
|
|
|
*-*-linux*|*-*-gnu*|*-*-k*bsd*-gnu)
|
|
|
|
case "$target" in
|
2004-01-29 16:15:12 +00:00
|
|
|
*-*-linux*) ARCH=linux ;;
|
|
|
|
*-*-kfreebsd*-gnu) ARCH=kfreebsd-gnu ;;
|
|
|
|
*-*-knetbsd*-gnu) ARCH=knetbsd-gnu ;;
|
|
|
|
*-*-kopenbsd*-gnu) ARCH=kopenbsd-gnu ;;
|
|
|
|
*-*-gnu*) ARCH=gnu ;; # must be last
|
|
|
|
esac
|
2001-04-26 16:50:19 +00:00
|
|
|
CheckDummyVideo
|
2001-06-16 01:51:42 +00:00
|
|
|
CheckDiskAudio
|
2002-05-19 20:06:01 +00:00
|
|
|
CheckDLOPEN
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckNASM
|
|
|
|
CheckOSS
|
|
|
|
CheckALSA
|
|
|
|
CheckARTSC
|
|
|
|
CheckESD
|
|
|
|
CheckNAS
|
|
|
|
CheckX11
|
2001-05-11 01:13:35 +00:00
|
|
|
CheckNANOX
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckDGA
|
|
|
|
CheckFBCON
|
2001-09-04 22:53:46 +00:00
|
|
|
CheckDirectFB
|
2001-06-16 03:17:45 +00:00
|
|
|
CheckPS2GS
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckGGI
|
|
|
|
CheckSVGA
|
|
|
|
CheckAAlib
|
2002-05-19 20:06:01 +00:00
|
|
|
CheckQtopia
|
2002-08-01 23:24:13 +00:00
|
|
|
CheckPicoGUI
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckOpenGL
|
|
|
|
CheckInputEvents
|
|
|
|
CheckPTHREAD
|
2004-02-12 16:29:24 +00:00
|
|
|
CheckSIGACTION
|
2004-01-29 16:15:12 +00:00
|
|
|
CheckAltivec
|
2001-04-26 16:45:43 +00:00
|
|
|
# Set up files for the main() stub
|
2002-05-19 20:06:01 +00:00
|
|
|
if test "x$video_qtopia" = "xyes"; then
|
|
|
|
SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
|
|
|
|
SDL_LIBS="-lSDLmain $SDL_LIBS"
|
|
|
|
fi
|
2001-04-26 16:45:43 +00:00
|
|
|
# Set up files for the audio library
|
|
|
|
# We use the OSS and ALSA API's, not the Sun audio API
|
|
|
|
#if test x$enable_audio = xyes; then
|
2001-08-09 13:09:47 +00:00
|
|
|
# CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
|
2001-04-26 16:45:43 +00:00
|
|
|
# AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
|
|
|
|
# AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
|
|
|
|
#fi
|
|
|
|
# Set up files for the joystick library
|
|
|
|
if test x$enable_joystick = xyes; then
|
2003-09-21 18:18:17 +00:00
|
|
|
case $ARCH in
|
|
|
|
linux)
|
|
|
|
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS linux"
|
|
|
|
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS linux/libjoystick_linux.la"
|
|
|
|
;;
|
|
|
|
gnu)
|
|
|
|
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
|
|
|
|
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
|
|
|
|
;;
|
|
|
|
k*bsd-gnu)
|
|
|
|
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS bsd"
|
|
|
|
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS bsd/libjoystick_bsd.la"
|
|
|
|
;;
|
|
|
|
esac
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the cdrom library
|
|
|
|
if test x$enable_cdrom = xyes; then
|
2003-09-21 18:18:17 +00:00
|
|
|
case $ARCH in
|
|
|
|
linux)
|
|
|
|
CDROM_SUBDIRS="$CDROM_SUBDIRS linux"
|
|
|
|
CDROM_DRIVERS="$CDROM_DRIVERS linux/libcdrom_linux.la"
|
|
|
|
;;
|
|
|
|
gnu)
|
|
|
|
CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
|
|
|
|
CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
|
|
|
|
;;
|
|
|
|
kfreebsd-gnu)
|
|
|
|
CDROM_SUBDIRS="$CDROM_SUBDIRS freebsd"
|
|
|
|
CDROM_DRIVERS="$CDROM_DRIVERS freebsd/libcdrom_freebsd.la"
|
|
|
|
;;
|
|
|
|
knetbsd-gnu|kopenbsd-gnu)
|
|
|
|
CDROM_SUBDIRS="$CDROM_SUBDIRS openbsd"
|
|
|
|
CDROM_DRIVERS="$CDROM_DRIVERS openbsd/libcdrom_openbsd.la"
|
|
|
|
;;
|
|
|
|
esac
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the thread library
|
|
|
|
if test x$enable_threads = xyes; then
|
2002-06-10 21:39:49 +00:00
|
|
|
CopyUnixThreadSource
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the timer library
|
|
|
|
if test x$enable_timers = xyes; then
|
|
|
|
COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*-*-bsdi*)
|
|
|
|
ARCH=bsdi
|
2001-04-26 16:50:19 +00:00
|
|
|
CheckDummyVideo
|
2001-06-16 01:51:42 +00:00
|
|
|
CheckDiskAudio
|
2002-05-19 20:06:01 +00:00
|
|
|
CheckDLOPEN
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckNASM
|
|
|
|
CheckOSS
|
2001-05-23 00:36:17 +00:00
|
|
|
CheckARTSC
|
|
|
|
CheckESD
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckNAS
|
|
|
|
CheckX11
|
|
|
|
CheckDGA
|
|
|
|
CheckSVGA
|
|
|
|
CheckAAlib
|
|
|
|
CheckOpenGL
|
|
|
|
CheckPTHREAD
|
2004-02-12 16:29:24 +00:00
|
|
|
CheckSIGACTION
|
2001-08-09 13:09:47 +00:00
|
|
|
# Set up files for the audio library
|
|
|
|
# We use the OSS and ALSA API's, not the Sun audio API
|
|
|
|
#if test x$enable_audio = xyes; then
|
|
|
|
# CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
|
|
|
|
# AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
|
|
|
|
# AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
|
|
|
|
#fi
|
2001-04-26 16:45:43 +00:00
|
|
|
# Set up files for the joystick library
|
|
|
|
# (No joystick support yet)
|
|
|
|
if test x$enable_joystick = xyes; then
|
|
|
|
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
|
|
|
|
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
|
|
|
|
fi
|
|
|
|
# Set up files for the cdrom library
|
|
|
|
if test x$enable_cdrom = xyes; then
|
2001-09-13 15:57:48 +00:00
|
|
|
CDROM_SUBDIRS="$CDROM_SUBDIRS bsdi"
|
|
|
|
CDROM_DRIVERS="$CDROM_DRIVERS bsdi/libcdrom_bsdi.la"
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the thread library
|
|
|
|
if test x$enable_threads = xyes; then
|
2002-06-10 21:39:49 +00:00
|
|
|
CopyUnixThreadSource
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the timer library
|
|
|
|
if test x$enable_timers = xyes; then
|
|
|
|
COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*-*-freebsd*)
|
|
|
|
ARCH=freebsd
|
2001-04-26 16:50:19 +00:00
|
|
|
CheckDummyVideo
|
2001-06-16 01:51:42 +00:00
|
|
|
CheckDiskAudio
|
2002-05-19 20:06:01 +00:00
|
|
|
CheckDLOPEN
|
2001-07-31 04:06:56 +00:00
|
|
|
CheckVGL
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckNASM
|
|
|
|
CheckOSS
|
|
|
|
CheckARTSC
|
|
|
|
CheckESD
|
|
|
|
CheckNAS
|
|
|
|
CheckX11
|
|
|
|
CheckDGA
|
|
|
|
CheckSVGA
|
|
|
|
CheckAAlib
|
|
|
|
CheckOpenGL
|
|
|
|
CheckPTHREAD
|
2004-02-12 16:29:24 +00:00
|
|
|
CheckSIGACTION
|
2002-05-28 20:01:29 +00:00
|
|
|
CheckUSBHID
|
2001-04-26 16:45:43 +00:00
|
|
|
# Set up files for the audio library
|
|
|
|
# We use the OSS and ALSA API's, not the Sun audio API
|
|
|
|
#if test x$enable_audio = xyes; then
|
2001-08-09 13:09:47 +00:00
|
|
|
# CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
|
2001-04-26 16:45:43 +00:00
|
|
|
# AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
|
|
|
|
# AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
|
|
|
|
#fi
|
|
|
|
# Set up files for the cdrom library
|
|
|
|
if test x$enable_cdrom = xyes; then
|
2001-08-18 22:03:11 +00:00
|
|
|
CDROM_SUBDIRS="$CDROM_SUBDIRS freebsd"
|
|
|
|
CDROM_DRIVERS="$CDROM_DRIVERS freebsd/libcdrom_freebsd.la"
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the thread library
|
|
|
|
if test x$enable_threads = xyes; then
|
2002-06-10 21:39:49 +00:00
|
|
|
CopyUnixThreadSource
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the timer library
|
|
|
|
if test x$enable_timers = xyes; then
|
|
|
|
COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*-*-netbsd*)
|
|
|
|
ARCH=netbsd
|
2001-04-26 16:50:19 +00:00
|
|
|
CheckDummyVideo
|
2001-06-16 01:51:42 +00:00
|
|
|
CheckDiskAudio
|
2002-05-19 20:06:01 +00:00
|
|
|
CheckDLOPEN
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckNASM
|
|
|
|
CheckOSS
|
|
|
|
CheckARTSC
|
|
|
|
CheckESD
|
|
|
|
CheckNAS
|
|
|
|
CheckX11
|
|
|
|
CheckAAlib
|
|
|
|
CheckOpenGL
|
|
|
|
CheckPTHREAD
|
2004-02-12 16:29:24 +00:00
|
|
|
CheckSIGACTION
|
2002-05-28 20:01:29 +00:00
|
|
|
CheckUSBHID
|
2001-04-26 16:45:43 +00:00
|
|
|
# Set up files for the audio library
|
|
|
|
if test x$enable_audio = xyes; then
|
2001-08-09 13:09:47 +00:00
|
|
|
CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
|
2001-04-26 16:45:43 +00:00
|
|
|
AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
|
|
|
|
AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
|
|
|
|
fi
|
|
|
|
# Set up files for the cdrom library
|
|
|
|
if test x$enable_cdrom = xyes; then
|
2001-08-18 22:03:11 +00:00
|
|
|
CDROM_SUBDIRS="$CDROM_SUBDIRS openbsd"
|
|
|
|
CDROM_DRIVERS="$CDROM_DRIVERS openbsd/libcdrom_openbsd.la"
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the thread library
|
|
|
|
if test x$enable_threads = xyes; then
|
2002-06-11 19:32:57 +00:00
|
|
|
if test x$use_pthreads = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -D_POSIX_THREAD_SYSCALL_SOFT=1"
|
|
|
|
fi
|
2002-06-10 21:39:49 +00:00
|
|
|
CopyUnixThreadSource
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the timer library
|
|
|
|
if test x$enable_timers = xyes; then
|
|
|
|
COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
|
|
|
|
fi
|
|
|
|
# NetBSD does not define "unix"
|
2002-06-11 19:32:57 +00:00
|
|
|
CFLAGS="$CFLAGS -Dunix"
|
2001-04-26 16:45:43 +00:00
|
|
|
;;
|
|
|
|
*-*-openbsd*)
|
|
|
|
ARCH=openbsd
|
2001-04-26 16:50:19 +00:00
|
|
|
CheckDummyVideo
|
2001-06-16 01:51:42 +00:00
|
|
|
CheckDiskAudio
|
2002-05-19 20:06:01 +00:00
|
|
|
CheckDLOPEN
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckNASM
|
|
|
|
CheckOSS
|
|
|
|
CheckARTSC
|
|
|
|
CheckESD
|
|
|
|
CheckNAS
|
|
|
|
CheckX11
|
|
|
|
CheckAAlib
|
|
|
|
CheckOpenGL
|
|
|
|
CheckPTHREAD
|
2004-02-12 16:29:24 +00:00
|
|
|
CheckSIGACTION
|
2002-05-28 20:01:29 +00:00
|
|
|
CheckUSBHID
|
2001-04-26 16:45:43 +00:00
|
|
|
# Set up files for the audio library
|
2002-04-18 04:28:58 +00:00
|
|
|
if test x$enable_audio = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DOPENBSD_AUDIO_SUPPORT"
|
|
|
|
AUDIO_SUBDIRS="$AUDIO_SUBDIRS openbsd"
|
|
|
|
AUDIO_DRIVERS="$AUDIO_DRIVERS openbsd/libaudio_openbsd.la"
|
|
|
|
fi
|
2001-07-08 09:00:06 +00:00
|
|
|
# OpenBSD needs linking with ossaudio emulation library
|
|
|
|
if test x$have_oss = xyes; then
|
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS -lossaudio"
|
|
|
|
fi
|
2001-04-26 16:45:43 +00:00
|
|
|
# Set up files for the cdrom library
|
|
|
|
if test x$enable_cdrom = xyes; then
|
2001-08-18 22:03:11 +00:00
|
|
|
CDROM_SUBDIRS="$CDROM_SUBDIRS openbsd"
|
|
|
|
CDROM_DRIVERS="$CDROM_DRIVERS openbsd/libcdrom_openbsd.la"
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the thread library
|
|
|
|
if test x$enable_threads = xyes; then
|
2002-06-10 21:39:49 +00:00
|
|
|
CopyUnixThreadSource
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the timer library
|
|
|
|
if test x$enable_timers = xyes; then
|
|
|
|
COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
|
|
|
|
fi
|
2001-05-26 16:58:37 +00:00
|
|
|
# OpenBSD does not define "unix"
|
|
|
|
CFLAGS="$CFLAGS -Dunix"
|
2001-04-26 16:45:43 +00:00
|
|
|
;;
|
|
|
|
*-*-sysv5*)
|
|
|
|
ARCH=sysv5
|
2001-04-26 16:50:19 +00:00
|
|
|
CheckDummyVideo
|
2001-06-16 01:51:42 +00:00
|
|
|
CheckDiskAudio
|
2002-05-19 20:06:01 +00:00
|
|
|
CheckDLOPEN
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckNASM
|
|
|
|
CheckOSS
|
|
|
|
CheckARTSC
|
|
|
|
CheckESD
|
|
|
|
CheckNAS
|
|
|
|
CheckX11
|
|
|
|
CheckAAlib
|
|
|
|
CheckOpenGL
|
|
|
|
CheckPTHREAD
|
2004-02-12 16:29:24 +00:00
|
|
|
CheckSIGACTION
|
2001-04-26 16:45:43 +00:00
|
|
|
# Set up files for the audio library
|
|
|
|
if test x$enable_audio = xyes; then
|
2001-08-09 13:09:47 +00:00
|
|
|
CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
|
2001-04-26 16:45:43 +00:00
|
|
|
AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
|
|
|
|
AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
|
|
|
|
fi
|
|
|
|
# Set up files for the joystick library
|
|
|
|
# (No joystick support yet)
|
|
|
|
if test x$enable_joystick = xyes; then
|
|
|
|
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
|
|
|
|
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
|
|
|
|
fi
|
|
|
|
# Set up files for the cdrom library
|
|
|
|
if test x$enable_cdrom = xyes; then
|
2001-08-18 22:03:11 +00:00
|
|
|
CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
|
|
|
|
CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the thread library
|
|
|
|
if test x$enable_threads = xyes; then
|
2002-06-10 21:39:49 +00:00
|
|
|
CopyUnixThreadSource
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the timer library
|
|
|
|
if test x$enable_timers = xyes; then
|
|
|
|
COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*-*-solaris*)
|
|
|
|
ARCH=solaris
|
2001-04-26 16:50:19 +00:00
|
|
|
CFLAGS="$CFLAGS -D__ELF__" # Fix for nasm on Solaris x86
|
|
|
|
CheckDummyVideo
|
2001-06-16 01:51:42 +00:00
|
|
|
CheckDiskAudio
|
2002-05-19 20:06:01 +00:00
|
|
|
CheckDLOPEN
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckNASM
|
2001-05-23 00:36:17 +00:00
|
|
|
CheckOSS
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckARTSC
|
|
|
|
CheckESD
|
|
|
|
CheckNAS
|
|
|
|
CheckX11
|
|
|
|
CheckAAlib
|
|
|
|
CheckOpenGL
|
|
|
|
CheckPTHREAD
|
2004-02-12 16:29:24 +00:00
|
|
|
CheckSIGACTION
|
2001-04-26 16:45:43 +00:00
|
|
|
# Set up files for the audio library
|
|
|
|
if test x$enable_audio = xyes; then
|
2001-08-09 13:09:47 +00:00
|
|
|
CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
|
2001-04-26 16:45:43 +00:00
|
|
|
AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
|
|
|
|
AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
|
|
|
|
fi
|
|
|
|
# Set up files for the joystick library
|
|
|
|
# (No joystick support yet)
|
|
|
|
if test x$enable_joystick = xyes; then
|
|
|
|
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
|
|
|
|
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
|
|
|
|
fi
|
|
|
|
# Set up files for the cdrom library
|
|
|
|
if test x$enable_cdrom = xyes; then
|
2001-08-18 22:03:11 +00:00
|
|
|
CDROM_SUBDIRS="$CDROM_SUBDIRS linux"
|
|
|
|
CDROM_DRIVERS="$CDROM_DRIVERS linux/libcdrom_linux.la"
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the thread library
|
|
|
|
if test x$enable_threads = xyes; then
|
2002-06-10 21:39:49 +00:00
|
|
|
CopyUnixThreadSource
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the timer library
|
|
|
|
if test x$enable_timers = xyes; then
|
|
|
|
COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*-*-irix*)
|
|
|
|
ARCH=irix
|
2001-04-26 16:50:19 +00:00
|
|
|
CheckDummyVideo
|
2001-06-16 01:51:42 +00:00
|
|
|
CheckDiskAudio
|
2002-05-19 20:06:01 +00:00
|
|
|
CheckDLOPEN
|
2001-08-09 13:09:47 +00:00
|
|
|
CheckDMEDIA
|
|
|
|
CheckESD
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckNAS
|
|
|
|
CheckX11
|
|
|
|
CheckAAlib
|
|
|
|
CheckOpenGL
|
|
|
|
CheckPTHREAD
|
2004-02-12 16:29:24 +00:00
|
|
|
CheckSIGACTION
|
2001-08-09 13:09:47 +00:00
|
|
|
# We use the dmedia audio API, not the Sun audio API
|
|
|
|
#if test x$enable_audio = xyes; then
|
|
|
|
# CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
|
|
|
|
# AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
|
|
|
|
# AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
|
|
|
|
#fi
|
2001-04-26 16:45:43 +00:00
|
|
|
# Set up files for the joystick library
|
|
|
|
# (No joystick support yet)
|
|
|
|
if test x$enable_joystick = xyes; then
|
|
|
|
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
|
|
|
|
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
|
|
|
|
fi
|
|
|
|
# Set up files for the cdrom library
|
|
|
|
# (No CD-ROM support yet)
|
|
|
|
if test x$enable_cdrom = xyes; then
|
2001-08-18 22:03:11 +00:00
|
|
|
CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
|
|
|
|
CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the thread library
|
|
|
|
if test x$enable_threads = xyes; then
|
2002-06-10 21:39:49 +00:00
|
|
|
if test x$use_pthreads = xyes -o x$use_pth = xyes; then
|
|
|
|
CopyUnixThreadSource
|
2001-04-26 16:45:43 +00:00
|
|
|
else
|
|
|
|
COPY_ARCH_SRC(src/thread, irix, SDL_systhread.c)
|
|
|
|
COPY_ARCH_SRC(src/thread, irix, SDL_systhread_c.h)
|
|
|
|
COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
|
|
|
|
COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
|
|
|
|
COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
# Set up files for the timer library
|
|
|
|
if test x$enable_timers = xyes; then
|
|
|
|
COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*-*-hpux*)
|
|
|
|
ARCH=hpux
|
2001-04-26 16:50:19 +00:00
|
|
|
CheckDummyVideo
|
2001-06-16 01:51:42 +00:00
|
|
|
CheckDiskAudio
|
2002-05-19 20:06:01 +00:00
|
|
|
CheckDLOPEN
|
2001-05-23 00:36:17 +00:00
|
|
|
CheckOSS
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckNAS
|
|
|
|
CheckX11
|
|
|
|
CheckGGI
|
|
|
|
CheckAAlib
|
|
|
|
CheckOpenGL
|
|
|
|
CheckPTHREAD
|
2004-02-12 16:29:24 +00:00
|
|
|
CheckSIGACTION
|
2001-04-26 16:45:43 +00:00
|
|
|
# Set up files for the audio library
|
|
|
|
if test x$enable_audio = xyes; then
|
2001-08-09 13:09:47 +00:00
|
|
|
CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
|
2001-04-26 16:45:43 +00:00
|
|
|
AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
|
|
|
|
AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
|
|
|
|
fi
|
|
|
|
# Set up files for the joystick library
|
|
|
|
# (No joystick support yet)
|
|
|
|
if test x$enable_joystick = xyes; then
|
|
|
|
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
|
|
|
|
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
|
|
|
|
fi
|
|
|
|
# Set up files for the cdrom library
|
|
|
|
# (No CD-ROM support yet)
|
|
|
|
if test x$enable_cdrom = xyes; then
|
2001-08-18 22:03:11 +00:00
|
|
|
CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
|
|
|
|
CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the thread library
|
|
|
|
if test x$enable_threads = xyes; then
|
2002-06-10 21:39:49 +00:00
|
|
|
CopyUnixThreadSource
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the timer library
|
|
|
|
if test x$enable_timers = xyes; then
|
|
|
|
COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*-*-aix*)
|
|
|
|
ARCH=aix
|
2001-04-26 16:50:19 +00:00
|
|
|
CheckDummyVideo
|
2001-06-16 01:51:42 +00:00
|
|
|
CheckDiskAudio
|
2002-05-19 20:06:01 +00:00
|
|
|
CheckDLOPEN
|
2001-05-23 00:36:17 +00:00
|
|
|
CheckOSS
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckNAS
|
|
|
|
CheckX11
|
|
|
|
CheckGGI
|
|
|
|
CheckAAlib
|
|
|
|
CheckOpenGL
|
|
|
|
CheckPTHREAD
|
2004-02-12 16:29:24 +00:00
|
|
|
CheckSIGACTION
|
2001-04-26 16:45:43 +00:00
|
|
|
# Set up files for the audio library
|
|
|
|
if test x$enable_audio = xyes; then
|
|
|
|
AUDIO_SUBDIRS="$AUDIO_SUBDIRS paudio"
|
|
|
|
AUDIO_DRIVERS="$AUDIO_DRIVERS paudio/libaudio_paudio.la"
|
|
|
|
fi
|
|
|
|
# Set up files for the joystick library
|
|
|
|
# (No joystick support yet)
|
|
|
|
if test x$enable_joystick = xyes; then
|
|
|
|
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
|
|
|
|
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
|
|
|
|
fi
|
|
|
|
# Set up files for the cdrom library
|
|
|
|
if test x$enable_cdrom = xyes; then
|
2001-08-18 22:03:11 +00:00
|
|
|
CDROM_SUBDIRS="$CDROM_SUBDIRS aix"
|
|
|
|
CDROM_DRIVERS="$CDROM_DRIVERS aix/libcdrom_aix.la"
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the thread library
|
|
|
|
if test x$enable_threads = xyes; then
|
2002-06-10 21:39:49 +00:00
|
|
|
CopyUnixThreadSource
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the timer library
|
|
|
|
if test x$enable_timers = xyes; then
|
|
|
|
COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*-*-osf*)
|
|
|
|
ARCH=osf
|
2001-04-26 16:50:19 +00:00
|
|
|
CheckDummyVideo
|
2001-06-16 01:51:42 +00:00
|
|
|
CheckDiskAudio
|
2002-05-19 20:06:01 +00:00
|
|
|
CheckDLOPEN
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckNAS
|
|
|
|
CheckX11
|
|
|
|
CheckGGI
|
|
|
|
CheckAAlib
|
|
|
|
CheckOpenGL
|
|
|
|
CheckPTHREAD
|
2004-02-12 16:29:24 +00:00
|
|
|
CheckSIGACTION
|
2001-04-26 16:45:43 +00:00
|
|
|
# Set up files for the audio library
|
|
|
|
if test x$enable_audio = xyes; then
|
2003-07-22 14:01:21 +00:00
|
|
|
CFLAGS="$CFLAGS -I/usr/include/mme -DMMEAUDIO_SUPPORT"
|
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS -lmme"
|
|
|
|
AUDIO_SUBDIRS="$AUDIO_SUBDIRS mme"
|
|
|
|
AUDIO_DRIVERS="$AUDIO_DRIVERS mme/libaudio_mme.la"
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the joystick library
|
|
|
|
# (No joystick support yet)
|
|
|
|
if test x$enable_joystick = xyes; then
|
|
|
|
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
|
|
|
|
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
|
|
|
|
fi
|
|
|
|
# Set up files for the cdrom library
|
|
|
|
# (No cdrom support yet)
|
|
|
|
if test x$enable_cdrom = xyes; then
|
2003-07-22 14:01:21 +00:00
|
|
|
CDROM_SUBDIRS="$CDROM_SUBDIRS osf"
|
|
|
|
CDROM_DRIVERS="$CDROM_DRIVERS osf/libcdrom_osf.la"
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the thread library
|
|
|
|
if test x$enable_threads = xyes; then
|
2002-06-10 21:39:49 +00:00
|
|
|
CopyUnixThreadSource
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the timer library
|
|
|
|
if test x$enable_timers = xyes; then
|
|
|
|
COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*-*-qnx*)
|
|
|
|
ARCH=qnx
|
2001-04-26 16:50:19 +00:00
|
|
|
CheckDummyVideo
|
2001-06-16 01:51:42 +00:00
|
|
|
CheckDiskAudio
|
2004-05-06 15:55:06 +00:00
|
|
|
# CheckNASM
|
2002-05-19 20:06:01 +00:00
|
|
|
CheckDLOPEN
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckNAS
|
|
|
|
CheckPHOTON
|
|
|
|
CheckX11
|
|
|
|
CheckOpenGL
|
|
|
|
CheckPTHREAD
|
2004-02-12 16:29:24 +00:00
|
|
|
CheckSIGACTION
|
2001-04-26 16:45:43 +00:00
|
|
|
# Set up files for the audio library
|
|
|
|
if test x$enable_audio = xyes; then
|
2003-08-06 20:20:30 +00:00
|
|
|
CFLAGS="$CFLAGS -DQNXNTOAUDIO_SUPPORT"
|
2001-04-26 16:45:43 +00:00
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS -lasound"
|
|
|
|
AUDIO_SUBDIRS="$AUDIO_SUBDIRS nto"
|
|
|
|
AUDIO_DRIVERS="$AUDIO_DRIVERS nto/libaudio_nto.la"
|
|
|
|
fi
|
|
|
|
# Set up files for the joystick library
|
|
|
|
if test x$enable_joystick = xyes; then
|
|
|
|
# (No joystick support yet)
|
|
|
|
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
|
|
|
|
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
|
|
|
|
fi
|
|
|
|
# Set up files for the cdrom library
|
|
|
|
if test x$enable_cdrom = xyes; then
|
2001-08-18 22:03:11 +00:00
|
|
|
CDROM_SUBDIRS="$CDROM_SUBDIRS qnx"
|
|
|
|
CDROM_DRIVERS="$CDROM_DRIVERS qnx/libcdrom_qnx.la"
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the thread library
|
|
|
|
if test x$enable_threads = xyes; then
|
2002-06-10 21:39:49 +00:00
|
|
|
CopyUnixThreadSource
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the timer library
|
|
|
|
if test x$enable_timers = xyes; then
|
|
|
|
COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*-*-cygwin* | *-*-mingw32*)
|
|
|
|
ARCH=win32
|
|
|
|
if test "$build" != "$target"; then # cross-compiling
|
|
|
|
# Default cross-compile location
|
|
|
|
ac_default_prefix=/usr/local/cross-tools/i386-mingw32msvc
|
|
|
|
else
|
|
|
|
# Look for the location of the tools and install there
|
2003-11-24 21:57:13 +00:00
|
|
|
if test "$BUILD_PREFIX" != ""; then
|
2001-04-26 16:50:19 +00:00
|
|
|
ac_default_prefix=$BUILD_PREFIX
|
|
|
|
fi
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
2001-04-26 16:50:19 +00:00
|
|
|
CheckDummyVideo
|
2001-06-16 01:51:42 +00:00
|
|
|
CheckDiskAudio
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckWIN32
|
|
|
|
CheckDIRECTX
|
|
|
|
CheckNASM
|
|
|
|
# Set up files for the audio library
|
|
|
|
if test x$enable_audio = xyes; then
|
|
|
|
AUDIO_SUBDIRS="$AUDIO_SUBDIRS windib"
|
|
|
|
AUDIO_DRIVERS="$AUDIO_DRIVERS windib/libaudio_windib.la"
|
|
|
|
if test x$use_directx = xyes; then
|
2001-05-27 00:24:43 +00:00
|
|
|
AUDIO_SUBDIRS="$AUDIO_SUBDIRS windx5"
|
|
|
|
AUDIO_DRIVERS="$AUDIO_DRIVERS windx5/libaudio_windx5.la"
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
# Set up files for the joystick library
|
|
|
|
if test x$enable_joystick = xyes; then
|
|
|
|
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS win32"
|
|
|
|
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS win32/libjoystick_winmm.la"
|
|
|
|
fi
|
|
|
|
# Set up files for the cdrom library
|
|
|
|
if test x$enable_cdrom = xyes; then
|
2001-08-18 22:03:11 +00:00
|
|
|
CDROM_SUBDIRS="$CDROM_SUBDIRS win32"
|
|
|
|
CDROM_DRIVERS="$CDROM_DRIVERS win32/libcdrom_win32.la"
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the thread library
|
|
|
|
if test x$enable_threads = xyes; then
|
|
|
|
COPY_ARCH_SRC(src/thread, win32, SDL_systhread.c)
|
|
|
|
COPY_ARCH_SRC(src/thread, win32, SDL_systhread_c.h)
|
|
|
|
COPY_ARCH_SRC(src/thread, win32, SDL_sysmutex.c)
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
|
|
|
|
COPY_ARCH_SRC(src/thread, win32, SDL_syssem.c)
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
|
|
|
|
fi
|
|
|
|
# Set up files for the timer library
|
|
|
|
if test x$enable_timers = xyes; then
|
|
|
|
COPY_ARCH_SRC(src/timer, win32, SDL_systimer.c)
|
|
|
|
fi
|
|
|
|
# The Win32 platform requires special setup
|
|
|
|
SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
|
2001-04-26 16:50:19 +00:00
|
|
|
case "$target" in
|
|
|
|
*-*-cygwin*)
|
2002-01-10 02:00:29 +00:00
|
|
|
CFLAGS="$CFLAGS -I/usr/include/mingw -DWIN32 -Uunix -mno-cygwin"
|
|
|
|
SDL_CFLAGS="$SDL_CFLAGS -I/usr/include/mingw -DWIN32 -Uunix -mno-cygwin"
|
2001-04-26 16:50:19 +00:00
|
|
|
LIBS="$LIBS -mno-cygwin"
|
|
|
|
SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows -mno-cygwin"
|
|
|
|
;;
|
|
|
|
*-*-mingw32*)
|
|
|
|
SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows"
|
|
|
|
;;
|
|
|
|
esac
|
2001-04-26 16:45:43 +00:00
|
|
|
;;
|
|
|
|
*-*-beos*)
|
|
|
|
ARCH=beos
|
|
|
|
ac_default_prefix=/boot/develop/tools/gnupro
|
2001-04-26 16:50:19 +00:00
|
|
|
CheckDummyVideo
|
2001-06-16 01:51:42 +00:00
|
|
|
CheckDiskAudio
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckNASM
|
|
|
|
CheckBWINDOW
|
|
|
|
CheckBeGL
|
|
|
|
# Set up files for the audio library
|
|
|
|
if test x$enable_audio = xyes; then
|
|
|
|
AUDIO_SUBDIRS="$AUDIO_SUBDIRS baudio"
|
|
|
|
AUDIO_DRIVERS="$AUDIO_DRIVERS baudio/libaudio_baudio.la"
|
|
|
|
fi
|
|
|
|
# Set up files for the joystick library
|
|
|
|
if test x$enable_joystick = xyes; then
|
|
|
|
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS beos"
|
|
|
|
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS beos/libjoystick_beos.la"
|
|
|
|
fi
|
|
|
|
# Set up files for the cdrom library
|
|
|
|
if test x$enable_cdrom = xyes; then
|
2001-08-18 22:03:11 +00:00
|
|
|
CDROM_SUBDIRS="$CDROM_SUBDIRS beos"
|
|
|
|
CDROM_DRIVERS="$CDROM_DRIVERS beos/libcdrom_beos.la"
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the thread library
|
|
|
|
if test x$enable_threads = xyes; then
|
|
|
|
COPY_ARCH_SRC(src/thread, beos, SDL_systhread.c)
|
|
|
|
COPY_ARCH_SRC(src/thread, beos, SDL_systhread_c.h)
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
|
|
|
|
COPY_ARCH_SRC(src/thread, beos, SDL_syssem.c)
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
|
|
|
|
fi
|
|
|
|
# Set up files for the timer library
|
|
|
|
if test x$enable_timers = xyes; then
|
|
|
|
COPY_ARCH_SRC(src/timer, beos, SDL_systimer.c)
|
|
|
|
fi
|
|
|
|
# The BeOS platform requires special libraries
|
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
|
|
|
|
;;
|
|
|
|
*-*-macos*)
|
|
|
|
# This would be used if cross-compiling to MacOS 9. No way to
|
|
|
|
# use it at present, but Apple is working on a X-to-9 compiler
|
|
|
|
# for which this case would be handy.
|
|
|
|
ARCH=macos
|
2001-04-26 16:50:19 +00:00
|
|
|
CheckDummyVideo
|
2001-06-16 01:51:42 +00:00
|
|
|
CheckDiskAudio
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckTOOLBOX
|
|
|
|
CheckMacGL
|
|
|
|
# Set up files for the audio library
|
|
|
|
if test x$enable_audio = xyes; then
|
|
|
|
AUDIO_SUBDIRS="$AUDIO_SUBDIRS macrom"
|
|
|
|
AUDIO_DRIVERS="$AUDIO_DRIVERS macrom/libaudio_macrom.la"
|
|
|
|
fi
|
|
|
|
# Set up files for the joystick library
|
|
|
|
if test x$enable_joystick = xyes; then
|
|
|
|
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS macos"
|
|
|
|
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS macos/libjoystick_macos.la"
|
|
|
|
fi
|
|
|
|
# Set up files for the cdrom library
|
|
|
|
if test x$enable_cdrom = xyes; then
|
2001-08-18 22:03:11 +00:00
|
|
|
CDROM_SUBDIRS="$CDROM_SUBDIRS macos"
|
|
|
|
CDROM_DRIVERS="$CDROM_DRIVERS macos/libcdrom_macos.la"
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the thread library
|
|
|
|
if test x$enable_threads = xyes; then
|
|
|
|
COPY_ARCH_SRC(src/thread, macos, SDL_systhread.c)
|
|
|
|
COPY_ARCH_SRC(src/thread, macos, SDL_systhread_c.h)
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
|
|
|
|
COPY_ARCH_SRC(src/thread, macos, SDL_syssem.c)
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
|
|
|
|
COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
|
|
|
|
fi
|
|
|
|
# Set up files for the timer library
|
|
|
|
if test x$enable_timers = xyes; then
|
|
|
|
COPY_ARCH_SRC(src/timer, macos, SDL_systimer.c)
|
|
|
|
fi
|
|
|
|
# The MacOS platform requires special setup
|
|
|
|
SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
|
|
|
|
SDL_LIBS="-lSDLmain $SDL_LIBS"
|
|
|
|
;;
|
|
|
|
*-*-darwin* )
|
|
|
|
# Strictly speaking, we want "Mac OS X", not "Darwin", which is
|
2001-08-21 07:19:59 +00:00
|
|
|
# just the OS X kernel sans upper layers like Carbon and Cocoa.
|
|
|
|
# But config.guess comes back with "darwin", so go with the flow.
|
|
|
|
ARCH=macosx
|
2001-04-26 16:50:19 +00:00
|
|
|
CheckDummyVideo
|
2001-06-16 01:51:42 +00:00
|
|
|
CheckDiskAudio
|
2001-08-21 07:19:59 +00:00
|
|
|
CheckQUARTZ
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckMacGL
|
|
|
|
CheckPTHREAD
|
2004-02-12 16:29:24 +00:00
|
|
|
CheckSIGACTION
|
2004-08-21 02:06:30 +00:00
|
|
|
# If either the audio or CD driver is used, add the AudioUnit framework
|
|
|
|
if test x$enable_audio = xyes -o x$enable_cdrom = xyes; then
|
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS -framework AudioToolbox -framework AudioUnit"
|
|
|
|
fi
|
2001-04-26 16:45:43 +00:00
|
|
|
# Set up files for the audio library
|
|
|
|
if test x$enable_audio = xyes; then
|
2004-08-21 03:21:44 +00:00
|
|
|
AUDIO_SUBDIRS="$AUDIO_SUBDIRS macosx"
|
|
|
|
AUDIO_DRIVERS="$AUDIO_DRIVERS macosx/libaudio_macosx.la"
|
2001-04-26 16:45:43 +00:00
|
|
|
AUDIO_SUBDIRS="$AUDIO_SUBDIRS macrom"
|
|
|
|
AUDIO_DRIVERS="$AUDIO_DRIVERS macrom/libaudio_macrom.la"
|
|
|
|
fi
|
|
|
|
# Set up files for the joystick library
|
|
|
|
if test x$enable_joystick = xyes; then
|
Date: Sat, 8 Sep 2001 04:42:23 +0200
From: Max Horn <max@quendi.de>
Subject: SDL/OSX: Joystick; Better key handling
I just finished implementing improved keyhandling for OS X (in fact
the code should be easily ported to the "normal" MacOS part of SDL, I
just had no chance yet). Works like this:
First init the mapping table statically like before. Them, it queries
the OS for the "official" key table, then iterates over all 127
scancode and gets the associates ascii code. It ignores everythng
below 32 (has to, as it would lead to many problems if we did not...
e.g. both ESC and NUM LOCk produce an ascii code 27 on my keyboard),
and all stuff above 127 is mapped to SDLK_WORLD_* simply in the order
it is encountered.
In addition, caps lock is now working, too.
The code work flawless for me, but since I only have one keyboard, I
may have not encountered some serious problem... but I am pretty
confident that it is better than the old code in most cases.
The joystick driver works fine for me, too. I think it can be added
to CVS already. It would simply be helpful if more people would test
it. Hm, I wonder if Maelstrom or GLTron has Joystick support? That
would be a wonderful test application :)
I also took the liberty of modifying some text files like BUGS,
README.CVS, README.MacOSX (which now contains the OS X docs I long
promised)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40173
2001-09-11 19:00:18 +00:00
|
|
|
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS darwin"
|
|
|
|
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS darwin/libjoystick_darwin.la"
|
2002-06-01 18:48:13 +00:00
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS -framework IOKit"
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the cdrom library
|
|
|
|
if test x$enable_cdrom = xyes; then
|
2004-01-04 16:20:28 +00:00
|
|
|
CDROM_SUBDIRS="$CDROM_SUBDIRS macosx"
|
|
|
|
CDROM_DRIVERS="$CDROM_DRIVERS macosx/libcdrom_macosx.la"
|
2004-08-21 02:06:30 +00:00
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS -lstdc++"
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the thread library
|
|
|
|
if test x$enable_threads = xyes; then
|
2002-06-10 21:39:49 +00:00
|
|
|
CopyUnixThreadSource
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the timer library
|
|
|
|
if test x$enable_timers = xyes; then
|
|
|
|
COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
|
|
|
|
fi
|
2002-06-01 18:48:13 +00:00
|
|
|
# The MacOS X platform requires special setup.
|
|
|
|
SDL_LIBS="-lSDLmain $SDL_LIBS"
|
|
|
|
# The Cocoa backend still needs Carbon, and the YUV code QuickTime
|
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS -framework Cocoa -framework Carbon -framework QuickTime"
|
2001-04-26 16:45:43 +00:00
|
|
|
;;
|
2002-02-17 19:54:28 +00:00
|
|
|
*-*-mint*)
|
|
|
|
ARCH=mint
|
|
|
|
CheckDummyVideo
|
|
|
|
CheckDiskAudio
|
|
|
|
CheckAtariBiosEvent
|
|
|
|
CheckAtariXbiosVideo
|
|
|
|
CheckAtariGemVideo
|
2002-06-10 20:42:53 +00:00
|
|
|
CheckAtariAudio
|
2003-07-16 11:54:13 +00:00
|
|
|
CheckAtariLdg
|
2002-02-17 19:54:28 +00:00
|
|
|
CheckPTH
|
|
|
|
# Set up files for the audio library
|
2002-06-10 20:42:53 +00:00
|
|
|
if test x$enable_threads = xyes -a x$enable_pth = xyes; then
|
|
|
|
if test x$enable_audio = xyes; then
|
|
|
|
CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
|
|
|
|
AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
|
|
|
|
AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
|
|
|
|
fi
|
2002-02-17 19:54:28 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the joystick library
|
|
|
|
if test x$enable_joystick = xyes; then
|
2002-03-07 20:23:11 +00:00
|
|
|
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS mint"
|
|
|
|
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS mint/libjoystick_mint.la"
|
2002-02-17 19:54:28 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the cdrom library
|
|
|
|
if test x$enable_cdrom = xyes; then
|
2003-09-27 08:20:26 +00:00
|
|
|
CDROM_SUBDIRS="$CDROM_SUBDIRS mint"
|
|
|
|
CDROM_DRIVERS="$CDROM_DRIVERS mint/libcdrom_mint.la"
|
2002-02-17 19:54:28 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the thread library
|
|
|
|
if test x$enable_threads = xyes; then
|
2002-06-10 21:39:49 +00:00
|
|
|
CopyUnixThreadSource
|
2002-02-17 19:54:28 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the timer library
|
|
|
|
if test x$enable_timers = xyes; then
|
2002-12-07 06:54:47 +00:00
|
|
|
if test x$enable_threads = xyes -a x$enable_pth = xyes; then
|
|
|
|
COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
|
|
|
|
else
|
|
|
|
COPY_ARCH_SRC(src/timer, mint, SDL_systimer.c)
|
|
|
|
fi
|
2002-02-17 19:54:28 +00:00
|
|
|
fi
|
|
|
|
# MiNT does not define "unix"
|
|
|
|
CFLAGS="$CFLAGS -Dunix"
|
|
|
|
;;
|
2003-08-11 22:28:13 +00:00
|
|
|
*-*-riscos)
|
|
|
|
ARCH=riscos
|
|
|
|
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS riscos"
|
|
|
|
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS riscos/libjoystick_riscos.la"
|
|
|
|
COPY_ARCH_SRC(src/timer, riscos, SDL_systimer.c)
|
|
|
|
VIDEO_SUBDIRS="$VIDEO_SUBDIRS riscos"
|
|
|
|
VIDEO_DRIVERS="$VIDEO_DRIVERS riscos/libvideo_riscos.la"
|
|
|
|
AUDIO_SUBDIRS="$AUDIO_SUBDIRS riscos"
|
|
|
|
AUDIO_DRIVERS="$AUDIO_DRIVERS riscos/libaudio_riscos.la"
|
|
|
|
|
|
|
|
if test x$enable_cdrom = xyes; then
|
|
|
|
CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
|
|
|
|
CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
|
|
|
|
fi
|
|
|
|
|
|
|
|
CFLAGS="$CFLAGS -DDISABLE_THREADS -DENABLE_RISCOS -DDRENDERER_SUPPORT"
|
|
|
|
|
|
|
|
SYSTEM_LIBS="$SYSTEM_LIBS -ljpeg -ltiff -lpng -lz"
|
|
|
|
;;
|
2001-04-26 16:45:43 +00:00
|
|
|
*)
|
|
|
|
AC_MSG_ERROR(Unsupported target: Please add to configure.in)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
AC_SUBST(ARCH)
|
|
|
|
|
|
|
|
# Set the conditional variables for this target
|
|
|
|
AM_CONDITIONAL(TARGET_LINUX, test $ARCH = linux)
|
2002-05-19 20:06:01 +00:00
|
|
|
AM_CONDITIONAL(TARGET_QTOPIA, test "x$video_qtopia" = "xyes")
|
2001-04-26 16:45:43 +00:00
|
|
|
AM_CONDITIONAL(TARGET_SOLARIS, test $ARCH = solaris)
|
|
|
|
AM_CONDITIONAL(TARGET_IRIX, test $ARCH = irix)
|
|
|
|
AM_CONDITIONAL(TARGET_BSDI, test $ARCH = bsdi)
|
|
|
|
AM_CONDITIONAL(TARGET_FREEBSD, test $ARCH = freebsd)
|
2001-05-27 00:15:42 +00:00
|
|
|
AM_CONDITIONAL(TARGET_NETBSD, test $ARCH = netbsd)
|
2001-04-26 16:45:43 +00:00
|
|
|
AM_CONDITIONAL(TARGET_OPENBSD, test $ARCH = openbsd)
|
|
|
|
AM_CONDITIONAL(TARGET_AIX, test $ARCH = aix)
|
|
|
|
AM_CONDITIONAL(TARGET_WIN32, test $ARCH = win32)
|
|
|
|
AM_CONDITIONAL(TARGET_BEOS, test $ARCH = beos)
|
|
|
|
AM_CONDITIONAL(TARGET_MACOS, test $ARCH = macos)
|
2001-08-21 07:19:59 +00:00
|
|
|
AM_CONDITIONAL(TARGET_MACOSX, test $ARCH = macosx)
|
2002-02-14 02:15:15 +00:00
|
|
|
AM_CONDITIONAL(TARGET_QNX, test $ARCH = qnx)
|
2002-02-17 19:54:28 +00:00
|
|
|
AM_CONDITIONAL(TARGET_MINT, test $ARCH = mint)
|
2001-04-26 16:45:43 +00:00
|
|
|
|
2002-06-01 18:48:13 +00:00
|
|
|
# More automake conditionals
|
|
|
|
AM_CONDITIONAL(USE_DIRECTX, test x$use_directx = xyes)
|
|
|
|
AM_CONDITIONAL(USE_CLONE, test x$use_clone = xyes)
|
2003-11-18 01:27:06 +00:00
|
|
|
AM_CONDITIONAL(HAVE_NASM, test x$use_nasm = xyes)
|
2002-06-01 18:48:13 +00:00
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
# Set conditional variables for shared and static library selection.
|
|
|
|
# These are not used in any Makefile.am but in sdl-config.in.
|
|
|
|
AM_CONDITIONAL([ENABLE_SHARED], [test "$enable_shared" = yes])
|
|
|
|
AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = yes])
|
|
|
|
|
|
|
|
# Set runtime shared library paths as needed
|
|
|
|
|
|
|
|
if test $ARCH = linux -o $ARCH = freebsd -o $ARCH = bsdi; then
|
|
|
|
SDL_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib"
|
|
|
|
fi
|
|
|
|
if test $ARCH = solaris; then
|
|
|
|
SDL_RLD_FLAGS="-R\${exec_prefix}/lib"
|
|
|
|
fi
|
2002-06-01 18:48:13 +00:00
|
|
|
|
|
|
|
case "$ARCH" in
|
2002-06-11 19:32:57 +00:00
|
|
|
openbsd | netbsd | bsdi)
|
2001-12-18 00:18:49 +00:00
|
|
|
SHARED_SYSTEM_LIBS="$SYSTEM_LIBS"
|
2002-06-01 18:48:13 +00:00
|
|
|
;;
|
Date: Sat, 2 Aug 2003 16:22:51 +0300
From: "Mike Gorchak"
Subject: New patches for QNX6
Here my patches for the SDL/QNX:
QNXSDL.diff - diff to non-QNX related sources:
- updated BUGS file, I think QNX6 is now will be officially supported
- configure.in - added shared library support for QNX, and removed dependency between the ALSA and QNX6.
- SDL_audio.c - added QNX NTO sound bootstrap insted of ALSA's.
- SDL_sysaudio.h - the same.
- SDL_nto_audio.c - the same.
- SDL_video.c - right now, QNX doesn't offer any method to obtain pointers to the OpenGL functions by function name, so they must be hardcoded in library, otherwise OpenGL will not be supported.
- testsprite.c - fixed: do not draw vertical red line if we are in non-double-buffered mode.
sdlqnxph.tar.gz - archive of the ./src/video/photon/* . Too many changes in code to make diffs :) :
+ Added stub for support hide/unhide window event
+ Added full YUV overlays support.
+ Added window maximize support.
+ Added mouse wheel events.
+ Added support for some specific key codes in Unicode mode (like ESC).
+ Added more checks to the all memory allocation code.
+ Added SDL_DOUBLEBUF support in all fullscreen modes.
+ Added fallback to window mode, if desired fullscreen mode is not supported.
+ Added stub support for the GL_LoadLibrary and GL_GetProcAddress functions.
+ Added resizable window support without caption.
! Fixed bug in the Ph_EV_EXPOSE event handler, when rectangles to update is 0 and when width or height of the rectangle is 0.
! Fixed bug in the event handler code. Events has not been passed to the window widget handler.
! Fixed codes for Win keys (Super/Hyper/Menu).
! Fixed memory leak, when deallocation palette.
! Fixed palette emulation code bugs.
! Fixed fullscreen and hwsurface handling.
! Fixed CLOSE button bug. First event was passed to the handler, but second terminated the application. Now all events passed to the application correctly.
- Removed all printfs in code, now SDL_SetError used instead of them.
- Disabled ToggleFullScreen function.
README.QNX - updated README.QNX file. Added much more issues.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40664
2003-08-04 00:52:42 +00:00
|
|
|
qnx)
|
|
|
|
SHARED_SYSTEM_LIBS="$SYSTEM_LIBS"
|
|
|
|
;;
|
2002-06-01 18:48:13 +00:00
|
|
|
macosx)
|
|
|
|
SHARED_SYSTEM_LIBS="-framework Cocoa"
|
|
|
|
if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
|
|
|
|
SHARED_SYSTEM_LIBS="$SHARED_SYSTEM_LIBS -framework OpenGL"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*)
|
2001-12-18 00:18:49 +00:00
|
|
|
SHARED_SYSTEM_LIBS=""
|
2002-06-01 18:48:13 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2004-02-11 07:09:11 +00:00
|
|
|
case "$ARCH" in
|
|
|
|
macosx)
|
|
|
|
# Evil hack to allow static linking on Mac OS X
|
|
|
|
SDL_STATIC_LIBS="\${exec_prefix}/lib/libSDLmain.a \${exec_prefix}/lib/libSDL.a"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
SDL_STATIC_LIBS="$SDL_LIBS"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
2001-12-18 00:18:49 +00:00
|
|
|
STATIC_SYSTEM_LIBS="$SYSTEM_LIBS"
|
2001-04-26 16:50:19 +00:00
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
dnl Output the video drivers we use
|
|
|
|
if test x$enable_video = xtrue; then
|
|
|
|
if test "$VIDEO_SUBDIRS" = ""; then
|
|
|
|
AC_MSG_ERROR(*** No video drivers are enabled!)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
AC_SUBST(AUDIO_SUBDIRS)
|
|
|
|
AC_SUBST(AUDIO_DRIVERS)
|
|
|
|
AC_SUBST(VIDEO_SUBDIRS)
|
|
|
|
AC_SUBST(VIDEO_DRIVERS)
|
|
|
|
AC_SUBST(JOYSTICK_SUBDIRS)
|
|
|
|
AC_SUBST(JOYSTICK_DRIVERS)
|
2001-08-18 22:03:11 +00:00
|
|
|
AC_SUBST(CDROM_SUBDIRS)
|
|
|
|
AC_SUBST(CDROM_DRIVERS)
|
2001-04-26 16:45:43 +00:00
|
|
|
AC_SUBST(SDL_EXTRADIRS)
|
|
|
|
AC_SUBST(SDL_EXTRALIBS)
|
|
|
|
|
|
|
|
dnl Expand the cflags and libraries needed by apps using SDL
|
|
|
|
AC_SUBST(SDL_CFLAGS)
|
|
|
|
AC_SUBST(SDL_LIBS)
|
2004-02-11 07:09:11 +00:00
|
|
|
AC_SUBST(SDL_STATIC_LIBS)
|
2001-04-26 16:45:43 +00:00
|
|
|
AC_SUBST(SDL_RLD_FLAGS)
|
|
|
|
|
2001-12-18 00:18:49 +00:00
|
|
|
dnl Expand the libraries needed for static and dynamic linking
|
|
|
|
AC_SUBST(STATIC_SYSTEM_LIBS)
|
|
|
|
AC_SUBST(SHARED_SYSTEM_LIBS)
|
2002-01-04 20:48:51 +00:00
|
|
|
AC_SUBST(SYSTEM_LIBS)
|
2001-12-18 00:18:49 +00:00
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
dnl Expand the include directories for building SDL
|
|
|
|
CFLAGS="$CFLAGS -I\$(top_srcdir)/include"
|
|
|
|
CFLAGS="$CFLAGS -I\$(top_srcdir)/include/SDL"
|
2003-12-18 05:01:47 +00:00
|
|
|
CFLAGS="$CFLAGS -I\$(top_srcdir)/src -I\$(top_srcdir)/src/main/$ARCH"
|
2001-04-26 16:45:43 +00:00
|
|
|
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/audio"
|
|
|
|
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video"
|
2002-03-05 19:55:32 +00:00
|
|
|
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video/XFree86/extensions"
|
2001-04-26 16:45:43 +00:00
|
|
|
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/events"
|
|
|
|
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/joystick"
|
|
|
|
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/cdrom"
|
|
|
|
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/thread"
|
|
|
|
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/timer"
|
|
|
|
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/endian"
|
|
|
|
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/file"
|
2003-09-24 21:45:27 +00:00
|
|
|
CFLAGS="$CFLAGS -I\$(top_builddir)/src/thread"
|
2001-04-26 16:45:43 +00:00
|
|
|
CXXFLAGS="$CFLAGS"
|
|
|
|
|
2001-08-21 07:19:59 +00:00
|
|
|
|
|
|
|
# Check for darwin at the very end and set up the Objective C compiler
|
|
|
|
# We do this here so that we get the full CFLAGS into OBJCFLAGS
|
|
|
|
case "$target" in
|
|
|
|
*-*-darwin*)
|
2003-08-09 18:19:42 +00:00
|
|
|
dnl AC_PROG_OBJC doesn't seem to exist, this is the SDL workaround
|
|
|
|
AC_MSG_CHECKING(for an Objective-C compiler)
|
|
|
|
OBJC="$CC"
|
2001-08-21 07:19:59 +00:00
|
|
|
AC_SUBST(OBJC)
|
2003-08-09 18:19:42 +00:00
|
|
|
OBJCFLAGS="$CFLAGS"
|
2001-08-21 07:19:59 +00:00
|
|
|
AC_SUBST(OBJCFLAGS)
|
2003-08-09 18:19:42 +00:00
|
|
|
dnl _AM_DEPENDENCIES(OBJC) doesn't work, so hard code OBJCDEPMODE here
|
2003-08-09 21:14:26 +00:00
|
|
|
dnl _AM_DEPENDENCIES(OBJC)
|
2003-08-27 05:14:40 +00:00
|
|
|
dnl Of course, hard coding doesn't work for some versions of automake
|
|
|
|
OBJCDEPMODE="depmode=gcc"
|
|
|
|
AC_SUBST(OBJCDEPMODE)
|
2003-08-09 22:13:38 +00:00
|
|
|
dnl Trying this to satisfy everybody...
|
2003-08-09 18:19:42 +00:00
|
|
|
AC_MSG_RESULT(not implemented yet)
|
2001-08-21 07:19:59 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
# Finally create all the generated files
|
|
|
|
dnl Important: Any directory that you want to be in the distcheck should
|
|
|
|
dnl have a file listed here, so that configure generates the
|
|
|
|
dnl subdirectories on the build target.
|
|
|
|
AC_OUTPUT([
|
|
|
|
Makefile
|
|
|
|
docs/Makefile
|
|
|
|
docs/html/Makefile
|
|
|
|
docs/man3/Makefile
|
|
|
|
include/Makefile
|
|
|
|
src/Makefile
|
|
|
|
src/main/Makefile
|
2001-09-04 23:18:45 +00:00
|
|
|
src/main/macosx/Makefile
|
Date: Sat, 8 Sep 2001 04:42:23 +0200
From: Max Horn <max@quendi.de>
Subject: SDL/OSX: Joystick; Better key handling
I just finished implementing improved keyhandling for OS X (in fact
the code should be easily ported to the "normal" MacOS part of SDL, I
just had no chance yet). Works like this:
First init the mapping table statically like before. Them, it queries
the OS for the "official" key table, then iterates over all 127
scancode and gets the associates ascii code. It ignores everythng
below 32 (has to, as it would lead to many problems if we did not...
e.g. both ESC and NUM LOCk produce an ascii code 27 on my keyboard),
and all stuff above 127 is mapped to SDLK_WORLD_* simply in the order
it is encountered.
In addition, caps lock is now working, too.
The code work flawless for me, but since I only have one keyboard, I
may have not encountered some serious problem... but I am pretty
confident that it is better than the old code in most cases.
The joystick driver works fine for me, too. I think it can be added
to CVS already. It would simply be helpful if more people would test
it. Hm, I wonder if Maelstrom or GLTron has Joystick support? That
would be a wonderful test application :)
I also took the liberty of modifying some text files like BUGS,
README.CVS, README.MacOSX (which now contains the OS X docs I long
promised)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40173
2001-09-11 19:00:18 +00:00
|
|
|
src/main/macosx/Info.plist
|
2003-06-28 21:38:14 +00:00
|
|
|
src/audio/Makefile
|
2001-04-26 16:45:43 +00:00
|
|
|
src/audio/alsa/Makefile
|
|
|
|
src/audio/arts/Makefile
|
|
|
|
src/audio/baudio/Makefile
|
2002-10-06 18:38:12 +00:00
|
|
|
src/audio/dc/Makefile
|
2003-03-09 21:38:18 +00:00
|
|
|
src/audio/disk/Makefile
|
2001-04-26 16:45:43 +00:00
|
|
|
src/audio/dma/Makefile
|
|
|
|
src/audio/dmedia/Makefile
|
|
|
|
src/audio/dsp/Makefile
|
|
|
|
src/audio/esd/Makefile
|
2004-08-21 02:06:30 +00:00
|
|
|
src/audio/macosx/Makefile
|
2001-04-26 16:45:43 +00:00
|
|
|
src/audio/macrom/Makefile
|
2003-03-09 21:38:18 +00:00
|
|
|
src/audio/mint/Makefile
|
2003-07-22 14:01:21 +00:00
|
|
|
src/audio/mme/Makefile
|
2001-04-26 16:45:43 +00:00
|
|
|
src/audio/nas/Makefile
|
|
|
|
src/audio/nto/Makefile
|
2001-05-26 16:58:37 +00:00
|
|
|
src/audio/openbsd/Makefile
|
2001-04-26 16:45:43 +00:00
|
|
|
src/audio/paudio/Makefile
|
2003-07-09 15:38:28 +00:00
|
|
|
src/audio/riscos/Makefile
|
2001-04-26 16:45:43 +00:00
|
|
|
src/audio/sun/Makefile
|
|
|
|
src/audio/ums/Makefile
|
|
|
|
src/audio/windib/Makefile
|
|
|
|
src/audio/windx5/Makefile
|
|
|
|
src/video/Makefile
|
2003-03-09 21:38:18 +00:00
|
|
|
src/video/aalib/Makefile
|
|
|
|
src/video/ataricommon/Makefile
|
|
|
|
src/video/bwindow/Makefile
|
2001-04-26 16:45:43 +00:00
|
|
|
src/video/cybergfx/Makefile
|
2003-03-09 21:38:18 +00:00
|
|
|
src/video/dc/Makefile
|
2001-04-26 16:45:43 +00:00
|
|
|
src/video/dga/Makefile
|
2001-09-04 22:53:46 +00:00
|
|
|
src/video/directfb/Makefile
|
2003-03-09 21:38:18 +00:00
|
|
|
src/video/dummy/Makefile
|
|
|
|
src/video/epoc/Makefile
|
|
|
|
src/video/fbcon/Makefile
|
|
|
|
src/video/gem/Makefile
|
2001-04-26 16:45:43 +00:00
|
|
|
src/video/ggi/Makefile
|
|
|
|
src/video/maccommon/Makefile
|
|
|
|
src/video/macdsp/Makefile
|
|
|
|
src/video/macrom/Makefile
|
2003-03-09 21:38:18 +00:00
|
|
|
src/video/nanox/Makefile
|
|
|
|
src/video/photon/Makefile
|
|
|
|
src/video/picogui/Makefile
|
|
|
|
src/video/ps2gs/Makefile
|
|
|
|
src/video/qtopia/Makefile
|
2001-06-07 14:28:11 +00:00
|
|
|
src/video/quartz/Makefile
|
2003-07-09 15:38:28 +00:00
|
|
|
src/video/riscos/Makefile
|
2001-04-26 16:45:43 +00:00
|
|
|
src/video/svga/Makefile
|
2001-06-19 13:33:54 +00:00
|
|
|
src/video/vgl/Makefile
|
2001-04-26 16:45:43 +00:00
|
|
|
src/video/wincommon/Makefile
|
|
|
|
src/video/windib/Makefile
|
|
|
|
src/video/windx5/Makefile
|
2003-03-09 21:38:18 +00:00
|
|
|
src/video/x11/Makefile
|
2002-02-17 19:54:28 +00:00
|
|
|
src/video/xbios/Makefile
|
2003-03-09 21:38:18 +00:00
|
|
|
src/video/XFree86/Makefile
|
2003-06-28 21:38:14 +00:00
|
|
|
src/video/XFree86/extensions/Makefile
|
2003-03-09 21:38:18 +00:00
|
|
|
src/video/XFree86/Xinerama/Makefile
|
|
|
|
src/video/XFree86/Xv/Makefile
|
|
|
|
src/video/XFree86/Xxf86dga/Makefile
|
|
|
|
src/video/XFree86/Xxf86vm/Makefile
|
2001-04-26 16:45:43 +00:00
|
|
|
src/events/Makefile
|
|
|
|
src/joystick/Makefile
|
2001-05-10 20:13:29 +00:00
|
|
|
src/joystick/amigaos/Makefile
|
2001-04-26 16:45:43 +00:00
|
|
|
src/joystick/beos/Makefile
|
2002-02-17 19:54:28 +00:00
|
|
|
src/joystick/bsd/Makefile
|
Date: Sat, 8 Sep 2001 04:42:23 +0200
From: Max Horn <max@quendi.de>
Subject: SDL/OSX: Joystick; Better key handling
I just finished implementing improved keyhandling for OS X (in fact
the code should be easily ported to the "normal" MacOS part of SDL, I
just had no chance yet). Works like this:
First init the mapping table statically like before. Them, it queries
the OS for the "official" key table, then iterates over all 127
scancode and gets the associates ascii code. It ignores everythng
below 32 (has to, as it would lead to many problems if we did not...
e.g. both ESC and NUM LOCk produce an ascii code 27 on my keyboard),
and all stuff above 127 is mapped to SDLK_WORLD_* simply in the order
it is encountered.
In addition, caps lock is now working, too.
The code work flawless for me, but since I only have one keyboard, I
may have not encountered some serious problem... but I am pretty
confident that it is better than the old code in most cases.
The joystick driver works fine for me, too. I think it can be added
to CVS already. It would simply be helpful if more people would test
it. Hm, I wonder if Maelstrom or GLTron has Joystick support? That
would be a wonderful test application :)
I also took the liberty of modifying some text files like BUGS,
README.CVS, README.MacOSX (which now contains the OS X docs I long
promised)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40173
2001-09-11 19:00:18 +00:00
|
|
|
src/joystick/darwin/Makefile
|
2002-10-06 18:38:12 +00:00
|
|
|
src/joystick/dc/Makefile
|
2001-04-26 16:45:43 +00:00
|
|
|
src/joystick/dummy/Makefile
|
|
|
|
src/joystick/linux/Makefile
|
|
|
|
src/joystick/macos/Makefile
|
2002-03-07 20:23:11 +00:00
|
|
|
src/joystick/mint/Makefile
|
2003-07-09 15:38:28 +00:00
|
|
|
src/joystick/riscos/Makefile
|
2001-04-26 16:45:43 +00:00
|
|
|
src/joystick/win32/Makefile
|
|
|
|
src/cdrom/Makefile
|
2001-08-18 22:03:11 +00:00
|
|
|
src/cdrom/aix/Makefile
|
|
|
|
src/cdrom/beos/Makefile
|
2002-10-06 18:38:12 +00:00
|
|
|
src/cdrom/dc/Makefile
|
2001-08-18 22:03:11 +00:00
|
|
|
src/cdrom/dummy/Makefile
|
2001-09-13 15:57:48 +00:00
|
|
|
src/cdrom/bsdi/Makefile
|
2001-08-18 22:03:11 +00:00
|
|
|
src/cdrom/freebsd/Makefile
|
|
|
|
src/cdrom/linux/Makefile
|
|
|
|
src/cdrom/macos/Makefile
|
2003-04-15 16:33:56 +00:00
|
|
|
src/cdrom/macosx/Makefile
|
2003-09-27 08:20:26 +00:00
|
|
|
src/cdrom/mint/Makefile
|
2001-08-18 22:03:11 +00:00
|
|
|
src/cdrom/openbsd/Makefile
|
2003-07-22 14:01:21 +00:00
|
|
|
src/cdrom/osf/Makefile
|
2001-08-18 22:03:11 +00:00
|
|
|
src/cdrom/qnx/Makefile
|
|
|
|
src/cdrom/win32/Makefile
|
2001-04-26 16:45:43 +00:00
|
|
|
src/thread/Makefile
|
|
|
|
src/timer/Makefile
|
|
|
|
src/endian/Makefile
|
|
|
|
src/file/Makefile
|
2003-11-18 01:27:06 +00:00
|
|
|
src/cpuinfo/Makefile
|
2001-04-26 16:45:43 +00:00
|
|
|
src/hermes/Makefile
|
|
|
|
sdl-config
|
|
|
|
SDL.spec
|
2003-08-23 23:25:46 +00:00
|
|
|
SDL.qpg
|
2001-04-26 16:45:43 +00:00
|
|
|
], [chmod +x sdl-config])
|