2001-04-26 16:45:43 +00:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
AC_INIT(README)
|
2006-02-07 12:11:33 +00:00
|
|
|
AC_CONFIG_HEADER(include/SDL_config.h)
|
2006-02-09 09:07:13 +00:00
|
|
|
AC_GNU_SOURCE
|
2001-04-26 16:45:43 +00:00
|
|
|
|
|
|
|
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
|
2006-01-04 01:08:40 +00:00
|
|
|
SDL_MICRO_VERSION=10
|
|
|
|
SDL_INTERFACE_AGE=3
|
|
|
|
SDL_BINARY_AGE=10
|
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
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_CONFIG_AUX_DIRS($srcdir/build-scripts)
|
2002-12-07 06:54:47 +00:00
|
|
|
AC_CANONICAL_SYSTEM
|
2006-02-09 09:38:05 +00:00
|
|
|
AC_C_BIGENDIAN
|
|
|
|
if test x$ac_cv_c_bigendian = xyes; then
|
|
|
|
AC_DEFINE(SDL_BYTEORDER, 4321)
|
|
|
|
else
|
|
|
|
AC_DEFINE(SDL_BYTEORDER, 1234)
|
|
|
|
fi
|
2001-04-26 16:45:43 +00:00
|
|
|
|
2006-02-20 11:30:29 +00:00
|
|
|
dnl Set up the compiler and linker flags
|
|
|
|
INCLUDE="-I$srcdir/include"
|
|
|
|
if test x$srcdir != x.; then
|
|
|
|
INCLUDE="-Iinclude $INCLUDE"
|
|
|
|
fi
|
2006-02-16 20:17:43 +00:00
|
|
|
case "$target" in
|
|
|
|
*-*-cygwin*)
|
|
|
|
# We build SDL on cygwin without the UNIX emulation layer
|
2006-02-21 08:46:50 +00:00
|
|
|
CFLAGS="$CFLAGS -I/usr/include/mingw -mno-cygwin"
|
2006-02-20 11:30:29 +00:00
|
|
|
BUILD_CFLAGS="$CFLAGS \$(INCLUDE)"
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$LDFLAGS -mno-cygwin"
|
2006-02-21 08:46:50 +00:00
|
|
|
SDL_CFLAGS="-I/usr/include/mingw -mno-cygwin"
|
2006-02-20 11:30:29 +00:00
|
|
|
SDL_LIBS="-lSDL -mno-cygwin"
|
2006-02-16 20:17:43 +00:00
|
|
|
;;
|
|
|
|
*)
|
2006-02-20 11:30:29 +00:00
|
|
|
CFLAGS="$CFLAGS -D_GNU_SOURCE=1"
|
|
|
|
BUILD_CFLAGS="$CFLAGS \$(INCLUDE)"
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$LDFLAGS"
|
2006-02-20 11:30:29 +00:00
|
|
|
SDL_CFLAGS=""
|
|
|
|
SDL_LIBS="-lSDL"
|
2006-02-16 20:17:43 +00:00
|
|
|
;;
|
|
|
|
esac
|
2006-02-19 16:42:18 +00:00
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
dnl Check for tools
|
|
|
|
AC_LIBTOOL_WIN32_DLL
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_PROG_LIBTOOL
|
2001-04-26 16:45:43 +00:00
|
|
|
AC_PROG_CC
|
2001-09-30 18:55:08 +00:00
|
|
|
AC_PROG_CXX
|
2001-04-26 16:45:43 +00:00
|
|
|
AC_PROG_INSTALL
|
2006-02-20 02:09:49 +00:00
|
|
|
AC_PROG_MAKE_SET
|
2006-02-07 12:11:33 +00:00
|
|
|
|
2006-02-09 09:07:13 +00:00
|
|
|
dnl Check for compiler characteristics
|
2006-02-07 12:11:33 +00:00
|
|
|
AC_C_CONST
|
|
|
|
AC_C_INLINE
|
2006-02-09 09:07:13 +00:00
|
|
|
AC_C_VOLATILE
|
|
|
|
|
2006-02-16 10:11:48 +00:00
|
|
|
dnl See whether we are allowed to use the system C library
|
|
|
|
AC_ARG_ENABLE(libc,
|
|
|
|
AC_HELP_STRING([--enable-libc], [Use the system C library [default=yes]]),
|
|
|
|
, enable_libc=yes)
|
|
|
|
if test x$enable_libc = xyes; then
|
|
|
|
AC_DEFINE(HAVE_LIBC)
|
|
|
|
|
|
|
|
dnl Check for C library headers
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_CHECK_HEADERS(sys/types.h stdio.h stdlib.h stddef.h stdarg.h malloc.h memory.h string.h strings.h inttypes.h stdint.h ctype.h math.h signal.h)
|
|
|
|
|
|
|
|
dnl Check for typedefs, structures, etc.
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
if test x$ac_cv_header_inttypes_h = xyes -o x$ac_cv_header_stdint_h = xyes; then
|
|
|
|
AC_CHECK_TYPE(int64_t)
|
|
|
|
if test x$ac_cv_type_int64_t = xyes; then
|
|
|
|
AC_DEFINE(SDL_HAS_64BIT_TYPE)
|
|
|
|
fi
|
|
|
|
have_inttypes=yes
|
|
|
|
fi
|
2006-02-09 09:07:13 +00:00
|
|
|
|
2006-02-16 10:11:48 +00:00
|
|
|
dnl Checks for library functions.
|
|
|
|
AC_FUNC_ALLOCA
|
|
|
|
AC_FUNC_MEMCMP
|
|
|
|
if test x$ac_cv_func_memcmp_working = xyes; then
|
|
|
|
AC_DEFINE(HAVE_MEMCMP)
|
2006-02-09 09:07:13 +00:00
|
|
|
fi
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_FUNC_STRTOD
|
|
|
|
if test x$ac_cv_func_strtod = xyes; then
|
|
|
|
AC_DEFINE(HAVE_STRTOD)
|
|
|
|
fi
|
2006-02-19 23:46:34 +00:00
|
|
|
AC_CHECK_FUNCS(malloc calloc realloc free getenv putenv unsetenv qsort abs bcopy memset memcpy memmove strlen strlcpy strlcat strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol _i64toa _ui64toa strtoll atoi atof strcmp strncmp stricmp strcasecmp sscanf snprintf vsnprintf sigaction setjmp nanosleep)
|
2006-02-19 16:42:18 +00:00
|
|
|
|
2006-02-20 20:08:29 +00:00
|
|
|
AC_CHECK_LIB(m, pow, [BUILD_LDFLAGS="$BUILD_LDFLAGS -lm"])
|
2006-02-16 10:11:48 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$have_inttypes != xyes; then
|
2006-02-09 09:07:13 +00:00
|
|
|
AC_CHECK_SIZEOF(char, 1)
|
|
|
|
AC_CHECK_SIZEOF(short, 2)
|
|
|
|
AC_CHECK_SIZEOF(int, 4)
|
|
|
|
AC_CHECK_SIZEOF(long, 4)
|
|
|
|
AC_CHECK_SIZEOF(long long, 8)
|
|
|
|
if test x$ac_cv_sizeof_char = x1; then
|
|
|
|
AC_DEFINE(int8_t, signed char)
|
|
|
|
AC_DEFINE(uint8_t, unsigned char)
|
|
|
|
fi
|
|
|
|
if test x$ac_cv_sizeof_short = x2; then
|
|
|
|
AC_DEFINE(int16_t, signed short)
|
|
|
|
AC_DEFINE(uint16_t, unsigned short)
|
|
|
|
else
|
|
|
|
if test x$ac_cv_sizeof_int = x2; then
|
|
|
|
AC_DEFINE(int16_t, signed int)
|
|
|
|
AC_DEFINE(uint16_t, unsigned int)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if test x$ac_cv_sizeof_int = x4; then
|
|
|
|
AC_DEFINE(int32_t, signed int)
|
|
|
|
AC_DEFINE(uint32_t, unsigned int)
|
|
|
|
else
|
|
|
|
if test x$ac_cv_sizeof_long = x4; then
|
|
|
|
AC_DEFINE(int32_t, signed long)
|
|
|
|
AC_DEFINE(uint32_t, unsigned long)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if test x$ac_cv_sizeof_long = x8; then
|
|
|
|
AC_DEFINE(int64_t, signed long)
|
|
|
|
AC_DEFINE(uint64_t, unsigned long)
|
|
|
|
AC_DEFINE(SDL_HAS_64BIT_TYPE)
|
|
|
|
else
|
|
|
|
if test x$ac_cv_sizeof_long_long = x8; then
|
|
|
|
AC_DEFINE(int64_t, signed long long)
|
|
|
|
AC_DEFINE(uint64_t, unsigned long long)
|
|
|
|
AC_DEFINE(SDL_HAS_64BIT_TYPE)
|
|
|
|
fi
|
|
|
|
fi
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(size_t, unsigned int)
|
|
|
|
AC_DEFINE(uintptr_t, unsigned long)
|
2006-02-09 09:07:13 +00:00
|
|
|
fi
|
2006-02-07 12:11:33 +00:00
|
|
|
|
2006-02-16 10:11:48 +00:00
|
|
|
# Standard C sources
|
|
|
|
SOURCES="$SOURCES $srcdir/src/*.c"
|
|
|
|
SOURCES="$SOURCES $srcdir/src/audio/*.c"
|
|
|
|
SOURCES="$SOURCES $srcdir/src/cdrom/*.c"
|
|
|
|
SOURCES="$SOURCES $srcdir/src/cpuinfo/*.c"
|
|
|
|
SOURCES="$SOURCES $srcdir/src/events/*.c"
|
|
|
|
SOURCES="$SOURCES $srcdir/src/file/*.c"
|
|
|
|
SOURCES="$SOURCES $srcdir/src/joystick/*.c"
|
|
|
|
SOURCES="$SOURCES $srcdir/src/stdlib/*.c"
|
|
|
|
SOURCES="$SOURCES $srcdir/src/thread/*.c"
|
|
|
|
SOURCES="$SOURCES $srcdir/src/timer/*.c"
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/*.c"
|
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
dnl Enable/disable various subsystems of the SDL library
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(audio,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-audio], [Enable the audio subsystem [default=yes]]),
|
2001-04-26 16:45:43 +00:00
|
|
|
, enable_audio=yes)
|
2006-02-16 10:11:48 +00:00
|
|
|
if test x$enable_audio != xyes; then
|
|
|
|
AC_DEFINE(SDL_AUDIO_DISABLED)
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
AC_ARG_ENABLE(video,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-video], [Enable the video subsystem [default=yes]]),
|
2001-04-26 16:45:43 +00:00
|
|
|
, enable_video=yes)
|
2006-02-16 10:11:48 +00:00
|
|
|
if test x$enable_video != xyes; then
|
|
|
|
AC_DEFINE(SDL_VIDEO_DISABLED)
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
AC_ARG_ENABLE(events,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-events], [Enable the events subsystem [default=yes]]),
|
2001-04-26 16:45:43 +00:00
|
|
|
, enable_events=yes)
|
2006-02-16 10:11:48 +00:00
|
|
|
if test x$enable_events != xyes; then
|
|
|
|
AC_DEFINE(SDL_EVENTS_DISABLED)
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
AC_ARG_ENABLE(joystick,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-joystick], [Enable the joystick subsystem [default=yes]]),
|
2001-04-26 16:45:43 +00:00
|
|
|
, enable_joystick=yes)
|
2006-02-16 10:11:48 +00:00
|
|
|
if test x$enable_joystick != xyes; then
|
|
|
|
AC_DEFINE(SDL_JOYSTICK_DISABLED)
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
AC_ARG_ENABLE(cdrom,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-cdrom], [Enable the cdrom subsystem [default=yes]]),
|
2001-04-26 16:45:43 +00:00
|
|
|
, enable_cdrom=yes)
|
2006-02-16 10:11:48 +00:00
|
|
|
if test x$enable_cdrom != xyes; then
|
|
|
|
AC_DEFINE(SDL_CDROM_DISABLED)
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
AC_ARG_ENABLE(threads,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-threads], [Enable the threading subsystem [default=yes]]),
|
2001-04-26 16:45:43 +00:00
|
|
|
, enable_threads=yes)
|
|
|
|
if test x$enable_threads != xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_THREADS_DISABLED)
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
AC_ARG_ENABLE(timers,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-timers], [Enable the timer subsystem [default=yes]]),
|
2001-04-26 16:45:43 +00:00
|
|
|
, enable_timers=yes)
|
2006-02-16 10:11:48 +00:00
|
|
|
if test x$enable_timers != xyes; then
|
|
|
|
AC_DEFINE(SDL_TIMERS_DISABLED)
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
AC_ARG_ENABLE(file,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-file], [Enable the file subsystem [default=yes]]),
|
2001-04-26 16:45:43 +00:00
|
|
|
, enable_file=yes)
|
2006-02-16 10:11:48 +00:00
|
|
|
if test x$enable_file != xyes; then
|
|
|
|
AC_DEFINE(SDL_FILE_DISABLED)
|
|
|
|
fi
|
|
|
|
AC_ARG_ENABLE(loadso,
|
|
|
|
AC_HELP_STRING([--enable-loadso], [Enable the shared object loading subsystem [default=yes]]),
|
|
|
|
, enable_loadso=yes)
|
|
|
|
if test x$enable_loadso != xyes; then
|
|
|
|
AC_DEFINE(SDL_LOADSO_DISABLED)
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
2003-11-18 02:16:57 +00:00
|
|
|
AC_ARG_ENABLE(cpuinfo,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-cpuinfo], [Enable the cpuinfo subsystem [default=yes]]),
|
2003-11-18 02:16:57 +00:00
|
|
|
, enable_cpuinfo=yes)
|
2006-02-16 10:11:48 +00:00
|
|
|
if test x$enable_cpuinfo != xyes; then
|
|
|
|
AC_DEFINE(SDL_CPUINFO_DISABLED)
|
|
|
|
fi
|
2006-02-21 08:46:50 +00:00
|
|
|
AC_ARG_ENABLE(assembly,
|
|
|
|
AC_HELP_STRING([--enable-assembly], [Enable assembly routines [default=yes]]),
|
|
|
|
, enable_assembly=yes)
|
|
|
|
if test x$enable_assembly = xyes; then
|
|
|
|
AC_DEFINE(SDL_ASSEMBLY_ROUTINES)
|
2003-11-18 02:16:57 +00:00
|
|
|
fi
|
2001-04-26 16:45:43 +00:00
|
|
|
|
|
|
|
dnl See if the OSS audio interface is supported
|
|
|
|
CheckOSS()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(oss,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-oss], [support the OSS audio API [default=yes]]),
|
2001-04-26 16:45:43 +00:00
|
|
|
, 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
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H)
|
2001-07-08 09:00:06 +00:00
|
|
|
])
|
|
|
|
fi
|
2001-04-26 16:45:43 +00:00
|
|
|
AC_MSG_RESULT($have_oss)
|
|
|
|
if test x$have_oss = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_AUDIO_DRIVER_OSS)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/audio/dsp/*.c"
|
|
|
|
SOURCES="$SOURCES $srcdir/src/audio/dma/*.c"
|
|
|
|
have_audio=yes
|
|
|
|
|
|
|
|
# OpenBSD needs linking with ossaudio emulation library
|
|
|
|
case "$target" in
|
2006-02-20 03:57:03 +00:00
|
|
|
*-*-openbsd*|*-*-netbsd*)
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS -lossaudio";;
|
2006-02-16 10:11:48 +00:00
|
|
|
esac
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
dnl See if the ALSA audio interface is supported
|
|
|
|
CheckALSA()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(alsa,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-alsa], [support the ALSA audio API [default=yes]]),
|
2001-04-26 16:45:43 +00:00
|
|
|
, 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)
|
2004-12-13 07:32:53 +00:00
|
|
|
# Restore all flags from before the ALSA detection runs
|
|
|
|
CFLAGS="$alsa_save_CFLAGS"
|
|
|
|
LDFLAGS="$alsa_save_LDFLAGS"
|
|
|
|
LIBS="$alsa_save_LIBS"
|
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,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-alsa-shared], [dynamically load ALSA audio support [default=yes]]),
|
|
|
|
, enable_alsa_shared=yes)
|
|
|
|
if test "x`echo $ALSA_LIBS | grep -- -L`" = "x"; then
|
|
|
|
if test "x`ls /lib/libasound.so.* 2> /dev/null`" != "x"; then
|
|
|
|
ALSA_LIBS="-L/lib $ALSA_LIBS"
|
|
|
|
elif test "x`ls /usr/lib/libasound.so.* 2> /dev/null`" != "x"; then
|
|
|
|
ALSA_LIBS="-L/usr/lib $ALSA_LIBS"
|
|
|
|
elif test "x`ls /usr/local/lib/libasound.so.* 2> /dev/null`" != "x"; then
|
|
|
|
ALSA_LIBS="-L/usr/local/lib $ALSA_LIBS"
|
|
|
|
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"
|
|
|
|
|
|
|
|
AC_DEFINE(SDL_AUDIO_DRIVER_ALSA)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/audio/alsa/*.c"
|
|
|
|
BUILD_CFLAGS="$BUILD_CFLAGS $ALSA_CFLAGS"
|
|
|
|
if test x$have_loadso != xyes && \
|
|
|
|
test x$enable_alsa_shared = xyes; then
|
|
|
|
AC_MSG_ERROR([You must have SDL_LoadObject() support])
|
|
|
|
fi
|
|
|
|
if test x$have_loadso = xyes && \
|
|
|
|
test x$enable_alsa_shared = xyes && test x$alsa_lib != x; then
|
|
|
|
AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ALSA_DYNAMIC, "$alsa_lib")
|
|
|
|
else
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS $ALSA_LIBS"
|
2006-02-16 10:11:48 +00:00
|
|
|
fi
|
|
|
|
have_audio=yes
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if test x$have_alsa = xyes; then
|
|
|
|
AC_ARG_ENABLE(alsa-shared,
|
2004-03-02 12:49:16 +00:00
|
|
|
[ --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
|
2004-11-15 01:47:53 +00:00
|
|
|
if test "x`ls /lib/libasound.so.* 2> /dev/null`" != "x"; then
|
|
|
|
ALSA_LIBS="-L/lib $ALSA_LIBS"
|
|
|
|
elif test "x`ls /usr/lib/libasound.so.* 2> /dev/null`" != "x"; then
|
2004-08-21 04:20:00 +00:00
|
|
|
ALSA_LIBS="-L/usr/lib $ALSA_LIBS"
|
2004-11-15 01:47:53 +00:00
|
|
|
elif test "x`ls /usr/local/lib/libasound.so.* 2> /dev/null`" != "x"; then
|
2004-08-21 04:20:00 +00:00
|
|
|
ALSA_LIBS="-L/usr/local/lib $ALSA_LIBS"
|
2004-11-15 01:47:53 +00:00
|
|
|
fi
|
2004-08-21 04:20:00 +00:00
|
|
|
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"
|
|
|
|
|
2005-11-17 03:15:05 +00:00
|
|
|
if test x$have_loadso != xyes && \
|
2004-03-02 12:49:16 +00:00
|
|
|
test x$enable_alsa_shared = xyes; then
|
2005-11-17 03:15:05 +00:00
|
|
|
AC_MSG_ERROR([You must have SDL_LoadObject() support])
|
2004-03-02 12:49:16 +00:00
|
|
|
fi
|
2005-11-17 03:15:05 +00:00
|
|
|
if test x$have_loadso = xyes && \
|
2004-03-02 12:49:16 +00:00
|
|
|
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
|
|
|
|
|
|
|
use_dlvsym=no
|
2005-09-08 06:43:51 +00:00
|
|
|
AC_CHECK_LIB(dl, dlvsym, [use_dlvsym=yes])
|
2004-08-21 04:20:00 +00:00
|
|
|
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
|
|
|
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
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_AUDIO_DRIVER_DMEDIA)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/audio/dmedia/*.c"
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS -laudio"
|
2006-02-16 10:11:48 +00:00
|
|
|
have_audio=yes
|
2001-08-09 13:09:47 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
dnl Find the ESD includes and libraries
|
|
|
|
CheckESD()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(esd,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-esd], [support the Enlightened Sound Daemon [default=yes]]),
|
2001-04-26 16:45:43 +00:00
|
|
|
, 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,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-esd-shared], [dynamically load ESD audio support [default=yes]]),
|
2003-08-09 20:36:29 +00:00
|
|
|
, 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"
|
2005-11-17 03:15:05 +00:00
|
|
|
if test x$have_loadso != xyes && \
|
2002-03-06 11:05:47 +00:00
|
|
|
test x$enable_esd_shared = xyes; then
|
2005-11-17 03:15:05 +00:00
|
|
|
AC_MSG_ERROR([You must have SDL_LoadObject() support])
|
2002-03-06 11:05:47 +00:00
|
|
|
fi
|
2005-11-17 03:15:05 +00:00
|
|
|
if test x$have_loadso = xyes && \
|
2002-03-06 05:20:11 +00:00
|
|
|
test x$enable_esd_shared = xyes && test x$esd_lib != x; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ESD_DYNAMIC, "$esd_lib")
|
2002-03-06 05:20:11 +00:00
|
|
|
fi
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_AUDIO_DRIVER_ESD)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/audio/esd/*.c"
|
|
|
|
BUILD_CFLAGS="$BUILD_CFLAGS $ESD_CFLAGS"
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS $ESD_LIBS"
|
2006-02-16 10:11:48 +00:00
|
|
|
have_audio=yes
|
2002-03-06 05:20:11 +00:00
|
|
|
fi
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
CheckARTSC()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(arts,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-arts], [support the Analog Real Time Synthesizer [default=yes]]),
|
2001-04-26 16:45:43 +00:00
|
|
|
, enable_arts=yes)
|
|
|
|
if test x$enable_audio = xyes -a x$enable_arts = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_PATH_PROG(ARTSCONFIG, artsc-config)
|
|
|
|
if test x$ARTSCONFIG = x -o x$ARTSCONFIG = x'"$ARTSCONFIG"'; then
|
2001-04-26 16:45:43 +00:00
|
|
|
: # arts isn't installed
|
|
|
|
else
|
2006-02-16 10:11:48 +00:00
|
|
|
ARTS_CFLAGS=`$ARTSCONFIG --cflags`
|
|
|
|
ARTS_LIBS=`$ARTSCONFIG --libs`
|
|
|
|
ARTS_PREFIX=`$ARTSCONFIG --arts-prefix`
|
2001-04-26 16:45:43 +00:00
|
|
|
AC_MSG_CHECKING(for aRts development environment)
|
|
|
|
audio_arts=no
|
|
|
|
save_CFLAGS="$CFLAGS"
|
2006-02-16 10:11:48 +00:00
|
|
|
CFLAGS="$CFLAGS $ARTS_CFLAGS"
|
2001-04-26 16:45:43 +00:00
|
|
|
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,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-arts-shared], [dynamically load aRts audio support [default=yes]]),
|
2003-08-09 20:36:29 +00:00
|
|
|
, enable_arts_shared=yes)
|
2006-02-16 10:11:48 +00:00
|
|
|
arts_lib_spec="$ARTS_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"
|
2005-11-17 03:15:05 +00:00
|
|
|
if test x$have_loadso != xyes && \
|
2002-03-06 11:05:47 +00:00
|
|
|
test x$enable_arts_shared = xyes; then
|
2005-11-17 03:15:05 +00:00
|
|
|
AC_MSG_ERROR([You must have SDL_LoadObject() support])
|
2002-03-06 11:05:47 +00:00
|
|
|
fi
|
2005-11-17 03:15:05 +00:00
|
|
|
if test x$have_loadso = xyes && \
|
2002-03-06 05:20:11 +00:00
|
|
|
test x$enable_arts_shared = xyes && test x$arts_lib != x; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ARTS_DYNAMIC, "$arts_lib")
|
2002-03-06 05:20:11 +00:00
|
|
|
fi
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_AUDIO_DRIVER_ARTS)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/audio/arts/*.c"
|
|
|
|
BUILD_CFLAGS="$BUILD_CFLAGS $ARTS_CFLAGS"
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS $ARTS_LIBS"
|
2006-02-16 10:11:48 +00:00
|
|
|
have_audio=yes
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
dnl See if the NAS audio interface is supported
|
|
|
|
CheckNAS()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(nas,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--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
|
2006-02-16 10:11:48 +00:00
|
|
|
NAS_CFLAGS="-I/usr/X11R6/include/"
|
|
|
|
NAS_LIBS="-laudio -lXt"
|
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
|
2006-02-16 10:11:48 +00:00
|
|
|
NAS_LIBS="-lnas -lXt"
|
2001-05-27 00:24:43 +00:00
|
|
|
fi
|
2003-03-06 06:12:41 +00:00
|
|
|
AC_MSG_RESULT($have_nas)
|
2006-02-16 10:11:48 +00:00
|
|
|
if test x$have_nas = xyes; then
|
|
|
|
AC_DEFINE(SDL_AUDIO_DRIVER_NAS)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/audio/nas/*.c"
|
|
|
|
BUILD_CFLAGS="$BUILD_CFLAGS $NAS_CFLAGS"
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS $NAS_LIBS"
|
2006-02-16 10:11:48 +00:00
|
|
|
have_audio=yes
|
|
|
|
fi
|
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,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--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
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_AUDIO_DRIVER_DISK)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/audio/disk/*.c"
|
2001-06-16 01:51:42 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2002-06-10 20:42:53 +00:00
|
|
|
dnl Set up the Atari Audio driver
|
|
|
|
CheckAtariAudio()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(mintaudio,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-mintaudio], [support Atari audio driver [default=yes]]),
|
2002-06-10 20:42:53 +00:00
|
|
|
, 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
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_AUDIO_DRIVER_MINT)
|
2006-02-16 22:00:06 +00:00
|
|
|
SOURCES="$SOURCES $srcdir/src/audio/mint/*.c"
|
2006-02-16 10:11:48 +00:00
|
|
|
have_audio=yes
|
2002-06-10 20:42:53 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
dnl See if we can use x86 assembly blitters
|
2006-02-16 10:11:48 +00:00
|
|
|
# NASM is available from: http://nasm.sourceforge.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,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-nasm], [use nasm assembly blitters on x86 [default=yes]]),
|
2001-04-26 16:45:43 +00:00
|
|
|
, enable_nasm=yes)
|
2006-02-21 08:46:50 +00:00
|
|
|
if test x$enable_video = xyes -a x$enable_assembly = xyes -a x$enable_nasm = xyes; then
|
2001-04-26 16:45:43 +00:00
|
|
|
AC_PATH_PROG(NASM, nasm)
|
2006-02-16 10:11:48 +00:00
|
|
|
if test x$NASM != x -a x$NASM != x'"$NASM"'; then
|
|
|
|
AC_DEFINE(SDL_HERMES_BLITTERS)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/hermes/*.asm"
|
2001-04-26 16:45:43 +00:00
|
|
|
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
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_SUBST(NASM)
|
2001-04-26 16:45:43 +00:00
|
|
|
AC_SUBST(NASMFLAGS)
|
2006-02-16 10:11:48 +00:00
|
|
|
|
2004-05-06 15:55:06 +00:00
|
|
|
case "$target" in
|
|
|
|
# this line is needed for QNX, because it's not defined the __ELF__
|
2006-02-16 10:11:48 +00:00
|
|
|
*-*-qnx*)
|
|
|
|
BUILD_CFLAGS="$BUILD_CFLAGS -D__ELF__";;
|
|
|
|
*-*-solaris*)
|
|
|
|
BUILD_CFLAGS="$BUILD_CFLAGS -D__ELF__";;
|
2004-05-06 15:55:06 +00:00
|
|
|
esac
|
2006-02-16 10:11:48 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
dnl Check for altivec instruction support using gas syntax
|
|
|
|
CheckAltivec()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(altivec,
|
|
|
|
AC_HELP_STRING([--enable-altivec], [use altivec assembly blitters on PPC [default=yes]]),
|
|
|
|
, enable_altivec=yes)
|
2006-02-21 08:46:50 +00:00
|
|
|
if test x$enable_video = xyes -a x$enable_assembly = xyes -a x$enable_altivec = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
have_altivec_h_hdr=no
|
|
|
|
AC_CHECK_HEADER(altivec.h, have_altivec_h_hdr=yes)
|
|
|
|
|
|
|
|
save_CFLAGS="$CFLAGS"
|
|
|
|
have_gcc_altivec=no
|
|
|
|
AC_MSG_CHECKING(for Altivec with GCC -maltivec option)
|
|
|
|
altivec_CFLAGS="-maltivec"
|
|
|
|
CFLAGS="$save_CFLAGS $altivec_CFLAGS"
|
|
|
|
|
|
|
|
if test x$have_altivec_h_hdr = xyes; then
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <altivec.h>
|
|
|
|
vector unsigned int vzero() {
|
|
|
|
return vec_splat_u32(0);
|
|
|
|
}
|
|
|
|
],[
|
|
|
|
],[
|
|
|
|
have_gcc_altivec=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($have_gcc_altivec)
|
|
|
|
else
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
vector unsigned int vzero() {
|
|
|
|
return vec_splat_u32(0);
|
|
|
|
}
|
|
|
|
],[
|
|
|
|
],[
|
|
|
|
have_gcc_altivec=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($have_gcc_altivec)
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$have_gcc_altivec = xno; then
|
|
|
|
AC_MSG_CHECKING(for Altivec with GCC -faltivec option)
|
|
|
|
altivec_CFLAGS="-faltivec"
|
|
|
|
CFLAGS="$save_CFLAGS $altivec_CFLAGS"
|
|
|
|
if test x$have_altivec_h_hdr = xyes; then
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <altivec.h>
|
|
|
|
vector unsigned int vzero() {
|
|
|
|
return vec_splat_u32(0);
|
|
|
|
}
|
|
|
|
],[
|
|
|
|
],[
|
|
|
|
have_gcc_altivec=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($have_gcc_altivec)
|
|
|
|
else
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
vector unsigned int vzero() {
|
|
|
|
return vec_splat_u32(0);
|
|
|
|
}
|
|
|
|
],[
|
|
|
|
],[
|
|
|
|
have_gcc_altivec=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($have_gcc_altivec)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
CFLAGS="$save_CFLAGS"
|
2004-05-06 15:55:06 +00:00
|
|
|
|
2006-02-16 10:11:48 +00:00
|
|
|
if test x$have_gcc_altivec = xyes; then
|
|
|
|
AC_DEFINE(SDL_ALTIVEC_BLITTERS)
|
|
|
|
if test x$have_altivec_h_hdr = xyes; then
|
|
|
|
AC_DEFINE(HAVE_ALTIVEC_H)
|
|
|
|
fi
|
|
|
|
BUILD_CFLAGS="$BUILD_CFLAGS $altivec_CFLAGS"
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2005-09-08 07:33:22 +00:00
|
|
|
dnl Do the iPod thing
|
|
|
|
CheckIPod()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(ipod,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-ipod], [configure SDL to work with iPodLinux [default=yes on arm-elf]]),
|
|
|
|
, enable_ipod=yes)
|
2005-09-08 07:33:22 +00:00
|
|
|
|
|
|
|
if test x$enable_ipod = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
BUILD_CFLAGS="$BUILD_CFLAGS -DIPOD"
|
|
|
|
AC_DEFINE(SDL_VIDEO_DRIVER_IPOD)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/ipod/*.c"
|
2005-09-08 07:33:22 +00:00
|
|
|
fi
|
2006-02-16 10:11:48 +00:00
|
|
|
}
|
2005-09-08 07:33:22 +00:00
|
|
|
|
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,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-video-nanox], [use nanox video driver [default=no]]),
|
2002-03-05 19:55:32 +00:00
|
|
|
, enable_video_nanox=no)
|
|
|
|
|
|
|
|
if test x$enable_video = xyes -a x$enable_video_nanox = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_ARG_ENABLE(nanox-debug,
|
|
|
|
AC_HELP_STRING([--enable-nanox-debug], [print debug messages [default=no]]),
|
|
|
|
, enable_nanox_debug=no)
|
2002-03-05 19:55:32 +00:00
|
|
|
if test x$enable_nanox_debug = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
BUILD_CFLAGS="$BUILD_CFLAGS -DENABLE_NANOX_DEBUG"
|
2002-03-05 19:55:32 +00:00
|
|
|
fi
|
|
|
|
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_ARG_ENABLE(nanox-share-memory,
|
|
|
|
AC_HELP_STRING([--enable-nanox-share-memory], [use share memory [default=no]]),
|
|
|
|
, enable_nanox_share_memory=no)
|
2002-03-05 19:55:32 +00:00
|
|
|
if test x$enable_nanox_share_memory = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
BUILD_CFLAGS="$BUILD_CFLAGS -DNANOX_SHARE_MEMORY"
|
2002-03-05 19:55:32 +00:00
|
|
|
fi
|
|
|
|
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_ARG_ENABLE(nanox_direct_fb,
|
|
|
|
AC_HELP_STRING([--enable-nanox-direct-fb], [use direct framebuffer access [default=no]]),
|
|
|
|
, enable_nanox_direct_fb=no)
|
2002-08-25 06:21:49 +00:00
|
|
|
if test x$enable_nanox_direct_fb = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
BUILD_CFLAGS="$BUILD_CFLAGS -DENABLE_NANOX_DIRECT_FB"
|
2002-08-25 06:21:49 +00:00
|
|
|
fi
|
2002-03-05 19:55:32 +00:00
|
|
|
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_VIDEO_DRIVER_NANOX)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/nanox/*.c"
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS -lnano-X"
|
2006-02-16 10:11:48 +00:00
|
|
|
have_video=yes
|
2002-03-05 19:55:32 +00:00
|
|
|
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,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-video-x11], [use X11 video driver [default=yes]]),
|
2001-04-26 16:45:43 +00:00
|
|
|
, 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
|
2005-11-05 19:53:37 +00:00
|
|
|
AC_ARG_ENABLE(x11-shared,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [default=yes]]),
|
2005-11-05 19:53:37 +00:00
|
|
|
, enable_x11_shared=yes)
|
|
|
|
|
2005-11-17 03:16:01 +00:00
|
|
|
case "$target" in
|
2006-02-20 08:49:00 +00:00
|
|
|
*-*-darwin*)
|
2005-11-17 03:16:01 +00:00
|
|
|
x11_lib='/usr/X11R6/lib/libX11.6.dylib'
|
|
|
|
x11ext_lib='/usr/X11R6/lib/libXext.6.dylib'
|
|
|
|
;;
|
2006-02-20 08:49:00 +00:00
|
|
|
*-*-osf*)
|
|
|
|
x11_lib='libX11.so'
|
|
|
|
x11ext_lib='libXext.so'
|
|
|
|
;;
|
|
|
|
*-*-irix*) # IRIX 6.5 requires that we use /usr/lib32
|
2006-01-30 18:21:44 +00:00
|
|
|
x11_lib='libX11.so'
|
|
|
|
x11ext_lib='libXext.so'
|
|
|
|
;;
|
2005-11-17 03:16:01 +00:00
|
|
|
*)
|
2006-02-18 07:11:58 +00:00
|
|
|
if test x$X_LIBS = x; then X_LIBS="-L/usr/lib"; fi
|
2006-02-20 11:30:29 +00:00
|
|
|
x11_lib_spec=[`echo $X_LIBS | sed 's/.*-L\([^ ]*\).*/\1\/libX11.so.[0-9]/'`]
|
2006-02-20 08:49:00 +00:00
|
|
|
x11_lib=`ls $x11_lib_spec 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`
|
2006-02-20 11:30:29 +00:00
|
|
|
x11ext_lib_spec=[`echo $X_LIBS | sed 's/.*-L\([^ ]*\).*/\1\/libXext.so.[0-9]/'`]
|
2006-02-20 08:49:00 +00:00
|
|
|
x11ext_lib=`ls $x11ext_lib_spec 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`
|
2005-11-17 03:16:01 +00:00
|
|
|
;;
|
|
|
|
esac
|
2005-11-05 19:53:37 +00:00
|
|
|
|
2006-02-16 10:11:48 +00:00
|
|
|
X_CFLAGS="$X_CFLAGS -DXTHREADS"
|
|
|
|
if test x$ac_cv_func_shmat != xyes; then
|
|
|
|
X_CFLAGS="$X_CFLAGS -DNO_SHARED_MEMORY"
|
|
|
|
fi
|
2005-11-17 03:15:05 +00:00
|
|
|
if test x$have_loadso != xyes && \
|
2005-11-05 19:53:37 +00:00
|
|
|
test x$enable_x11_shared = xyes; then
|
2005-11-17 03:15:05 +00:00
|
|
|
AC_MSG_ERROR([You must have SDL_LoadObject() support])
|
2005-11-05 19:53:37 +00:00
|
|
|
fi
|
|
|
|
|
2005-11-17 03:15:05 +00:00
|
|
|
if test x$have_loadso = xyes && \
|
2005-11-08 01:34:28 +00:00
|
|
|
test x$enable_x11_shared = xyes && test x$x11_lib != x && test x$x11ext_lib != x; then
|
2005-11-17 03:16:01 +00:00
|
|
|
echo "-- dynamic libX11 -> $x11_lib"
|
|
|
|
echo "-- dynamic libX11ext -> $x11ext_lib"
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC, "$x11_lib")
|
|
|
|
AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT, "$x11ext_lib")
|
2005-11-05 19:53:37 +00:00
|
|
|
else
|
2006-02-16 10:11:48 +00:00
|
|
|
X_LIBS="$X_LIBS -lX11 -lXext"
|
2005-11-05 19:53:37 +00:00
|
|
|
fi
|
|
|
|
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_VIDEO_DRIVER_X11)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/x11/*.c"
|
|
|
|
BUILD_CFLAGS="$BUILD_CFLAGS $X_CFLAGS"
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS $X_LIBS"
|
2006-02-16 10:11:48 +00:00
|
|
|
have_video=yes
|
2001-04-26 16:45:43 +00:00
|
|
|
|
2001-05-10 18:04:03 +00:00
|
|
|
AC_ARG_ENABLE(dga,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-dga], [allow use of X11 DGA code [default=yes]]),
|
2001-05-10 18:04:03 +00:00
|
|
|
, enable_dga=yes)
|
2006-01-31 19:09:09 +00:00
|
|
|
if test x$enable_dga = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
SOURCES="$SOURCES $srcdir/src/video/Xext/Xxf86dga/*.c"
|
2006-01-31 19:09:09 +00:00
|
|
|
fi
|
|
|
|
AC_ARG_ENABLE(video-dga,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-video-dga], [use DGA 2.0 video driver [default=yes]]),
|
2006-01-31 19:09:09 +00:00
|
|
|
, enable_video_dga=yes)
|
|
|
|
if test x$enable_dga = xyes -a x$enable_video_dga = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_VIDEO_DRIVER_DGA)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/dga/*.c"
|
2006-01-31 19:09:09 +00:00
|
|
|
fi
|
2001-04-26 16:45:43 +00:00
|
|
|
AC_ARG_ENABLE(video-x11-dgamouse,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-video-x11-dgamouse], [use X11 DGA for mouse events [default=yes]]),
|
2001-04-26 16:45:43 +00:00
|
|
|
, enable_video_x11_dgamouse=yes)
|
2006-01-31 19:09:09 +00:00
|
|
|
if test x$enable_dga = xyes -a x$enable_video_x11_dgamouse = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_VIDEO_DRIVER_X11_DGAMOUSE)
|
2006-01-31 19:09:09 +00:00
|
|
|
fi
|
|
|
|
AC_ARG_ENABLE(video-x11-vm,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-video-x11-vm], [use X11 VM extension for fullscreen [default=yes]]),
|
2006-01-31 19:09:09 +00:00
|
|
|
, enable_video_x11_vm=yes)
|
|
|
|
if test x$enable_video_x11_vm = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_VIDEO_DRIVER_X11_VIDMODE)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/Xext/Xxf86vm/*.c"
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
AC_ARG_ENABLE(video-x11-xv,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-video-x11-xv], [use X11 XvImage extension for video [default=yes]]),
|
2001-04-26 16:45:43 +00:00
|
|
|
, enable_video_x11_xv=yes)
|
|
|
|
if test x$enable_video_x11_xv = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XV)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/Xext/Xv/*.c"
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
2001-11-03 17:03:16 +00:00
|
|
|
AC_ARG_ENABLE(video-x11-xinerama,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-video-x11-xinerama], [enable X11 Xinerama support [default=yes]]),
|
2001-11-03 17:03:16 +00:00
|
|
|
, enable_video_x11_xinerama=yes)
|
|
|
|
if test x$enable_video_x11_xinerama = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINERAMA)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/Xext/Xinerama/*.c"
|
2001-11-03 17:03:16 +00:00
|
|
|
fi
|
2001-11-22 04:55:38 +00:00
|
|
|
AC_ARG_ENABLE(video-x11-xme,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-video-x11-xme], [enable Xi Graphics XME for fullscreen [default=yes]]),
|
2001-11-22 04:55:38 +00:00
|
|
|
, enable_video_x11_xme=yes)
|
|
|
|
if test x$enable_video_x11_xme = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XME)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/Xext/XME/*.c"
|
2001-11-22 04:55:38 +00:00
|
|
|
fi
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
2002-02-14 02:15:15 +00:00
|
|
|
|
2006-02-16 10:11:48 +00:00
|
|
|
dnl Check for QNX photon video driver
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckPHOTON()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(video-photon,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--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
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_VIDEO_DRIVER_PHOTON)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/photon/*.c"
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS -lph"
|
2006-02-16 10:11:48 +00:00
|
|
|
have_video=yes
|
|
|
|
|
2002-02-14 02:15:15 +00:00
|
|
|
CheckOpenGLQNX
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2006-02-16 10:11:48 +00:00
|
|
|
dnl Set up the BWindow video driver if enabled
|
|
|
|
CheckBWINDOW()
|
|
|
|
{
|
|
|
|
if test x$enable_video = xyes; then
|
|
|
|
AC_DEFINE(SDL_VIDEO_DRIVER_BWINDOW)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/bwindow/*.cc"
|
|
|
|
have_video=yes
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
dnl Set up the Carbon/QuickDraw video driver for Mac OS X (but not Darwin)
|
|
|
|
CheckCARBON()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(video-carbon,
|
|
|
|
AC_HELP_STRING([--enable-video-carbon], [use Carbon/QuickDraw video driver [default=no]]),
|
|
|
|
, enable_video_carbon=no)
|
|
|
|
if test x$enable_video = xyes -a x$enable_video_carbon = xyes; then
|
|
|
|
AC_MSG_CHECKING(for Carbon framework)
|
|
|
|
have_carbon=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <Carbon/Carbon.h>
|
|
|
|
],[
|
|
|
|
],[
|
|
|
|
have_carbon=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($have_carbon)
|
|
|
|
if test x$have_carbon = xyes; then
|
|
|
|
AC_DEFINE(SDL_VIDEO_DRIVER_TOOLBOX)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/maccommon/*.c"
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/macrom/*.c"
|
|
|
|
have_video=yes
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
dnl Set up the Cocoa/Quartz video driver for Mac OS X (but not Darwin)
|
|
|
|
CheckCOCOA()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(video-cocoa,
|
|
|
|
AC_HELP_STRING([--enable-video-cocoa], [use Cocoa/Quartz video driver [default=yes]]),
|
|
|
|
, enable_video_cocoa=yes)
|
|
|
|
if test x$enable_video = xyes -a x$enable_video_cocoa = xyes; then
|
|
|
|
save_CFLAGS="$CFLAGS"
|
|
|
|
dnl work around that we don't have Objective-C support in autoconf
|
|
|
|
CFLAGS="$CFLAGS -x objective-c"
|
|
|
|
AC_MSG_CHECKING(for Cocoa framework)
|
|
|
|
have_cocoa=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#import <Cocoa/Cocoa.h>
|
|
|
|
],[
|
|
|
|
],[
|
|
|
|
have_cocoa=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($have_cocoa)
|
|
|
|
CFLAGS="$save_CFLAGS"
|
|
|
|
if test x$have_cocoa = xyes; then
|
|
|
|
AC_DEFINE(SDL_VIDEO_DRIVER_QUARTZ)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/quartz/*.m"
|
|
|
|
have_video=yes
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
dnl Find the framebuffer console includes
|
|
|
|
CheckFBCON()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(video-fbcon,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-video-fbcon], [use framebuffer console video driver [default=yes]]),
|
2001-04-26 16:45:43 +00:00
|
|
|
, 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
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_VIDEO_DRIVER_FBCON)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/fbcon/*.c"
|
|
|
|
have_video=yes
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2001-09-04 22:53:46 +00:00
|
|
|
dnl Find DirectFB
|
|
|
|
CheckDirectFB()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(video-directfb,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-video-directfb], [use DirectFB video driver [default=no]]),
|
2003-08-09 20:36:29 +00:00
|
|
|
, 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
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_VIDEO_DRIVER_DIRECTFB)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/directfb/*.c"
|
|
|
|
BUILD_CFLAGS="$BUILD_CFLAGS $DIRECTFB_CFLAGS"
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS $DIRECTFB_LIBS"
|
2006-02-16 10:11:48 +00:00
|
|
|
have_video=yes
|
2001-09-04 22:53:46 +00:00
|
|
|
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,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-video-ps2gs], [use PlayStation 2 GS video driver [default=yes]]),
|
2001-06-16 06:35:36 +00:00
|
|
|
, 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
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_VIDEO_DRIVER_PS2GS)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/ps2gs/*.c"
|
|
|
|
have_video=yes
|
2001-06-16 03:17:45 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
dnl Find the GGI includes
|
|
|
|
CheckGGI()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(video-ggi,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-video-ggi], [use GGI video driver [default=no]]),
|
2001-04-26 16:45:43 +00:00
|
|
|
, 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
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_VIDEO_DRIVER_GGI)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/ggi/*.c"
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS -lggi -lgii -lgg"
|
2006-02-16 10:11:48 +00:00
|
|
|
have_video=yes
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
dnl Find the SVGAlib includes and libraries
|
|
|
|
CheckSVGA()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(video-svga,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-video-svga], [use SVGAlib video driver [default=no]]),
|
2001-04-26 16:45:43 +00:00
|
|
|
, 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
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_VIDEO_DRIVER_SVGALIB)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/svga/*.c"
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS -lvga"
|
2006-02-16 10:11:48 +00:00
|
|
|
have_video=yes
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2001-06-19 13:33:54 +00:00
|
|
|
dnl Find the VGL includes and libraries
|
|
|
|
CheckVGL()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(video-vgl,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--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
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_VIDEO_DRIVER_VGL)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/vgl/*.c"
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS -lvgl"
|
2006-02-16 10:11:48 +00:00
|
|
|
have_video=yes
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
2001-06-19 13:33:54 +00:00
|
|
|
|
2006-02-16 10:11:48 +00:00
|
|
|
dnl Set up the wscons video driver if enabled
|
|
|
|
CheckWscons()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(video-wscons,
|
|
|
|
AC_HELP_STRING([--enable-video-wscons], [use wscons video driver [default=yes]]),
|
|
|
|
, enable_video_wscons=yes)
|
|
|
|
if test x$enable_video = xyes -a x$enable_video_wscons = xyes; then
|
|
|
|
AC_MSG_CHECKING(for wscons support)
|
|
|
|
video_wscons=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <sys/time.h>
|
|
|
|
#include <dev/wscons/wsconsio.h>
|
|
|
|
],[
|
|
|
|
],[
|
|
|
|
video_wscons=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($video_wscons)
|
|
|
|
if test x$video_wscons = xyes; then
|
|
|
|
AC_DEFINE(SDL_VIDEO_DRIVER_WSCONS)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/wscons/*.c"
|
|
|
|
have_video=yes
|
2001-06-19 13:33:54 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2006-02-16 10:11:48 +00:00
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
dnl Find the AAlib includes
|
|
|
|
CheckAAlib()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(video-aalib,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-video-aalib], [use AAlib video driver [default=no]]),
|
2001-04-26 16:45:43 +00:00
|
|
|
, 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
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_VIDEO_DRIVER_AALIB)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/aalib/*.c"
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS -laa"
|
2006-02-16 10:11:48 +00:00
|
|
|
have_video=yes
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
dnl Set up the QTopia video driver if enabled
|
|
|
|
CheckQtopia()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(video-qtopia,
|
|
|
|
AC_HELP_STRING([--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
|
|
|
|
QTOPIA_FLAGS="-DQT_QWS_EBX -DQT_QWS_CUSTOM -DQWS -I${QPEDIR}/include -I${QTDIR}/include/ -DNO_DEBUG -fno-rtti -fno-exceptions"
|
|
|
|
AC_LANG_CPLUSPLUS
|
|
|
|
OLD_CXX="$CXXFLAGS"
|
|
|
|
CXXFLAGS="$QTOPIA_FLAGS"
|
|
|
|
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
|
|
|
|
AC_DEFINE(SDL_VIDEO_DRIVER_QTOPIA)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/qtopia/*.cc"
|
2006-02-20 22:15:38 +00:00
|
|
|
SDLMAIN_SOURCES="$srcdir/src/main/qtopia/*.cc"
|
2006-02-16 10:11:48 +00:00
|
|
|
BUILD_CFLAGS="$BUILD_CFLAGS $QTOPIA_FLAGS"
|
|
|
|
SDL_CFLAGS="$SDL_CFLAGS -DQWS -Dmain=SDL_main"
|
|
|
|
SDL_LIBS="-lSDLmain $SDL_LIBS -L${QPEDIR}/lib -L${QTDIR}/lib/ -lqpe -lqte"
|
|
|
|
have_video=yes
|
|
|
|
fi
|
|
|
|
AC_LANG_C
|
|
|
|
fi
|
|
|
|
}
|
2001-04-26 16:45:43 +00:00
|
|
|
|
2006-02-16 10:11:48 +00:00
|
|
|
dnl Set up the PicoGUI video driver if enabled
|
|
|
|
CheckPicoGUI()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(video-picogui,
|
|
|
|
AC_HELP_STRING([--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
|
|
|
|
AC_DEFINE(SDL_VIDEO_DRIVER_PICOGUI)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/picogui/*.c"
|
|
|
|
SDL_LIBS="$SDL_LIBS -lpgui"
|
|
|
|
have_video=yes
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2006-02-16 10:11:48 +00:00
|
|
|
dnl Set up the Atari Bios keyboard driver
|
|
|
|
CheckAtariBiosEvent()
|
|
|
|
{
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/ataricommon/*.c"
|
|
|
|
}
|
|
|
|
|
2002-02-17 19:54:28 +00:00
|
|
|
dnl Set up the Atari Xbios driver
|
|
|
|
CheckAtariXbiosVideo()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(xbios,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-video-xbios], [use Atari Xbios video driver [default=yes]]),
|
2002-02-17 19:54:28 +00:00
|
|
|
, enable_video_xbios=yes)
|
|
|
|
video_xbios=no
|
|
|
|
if test x$enable_video = xyes -a x$enable_video_xbios = xyes; then
|
|
|
|
video_xbios=yes
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_VIDEO_DRIVER_XBIOS)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/xbios/*.c"
|
|
|
|
have_video=yes
|
2002-02-17 19:54:28 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
dnl Set up the Atari Gem driver
|
|
|
|
CheckAtariGemVideo()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(gem,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-video-gem], [use Atari Gem video driver [default=yes]]),
|
2002-02-17 19:54:28 +00:00
|
|
|
, 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
|
2006-02-16 23:32:39 +00:00
|
|
|
video_gem=yes
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_VIDEO_DRIVER_GEM)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/gem/*.c"
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS -lgem"
|
2006-02-16 10:11:48 +00:00
|
|
|
have_video=yes
|
2002-02-17 19:54:28 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2001-04-26 16:50:19 +00:00
|
|
|
dnl rcg04172001 Set up the Null video driver.
|
|
|
|
CheckDummyVideo()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(video-dummy,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-video-dummy], [use dummy video driver [default=yes]]),
|
2001-07-02 00:20:29 +00:00
|
|
|
, enable_video_dummy=yes)
|
2001-04-26 16:50:19 +00:00
|
|
|
if test x$enable_video_dummy = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_VIDEO_DRIVER_DUMMY)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/dummy/*.c"
|
|
|
|
have_video=yes
|
2001-04-26 16:50:19 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
dnl Check to see if OpenGL support is desired
|
|
|
|
AC_ARG_ENABLE(video-opengl,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-video-opengl], [include OpenGL context creation [default=yes]]),
|
2001-04-26 16:45:43 +00:00
|
|
|
, enable_video_opengl=yes)
|
|
|
|
|
|
|
|
dnl Find OpenGL
|
2005-11-23 11:46:36 +00:00
|
|
|
CheckOpenGLX11()
|
2001-04-26 16:45:43 +00:00
|
|
|
{
|
|
|
|
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>
|
|
|
|
],[
|
|
|
|
],[
|
|
|
|
video_opengl=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($video_opengl)
|
|
|
|
if test x$video_opengl = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_VIDEO_OPENGL)
|
|
|
|
AC_DEFINE(SDL_VIDEO_OPENGL_GLX)
|
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
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_VIDEO_OPENGL)
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS -lGL"
|
2002-02-14 02:15:15 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2006-02-16 10:11:48 +00:00
|
|
|
dnl Check for Win32 OpenGL
|
|
|
|
CheckWIN32GL()
|
|
|
|
{
|
|
|
|
if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
|
|
|
|
AC_DEFINE(SDL_VIDEO_OPENGL)
|
|
|
|
AC_DEFINE(SDL_VIDEO_OPENGL_WGL)
|
|
|
|
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
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_VIDEO_OPENGL)
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS -lGL"
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
dnl Check for MacOS OpenGL
|
|
|
|
CheckMacGL()
|
|
|
|
{
|
|
|
|
if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_VIDEO_OPENGL)
|
2001-04-26 16:45:43 +00:00
|
|
|
case "$target" in
|
|
|
|
*-*-darwin*)
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS -framework OpenGL"
|
The MacOSX Carbon/Cocoa/X11 all in one library patch. Relevant emails:
To: SDL Developers <sdl@libsdl.org>
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se>
Date: Mon, 30 May 2005 23:29:04 +0200
Subject: [SDL] Mac OS X Video Drivers [patch]
I've updated/added the Carbon and X11 video drivers
to the Mac OS X port of SDL 1.2 (the CVS version),
and made the Cocoa driver and runtime *optional*.
The default is still Cocoa, and the "Quartz" driver.
But you can now also use "toolbox" for Carbon, and
"x11" for running with Apple's (or other) X11 server:
export SDL_VIDEODRIVER=x11
export SDL_VIDEO_GL_DRIVER=/usr/X11R6/lib/libGL.dylib
It also checks if the frameworks are available, by a:
#include <Carbon/Carbon.h> or #import <Cocoa/Cocoa.h>
(this should make it configure on plain Darwin as well?)
Here are the new configure targets:
--enable-video-cocoa use Cocoa/Quartz video driver default=yes
--enable-video-carbon use Carbon/QuickDraw video driver default=yes
--enable-video-x11 use X11 video driver default=no
./configure --enable-video-cocoa --enable-video-carbon
--enable-video-x11 \
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
The Carbon version is just an updated version of the old
SDL driver for Mac OS 9, and could probably be improved...
(but it does work, including the Carbon version of SDLmain)
If you disable cocoa, you can run with -framework Carbon only,
and the C version of SDL_main.c. And if you disable carbon too,
you can still use the X11 version which doesn't require SDLmain.
I updated the DrawSprocket version, but did not include it.
(no blitters or VRAM GWorlds etc. available on OS X anyway)
Besides for Mac OS 9, I don't think there's any use for it ?
And note that any performance on Mac OS X equals OpenGL anyway...
You can get "fair" software SDL results on captured CG displays,
but for decent frame rates you need to be using GL for rendering.
Finally, here is the patch itself:
http://www.algonet.se/~afb/SDL-12CVS-macvideo.patch
--anders
PS. It says "video", but as usual it applies to mouse/keyboard too.
------
To: A list for developers using the SDL library <sdl@libsdl.org>
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se>
Date: Sun, 4 Sep 2005 10:02:15 +0200
Subject: [SDL] Updated Mac patch
Updated the previous Mac patch to disable Carbon by default.
Also "fixed" the SDL.spec again, so that it builds on Darwin.
http://www.algonet.se/~afb/SDL-1.2.9-mac.patch
Also applied fine to SDL12 CVS, when I tried it.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401136
2005-09-08 06:16:14 +00:00
|
|
|
# The following is probably not available in Darwin:
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS -framework AGL"
|
2001-04-26 16:45:43 +00:00
|
|
|
esac
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2004-11-17 23:13:15 +00:00
|
|
|
dnl Check for Mesa offscreen rendering
|
2004-11-25 15:47:49 +00:00
|
|
|
CheckAtariOSMesa()
|
2004-11-17 23:13:15 +00:00
|
|
|
{
|
2004-11-25 15:47:49 +00:00
|
|
|
if test "x$enable_video" = "xyes" -a "x$enable_video_opengl" = "xyes"; then
|
2004-11-26 16:16:50 +00:00
|
|
|
AC_CHECK_HEADER(GL/osmesa.h, have_osmesa_hdr=yes)
|
|
|
|
AC_CHECK_LIB(OSMesa, OSMesaCreateContext, have_osmesa_lib=yes, have_osmesa_lib=no, -lm)
|
|
|
|
|
|
|
|
# Static linking to -lOSMesa
|
2004-11-25 15:47:49 +00:00
|
|
|
AC_PATH_PROG(OSMESA_CONFIG, osmesa-config, no)
|
|
|
|
if test "x$OSMESA_CONFIG" = "xno" -o "x$enable_atari_ldg" = "xno"; then
|
2004-11-26 16:16:50 +00:00
|
|
|
# -lOSMesa is really the static library
|
2004-11-25 15:47:49 +00:00
|
|
|
if test "x$have_osmesa_hdr" = "xyes" -a "x$have_osmesa_lib" = "xyes"; then
|
2006-02-16 10:11:48 +00:00
|
|
|
OSMESA_LIBS="-lOSMesa"
|
2004-11-25 15:47:49 +00:00
|
|
|
fi
|
|
|
|
else
|
2004-11-26 16:16:50 +00:00
|
|
|
# -lOSMesa is a loader for OSMesa.ldg
|
2004-11-25 15:47:49 +00:00
|
|
|
OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags`
|
|
|
|
OSMESA_LIBS=`$OSMESA_CONFIG --libs`
|
2004-11-17 23:13:15 +00:00
|
|
|
fi
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_VIDEO_OPENGL)
|
|
|
|
AC_DEFINE(SDL_VIDEO_OPENGL_OSMESA)
|
|
|
|
BUILD_CFLAGS="$BUILD_CFLAGS $OSMESA_CFLAGS"
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS $OSMESA_LIBS"
|
2004-11-26 16:16:50 +00:00
|
|
|
|
|
|
|
AC_ARG_ENABLE(osmesa-shared,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-osmesa-shared], [dynamically load OSMesa OpenGL support [default=yes]]),
|
2004-11-26 16:16:50 +00:00
|
|
|
, enable_osmesa_shared=yes)
|
|
|
|
if test "x$enable_osmesa_shared" = "xyes" -a "x$enable_atari_ldg" = "xyes"; then
|
|
|
|
# Dynamic linking
|
|
|
|
if test "x$have_osmesa_hdr" = "xyes"; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_VIDEO_OPENGL_OSMESA_DYNAMIC)
|
2004-11-26 16:16:50 +00:00
|
|
|
fi
|
2006-02-16 10:11:48 +00:00
|
|
|
fi
|
2004-11-17 23:13:15 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
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,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-input-events], [use Linux 2.4 unified input interface [default=yes]]),
|
2001-10-22 21:34:50 +00:00
|
|
|
, 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
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_INPUT_LINUXEV)
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2005-12-12 09:26:32 +00:00
|
|
|
dnl See if we can use the Touchscreen input library
|
|
|
|
CheckTslib()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(input-tslib,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-input-tslib], [use the Touchscreen library for input [default=yes]]),
|
2005-12-12 09:26:32 +00:00
|
|
|
, enable_input_tslib=yes)
|
|
|
|
if test x$enable_input_tslib = xyes; then
|
|
|
|
AC_MSG_CHECKING(for Touchscreen library support)
|
|
|
|
enable_input_tslib=no
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include "tslib.h"
|
|
|
|
],[
|
|
|
|
],[
|
|
|
|
enable_input_tslib=yes
|
|
|
|
])
|
|
|
|
AC_MSG_RESULT($enable_input_tslib)
|
|
|
|
if test x$enable_input_tslib = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_INPUT_TSLIB)
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS -lts"
|
2005-12-12 09:26:32 +00:00
|
|
|
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,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-pth], [use GNU pth library for multi-threading [default=yes]]),
|
2002-06-10 21:39:49 +00:00
|
|
|
, 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
|
|
|
|
use_pth=yes
|
|
|
|
fi
|
|
|
|
AC_MSG_CHECKING(pth)
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_MSG_RESULT($use_pth)
|
2002-06-10 21:39:49 +00:00
|
|
|
if test "x$use_pth" = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_THREAD_PTH)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/thread/pth/*.c"
|
|
|
|
SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syssem.c"
|
|
|
|
SDL_CFLAGS="$SDL_CFLAGS `$PTH_CONFIG --cflags`"
|
|
|
|
SDL_LIBS="$SDL_LIBS `$PTH_CONFIG --libs --all`"
|
|
|
|
have_threads=yes
|
2002-06-10 21:39:49 +00:00
|
|
|
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,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-pthreads], [use POSIX threads for multi-threading [default=yes]]),
|
2001-04-26 16:45:43 +00:00
|
|
|
, enable_pthreads=yes)
|
|
|
|
dnl This is used on Linux for glibc binary compatibility (Doh!)
|
|
|
|
AC_ARG_ENABLE(pthread-sem,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-pthread-sem], [use pthread semaphores [default=yes]]),
|
2001-04-26 16:45:43 +00:00
|
|
|
, enable_pthread_sem=yes)
|
|
|
|
case "$target" in
|
2006-02-03 06:33:54 +00:00
|
|
|
*-*-linux*)
|
2006-02-16 10:11:48 +00:00
|
|
|
pthread_cflags="-D_REENTRANT"
|
2006-02-03 06:33:54 +00:00
|
|
|
pthread_lib="-lpthread"
|
|
|
|
;;
|
2001-04-26 16:45:43 +00:00
|
|
|
*-*-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*)
|
2006-02-20 03:57:03 +00:00
|
|
|
pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
|
2005-12-12 09:22:36 +00:00
|
|
|
pthread_lib="-L/usr/lib -lpthread"
|
2001-05-27 01:03:39 +00:00
|
|
|
;;
|
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*)
|
2005-01-02 05:05:21 +00:00
|
|
|
pthread_cflags="-D_REENTRANT"
|
2004-03-07 16:40:15 +00:00
|
|
|
if test x$ac_cv_prog_gcc = xyes; then
|
|
|
|
pthread_lib="-lpthread -lrt"
|
|
|
|
else
|
2005-01-02 05:05:21 +00:00
|
|
|
pthread_lib="-lpthread -lexc -lrt"
|
2004-03-07 16:40:15 +00:00
|
|
|
fi
|
|
|
|
;;
|
2001-04-26 16:45:43 +00:00
|
|
|
*)
|
|
|
|
pthread_cflags="-D_REENTRANT"
|
|
|
|
pthread_lib="-lpthread"
|
|
|
|
;;
|
|
|
|
esac
|
2005-09-08 07:33:22 +00:00
|
|
|
if test x$enable_threads = xyes -a x$enable_pthreads = xyes -a x$enable_ipod != 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"
|
2006-02-16 10:11:48 +00:00
|
|
|
|
2002-06-13 21:36:25 +00:00
|
|
|
# Do futher testing if we have pthread support...
|
2001-04-26 16:45:43 +00:00
|
|
|
if test x$use_pthreads = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_THREAD_PTHREAD)
|
|
|
|
BUILD_CFLAGS="$BUILD_CFLAGS $pthread_cflags"
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS $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
|
2006-02-03 06:33:54 +00:00
|
|
|
if test x$has_recursive_mutexes = xno; then
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <pthread.h>
|
|
|
|
],[
|
|
|
|
pthread_mutexattr_t attr;
|
|
|
|
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
|
|
|
],[
|
|
|
|
has_recursive_mutexes=yes
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX)
|
2006-02-03 06:33:54 +00:00
|
|
|
])
|
|
|
|
fi
|
|
|
|
if test x$has_recursive_mutexes = xno; then
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <pthread.h>
|
|
|
|
],[
|
|
|
|
pthread_mutexattr_t attr;
|
|
|
|
pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
|
|
|
|
],[
|
|
|
|
has_recursive_mutexes=yes
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP)
|
2006-02-03 06:33:54 +00:00
|
|
|
])
|
|
|
|
fi
|
2001-04-26 16:45:43 +00:00
|
|
|
AC_MSG_RESULT($has_recursive_mutexes)
|
|
|
|
|
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
|
|
|
|
|
2006-02-16 10:11:48 +00:00
|
|
|
# Basic thread creation functions
|
|
|
|
SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_systhread.c"
|
2001-04-26 16:45:43 +00:00
|
|
|
|
2006-02-16 10:11:48 +00:00
|
|
|
# Semaphores
|
|
|
|
# We can fake these with mutexes and condition variables if necessary
|
|
|
|
if test x$have_pthread_sem = xyes; then
|
|
|
|
SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_syssem.c"
|
|
|
|
else
|
|
|
|
SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syssem.c"
|
|
|
|
fi
|
2001-04-26 16:45:43 +00:00
|
|
|
|
2006-02-16 10:11:48 +00:00
|
|
|
# Mutexes
|
|
|
|
# We can fake these with semaphores if necessary
|
|
|
|
SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_sysmutex.c"
|
2002-06-10 21:39:49 +00:00
|
|
|
|
2006-02-16 10:11:48 +00:00
|
|
|
# Condition variables
|
|
|
|
# We can fake these with semaphores and mutexes if necessary
|
|
|
|
SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_syscond.c"
|
2002-06-10 21:39:49 +00:00
|
|
|
|
2006-02-16 10:11:48 +00:00
|
|
|
have_threads=yes
|
2001-09-14 04:34:15 +00:00
|
|
|
else
|
2006-02-16 10:11:48 +00:00
|
|
|
CheckPTH
|
2004-02-12 16:29:24 +00:00
|
|
|
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,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-stdio-redirect], [Redirect STDIO to files on Win32 [default=yes]]),
|
2001-04-26 16:45:43 +00:00
|
|
|
, enable_stdio_redirect=yes)
|
|
|
|
if test x$enable_stdio_redirect != xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
BUILD_CFLAGS="$BUILD_CFLAGS -DNO_STDIO_REDIRECT"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x$enable_video = xyes; then
|
|
|
|
AC_DEFINE(SDL_VIDEO_DRIVER_WINDIB)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/wincommon/*.c"
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/windib/*.c"
|
|
|
|
have_video=yes
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
dnl Find the DirectX includes and libraries
|
|
|
|
CheckDIRECTX()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(directx,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-directx], [use DirectX for Win32 audio/video [default=yes]]),
|
2001-04-26 16:45:43 +00:00
|
|
|
, enable_directx=yes)
|
|
|
|
if test x$enable_directx = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
have_directx=no
|
|
|
|
AC_CHECK_HEADER(ddraw.h, have_ddraw=yes)
|
|
|
|
AC_CHECK_HEADER(dsound.h, have_dsound=yes)
|
|
|
|
AC_CHECK_HEADER(dinput.h, use_dinput=yes)
|
|
|
|
if test x$have_ddraw = xyes -a x$have_dsound = xyes -a x$use_dinput = xyes; then
|
|
|
|
have_directx=yes
|
2002-05-19 20:06:01 +00:00
|
|
|
fi
|
2006-02-16 10:11:48 +00:00
|
|
|
if test x$enable_video = xyes -a x$have_directx = xyes; then
|
|
|
|
AC_DEFINE(SDL_VIDEO_DRIVER_DDRAW)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/windx5/*.c"
|
|
|
|
have_video=yes
|
2005-11-22 15:19:50 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
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,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-sdl-dlopen], [use dlopen for shared object loading [default=yes]]),
|
2003-10-06 09:03:02 +00:00
|
|
|
, 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)
|
2006-02-16 10:11:48 +00:00
|
|
|
have_dlopen=no
|
2002-03-06 05:20:11 +00:00
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <dlfcn.h>
|
|
|
|
],[
|
|
|
|
],[
|
2006-02-16 10:11:48 +00:00
|
|
|
have_dlopen=yes
|
2002-03-06 05:20:11 +00:00
|
|
|
])
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_MSG_RESULT($have_dlopen)
|
|
|
|
|
|
|
|
if test x$have_dlopen = xyes; then
|
2006-02-20 20:08:29 +00:00
|
|
|
AC_CHECK_LIB(c, dlopen, BUILD_LDFLAGS="$BUILD_LDFLAGS",
|
|
|
|
AC_CHECK_LIB(dl, dlopen, BUILD_LDFLAGS="$BUILD_LDFLAGS -ldl",
|
|
|
|
AC_CHECK_LIB(ltdl, dlopen, BUILD_LDFLAGS="$BUILD_LDFLAGS -lltdl")))
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_CHECK_LIB(dl, dlvsym, have_dlvsym=yes)
|
|
|
|
if test x$have_dlvsym = xyes; then
|
|
|
|
AC_DEFINE(HAVE_DLVSYM)
|
|
|
|
fi
|
|
|
|
AC_DEFINE(SDL_LOADSO_DLOPEN)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/loadso/dlopen/*.c"
|
|
|
|
have_loadso=yes
|
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,
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_HELP_STRING([--enable-atari-ldg], [use Atari LDG for shared object loading [default=yes]]),
|
2003-07-16 11:54:13 +00:00
|
|
|
, 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
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_LOADSO_LDG)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/loadso/mint/*.c"
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS -lldg -lgem"
|
2005-11-17 03:15:05 +00:00
|
|
|
have_loadso=yes
|
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
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_CHECK_HEADER(usb.h, [USB_CFLAGS="-DHAVE_USB_H"])
|
|
|
|
AC_CHECK_HEADER(usbhid.h, [USB_CFLAGS="-DHAVE_USBHID_H"])
|
|
|
|
AC_CHECK_HEADER(libusb.h, [USB_CFLAGS="-DHAVE_LIBUSB_H"])
|
|
|
|
AC_CHECK_HEADER(libusbhid.h, [USB_CFLAGS="-DHAVE_LIBUSBHID_H"])
|
|
|
|
|
|
|
|
AC_CHECK_LIB(usbhid, hid_init, [USB_LIBS="$USB_LIBS -lusbhid"])
|
|
|
|
AC_CHECK_LIB(usb, hid_init, [USB_LIBS="$USB_LIBS -lusb"])
|
2002-05-28 20:01:29 +00:00
|
|
|
|
2006-02-16 10:11:48 +00:00
|
|
|
save_CFLAGS="$CFLAGS"
|
|
|
|
CFLAGS="$CFLAGS $USB_CFLAGS"
|
2002-05-28 20:01:29 +00:00
|
|
|
|
|
|
|
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
|
2006-02-16 10:11:48 +00:00
|
|
|
USB_CFLAGS="$USB_CFLAGS -DUSBHID_UCR_DATA"
|
2002-05-28 20:01:29 +00:00
|
|
|
fi
|
|
|
|
AC_MSG_RESULT($have_usbhid_ucr_data)
|
2002-06-12 03:32:01 +00:00
|
|
|
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_MSG_CHECKING(for new usbhid API)
|
2002-06-12 03:32:01 +00:00
|
|
|
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)
|
2006-02-16 10:11:48 +00:00
|
|
|
#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
|
|
|
|
USB_CFLAGS="$USB_CFLAGS -DUSBHID_NEW"
|
|
|
|
fi
|
|
|
|
AC_MSG_RESULT($have_usbhid_new)
|
|
|
|
|
|
|
|
AC_DEFINE(SDL_JOYSTICK_USBHID)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/joystick/bsd/*.c"
|
|
|
|
BUILD_CFLAGS="$BUILD_CFLAGS $USB_CFLAGS"
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS $USB_LIBS"
|
2006-02-16 10:11:48 +00:00
|
|
|
have_joystick=yes
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
2006-02-16 10:11:48 +00:00
|
|
|
CFLAGS="$save_CFLAGS"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
dnl Check for clock_gettime()
|
|
|
|
CheckClockGettime()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(clock_gettime,
|
|
|
|
AC_HELP_STRING([--enable-clock_gettime], [use clock_gettime() instead of gettimeofday() on UNIX [default=no]]),
|
|
|
|
, enable_clock_gettime=no)
|
|
|
|
if test x$enable_clock_gettime = xyes; then
|
|
|
|
AC_CHECK_LIB(rt, clock_gettime, have_clock_gettime=yes)
|
|
|
|
if test x$have_clock_gettime = xyes; then
|
|
|
|
AC_DEFINE(HAVE_CLOCK_GETTIME)
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS -lrt"
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
2006-02-16 10:11:48 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
dnl Check for a valid linux/version.h
|
|
|
|
CheckLinuxVersion()
|
|
|
|
{
|
|
|
|
AC_CHECK_HEADER(linux/version.h, have_linux_version_h=yes)
|
|
|
|
if test x$have_linux_version_h = xyes; then
|
|
|
|
BUILD_CFLAGS="$BUILD_CFLAGS -DHAVE_LINUX_VERSION_H"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
dnl Check if we want to use RPATH
|
|
|
|
CheckRPATH()
|
|
|
|
{
|
|
|
|
AC_ARG_ENABLE(rpath,
|
|
|
|
AC_HELP_STRING([--enable-rpath], [use an rpath when linking SDL [default=yes]]),
|
|
|
|
, enable_rpath=yes)
|
|
|
|
}
|
|
|
|
|
|
|
|
dnl Set up the configuration based on the target platform!
|
|
|
|
case "$target" in
|
|
|
|
arm-*-elf*) # FIXME: Can we get more specific for iPodLinux?
|
|
|
|
ARCH=linux
|
|
|
|
CheckDummyVideo
|
|
|
|
CheckIPod
|
2001-04-26 16:45:43 +00:00
|
|
|
# Set up files for the timer library
|
|
|
|
if test x$enable_timers = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_TIMER_UNIX)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
|
|
|
|
have_timers=yes
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
;;
|
2006-02-16 10:11:48 +00:00
|
|
|
*-*-linux*|*-*-gnu*|*-*-k*bsd*-gnu|*-*-bsdi*|*-*-freebsd*|*-*-netbsd*|*-*-openbsd*|*-*-sysv5*|*-*-solaris*|*-*-hpux*|*-*-irix*|*-*-aix*|*-*-osf*)
|
|
|
|
case "$target" in
|
|
|
|
*-*-linux*) ARCH=linux ;;
|
|
|
|
*-*-kfreebsd*-gnu) ARCH=kfreebsd-gnu ;;
|
|
|
|
*-*-knetbsd*-gnu) ARCH=knetbsd-gnu ;;
|
|
|
|
*-*-kopenbsd*-gnu) ARCH=kopenbsd-gnu ;;
|
|
|
|
*-*-gnu*) ARCH=gnu ;; # must be last of the gnu variants
|
|
|
|
*-*-bsdi*) ARCH=bsdi ;;
|
|
|
|
*-*-freebsd*) ARCH=freebsd ;;
|
|
|
|
*-*-netbsd*) ARCH=netbsd ;;
|
|
|
|
*-*-openbsd*) ARCH=openbsd ;;
|
|
|
|
*-*-sysv5*) ARCH=sysv5 ;;
|
|
|
|
*-*-solaris*) ARCH=solaris ;;
|
|
|
|
*-*-hpux*) ARCH=hpux ;;
|
|
|
|
*-*-irix*) ARCH=irix ;;
|
|
|
|
*-*-aix*) ARCH=aix ;;
|
|
|
|
*-*-osf*) ARCH=osf ;;
|
|
|
|
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
|
2006-02-16 10:11:48 +00:00
|
|
|
CheckAltivec
|
2001-05-23 00:36:17 +00:00
|
|
|
CheckOSS
|
2001-08-09 13:09:47 +00:00
|
|
|
CheckDMEDIA
|
2006-02-16 10:11:48 +00:00
|
|
|
CheckALSA
|
|
|
|
CheckARTSC
|
2001-08-09 13:09:47 +00:00
|
|
|
CheckESD
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckNAS
|
|
|
|
CheckX11
|
2006-02-16 10:11:48 +00:00
|
|
|
CheckNANOX
|
|
|
|
CheckFBCON
|
|
|
|
CheckDirectFB
|
|
|
|
CheckPS2GS
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckGGI
|
2006-02-16 10:11:48 +00:00
|
|
|
CheckSVGA
|
|
|
|
CheckVGL
|
|
|
|
CheckWscons
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckAAlib
|
2006-02-16 10:11:48 +00:00
|
|
|
CheckQtopia
|
|
|
|
CheckPicoGUI
|
2005-11-23 11:46:36 +00:00
|
|
|
CheckOpenGLX11
|
2006-02-16 10:11:48 +00:00
|
|
|
CheckInputEvents
|
|
|
|
CheckTslib
|
|
|
|
CheckUSBHID
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckPTHREAD
|
2006-02-16 10:11:48 +00:00
|
|
|
CheckClockGettime
|
|
|
|
CheckLinuxVersion
|
|
|
|
CheckRPATH
|
2001-04-26 16:45:43 +00:00
|
|
|
# Set up files for the audio library
|
|
|
|
if test x$enable_audio = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
case $ARCH in
|
|
|
|
netbsd|sysv5|solaris|hpux)
|
|
|
|
AC_DEFINE(SDL_AUDIO_DRIVER_SUNAUDIO)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
|
|
|
|
have_audio=yes
|
|
|
|
;;
|
|
|
|
openbsd)
|
|
|
|
AC_DEFINE(SDL_AUDIO_DRIVER_OPENBSD)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/audio/openbsd/*.c"
|
|
|
|
have_audio=yes
|
|
|
|
;;
|
|
|
|
aix)
|
|
|
|
AC_DEFINE(SDL_AUDIO_DRIVER_PAUD)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/audio/paudio/*.c"
|
|
|
|
have_audio=yes
|
|
|
|
;;
|
|
|
|
osf)
|
|
|
|
AC_DEFINE(SDL_AUDIO_DRIVER_MMEAUDIO)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/audio/mme/*.c"
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS -lmme"
|
2006-02-16 10:11:48 +00:00
|
|
|
have_audio=yes
|
|
|
|
;;
|
|
|
|
esac
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the joystick library
|
|
|
|
if test x$enable_joystick = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
case $ARCH in
|
|
|
|
linux)
|
|
|
|
AC_DEFINE(SDL_JOYSTICK_LINUX)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/joystick/linux/*.c"
|
|
|
|
have_joystick=yes
|
|
|
|
;;
|
|
|
|
esac
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the cdrom library
|
|
|
|
if test x$enable_cdrom = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
case $ARCH in
|
|
|
|
linux|solaris)
|
|
|
|
AC_DEFINE(SDL_CDROM_LINUX)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/cdrom/linux/*.c"
|
|
|
|
have_cdrom=yes
|
|
|
|
;;
|
|
|
|
*freebsd*)
|
|
|
|
AC_DEFINE(SDL_CDROM_FREEBSD)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/cdrom/freebsd/*.c"
|
|
|
|
have_cdrom=yes
|
|
|
|
;;
|
2006-02-20 03:57:03 +00:00
|
|
|
*openbsd*|*netbsd*)
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_CDROM_OPENBSD)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/cdrom/openbsd/*.c"
|
|
|
|
have_cdrom=yes
|
|
|
|
;;
|
|
|
|
bsdi)
|
|
|
|
AC_DEFINE(SDL_CDROM_BSDI)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/cdrom/bsdi/*.c"
|
|
|
|
have_cdrom=yes
|
|
|
|
;;
|
|
|
|
aix)
|
|
|
|
AC_DEFINE(SDL_CDROM_AIX)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/cdrom/aix/*.c"
|
|
|
|
have_cdrom=yes
|
|
|
|
;;
|
|
|
|
osf)
|
|
|
|
AC_DEFINE(SDL_CDROM_OSF)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/cdrom/osf/*.c"
|
|
|
|
have_cdrom=yes
|
|
|
|
;;
|
|
|
|
esac
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the thread library
|
2006-02-16 10:11:48 +00:00
|
|
|
if test x$enable_threads = xyes -a x$use_pthreads != xyes -a x$use_pth != xyes -a x$ARCH = xirix; then
|
|
|
|
AC_DEFINE(SDL_THREAD_SPROC)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/thread/irix/*.c"
|
|
|
|
SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_sysmutex.c"
|
|
|
|
SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
|
|
|
|
have_threads=yes
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the timer library
|
|
|
|
if test x$enable_timers = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_TIMER_UNIX)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
|
|
|
|
have_timers=yes
|
|
|
|
fi
|
2001-04-26 16:45:43 +00:00
|
|
|
;;
|
|
|
|
*-*-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
|
2005-11-23 11:46:36 +00:00
|
|
|
CheckOpenGLX11
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckPTHREAD
|
|
|
|
# Set up files for the audio library
|
|
|
|
if test x$enable_audio = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_AUDIO_DRIVER_QNXNTO)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/audio/nto/*.c"
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS -lasound"
|
2006-02-16 10:11:48 +00:00
|
|
|
have_audio=yes
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the cdrom library
|
|
|
|
if test x$enable_cdrom = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_CDROM_QNX)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/cdrom/qnx/*.c"
|
|
|
|
have_cdrom=yes
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the timer library
|
|
|
|
if test x$enable_timers = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_TIMER_UNIX)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
|
|
|
|
have_timers=yes
|
2001-04-26 16:45:43 +00:00
|
|
|
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
|
2006-02-16 10:11:48 +00:00
|
|
|
CheckWIN32GL
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckDIRECTX
|
|
|
|
CheckNASM
|
|
|
|
# Set up files for the audio library
|
|
|
|
if test x$enable_audio = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_AUDIO_DRIVER_WAVEOUT)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/audio/windib/*.c"
|
|
|
|
if test x$have_directx = xyes; then
|
|
|
|
AC_DEFINE(SDL_AUDIO_DRIVER_DSOUND)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/audio/windx5/*.c"
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
2006-02-16 10:11:48 +00:00
|
|
|
have_audio=yes
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the joystick library
|
|
|
|
if test x$enable_joystick = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_JOYSTICK_WINMM)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/joystick/win32/*.c"
|
|
|
|
have_joystick=yes
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the cdrom library
|
|
|
|
if test x$enable_cdrom = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_CDROM_WIN32)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/cdrom/win32/*.c"
|
|
|
|
have_cdrom=yes
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the thread library
|
|
|
|
if test x$enable_threads = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_THREAD_WIN32)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/thread/win32/SDL_sysmutex.c"
|
|
|
|
SOURCES="$SOURCES $srcdir/src/thread/win32/SDL_syssem.c"
|
|
|
|
SOURCES="$SOURCES $srcdir/src/thread/win32/SDL_systhread.c"
|
|
|
|
SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
|
|
|
|
have_threads=yes
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the timer library
|
|
|
|
if test x$enable_timers = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_TIMER_WIN32)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/timer/win32/*.c"
|
|
|
|
have_timers=yes
|
|
|
|
fi
|
|
|
|
# Set up files for the shared object loading library
|
|
|
|
if test x$enable_loadso = xyes; then
|
|
|
|
AC_DEFINE(SDL_LOADSO_WIN32)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/loadso/win32/*.c"
|
|
|
|
have_loadso=yes
|
|
|
|
fi
|
|
|
|
# Set up the system libraries we need
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS -luser32 -lgdi32 -lwinmm"
|
2006-02-16 10:11:48 +00:00
|
|
|
if test x$have_directx = xyes; then
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS -ldxguid"
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# The Win32 platform requires special setup
|
2006-02-20 22:15:38 +00:00
|
|
|
SDLMAIN_SOURCES="$srcdir/src/main/win32/*.c"
|
2001-04-26 16:45:43 +00:00
|
|
|
SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
|
2006-02-16 20:17:43 +00:00
|
|
|
SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows"
|
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
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_AUDIO_DRIVER_BAUDIO)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/audio/baudio/*.cc"
|
|
|
|
have_audio=yes
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the joystick library
|
|
|
|
if test x$enable_joystick = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_JOYSTICK_BEOS)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/joystick/beos/*.cc"
|
|
|
|
have_joystick=yes
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the cdrom library
|
|
|
|
if test x$enable_cdrom = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_CDROM_BEOS)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/cdrom/beos/*.cc"
|
|
|
|
have_cdrom=yes
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the thread library
|
|
|
|
if test x$enable_threads = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_THREAD_BEOS)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/thread/beos/*.c"
|
|
|
|
SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_sysmutex.c"
|
|
|
|
SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
|
|
|
|
have_threads=yes
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the timer library
|
|
|
|
if test x$enable_timers = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_TIMER_BEOS)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/timer/beos/*.c"
|
|
|
|
have_timers=yes
|
|
|
|
fi
|
|
|
|
# Set up files for the shared object loading library
|
|
|
|
if test x$enable_loadso = xyes; then
|
|
|
|
AC_DEFINE(SDL_LOADSO_BEOS)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/loadso/beos/*.c"
|
|
|
|
have_loadso=yes
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
2006-02-17 08:43:23 +00:00
|
|
|
# The BeOS platform requires special setup.
|
|
|
|
SOURCES="$srcdir/src/main/beos/*.cc $SOURCES"
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
|
2001-04-26 16:45:43 +00:00
|
|
|
;;
|
|
|
|
*-*-darwin* )
|
The MacOSX Carbon/Cocoa/X11 all in one library patch. Relevant emails:
To: SDL Developers <sdl@libsdl.org>
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se>
Date: Mon, 30 May 2005 23:29:04 +0200
Subject: [SDL] Mac OS X Video Drivers [patch]
I've updated/added the Carbon and X11 video drivers
to the Mac OS X port of SDL 1.2 (the CVS version),
and made the Cocoa driver and runtime *optional*.
The default is still Cocoa, and the "Quartz" driver.
But you can now also use "toolbox" for Carbon, and
"x11" for running with Apple's (or other) X11 server:
export SDL_VIDEODRIVER=x11
export SDL_VIDEO_GL_DRIVER=/usr/X11R6/lib/libGL.dylib
It also checks if the frameworks are available, by a:
#include <Carbon/Carbon.h> or #import <Cocoa/Cocoa.h>
(this should make it configure on plain Darwin as well?)
Here are the new configure targets:
--enable-video-cocoa use Cocoa/Quartz video driver default=yes
--enable-video-carbon use Carbon/QuickDraw video driver default=yes
--enable-video-x11 use X11 video driver default=no
./configure --enable-video-cocoa --enable-video-carbon
--enable-video-x11 \
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
The Carbon version is just an updated version of the old
SDL driver for Mac OS 9, and could probably be improved...
(but it does work, including the Carbon version of SDLmain)
If you disable cocoa, you can run with -framework Carbon only,
and the C version of SDL_main.c. And if you disable carbon too,
you can still use the X11 version which doesn't require SDLmain.
I updated the DrawSprocket version, but did not include it.
(no blitters or VRAM GWorlds etc. available on OS X anyway)
Besides for Mac OS 9, I don't think there's any use for it ?
And note that any performance on Mac OS X equals OpenGL anyway...
You can get "fair" software SDL results on captured CG displays,
but for decent frame rates you need to be using GL for rendering.
Finally, here is the patch itself:
http://www.algonet.se/~afb/SDL-12CVS-macvideo.patch
--anders
PS. It says "video", but as usual it applies to mouse/keyboard too.
------
To: A list for developers using the SDL library <sdl@libsdl.org>
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se>
Date: Sun, 4 Sep 2005 10:02:15 +0200
Subject: [SDL] Updated Mac patch
Updated the previous Mac patch to disable Carbon by default.
Also "fixed" the SDL.spec again, so that it builds on Darwin.
http://www.algonet.se/~afb/SDL-1.2.9-mac.patch
Also applied fine to SDL12 CVS, when I tried it.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401136
2005-09-08 06:16:14 +00:00
|
|
|
# This could be either full "Mac OS X", or plain "Darwin" which is
|
2001-08-21 07:19:59 +00:00
|
|
|
# just the OS X kernel sans upper layers like Carbon and Cocoa.
|
The MacOSX Carbon/Cocoa/X11 all in one library patch. Relevant emails:
To: SDL Developers <sdl@libsdl.org>
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se>
Date: Mon, 30 May 2005 23:29:04 +0200
Subject: [SDL] Mac OS X Video Drivers [patch]
I've updated/added the Carbon and X11 video drivers
to the Mac OS X port of SDL 1.2 (the CVS version),
and made the Cocoa driver and runtime *optional*.
The default is still Cocoa, and the "Quartz" driver.
But you can now also use "toolbox" for Carbon, and
"x11" for running with Apple's (or other) X11 server:
export SDL_VIDEODRIVER=x11
export SDL_VIDEO_GL_DRIVER=/usr/X11R6/lib/libGL.dylib
It also checks if the frameworks are available, by a:
#include <Carbon/Carbon.h> or #import <Cocoa/Cocoa.h>
(this should make it configure on plain Darwin as well?)
Here are the new configure targets:
--enable-video-cocoa use Cocoa/Quartz video driver default=yes
--enable-video-carbon use Carbon/QuickDraw video driver default=yes
--enable-video-x11 use X11 video driver default=no
./configure --enable-video-cocoa --enable-video-carbon
--enable-video-x11 \
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
The Carbon version is just an updated version of the old
SDL driver for Mac OS 9, and could probably be improved...
(but it does work, including the Carbon version of SDLmain)
If you disable cocoa, you can run with -framework Carbon only,
and the C version of SDL_main.c. And if you disable carbon too,
you can still use the X11 version which doesn't require SDLmain.
I updated the DrawSprocket version, but did not include it.
(no blitters or VRAM GWorlds etc. available on OS X anyway)
Besides for Mac OS 9, I don't think there's any use for it ?
And note that any performance on Mac OS X equals OpenGL anyway...
You can get "fair" software SDL results on captured CG displays,
but for decent frame rates you need to be using GL for rendering.
Finally, here is the patch itself:
http://www.algonet.se/~afb/SDL-12CVS-macvideo.patch
--anders
PS. It says "video", but as usual it applies to mouse/keyboard too.
------
To: A list for developers using the SDL library <sdl@libsdl.org>
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se>
Date: Sun, 4 Sep 2005 10:02:15 +0200
Subject: [SDL] Updated Mac patch
Updated the previous Mac patch to disable Carbon by default.
Also "fixed" the SDL.spec again, so that it builds on Darwin.
http://www.algonet.se/~afb/SDL-1.2.9-mac.patch
Also applied fine to SDL12 CVS, when I tried it.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401136
2005-09-08 06:16:14 +00:00
|
|
|
# Next line is broken, and a few files below require Mac OS X (full)
|
2001-08-21 07:19:59 +00:00
|
|
|
ARCH=macosx
|
2001-04-26 16:50:19 +00:00
|
|
|
CheckDummyVideo
|
2001-06-16 01:51:42 +00:00
|
|
|
CheckDiskAudio
|
2006-02-16 10:11:48 +00:00
|
|
|
CheckDLOPEN
|
The MacOSX Carbon/Cocoa/X11 all in one library patch. Relevant emails:
To: SDL Developers <sdl@libsdl.org>
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se>
Date: Mon, 30 May 2005 23:29:04 +0200
Subject: [SDL] Mac OS X Video Drivers [patch]
I've updated/added the Carbon and X11 video drivers
to the Mac OS X port of SDL 1.2 (the CVS version),
and made the Cocoa driver and runtime *optional*.
The default is still Cocoa, and the "Quartz" driver.
But you can now also use "toolbox" for Carbon, and
"x11" for running with Apple's (or other) X11 server:
export SDL_VIDEODRIVER=x11
export SDL_VIDEO_GL_DRIVER=/usr/X11R6/lib/libGL.dylib
It also checks if the frameworks are available, by a:
#include <Carbon/Carbon.h> or #import <Cocoa/Cocoa.h>
(this should make it configure on plain Darwin as well?)
Here are the new configure targets:
--enable-video-cocoa use Cocoa/Quartz video driver default=yes
--enable-video-carbon use Carbon/QuickDraw video driver default=yes
--enable-video-x11 use X11 video driver default=no
./configure --enable-video-cocoa --enable-video-carbon
--enable-video-x11 \
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
The Carbon version is just an updated version of the old
SDL driver for Mac OS 9, and could probably be improved...
(but it does work, including the Carbon version of SDLmain)
If you disable cocoa, you can run with -framework Carbon only,
and the C version of SDL_main.c. And if you disable carbon too,
you can still use the X11 version which doesn't require SDLmain.
I updated the DrawSprocket version, but did not include it.
(no blitters or VRAM GWorlds etc. available on OS X anyway)
Besides for Mac OS 9, I don't think there's any use for it ?
And note that any performance on Mac OS X equals OpenGL anyway...
You can get "fair" software SDL results on captured CG displays,
but for decent frame rates you need to be using GL for rendering.
Finally, here is the patch itself:
http://www.algonet.se/~afb/SDL-12CVS-macvideo.patch
--anders
PS. It says "video", but as usual it applies to mouse/keyboard too.
------
To: A list for developers using the SDL library <sdl@libsdl.org>
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se>
Date: Sun, 4 Sep 2005 10:02:15 +0200
Subject: [SDL] Updated Mac patch
Updated the previous Mac patch to disable Carbon by default.
Also "fixed" the SDL.spec again, so that it builds on Darwin.
http://www.algonet.se/~afb/SDL-1.2.9-mac.patch
Also applied fine to SDL12 CVS, when I tried it.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401136
2005-09-08 06:16:14 +00:00
|
|
|
CheckCOCOA
|
|
|
|
CheckCARBON
|
2005-11-17 03:16:01 +00:00
|
|
|
CheckX11
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckMacGL
|
2005-11-23 11:46:36 +00:00
|
|
|
CheckOpenGLX11
|
2001-04-26 16:45:43 +00:00
|
|
|
CheckPTHREAD
|
2005-04-17 10:19:22 +00:00
|
|
|
CheckAltivec
|
2001-04-26 16:45:43 +00:00
|
|
|
# Set up files for the audio library
|
|
|
|
if test x$enable_audio = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_AUDIO_DRIVER_COREAUDIO)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/audio/macosx/*.c"
|
|
|
|
AC_DEFINE(SDL_AUDIO_DRIVER_SNDMGR)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/audio/macrom/*.c"
|
|
|
|
have_audio=yes
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the joystick library
|
|
|
|
if test x$enable_joystick = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_JOYSTICK_IOKIT)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c"
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS -framework IOKit"
|
2006-02-16 10:11:48 +00:00
|
|
|
have_joystick=yes
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the cdrom library
|
|
|
|
if test x$enable_cdrom = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_CDROM_MACOSX)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/cdrom/macosx/*.c"
|
|
|
|
have_cdrom=yes
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the timer library
|
|
|
|
if test x$enable_timers = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_TIMER_UNIX)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
|
|
|
|
have_timers=yes
|
|
|
|
fi
|
|
|
|
# Set up files for the shared object loading library
|
|
|
|
if test x$enable_loadso = xyes -a x$have_dlopen != xyes; then
|
|
|
|
AC_DEFINE(SDL_LOADSO_DLCOMPAT)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/loadso/macosx/*.c"
|
|
|
|
have_loadso=yes
|
2001-04-26 16:45:43 +00:00
|
|
|
fi
|
2002-06-01 18:48:13 +00:00
|
|
|
# The MacOS X platform requires special setup.
|
2006-02-20 22:15:38 +00:00
|
|
|
SDLMAIN_SOURCES="$srcdir/src/main/macosx/*.m"
|
2006-02-21 08:46:50 +00:00
|
|
|
BUILD_CFLAGS="$BUILD_CFLAGS -fpascal-strings"
|
2002-06-01 18:48:13 +00:00
|
|
|
SDL_LIBS="-lSDLmain $SDL_LIBS"
|
The MacOSX Carbon/Cocoa/X11 all in one library patch. Relevant emails:
To: SDL Developers <sdl@libsdl.org>
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se>
Date: Mon, 30 May 2005 23:29:04 +0200
Subject: [SDL] Mac OS X Video Drivers [patch]
I've updated/added the Carbon and X11 video drivers
to the Mac OS X port of SDL 1.2 (the CVS version),
and made the Cocoa driver and runtime *optional*.
The default is still Cocoa, and the "Quartz" driver.
But you can now also use "toolbox" for Carbon, and
"x11" for running with Apple's (or other) X11 server:
export SDL_VIDEODRIVER=x11
export SDL_VIDEO_GL_DRIVER=/usr/X11R6/lib/libGL.dylib
It also checks if the frameworks are available, by a:
#include <Carbon/Carbon.h> or #import <Cocoa/Cocoa.h>
(this should make it configure on plain Darwin as well?)
Here are the new configure targets:
--enable-video-cocoa use Cocoa/Quartz video driver default=yes
--enable-video-carbon use Carbon/QuickDraw video driver default=yes
--enable-video-x11 use X11 video driver default=no
./configure --enable-video-cocoa --enable-video-carbon
--enable-video-x11 \
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
The Carbon version is just an updated version of the old
SDL driver for Mac OS 9, and could probably be improved...
(but it does work, including the Carbon version of SDLmain)
If you disable cocoa, you can run with -framework Carbon only,
and the C version of SDL_main.c. And if you disable carbon too,
you can still use the X11 version which doesn't require SDLmain.
I updated the DrawSprocket version, but did not include it.
(no blitters or VRAM GWorlds etc. available on OS X anyway)
Besides for Mac OS 9, I don't think there's any use for it ?
And note that any performance on Mac OS X equals OpenGL anyway...
You can get "fair" software SDL results on captured CG displays,
but for decent frame rates you need to be using GL for rendering.
Finally, here is the patch itself:
http://www.algonet.se/~afb/SDL-12CVS-macvideo.patch
--anders
PS. It says "video", but as usual it applies to mouse/keyboard too.
------
To: A list for developers using the SDL library <sdl@libsdl.org>
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se>
Date: Sun, 4 Sep 2005 10:02:15 +0200
Subject: [SDL] Updated Mac patch
Updated the previous Mac patch to disable Carbon by default.
Also "fixed" the SDL.spec again, so that it builds on Darwin.
http://www.algonet.se/~afb/SDL-1.2.9-mac.patch
Also applied fine to SDL12 CVS, when I tried it.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401136
2005-09-08 06:16:14 +00:00
|
|
|
if test x$enable_video_cocoa = xyes; then
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS -framework Cocoa"
|
The MacOSX Carbon/Cocoa/X11 all in one library patch. Relevant emails:
To: SDL Developers <sdl@libsdl.org>
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se>
Date: Mon, 30 May 2005 23:29:04 +0200
Subject: [SDL] Mac OS X Video Drivers [patch]
I've updated/added the Carbon and X11 video drivers
to the Mac OS X port of SDL 1.2 (the CVS version),
and made the Cocoa driver and runtime *optional*.
The default is still Cocoa, and the "Quartz" driver.
But you can now also use "toolbox" for Carbon, and
"x11" for running with Apple's (or other) X11 server:
export SDL_VIDEODRIVER=x11
export SDL_VIDEO_GL_DRIVER=/usr/X11R6/lib/libGL.dylib
It also checks if the frameworks are available, by a:
#include <Carbon/Carbon.h> or #import <Cocoa/Cocoa.h>
(this should make it configure on plain Darwin as well?)
Here are the new configure targets:
--enable-video-cocoa use Cocoa/Quartz video driver default=yes
--enable-video-carbon use Carbon/QuickDraw video driver default=yes
--enable-video-x11 use X11 video driver default=no
./configure --enable-video-cocoa --enable-video-carbon
--enable-video-x11 \
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
The Carbon version is just an updated version of the old
SDL driver for Mac OS 9, and could probably be improved...
(but it does work, including the Carbon version of SDLmain)
If you disable cocoa, you can run with -framework Carbon only,
and the C version of SDL_main.c. And if you disable carbon too,
you can still use the X11 version which doesn't require SDLmain.
I updated the DrawSprocket version, but did not include it.
(no blitters or VRAM GWorlds etc. available on OS X anyway)
Besides for Mac OS 9, I don't think there's any use for it ?
And note that any performance on Mac OS X equals OpenGL anyway...
You can get "fair" software SDL results on captured CG displays,
but for decent frame rates you need to be using GL for rendering.
Finally, here is the patch itself:
http://www.algonet.se/~afb/SDL-12CVS-macvideo.patch
--anders
PS. It says "video", but as usual it applies to mouse/keyboard too.
------
To: A list for developers using the SDL library <sdl@libsdl.org>
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se>
Date: Sun, 4 Sep 2005 10:02:15 +0200
Subject: [SDL] Updated Mac patch
Updated the previous Mac patch to disable Carbon by default.
Also "fixed" the SDL.spec again, so that it builds on Darwin.
http://www.algonet.se/~afb/SDL-1.2.9-mac.patch
Also applied fine to SDL12 CVS, when I tried it.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401136
2005-09-08 06:16:14 +00:00
|
|
|
fi
|
|
|
|
if test x$enable_video_carbon = xyes -o x$enable_video_cocoa = xyes; then
|
|
|
|
# The Cocoa backend still needs Carbon, and the YUV code QuickTime
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS -framework QuickTime -framework ApplicationServices"
|
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS -framework Carbon"
|
2006-02-16 10:11:48 +00:00
|
|
|
fi
|
|
|
|
# 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
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS -framework AudioToolbox -framework AudioUnit"
|
The MacOSX Carbon/Cocoa/X11 all in one library patch. Relevant emails:
To: SDL Developers <sdl@libsdl.org>
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se>
Date: Mon, 30 May 2005 23:29:04 +0200
Subject: [SDL] Mac OS X Video Drivers [patch]
I've updated/added the Carbon and X11 video drivers
to the Mac OS X port of SDL 1.2 (the CVS version),
and made the Cocoa driver and runtime *optional*.
The default is still Cocoa, and the "Quartz" driver.
But you can now also use "toolbox" for Carbon, and
"x11" for running with Apple's (or other) X11 server:
export SDL_VIDEODRIVER=x11
export SDL_VIDEO_GL_DRIVER=/usr/X11R6/lib/libGL.dylib
It also checks if the frameworks are available, by a:
#include <Carbon/Carbon.h> or #import <Cocoa/Cocoa.h>
(this should make it configure on plain Darwin as well?)
Here are the new configure targets:
--enable-video-cocoa use Cocoa/Quartz video driver default=yes
--enable-video-carbon use Carbon/QuickDraw video driver default=yes
--enable-video-x11 use X11 video driver default=no
./configure --enable-video-cocoa --enable-video-carbon
--enable-video-x11 \
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
The Carbon version is just an updated version of the old
SDL driver for Mac OS 9, and could probably be improved...
(but it does work, including the Carbon version of SDLmain)
If you disable cocoa, you can run with -framework Carbon only,
and the C version of SDL_main.c. And if you disable carbon too,
you can still use the X11 version which doesn't require SDLmain.
I updated the DrawSprocket version, but did not include it.
(no blitters or VRAM GWorlds etc. available on OS X anyway)
Besides for Mac OS 9, I don't think there's any use for it ?
And note that any performance on Mac OS X equals OpenGL anyway...
You can get "fair" software SDL results on captured CG displays,
but for decent frame rates you need to be using GL for rendering.
Finally, here is the patch itself:
http://www.algonet.se/~afb/SDL-12CVS-macvideo.patch
--anders
PS. It says "video", but as usual it applies to mouse/keyboard too.
------
To: A list for developers using the SDL library <sdl@libsdl.org>
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se>
Date: Sun, 4 Sep 2005 10:02:15 +0200
Subject: [SDL] Updated Mac patch
Updated the previous Mac patch to disable Carbon by default.
Also "fixed" the SDL.spec again, so that it builds on Darwin.
http://www.algonet.se/~afb/SDL-1.2.9-mac.patch
Also applied fine to SDL12 CVS, when I tried it.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401136
2005-09-08 06:16:14 +00:00
|
|
|
fi
|
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
|
2006-02-16 10:11:48 +00:00
|
|
|
CheckAtariOSMesa
|
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
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_AUDIO_DRIVER_SUNAUDIO)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
|
|
|
|
have_audio=yes
|
2002-06-10 20:42:53 +00:00
|
|
|
fi
|
2002-02-17 19:54:28 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the joystick library
|
|
|
|
if test x$enable_joystick = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_JOYSTICK_MINT)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/joystick/mint/*.c"
|
|
|
|
have_joystick=yes
|
2002-02-17 19:54:28 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the cdrom library
|
|
|
|
if test x$enable_cdrom = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_CDROM_MINT)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/cdrom/mint/*.c"
|
|
|
|
have_cdrom=yes
|
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
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_TIMER_UNIX)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
|
2002-12-07 06:54:47 +00:00
|
|
|
else
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_TIMER_MINT)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/timer/mint/*.c"
|
2002-12-07 06:54:47 +00:00
|
|
|
fi
|
2006-02-16 10:11:48 +00:00
|
|
|
have_timers=yes
|
2002-02-17 19:54:28 +00:00
|
|
|
fi
|
|
|
|
;;
|
2005-02-12 18:01:31 +00:00
|
|
|
*-riscos)
|
2003-08-11 22:28:13 +00:00
|
|
|
ARCH=riscos
|
2006-02-16 10:11:48 +00:00
|
|
|
CheckOSS
|
|
|
|
CheckPTHREAD
|
2004-09-17 13:20:10 +00:00
|
|
|
# Set up files for the video library
|
|
|
|
if test x$enable_video = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_VIDEO_DRIVER_RISCOS)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/video/riscos/*.c"
|
|
|
|
have_video=yes
|
2004-09-17 13:20:10 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the joystick library
|
|
|
|
if test x$enable_joystick = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_JOYSTICK_RISCOS)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/joystick/riscos/*.c"
|
|
|
|
have_joystick=yes
|
2004-09-17 13:20:10 +00:00
|
|
|
fi
|
|
|
|
# Set up files for the timer library
|
|
|
|
if test x$enable_timers = xyes; then
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_DEFINE(SDL_TIMER_RISCOS)
|
|
|
|
SOURCES="$SOURCES $srcdir/src/timer/riscos/*.c"
|
|
|
|
have_timers=yes
|
2004-09-17 13:20:10 +00:00
|
|
|
fi
|
2006-02-16 10:11:48 +00:00
|
|
|
# The RISC OS platform requires special setup.
|
2006-02-20 20:08:29 +00:00
|
|
|
BUILD_LDFLAGS="$BUILD_LDFLAGS -ljpeg -ltiff -lpng -lz"
|
2003-08-11 22:28:13 +00:00
|
|
|
;;
|
2001-04-26 16:45:43 +00:00
|
|
|
*)
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_MSG_ERROR([
|
|
|
|
*** Unsupported target: Please add to configure.in
|
|
|
|
])
|
2001-04-26 16:45:43 +00:00
|
|
|
;;
|
|
|
|
esac
|
2006-02-16 10:11:48 +00:00
|
|
|
|
|
|
|
# Verify that we have all the platform specific files we need
|
|
|
|
if test x$have_joystick != xyes; then
|
|
|
|
if test x$enable_joystick = xyes; then
|
|
|
|
AC_DEFINE(SDL_JOYSTICK_DISABLED)
|
|
|
|
fi
|
|
|
|
SOURCES="$SOURCES $srcdir/src/joystick/dummy/*.c"
|
|
|
|
fi
|
|
|
|
if test x$have_cdrom != xyes; then
|
|
|
|
if test x$enable_cdrom = xyes; then
|
|
|
|
AC_DEFINE(SDL_CDROM_DISABLED)
|
|
|
|
fi
|
|
|
|
SOURCES="$SOURCES $srcdir/src/cdrom/dummy/*.c"
|
|
|
|
fi
|
|
|
|
if test x$have_threads != xyes; then
|
|
|
|
if test x$enable_threads = xyes; then
|
|
|
|
AC_DEFINE(SDL_THREADS_DISABLED)
|
|
|
|
fi
|
|
|
|
SOURCES="$SOURCES $srcdir/src/thread/generic/*.c"
|
|
|
|
fi
|
|
|
|
if test x$have_timers != xyes; then
|
|
|
|
if test x$enable_timers = xyes; then
|
|
|
|
AC_DEFINE(SDL_TIMERS_DISABLED)
|
|
|
|
fi
|
|
|
|
SOURCES="$SOURCES $srcdir/src/timer/dummy/*.c"
|
|
|
|
fi
|
|
|
|
if test x$have_loadso != xyes; then
|
|
|
|
if test x$enable_loadso = xyes; then
|
|
|
|
AC_DEFINE(SDL_LOADSO_DISABLED)
|
|
|
|
fi
|
|
|
|
SOURCES="$SOURCES $srcdir/src/loadso/dummy/*.c"
|
|
|
|
fi
|
2006-02-20 22:15:38 +00:00
|
|
|
if test x$SDLMAIN_SOURCES = x; then
|
|
|
|
SDLMAIN_SOURCES="$srcdir/src/main/dummy/*.c"
|
|
|
|
fi
|
2006-02-16 10:11:48 +00:00
|
|
|
|
|
|
|
OBJECTS=`echo $SOURCES | sed 's,[[^ ]]*/\([[^ ]]*\)\.asm,$(objects)/\1.lo,g'`
|
|
|
|
OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.cc,$(objects)/\1.lo,g'`
|
|
|
|
OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.m,$(objects)/\1.lo,g'`
|
|
|
|
OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
|
2001-04-26 16:45:43 +00:00
|
|
|
|
2006-02-20 22:15:38 +00:00
|
|
|
SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES | sed 's,[[^ ]]*/\([[^ ]]*\)\.cc,$(objects)/\1.o,g'`
|
|
|
|
SDLMAIN_OBJECTS=`echo $SDLMAIN_OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.m,$(objects)/\1.o,g'`
|
|
|
|
SDLMAIN_OBJECTS=`echo $SDLMAIN_OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'`
|
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
# Set runtime shared library paths as needed
|
|
|
|
|
2005-08-23 06:36:23 +00:00
|
|
|
if test "x$enable_rpath" = "xyes"; then
|
2006-02-20 08:49:00 +00:00
|
|
|
if test $ARCH = linux -o $ARCH = freebsd -o $ARCH = bsdi -o $ARCH = irix; then
|
2005-08-23 06:36:23 +00:00
|
|
|
SDL_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib"
|
|
|
|
fi
|
|
|
|
if test $ARCH = solaris; then
|
|
|
|
SDL_RLD_FLAGS="-R\${exec_prefix}/lib"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
SDL_RLD_FLAGS=""
|
2001-04-26 16:45:43 +00:00
|
|
|
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)
|
The MacOSX Carbon/Cocoa/X11 all in one library patch. Relevant emails:
To: SDL Developers <sdl@libsdl.org>
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se>
Date: Mon, 30 May 2005 23:29:04 +0200
Subject: [SDL] Mac OS X Video Drivers [patch]
I've updated/added the Carbon and X11 video drivers
to the Mac OS X port of SDL 1.2 (the CVS version),
and made the Cocoa driver and runtime *optional*.
The default is still Cocoa, and the "Quartz" driver.
But you can now also use "toolbox" for Carbon, and
"x11" for running with Apple's (or other) X11 server:
export SDL_VIDEODRIVER=x11
export SDL_VIDEO_GL_DRIVER=/usr/X11R6/lib/libGL.dylib
It also checks if the frameworks are available, by a:
#include <Carbon/Carbon.h> or #import <Cocoa/Cocoa.h>
(this should make it configure on plain Darwin as well?)
Here are the new configure targets:
--enable-video-cocoa use Cocoa/Quartz video driver default=yes
--enable-video-carbon use Carbon/QuickDraw video driver default=yes
--enable-video-x11 use X11 video driver default=no
./configure --enable-video-cocoa --enable-video-carbon
--enable-video-x11 \
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
The Carbon version is just an updated version of the old
SDL driver for Mac OS 9, and could probably be improved...
(but it does work, including the Carbon version of SDLmain)
If you disable cocoa, you can run with -framework Carbon only,
and the C version of SDL_main.c. And if you disable carbon too,
you can still use the X11 version which doesn't require SDLmain.
I updated the DrawSprocket version, but did not include it.
(no blitters or VRAM GWorlds etc. available on OS X anyway)
Besides for Mac OS 9, I don't think there's any use for it ?
And note that any performance on Mac OS X equals OpenGL anyway...
You can get "fair" software SDL results on captured CG displays,
but for decent frame rates you need to be using GL for rendering.
Finally, here is the patch itself:
http://www.algonet.se/~afb/SDL-12CVS-macvideo.patch
--anders
PS. It says "video", but as usual it applies to mouse/keyboard too.
------
To: A list for developers using the SDL library <sdl@libsdl.org>
From: =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb@algonet.se>
Date: Sun, 4 Sep 2005 10:02:15 +0200
Subject: [SDL] Updated Mac patch
Updated the previous Mac patch to disable Carbon by default.
Also "fixed" the SDL.spec again, so that it builds on Darwin.
http://www.algonet.se/~afb/SDL-1.2.9-mac.patch
Also applied fine to SDL12 CVS, when I tried it.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401136
2005-09-08 06:16:14 +00:00
|
|
|
SHARED_SYSTEM_LIBS=""
|
|
|
|
if test x$enable_video = xyes -a x$enable_video_cocoa = xyes; then
|
|
|
|
SHARED_SYSTEM_LIBS="$SHARED_SYSTEM_LIBS -framework Cocoa"
|
|
|
|
fi
|
|
|
|
if test x$enable_video = xyes -a x$enable_video_carbon = xyes; then
|
|
|
|
SHARED_SYSTEM_LIBS="$SHARED_SYSTEM_LIBS -framework Carbon"
|
|
|
|
fi
|
2002-06-01 18:48:13 +00:00
|
|
|
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 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)
|
2006-02-16 10:11:48 +00:00
|
|
|
if test x$enable_shared = xyes; then
|
|
|
|
ENABLE_SHARED_TRUE=
|
|
|
|
ENABLE_SHARED_FALSE="#"
|
|
|
|
else
|
|
|
|
ENABLE_SHARED_TRUE="#"
|
|
|
|
ENABLE_SHARED_FALSE=
|
|
|
|
fi
|
|
|
|
if test x$enable_static = xyes; then
|
|
|
|
ENABLE_STATIC_TRUE=
|
|
|
|
ENABLE_STATIC_FALSE="#"
|
|
|
|
else
|
|
|
|
ENABLE_STATIC_TRUE="#"
|
|
|
|
ENABLE_STATIC_FALSE=
|
|
|
|
fi
|
|
|
|
AC_SUBST(ENABLE_SHARED_TRUE)
|
|
|
|
AC_SUBST(ENABLE_SHARED_FALSE)
|
|
|
|
AC_SUBST(ENABLE_STATIC_TRUE)
|
|
|
|
AC_SUBST(ENABLE_STATIC_FALSE)
|
2001-04-26 16:45:43 +00:00
|
|
|
|
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
|
|
|
|
2006-02-16 10:11:48 +00:00
|
|
|
dnl Expand the sources and objects needed to build the library
|
|
|
|
AC_SUBST(ac_aux_dir)
|
|
|
|
AC_SUBST(INCLUDE)
|
|
|
|
AC_SUBST(SOURCES)
|
|
|
|
AC_SUBST(OBJECTS)
|
2006-02-20 22:15:38 +00:00
|
|
|
AC_SUBST(SDLMAIN_SOURCES)
|
|
|
|
AC_SUBST(SDLMAIN_OBJECTS)
|
2006-02-16 10:11:48 +00:00
|
|
|
AC_SUBST(BUILD_CFLAGS)
|
2006-02-20 20:08:29 +00:00
|
|
|
AC_SUBST(BUILD_LDFLAGS)
|
2001-08-21 07:19:59 +00:00
|
|
|
|
2001-04-26 16:45:43 +00:00
|
|
|
AC_OUTPUT([
|
2006-02-16 10:11:48 +00:00
|
|
|
Makefile sdl-config SDL.spec SDL.qpg
|
|
|
|
], [
|
|
|
|
: >build-deps
|
|
|
|
make depend
|
|
|
|
])
|