SDL2/configure.in

2841 lines
100 KiB
Plaintext
Raw Normal View History

dnl Process this file with autoconf to produce a configure script.
AC_INIT(README)
AC_CONFIG_HEADER(include/SDL_config.h)
AC_GNU_SOURCE
AC_CONFIG_AUX_DIRS($srcdir/build-scripts)
dnl Save the CFLAGS to see whether they were passed in or generated
orig_CFLAGS="$CFLAGS"
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=3
SDL_MICRO_VERSION=0
SDL_INTERFACE_AGE=0
SDL_BINARY_AGE=0
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_INIT([win32-dll])
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`
m4_pattern_allow([^LT_])
AC_SUBST(LT_RELEASE)
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)
dnl Detect the canonical build and host environments
dnl AC_CANONICAL_HOST
dnl Check for tools
AC_PROG_LIBTOOL
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_MAKE_SET
if test -z "$host_alias"; then
hostaliaswindres=
else
hostaliaswindres="$host_alias-windres"
fi
AC_CHECK_PROGS(WINDRES, [windres $hostaliaswindres $host_os-windres])
dnl Set up the compiler and linker flags
INCLUDE="-I$srcdir/include"
if test x$srcdir != x.; then
# Remove SDL_config.h from the source directory, since it's the
# default one, and we want to include the one that we generate.
if test -f $srcdir/include/SDL_config.h; then
rm $srcdir/include/SDL_config.h
fi
INCLUDE="-Iinclude $INCLUDE"
fi
case "$host" in
*-*-cygwin*)
# We build SDL on cygwin without the UNIX emulation layer
BASE_CFLAGS="-I/usr/include/mingw -mno-cygwin"
BASE_LDFLAGS="-mno-cygwin"
;;
*)
BASE_CFLAGS=""
BASE_LDFLAGS=""
;;
esac
# Uncomment the following line if you want to force SDL and applications
# built with it to be compiled for a particular architecture.
#AX_GCC_ARCHFLAG([no], [BASE_CFLAGS="$BASE_CFLAGS $ax_cv_gcc_archflag]")
BUILD_CFLAGS="$CFLAGS $CPPFLAGS"
# The default optimization for SDL 1.3 is -O3 (Bug #31)
if test x$orig_CFLAGS = x; then
BUILD_CFLAGS=`echo $BUILD_CFLAGS | sed 's/-O2/-O3/'`
fi
EXTRA_CFLAGS="$INCLUDE $BASE_CFLAGS"
BUILD_LDFLAGS="$LDFLAGS"
EXTRA_LDFLAGS="$BASE_LDFLAGS"
## These are common directories to find software packages
#for path in /usr/freeware /usr/pkg /usr/X11R6 /usr/local; do
# if test -d $path/include; then
# EXTRA_CFLAGS="$EXTRA_CFLAGS -I$path/include"
# fi
# if test -d $path/lib; then
# EXTRA_LDFLAGS="$EXTRA_LDFLAGS -L$path/lib"
# fi
#done
SDL_CFLAGS="$BASE_CFLAGS"
SDL_LIBS="-lSDL $BASE_LDFLAGS"
CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS"
CFLAGS="$CFLAGS $EXTRA_CFLAGS"
LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
dnl set this to use on systems that use lib64 instead of lib
base_libdir=`echo \${libdir} | sed 's/.*\/\(.*\)/\1/; q'`
dnl Function to find a library in the compiler search path
find_lib()
{
gcc_bin_path=[`$CC -print-search-dirs 2>/dev/null | fgrep programs: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`]
gcc_lib_path=[`$CC -print-search-dirs 2>/dev/null | fgrep libraries: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`]
env_lib_path=[`echo $LIBS $LDFLAGS $* | sed 's/-L[ ]*//g'`]
if test "$cross_compiling" = yes; then
host_lib_path=""
else
host_lib_path="/usr/$base_libdir /usr/local/$base_libdir"
fi
for path in $gcc_bin_path $gcc_lib_path $env_lib_path $host_lib_path; do
lib=[`ls -- $path/$1 2>/dev/null | sort | sed 's/.*\/\(.*\)/\1/; q'`]
if test x$lib != x; then
echo $lib
return
fi
done
}
dnl Check for compiler characteristics
AC_C_CONST
AC_C_INLINE
AC_C_VOLATILE
dnl See whether we want assertions for debugging/sanity checking SDL itself.
AC_ARG_ENABLE(assertions,
AC_HELP_STRING([--enable-assertions],
[Enable internal sanity checks (auto/disabled/release/enabled/paranoid) [[default=auto]]]),
, enable_assertions=auto)
case "$enable_assertions" in
auto) # Use optimization settings to determine assertion level
;;
disabled)
AC_DEFINE(SDL_DEFAULT_ASSERT_LEVEL, 0)
;;
release)
AC_DEFINE(SDL_DEFAULT_ASSERT_LEVEL, 1)
;;
enabled)
AC_DEFINE(SDL_DEFAULT_ASSERT_LEVEL, 2)
;;
paranoid)
AC_DEFINE(SDL_DEFAULT_ASSERT_LEVEL, 3)
;;
*)
AC_MSG_ERROR([*** unknown assertion level. stop.])
;;
esac
dnl See whether we can use gcc style dependency tracking
AC_ARG_ENABLE(dependency-tracking,
AC_HELP_STRING([--enable-dependency-tracking],
[Use gcc -MMD -MT dependency tracking [[default=yes]]]),
, enable_dependency_tracking=yes)
if test x$enable_dependency_tracking = xyes; then
have_gcc_mmd_mt=no
AC_MSG_CHECKING(for GCC -MMD -MT option)
AC_TRY_COMPILE([
#if !defined(__GNUC__) || __GNUC__ < 3
#error Dependency tracking requires GCC 3.0 or newer
#endif
],[
],[
have_gcc_mmd_mt=yes
])
AC_MSG_RESULT($have_gcc_mmd_mt)
if test x$have_gcc_mmd_mt = xyes; then
DEPENDENCY_TRACKING_OPTIONS="-MMD -MT \$@"
fi
fi
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 iconv.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
dnl Check for defines
AC_CHECK_DEFINE(M_PI, math.h)
dnl Checks for library functions.
case "$host" in
*-*-cygwin* | *-*-mingw32*)
;;
*)
AC_FUNC_ALLOCA
;;
esac
AC_FUNC_MEMCMP
if test x$ac_cv_func_memcmp_working = xyes; then
AC_DEFINE(HAVE_MEMCMP)
fi
AC_FUNC_STRTOD
if test x$ac_cv_func_strtod = xyes; then
AC_DEFINE(HAVE_STRTOD)
fi
AC_CHECK_FUNC(mprotect,
AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/mman.h>
],[
],[
AC_DEFINE(HAVE_MPROTECT)
]),
)
AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove strlen strlcpy strlcat strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp sscanf snprintf vsnprintf sigaction setjmp nanosleep sysconf sysctlbyname)
AC_CHECK_LIB(m, pow, [LIBS="$LIBS -lm"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"])
2010-08-29 23:51:48 +00:00
AC_CHECK_FUNCS(atan atan2 ceil copysign cos cosf fabs floor log pow scalbn sin sinf sqrt)
2011-01-19 23:02:11 +00:00
AC_CHECK_LIB(iconv, iconv_open, [LIBS="$LIBS -liconv"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"])
AC_CHECK_FUNCS(iconv)
fi
AC_CHECK_SIZEOF(void*)
if test x$have_inttypes != xyes; then
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
AC_DEFINE(size_t, unsigned int)
AC_DEFINE(uintptr_t, unsigned long)
fi
dnl See whether we can use gcc atomic operations on this architecture
AC_ARG_ENABLE(gcc-atomics,
AC_HELP_STRING([--enable-gcc-atomics],
[Use gcc builtin atomics [[default=yes]]]),
, enable_gcc_atomics=yes)
if test x$enable_gcc_atomics = xyes; then
have_gcc_atomics=no
AC_MSG_CHECKING(for GCC builtin atomic operations)
AC_TRY_LINK([
],[
int a;
void *x, *y, *z;
__sync_lock_test_and_set(&a, 4);
__sync_fetch_and_add(&a, 1);
__sync_bool_compare_and_swap(&a, 5, 10);
__sync_bool_compare_and_swap(&x, y, z);
],[
have_gcc_atomics=yes
])
AC_MSG_RESULT($have_gcc_atomics)
2011-01-22 05:35:43 +00:00
if test x$have_gcc_atomics = xyes; then
AC_DEFINE(HAVE_GCC_ATOMICS)
else
# See if we have the minimum operation needed for GCC atomics
AC_TRY_LINK([
],[
int a;
__sync_lock_test_and_set(&a, 1);
],[
have_gcc_sync_lock_test_and_set=yes
])
if test x$have_gcc_sync_lock_test_and_set = xyes; then
AC_DEFINE(HAVE_GCC_SYNC_LOCK_TEST_AND_SET)
fi
fi
fi
# Standard C sources
SOURCES="$SOURCES $srcdir/src/*.c"
SOURCES="$SOURCES $srcdir/src/audio/*.c"
SOURCES="$SOURCES $srcdir/src/atomic/*.c"
SOURCES="$SOURCES $srcdir/src/cpuinfo/*.c"
SOURCES="$SOURCES $srcdir/src/events/*.c"
SOURCES="$SOURCES $srcdir/src/file/*.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"
dnl Enable/disable various subsystems of the SDL library
AC_ARG_ENABLE(atomic,
AC_HELP_STRING([--enable-atomic], [Enable the atomic operations subsystem [[default=yes]]]),
, enable_atomic=yes)
if test x$enable_atomic != xyes; then
AC_DEFINE(SDL_ATOMIC_DISABLED)
fi
AC_ARG_ENABLE(audio,
AC_HELP_STRING([--enable-audio], [Enable the audio subsystem [[default=yes]]]),
, enable_audio=yes)
if test x$enable_audio != xyes; then
AC_DEFINE(SDL_AUDIO_DISABLED)
fi
AC_ARG_ENABLE(video,
AC_HELP_STRING([--enable-video], [Enable the video subsystem [[default=yes]]]),
, enable_video=yes)
if test x$enable_video != xyes; then
AC_DEFINE(SDL_VIDEO_DISABLED)
fi
AC_ARG_ENABLE(events,
AC_HELP_STRING([--enable-events], [Enable the events subsystem [[default=yes]]]),
, enable_events=yes)
if test x$enable_events != xyes; then
AC_DEFINE(SDL_EVENTS_DISABLED)
fi
AC_ARG_ENABLE(joystick,
AC_HELP_STRING([--enable-joystick], [Enable the joystick subsystem [[default=yes]]]),
, enable_joystick=yes)
if test x$enable_joystick != xyes; then
AC_DEFINE(SDL_JOYSTICK_DISABLED)
else
SOURCES="$SOURCES $srcdir/src/joystick/*.c"
fi
AC_ARG_ENABLE(haptic,
AC_HELP_STRING([--enable-haptic], [Enable the haptic (force feedback) subsystem [[default=yes]]]),
, enable_haptic=yes)
if test x$enable_haptic != xyes; then
AC_DEFINE(SDL_HAPTIC_DISABLED)
else
SOURCES="$SOURCES $srcdir/src/haptic/*.c"
fi
AC_ARG_ENABLE(power,
AC_HELP_STRING([--enable-power], [Enable the power subsystem [[default=yes]]]),
, enable_power=yes)
if test x$enable_power != xyes; then
AC_DEFINE(SDL_POWER_DISABLED)
else
SOURCES="$SOURCES $srcdir/src/power/*.c"
fi
AC_ARG_ENABLE(threads,
AC_HELP_STRING([--enable-threads], [Enable the threading subsystem [[default=yes]]]),
, enable_threads=yes)
if test x$enable_threads != xyes; then
AC_DEFINE(SDL_THREADS_DISABLED)
fi
AC_ARG_ENABLE(timers,
AC_HELP_STRING([--enable-timers], [Enable the timer subsystem [[default=yes]]]),
, enable_timers=yes)
if test x$enable_timers != xyes; then
AC_DEFINE(SDL_TIMERS_DISABLED)
fi
AC_ARG_ENABLE(file,
AC_HELP_STRING([--enable-file], [Enable the file subsystem [[default=yes]]]),
, enable_file=yes)
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)
fi
AC_ARG_ENABLE(cpuinfo,
AC_HELP_STRING([--enable-cpuinfo], [Enable the cpuinfo subsystem [[default=yes]]]),
, enable_cpuinfo=yes)
if test x$enable_cpuinfo != xyes; then
AC_DEFINE(SDL_CPUINFO_DISABLED)
fi
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)
# Make sure that we don't generate floating point code that would
# cause illegal instruction exceptions on older processors
case "$host" in
*-*-darwin*)
# Don't need to worry about Apple hardware, it's all SSE capable
default_ssemath=yes
;;
*64-*-*)
# x86 64-bit architectures all have SSE instructions
default_ssemath=yes
;;
*)
default_ssemath=no
;;
esac
AC_ARG_ENABLE(ssemath,
AC_HELP_STRING([--enable-ssemath], [Allow GCC to use SSE floating point math [[default=no]]]),
, enable_ssemath=$default_ssemath)
if test x$enable_ssemath = xno; then
if test x$have_gcc_sse = xyes -o x$have_gcc_sse2 = xyes; then
EXTRA_CFLAGS="$EXTRA_CFLAGS -mfpmath=387"
fi
fi
dnl Check for various instruction support
AC_ARG_ENABLE(mmx,
AC_HELP_STRING([--enable-mmx], [use MMX assembly routines [[default=yes]]]),
, enable_mmx=yes)
if test x$enable_mmx = xyes; then
save_CFLAGS="$CFLAGS"
have_gcc_mmx=no
AC_MSG_CHECKING(for GCC -mmmx option)
mmx_CFLAGS="-mmmx"
CFLAGS="$save_CFLAGS $mmx_CFLAGS"
AC_TRY_COMPILE([
Fixed bug #943 Ozkan Sezer 2010-02-06 12:31:06 PST Hi: Here are some small fixes for compiling SDL against mingw-w64. (see http://mingw-w64.sourceforge.net/ . Despite the name, it supports both win32 and win64.) src/audio/windx5/directx.h and src/video/windx5/directx.h (both SDL-1.2 and SDL-1.3.) I get compilation errors about some union not having a member named u1 and alike, because of other system headers being included before this one and them already defining DUMMYUNIONNAME and stuff. This header probably assumes that those stuff are defined in windef.h, but mingw-w64 headers define them in _mingw.h. Easily fixed by moving NONAMELESSUNION definition to the top of the file. src/thread/win32/SDL_systhread.c (both SDL-1.2 and SDL-1.3.) : The __GNUC__ case for pfnSDL_CurrentBeginThread is 32-bit centric because _beginthreadex returns uintptr_t, not unsigned long which is 32 bits in win64. Changing the return type to uintptr_t fixes it. video/SDL_blit.h (and configure.in) (SDL-1.3-only) : MinGW-w64 uses msvcrt version of _aligned_malloc and _aligned_free and they are defined in intrin.h (similar to VC). Adding proper ifdefs fixes it. (Notes about macros to check: __MINGW32__ is defined for both mingw.org and for mingw-w64 for both win32 and win64, __MINGW64__ is only defined for _WIN64, so __MINGW64__ can't be used to detect mingw-w64: including _mingw.h and then checking for __MINGW64_VERSION_MAJOR does the trick.) SDL_win32video.h (SDL-1.3-only) : Tweaked the VINWER definition and location in order to avoid multiple redefinition warnings. Hope these are useful. Thanks.
2010-03-10 15:02:58 +00:00
#ifdef __MINGW32__
#include <_mingw.h>
#ifdef __MINGW64_VERSION_MAJOR
#include <intrin.h>
#else
#include <mmintrin.h>
Fixed bug #943 Ozkan Sezer 2010-02-06 12:31:06 PST Hi: Here are some small fixes for compiling SDL against mingw-w64. (see http://mingw-w64.sourceforge.net/ . Despite the name, it supports both win32 and win64.) src/audio/windx5/directx.h and src/video/windx5/directx.h (both SDL-1.2 and SDL-1.3.) I get compilation errors about some union not having a member named u1 and alike, because of other system headers being included before this one and them already defining DUMMYUNIONNAME and stuff. This header probably assumes that those stuff are defined in windef.h, but mingw-w64 headers define them in _mingw.h. Easily fixed by moving NONAMELESSUNION definition to the top of the file. src/thread/win32/SDL_systhread.c (both SDL-1.2 and SDL-1.3.) : The __GNUC__ case for pfnSDL_CurrentBeginThread is 32-bit centric because _beginthreadex returns uintptr_t, not unsigned long which is 32 bits in win64. Changing the return type to uintptr_t fixes it. video/SDL_blit.h (and configure.in) (SDL-1.3-only) : MinGW-w64 uses msvcrt version of _aligned_malloc and _aligned_free and they are defined in intrin.h (similar to VC). Adding proper ifdefs fixes it. (Notes about macros to check: __MINGW32__ is defined for both mingw.org and for mingw-w64 for both win32 and win64, __MINGW64__ is only defined for _WIN64, so __MINGW64__ can't be used to detect mingw-w64: including _mingw.h and then checking for __MINGW64_VERSION_MAJOR does the trick.) SDL_win32video.h (SDL-1.3-only) : Tweaked the VINWER definition and location in order to avoid multiple redefinition warnings. Hope these are useful. Thanks.
2010-03-10 15:02:58 +00:00
#endif
#else
#include <mmintrin.h>
#endif
#ifndef __MMX__
#error Assembler CPP flag not enabled
#endif
],[
],[
have_gcc_mmx=yes
])
AC_MSG_RESULT($have_gcc_mmx)
CFLAGS="$save_CFLAGS"
if test x$have_gcc_mmx = xyes; then
EXTRA_CFLAGS="$EXTRA_CFLAGS $mmx_CFLAGS"
fi
fi
AC_ARG_ENABLE(3dnow,
AC_HELP_STRING([--enable-3dnow], [use MMX assembly routines [[default=yes]]]),
, enable_3dnow=yes)
if test x$enable_3dnow = xyes; then
save_CFLAGS="$CFLAGS"
have_gcc_3dnow=no
AC_MSG_CHECKING(for GCC -m3dnow option)
amd3dnow_CFLAGS="-m3dnow"
CFLAGS="$save_CFLAGS $amd3dnow_CFLAGS"
AC_TRY_COMPILE([
#include <mm3dnow.h>
#ifndef __3dNOW__
#error Assembler CPP flag not enabled
#endif
],[
],[
have_gcc_3dnow=yes
])
AC_MSG_RESULT($have_gcc_3dnow)
CFLAGS="$save_CFLAGS"
if test x$have_gcc_3dnow = xyes; then
EXTRA_CFLAGS="$EXTRA_CFLAGS $amd3dnow_CFLAGS"
fi
fi
AC_ARG_ENABLE(sse,
AC_HELP_STRING([--enable-sse], [use SSE assembly routines [[default=yes]]]),
, enable_sse=yes)
if test x$enable_sse = xyes; then
save_CFLAGS="$CFLAGS"
have_gcc_sse=no
AC_MSG_CHECKING(for GCC -msse option)
sse_CFLAGS="-msse"
CFLAGS="$save_CFLAGS $sse_CFLAGS"
AC_TRY_COMPILE([
Fixed bug #943 Ozkan Sezer 2010-02-06 12:31:06 PST Hi: Here are some small fixes for compiling SDL against mingw-w64. (see http://mingw-w64.sourceforge.net/ . Despite the name, it supports both win32 and win64.) src/audio/windx5/directx.h and src/video/windx5/directx.h (both SDL-1.2 and SDL-1.3.) I get compilation errors about some union not having a member named u1 and alike, because of other system headers being included before this one and them already defining DUMMYUNIONNAME and stuff. This header probably assumes that those stuff are defined in windef.h, but mingw-w64 headers define them in _mingw.h. Easily fixed by moving NONAMELESSUNION definition to the top of the file. src/thread/win32/SDL_systhread.c (both SDL-1.2 and SDL-1.3.) : The __GNUC__ case for pfnSDL_CurrentBeginThread is 32-bit centric because _beginthreadex returns uintptr_t, not unsigned long which is 32 bits in win64. Changing the return type to uintptr_t fixes it. video/SDL_blit.h (and configure.in) (SDL-1.3-only) : MinGW-w64 uses msvcrt version of _aligned_malloc and _aligned_free and they are defined in intrin.h (similar to VC). Adding proper ifdefs fixes it. (Notes about macros to check: __MINGW32__ is defined for both mingw.org and for mingw-w64 for both win32 and win64, __MINGW64__ is only defined for _WIN64, so __MINGW64__ can't be used to detect mingw-w64: including _mingw.h and then checking for __MINGW64_VERSION_MAJOR does the trick.) SDL_win32video.h (SDL-1.3-only) : Tweaked the VINWER definition and location in order to avoid multiple redefinition warnings. Hope these are useful. Thanks.
2010-03-10 15:02:58 +00:00
#ifdef __MINGW32__
#include <_mingw.h>
#ifdef __MINGW64_VERSION_MAJOR
#include <intrin.h>
#else
#include <xmmintrin.h>
#endif
#else
#include <xmmintrin.h>
Fixed bug #943 Ozkan Sezer 2010-02-06 12:31:06 PST Hi: Here are some small fixes for compiling SDL against mingw-w64. (see http://mingw-w64.sourceforge.net/ . Despite the name, it supports both win32 and win64.) src/audio/windx5/directx.h and src/video/windx5/directx.h (both SDL-1.2 and SDL-1.3.) I get compilation errors about some union not having a member named u1 and alike, because of other system headers being included before this one and them already defining DUMMYUNIONNAME and stuff. This header probably assumes that those stuff are defined in windef.h, but mingw-w64 headers define them in _mingw.h. Easily fixed by moving NONAMELESSUNION definition to the top of the file. src/thread/win32/SDL_systhread.c (both SDL-1.2 and SDL-1.3.) : The __GNUC__ case for pfnSDL_CurrentBeginThread is 32-bit centric because _beginthreadex returns uintptr_t, not unsigned long which is 32 bits in win64. Changing the return type to uintptr_t fixes it. video/SDL_blit.h (and configure.in) (SDL-1.3-only) : MinGW-w64 uses msvcrt version of _aligned_malloc and _aligned_free and they are defined in intrin.h (similar to VC). Adding proper ifdefs fixes it. (Notes about macros to check: __MINGW32__ is defined for both mingw.org and for mingw-w64 for both win32 and win64, __MINGW64__ is only defined for _WIN64, so __MINGW64__ can't be used to detect mingw-w64: including _mingw.h and then checking for __MINGW64_VERSION_MAJOR does the trick.) SDL_win32video.h (SDL-1.3-only) : Tweaked the VINWER definition and location in order to avoid multiple redefinition warnings. Hope these are useful. Thanks.
2010-03-10 15:02:58 +00:00
#endif
#ifndef __SSE__
#error Assembler CPP flag not enabled
#endif
],[
],[
have_gcc_sse=yes
])
AC_MSG_RESULT($have_gcc_sse)
CFLAGS="$save_CFLAGS"
if test x$have_gcc_sse = xyes; then
EXTRA_CFLAGS="$EXTRA_CFLAGS $sse_CFLAGS"
fi
fi
AC_ARG_ENABLE(sse2,
AC_HELP_STRING([--enable-sse2], [use SSE2 assembly routines [[default=no]]]),
, enable_sse2=$default_ssemath)
if test x$enable_sse2 = xyes; then
save_CFLAGS="$CFLAGS"
have_gcc_sse2=no
AC_MSG_CHECKING(for GCC -msse2 option)
sse2_CFLAGS="-msse2"
CFLAGS="$save_CFLAGS $sse2_CFLAGS"
AC_TRY_COMPILE([
Fixed bug #943 Ozkan Sezer 2010-02-06 12:31:06 PST Hi: Here are some small fixes for compiling SDL against mingw-w64. (see http://mingw-w64.sourceforge.net/ . Despite the name, it supports both win32 and win64.) src/audio/windx5/directx.h and src/video/windx5/directx.h (both SDL-1.2 and SDL-1.3.) I get compilation errors about some union not having a member named u1 and alike, because of other system headers being included before this one and them already defining DUMMYUNIONNAME and stuff. This header probably assumes that those stuff are defined in windef.h, but mingw-w64 headers define them in _mingw.h. Easily fixed by moving NONAMELESSUNION definition to the top of the file. src/thread/win32/SDL_systhread.c (both SDL-1.2 and SDL-1.3.) : The __GNUC__ case for pfnSDL_CurrentBeginThread is 32-bit centric because _beginthreadex returns uintptr_t, not unsigned long which is 32 bits in win64. Changing the return type to uintptr_t fixes it. video/SDL_blit.h (and configure.in) (SDL-1.3-only) : MinGW-w64 uses msvcrt version of _aligned_malloc and _aligned_free and they are defined in intrin.h (similar to VC). Adding proper ifdefs fixes it. (Notes about macros to check: __MINGW32__ is defined for both mingw.org and for mingw-w64 for both win32 and win64, __MINGW64__ is only defined for _WIN64, so __MINGW64__ can't be used to detect mingw-w64: including _mingw.h and then checking for __MINGW64_VERSION_MAJOR does the trick.) SDL_win32video.h (SDL-1.3-only) : Tweaked the VINWER definition and location in order to avoid multiple redefinition warnings. Hope these are useful. Thanks.
2010-03-10 15:02:58 +00:00
#ifdef __MINGW32__
#include <_mingw.h>
#ifdef __MINGW64_VERSION_MAJOR
#include <intrin.h>
#else
#include <emmintrin.h>
#endif
#else
#include <emmintrin.h>
Fixed bug #943 Ozkan Sezer 2010-02-06 12:31:06 PST Hi: Here are some small fixes for compiling SDL against mingw-w64. (see http://mingw-w64.sourceforge.net/ . Despite the name, it supports both win32 and win64.) src/audio/windx5/directx.h and src/video/windx5/directx.h (both SDL-1.2 and SDL-1.3.) I get compilation errors about some union not having a member named u1 and alike, because of other system headers being included before this one and them already defining DUMMYUNIONNAME and stuff. This header probably assumes that those stuff are defined in windef.h, but mingw-w64 headers define them in _mingw.h. Easily fixed by moving NONAMELESSUNION definition to the top of the file. src/thread/win32/SDL_systhread.c (both SDL-1.2 and SDL-1.3.) : The __GNUC__ case for pfnSDL_CurrentBeginThread is 32-bit centric because _beginthreadex returns uintptr_t, not unsigned long which is 32 bits in win64. Changing the return type to uintptr_t fixes it. video/SDL_blit.h (and configure.in) (SDL-1.3-only) : MinGW-w64 uses msvcrt version of _aligned_malloc and _aligned_free and they are defined in intrin.h (similar to VC). Adding proper ifdefs fixes it. (Notes about macros to check: __MINGW32__ is defined for both mingw.org and for mingw-w64 for both win32 and win64, __MINGW64__ is only defined for _WIN64, so __MINGW64__ can't be used to detect mingw-w64: including _mingw.h and then checking for __MINGW64_VERSION_MAJOR does the trick.) SDL_win32video.h (SDL-1.3-only) : Tweaked the VINWER definition and location in order to avoid multiple redefinition warnings. Hope these are useful. Thanks.
2010-03-10 15:02:58 +00:00
#endif
#ifndef __SSE2__
#error Assembler CPP flag not enabled
#endif
],[
],[
have_gcc_sse2=yes
])
AC_MSG_RESULT($have_gcc_sse2)
CFLAGS="$save_CFLAGS"
if test x$have_gcc_sse2 = xyes; then
EXTRA_CFLAGS="$EXTRA_CFLAGS $sse2_CFLAGS"
fi
fi
AC_ARG_ENABLE(altivec,
AC_HELP_STRING([--enable-altivec], [use Altivec assembly routines [[default=yes]]]),
, enable_altivec=yes)
if test x$enable_altivec = xyes; then
save_CFLAGS="$CFLAGS"
have_gcc_altivec=no
have_altivec_h_hdr=no
altivec_CFLAGS="-maltivec"
CFLAGS="$save_CFLAGS $altivec_CFLAGS"
AC_MSG_CHECKING(for Altivec with GCC altivec.h and -maltivec option)
AC_TRY_COMPILE([
#include <altivec.h>
vector unsigned int vzero() {
return vec_splat_u32(0);
}
],[
],[
have_gcc_altivec=yes
have_altivec_h_hdr=yes
])
AC_MSG_RESULT($have_gcc_altivec)
if test x$have_gcc_altivec = xno; then
AC_MSG_CHECKING(for Altivec with GCC -maltivec option)
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 altivec.h and -faltivec option)
altivec_CFLAGS="-faltivec"
CFLAGS="$save_CFLAGS $altivec_CFLAGS"
AC_TRY_COMPILE([
#include <altivec.h>
vector unsigned int vzero() {
return vec_splat_u32(0);
}
],[
],[
have_gcc_altivec=yes
have_altivec_h_hdr=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)
AC_TRY_COMPILE([
vector unsigned int vzero() {
return vec_splat_u32(0);
}
],[
],[
have_gcc_altivec=yes
])
AC_MSG_RESULT($have_gcc_altivec)
fi
CFLAGS="$save_CFLAGS"
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
EXTRA_CFLAGS="$EXTRA_CFLAGS $altivec_CFLAGS"
fi
fi
fi
dnl See if the OSS audio interface is supported
CheckOSS()
{
AC_ARG_ENABLE(oss,
AC_HELP_STRING([--enable-oss], [support the OSS audio API [[default=yes]]]),
, enable_oss=yes)
if test x$enable_audio = xyes -a x$enable_oss = xyes; then
AC_MSG_CHECKING(for OSS audio support)
have_oss=no
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
AC_DEFINE(SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H)
])
fi
AC_MSG_RESULT($have_oss)
if test x$have_oss = xyes; then
AC_DEFINE(SDL_AUDIO_DRIVER_OSS)
SOURCES="$SOURCES $srcdir/src/audio/dsp/*.c"
SOURCES="$SOURCES $srcdir/src/audio/dma/*.c"
have_audio=yes
# We may need to link with ossaudio emulation library
case "$host" in
*-*-openbsd*|*-*-netbsd*)
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lossaudio";;
esac
fi
fi
}
dnl See if the ALSA audio interface is supported
CheckALSA()
{
AC_ARG_ENABLE(alsa,
AC_HELP_STRING([--enable-alsa], [support the ALSA audio API [[default=yes]]]),
, enable_alsa=yes)
if test x$enable_audio = xyes -a x$enable_alsa = xyes; then
AM_PATH_ALSA(0.9.0, have_alsa=yes, have_alsa=no)
# Restore all flags from before the ALSA detection runs
CFLAGS="$alsa_save_CFLAGS"
LDFLAGS="$alsa_save_LDFLAGS"
LIBS="$alsa_save_LIBS"
if test x$have_alsa = xyes; then
AC_ARG_ENABLE(alsa-shared,
AC_HELP_STRING([--enable-alsa-shared], [dynamically load ALSA audio support [[default=yes]]]),
, enable_alsa_shared=yes)
alsa_lib=[`find_lib "libasound.so.*" "$ALSA_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
AC_DEFINE(SDL_AUDIO_DRIVER_ALSA)
SOURCES="$SOURCES $srcdir/src/audio/alsa/*.c"
EXTRA_CFLAGS="$EXTRA_CFLAGS $ALSA_CFLAGS"
if test x$have_loadso != xyes && \
test x$enable_alsa_shared = xyes; then
AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic ALSA loading])
fi
if test x$have_loadso = xyes && \
test x$enable_alsa_shared = xyes && test x$alsa_lib != x; then
echo "-- dynamic libasound -> $alsa_lib"
AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ALSA_DYNAMIC, "$alsa_lib")
else
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ALSA_LIBS"
fi
have_audio=yes
fi
fi
}
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
])
AC_MSG_RESULT($have_dmedia)
# Set up files for the audio library
if test x$have_dmedia = xyes; then
AC_DEFINE(SDL_AUDIO_DRIVER_DMEDIA)
SOURCES="$SOURCES $srcdir/src/audio/dmedia/*.c"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -laudio"
have_audio=yes
fi
fi
}
Date: Sun, 26 Feb 2006 11:25:09 +0900 From: Hayashi Naoyuki Subject: Re: [SDL] CVS stable again, please update SDL ports Some problems are caused on Tru64 UNIX. If applying SDL12-osf1.path, these problems are fixed. 1. configure-script say "recursive mutexes... no" and "pthread semaphores... no". checking for pthreads... yes checking for recursive mutexes... no checking for pthread semaphores... no This is because it compiled without pthread_cflags and pthread_lib when checking recursive mutexes and pthread semaphores. 2. Compiling src/audio/mme/SDL_mmeaudio.c fails. cc: Severe: ./src/audio/mme/SDL_mmeaudio.c, line 25: Cannot find file <mme_api.h> specified in #include directive. (noinclfilef) #include <mme_api.h> -^ This is because BUILD_CFLAGS is wrong. 3. Compiling src/cdrom/osf/SDL_syscdrom.c fails. cc: Warning: ./src/cdrom/osf/SDL_syscdrom.c, line 176: Too few actual parameters in the invocation of the macro "SDL_stack_alloc". (toofewactuals) cdpath = SDL_stack_alloc(len); ------------------------------------^ cc: Error: ./src/cdrom/osf/SDL_syscdrom.c, line 176: Invalid expression. (badexpr) cdpath = SDL_stack_alloc(len); -----------------^ SDL_stack_alloc is defined in include/SDL_stdinc.h. #define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)*count) 4. Linking fails if running configure with --enable-x11-shared=yes. /usr/ccs/bin/ld: Warning: Unresolved: p_XData32 5. Compiling src/video/x11/SDL_x11dyn.c fails if running configure with --enable-x11-shared=no. cc: Error: ./src/video/x11/SDL_x11sym.h, line 149: In this statement, "_SmtBufferOverflow" is not declared. (undeclared) SDL_X11_SYM(1,void,_SmtBufferOverflow,(Display *dpy,register smtDisplayPtr)) ^ cc: Error: ./src/video/x11/SDL_x11sym.h, line 150: In this statement, "_SmtBufferOverflow" is not declared. (undeclared) SDL_X11_SYM(1,void,_SmtBufferOverflow,(Display *dpy,register smtDisplayPtr)) ^ cc: Error: ./src/video/x11/SDL_x11sym.h, line 150: In this statement, "_SmtIpError" is not declared. (undeclared) SDL_X11_SYM(1,void,_SmtIpError,(Display *dpy,register smtDisplayPtr, int)) ^ --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401442
2006-02-26 04:54:01 +00:00
dnl Check whether we want to use Tru64 UNIX native audio or not
CheckMME()
{
dnl Make sure we are running on an Tru64 UNIX
case $ARCH in
osf)
;;
*)
return
;;
esac
if test x$enable_audio = xyes; then
AC_MSG_CHECKING(for MME audio support)
MME_CFLAGS="-I/usr/include/mme"
MME_LIBS="-lmme"
have_mme=no
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $MME_CFLAGS"
AC_TRY_COMPILE([
#include <mme_api.h>
],[
HWAVEOUT sound;
],[
have_mme=yes
])
CFLAGS="$save_CFLAGS"
AC_MSG_RESULT($have_mme)
# Set up files for the audio library
if test x$have_mme = xyes; then
AC_DEFINE(SDL_AUDIO_DRIVER_MMEAUDIO)
SOURCES="$SOURCES $srcdir/src/audio/mme/*.c"
EXTRA_CFLAGS="$EXTRA_CFLAGS $MME_CFLAGS"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $MME_LIBS"
Date: Sun, 26 Feb 2006 11:25:09 +0900 From: Hayashi Naoyuki Subject: Re: [SDL] CVS stable again, please update SDL ports Some problems are caused on Tru64 UNIX. If applying SDL12-osf1.path, these problems are fixed. 1. configure-script say "recursive mutexes... no" and "pthread semaphores... no". checking for pthreads... yes checking for recursive mutexes... no checking for pthread semaphores... no This is because it compiled without pthread_cflags and pthread_lib when checking recursive mutexes and pthread semaphores. 2. Compiling src/audio/mme/SDL_mmeaudio.c fails. cc: Severe: ./src/audio/mme/SDL_mmeaudio.c, line 25: Cannot find file <mme_api.h> specified in #include directive. (noinclfilef) #include <mme_api.h> -^ This is because BUILD_CFLAGS is wrong. 3. Compiling src/cdrom/osf/SDL_syscdrom.c fails. cc: Warning: ./src/cdrom/osf/SDL_syscdrom.c, line 176: Too few actual parameters in the invocation of the macro "SDL_stack_alloc". (toofewactuals) cdpath = SDL_stack_alloc(len); ------------------------------------^ cc: Error: ./src/cdrom/osf/SDL_syscdrom.c, line 176: Invalid expression. (badexpr) cdpath = SDL_stack_alloc(len); -----------------^ SDL_stack_alloc is defined in include/SDL_stdinc.h. #define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)*count) 4. Linking fails if running configure with --enable-x11-shared=yes. /usr/ccs/bin/ld: Warning: Unresolved: p_XData32 5. Compiling src/video/x11/SDL_x11dyn.c fails if running configure with --enable-x11-shared=no. cc: Error: ./src/video/x11/SDL_x11sym.h, line 149: In this statement, "_SmtBufferOverflow" is not declared. (undeclared) SDL_X11_SYM(1,void,_SmtBufferOverflow,(Display *dpy,register smtDisplayPtr)) ^ cc: Error: ./src/video/x11/SDL_x11sym.h, line 150: In this statement, "_SmtBufferOverflow" is not declared. (undeclared) SDL_X11_SYM(1,void,_SmtBufferOverflow,(Display *dpy,register smtDisplayPtr)) ^ cc: Error: ./src/video/x11/SDL_x11sym.h, line 150: In this statement, "_SmtIpError" is not declared. (undeclared) SDL_X11_SYM(1,void,_SmtIpError,(Display *dpy,register smtDisplayPtr, int)) ^ --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401442
2006-02-26 04:54:01 +00:00
have_audio=yes
fi
fi
}
dnl Find the ESD includes and libraries
CheckESD()
{
AC_ARG_ENABLE(esd,
AC_HELP_STRING([--enable-esd], [support the Enlightened Sound Daemon [[default=yes]]]),
, enable_esd=yes)
if test x$enable_audio = xyes -a x$enable_esd = xyes; then
AM_PATH_ESD(0.2.8, have_esd=yes, have_esd=no)
if test x$have_esd = xyes; then
AC_ARG_ENABLE(esd-shared,
AC_HELP_STRING([--enable-esd-shared], [dynamically load ESD audio support [[default=yes]]]),
, enable_esd_shared=yes)
esd_lib=[`find_lib "libesd.so.*" "$ESD_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
AC_DEFINE(SDL_AUDIO_DRIVER_ESD)
SOURCES="$SOURCES $srcdir/src/audio/esd/*.c"
EXTRA_CFLAGS="$EXTRA_CFLAGS $ESD_CFLAGS"
if test x$have_loadso != xyes && \
test x$enable_esd_shared = xyes; then
AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic ESD loading])
fi
if test x$have_loadso = xyes && \
test x$enable_esd_shared = xyes && test x$esd_lib != x; then
echo "-- dynamic libesd -> $esd_lib"
AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ESD_DYNAMIC, "$esd_lib")
else
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ESD_LIBS"
fi
have_audio=yes
fi
fi
}
dnl Find PulseAudio
CheckPulseAudio()
{
AC_ARG_ENABLE(pulseaudio,
AC_HELP_STRING([--enable-pulseaudio], [use PulseAudio [[default=yes]]]),
, enable_pulseaudio=yes)
if test x$enable_audio = xyes -a x$enable_pulseaudio = xyes; then
audio_pulseaudio=no
PULSEAUDIO_REQUIRED_VERSION=0.9
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
AC_MSG_CHECKING(for PulseAudio $PULSEAUDIO_REQUIRED_VERSION support)
if test x$PKG_CONFIG != xno; then
if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $PULSEAUDIO_REQUIRED_VERSION libpulse-simple; then
PULSEAUDIO_CFLAGS=`$PKG_CONFIG --cflags libpulse-simple`
PULSEAUDIO_LIBS=`$PKG_CONFIG --libs libpulse-simple`
audio_pulseaudio=yes
fi
fi
AC_MSG_RESULT($audio_pulseaudio)
if test x$audio_pulseaudio = xyes; then
AC_ARG_ENABLE(pulseaudio-shared,
AC_HELP_STRING([--enable-pulseaudio-shared], [dynamically load PulseAudio support [[default=yes]]]),
, enable_pulseaudio_shared=yes)
pulseaudio_lib=[`find_lib "libpulse-simple.so.*" "$PULSEAUDIO_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
AC_DEFINE(SDL_AUDIO_DRIVER_PULSEAUDIO)
SOURCES="$SOURCES $srcdir/src/audio/pulseaudio/*.c"
EXTRA_CFLAGS="$EXTRA_CFLAGS $PULSEAUDIO_CFLAGS"
if test x$have_loadso != xyes && \
test x$enable_pulseaudio_shared = xyes; then
AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic PulseAudio loading])
fi
if test x$have_loadso = xyes && \
test x$enable_pulseaudio_shared = xyes && test x$pulseaudio_lib != x; then
echo "-- dynamic libpulse-simple -> $pulseaudio_lib"
AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC, "$pulseaudio_lib")
else
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PULSEAUDIO_LIBS"
fi
have_audio=yes
fi
fi
}
CheckARTSC()
{
AC_ARG_ENABLE(arts,
AC_HELP_STRING([--enable-arts], [support the Analog Real Time Synthesizer [[default=yes]]]),
, enable_arts=yes)
if test x$enable_audio = xyes -a x$enable_arts = xyes; then
AC_PATH_PROG(ARTSCONFIG, artsc-config)
if test x$ARTSCONFIG = x -o x$ARTSCONFIG = x'"$ARTSCONFIG"'; then
: # arts isn't installed
else
ARTS_CFLAGS=`$ARTSCONFIG --cflags`
ARTS_LIBS=`$ARTSCONFIG --libs`
AC_MSG_CHECKING(for aRts development environment)
audio_arts=no
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $ARTS_CFLAGS"
AC_TRY_COMPILE([
#include <artsc.h>
],[
arts_stream_t stream;
],[
audio_arts=yes
])
CFLAGS="$save_CFLAGS"
AC_MSG_RESULT($audio_arts)
if test x$audio_arts = xyes; then
AC_ARG_ENABLE(arts-shared,
AC_HELP_STRING([--enable-arts-shared], [dynamically load aRts audio support [[default=yes]]]),
, enable_arts_shared=yes)
arts_lib=[`find_lib "libartsc.so.*" "$ARTS_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
AC_DEFINE(SDL_AUDIO_DRIVER_ARTS)
SOURCES="$SOURCES $srcdir/src/audio/arts/*.c"
EXTRA_CFLAGS="$EXTRA_CFLAGS $ARTS_CFLAGS"
if test x$have_loadso != xyes && \
test x$enable_arts_shared = xyes; then
AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic ARTS loading])
fi
if test x$have_loadso = xyes && \
test x$enable_arts_shared = xyes && test x$arts_lib != x; then
echo "-- dynamic libartsc -> $arts_lib"
AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ARTS_DYNAMIC, "$arts_lib")
else
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARTS_LIBS"
fi
have_audio=yes
fi
fi
fi
}
dnl See if the NAS audio interface is supported
CheckNAS()
{
AC_ARG_ENABLE(nas,
AC_HELP_STRING([--enable-nas], [support the NAS audio API [[default=yes]]]),
, enable_nas=yes)
if test x$enable_audio = xyes -a x$enable_nas = xyes; then
AC_CHECK_HEADER(audio/audiolib.h, have_nas_hdr=yes)
AC_CHECK_LIB(audio, AuOpenServer, have_nas_lib=yes)
AC_MSG_CHECKING(for NAS audio support)
have_nas=no
if test x$have_nas_hdr = xyes -a x$have_nas_lib = xyes; then
have_nas=yes
NAS_LIBS="-laudio"
elif test -r /usr/X11R6/include/audio/audiolib.h; then
have_nas=yes
NAS_CFLAGS="-I/usr/X11R6/include/"
NAS_LIBS="-L/usr/X11R6/lib -laudio -lXt"
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
NAS_LIBS="-lnas -lXt"
fi
AC_MSG_RESULT($have_nas)
if test x$have_nas = xyes; then
AC_ARG_ENABLE(nas-shared,
AC_HELP_STRING([--enable-nas-shared], [dynamically load NAS audio support [[default=yes]]]),
, enable_nas_shared=yes)
nas_lib=[`find_lib "libaudio.so.*" "$NAS_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
if test x$have_loadso != xyes && \
test x$enable_nas_shared = xyes; then
AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic NAS loading])
fi
if test x$have_loadso = xyes && \
test x$enable_nas_shared = xyes && test x$nas_lib != x; then
echo "-- dynamic libaudio -> $nas_lib"
AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_NAS_DYNAMIC, "$nas_lib")
else
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $NAS_LIBS"
fi
AC_DEFINE(SDL_AUDIO_DRIVER_NAS)
SOURCES="$SOURCES $srcdir/src/audio/nas/*.c"
EXTRA_CFLAGS="$EXTRA_CFLAGS $NAS_CFLAGS"
have_audio=yes
fi
fi
}
dnl rcg07142001 See if the user wants the disk writer audio driver...
CheckDiskAudio()
{
AC_ARG_ENABLE(diskaudio,
AC_HELP_STRING([--enable-diskaudio], [support the disk writer audio driver [[default=yes]]]),
, enable_diskaudio=yes)
if test x$enable_audio = xyes -a x$enable_diskaudio = xyes; then
AC_DEFINE(SDL_AUDIO_DRIVER_DISK)
SOURCES="$SOURCES $srcdir/src/audio/disk/*.c"
fi
}
dnl rcg03142006 See if the user wants the dummy audio driver...
CheckDummyAudio()
{
AC_ARG_ENABLE(dummyaudio,
AC_HELP_STRING([--enable-dummyaudio], [support the dummy audio driver [[default=yes]]]),
, enable_dummyaudio=yes)
if test x$enable_audio = xyes -a x$enable_dummyaudio = xyes; then
AC_DEFINE(SDL_AUDIO_DRIVER_DUMMY)
SOURCES="$SOURCES $srcdir/src/audio/dummy/*.c"
fi
}
dnl See if GCC's -fvisibility=hidden is supported (gcc4 and later, usually).
dnl Details of this flag are here: http://gcc.gnu.org/wiki/Visibility
CheckVisibilityHidden()
{
AC_MSG_CHECKING(for GCC -fvisibility=hidden option)
have_gcc_fvisibility=no
visibility_CFLAGS="-fvisibility=hidden"
save_CFLAGS="$CFLAGS"
CFLAGS="$save_CFLAGS $visibility_CFLAGS -Werror"
AC_TRY_COMPILE([
#if !defined(__GNUC__) || __GNUC__ < 4
#error SDL only uses visibility attributes in GCC 4 or newer
#endif
],[
],[
have_gcc_fvisibility=yes
])
AC_MSG_RESULT($have_gcc_fvisibility)
CFLAGS="$save_CFLAGS"
if test x$have_gcc_fvisibility = xyes; then
EXTRA_CFLAGS="$EXTRA_CFLAGS $visibility_CFLAGS"
fi
}
dnl Find the X11 include and library directories
CheckX11()
{
2010-08-02 04:14:53 +00:00
AC_ARG_ENABLE(video-x11,
AC_HELP_STRING([--enable-video-x11], [use X11 video driver [[default=yes]]]),
, enable_video_x11=yes)
if test x$enable_video = xyes -a x$enable_video_x11 = xyes; then
case "$host" in
*-*-darwin*)
# This isn't necessary for X11, but fixes GLX detection
if test "x$x_includes" = xNONE && test "x$x_libraries" = xNONE; then
x_includes="/usr/X11R6/include"
x_libraries="/usr/X11R6/lib"
fi
;;
esac
AC_PATH_X
AC_PATH_XTRA
if test x$have_x = xyes; then
# Only allow dynamically loaded X11 if the X11 function pointers
# will not end up in the global namespace, which causes problems
# with other libraries calling X11 functions.
x11_symbols_private=$have_gcc_fvisibility
AC_ARG_ENABLE(x11-shared,
AC_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=maybe]]]),
, enable_x11_shared=maybe)
case "$host" in
*-*-darwin*) # Latest Mac OS X actually ships with Xrandr/Xrender libs...
x11_symbols_private=yes
x11_lib='/usr/X11R6/lib/libX11.6.dylib'
x11ext_lib='/usr/X11R6/lib/libXext.6.dylib'
xrender_lib='/usr/X11R6/lib/libXrender.1.dylib'
xrandr_lib='/usr/X11R6/lib/libXrandr.2.dylib'
xinput_lib='/usr/X11R6/lib/libXi.6.dylib'
xss_lib='/usr/X11R6/lib/libXss.6.dylib'
xdamage_lib='/usr/X11R6/lib/libXdamage.1.dylib'
2010-07-29 05:24:13 +00:00
xfixes_lib='/usr/X11R6/lib/libXfixes.3.dylib'
;;
*-*-osf*)
x11_lib='libX11.so'
x11ext_lib='libXext.so'
;;
*-*-irix*) # IRIX 6.5 requires that we use /usr/lib32
x11_lib='libX11.so'
x11ext_lib='libXext.so'
;;
*)
x11_lib=[`find_lib "libX11.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
x11ext_lib=[`find_lib "libXext.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
xrender_lib=[`find_lib "libXrender.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
xrandr_lib=[`find_lib "libXrandr.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
xinput_lib=[`find_lib "libXi.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
xss_lib=[`find_lib "libXss.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
xdamage_lib=[`find_lib "libXdamage.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
xfixes_lib=[`find_lib "libXfixes.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
;;
esac
if test x$ac_cv_func_shmat != xyes; then
X_CFLAGS="$X_CFLAGS -DNO_SHARED_MEMORY"
fi
CFLAGS="$CFLAGS $X_CFLAGS"
LDFLAGS="$LDFLAGS $X_LIBS"
AC_DEFINE(SDL_VIDEO_DRIVER_X11)
SOURCES="$SOURCES $srcdir/src/video/x11/*.c"
SOURCES="$SOURCES $srcdir/src/video/Xext/XmuStdCmap/*.c"
EXTRA_CFLAGS="$EXTRA_CFLAGS $X_CFLAGS"
if test x$enable_x11_shared = xmaybe; then
enable_x11_shared=$x11_symbols_private
fi
if test x$have_loadso != xyes && \
test x$enable_x11_shared = xyes; then
AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic X11 loading])
enable_x11_shared=no
fi
if test x$x11_symbols_private != xyes && \
test x$enable_x11_shared = xyes; then
AC_MSG_WARN([You must have gcc4 (-fvisibility=hidden) for dynamic X11 loading])
enable_x11_shared=no
fi
if test x$have_loadso = xyes && \
test x$enable_x11_shared = xyes && test x$x11_lib != x && test x$x11ext_lib != x; then
echo "-- dynamic libX11 -> $x11_lib"
echo "-- dynamic libX11ext -> $x11ext_lib"
AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC, "$x11_lib")
AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT, "$x11ext_lib")
else
enable_x11_shared=no
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $X_LIBS -lX11 -lXext"
fi
have_video=yes
AC_ARG_ENABLE(video-x11-vm,
AC_HELP_STRING([--enable-video-x11-vm], [use X11 VM extension for fullscreen [[default=yes]]]),
, enable_video_x11_vm=yes)
if test x$enable_video_x11_vm = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_X11_VIDMODE)
SOURCES="$SOURCES $srcdir/src/video/Xext/Xxf86vm/*.c"
fi
AC_ARG_ENABLE(video-x11-xv,
AC_HELP_STRING([--enable-video-x11-xv], [use X11 XvImage extension for video [[default=yes]]]),
, enable_video_x11_xv=yes)
if test x$enable_video_x11_xv = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XV)
SOURCES="$SOURCES $srcdir/src/video/Xext/Xv/*.c"
fi
AC_ARG_ENABLE(video-x11-xinerama,
AC_HELP_STRING([--enable-video-x11-xinerama], [enable X11 Xinerama support [[default=yes]]]),
, enable_video_x11_xinerama=yes)
if test x$enable_video_x11_xinerama = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINERAMA)
SOURCES="$SOURCES $srcdir/src/video/Xext/Xinerama/*.c"
fi
2010-07-13 06:43:10 +00:00
AC_ARG_ENABLE(video-x11-xshape,
AC_HELP_STRING([--enable-video-x11-xshape], [enable X11 XShape support [[default=yes]]]),
, enable_video_x11_xshape=yes)
if test x$enable_video_x11_xshape = xyes; then
AC_CHECK_HEADER(X11/extensions/shape.h,
have_shape_h_hdr=yes,
have_shape_h_hdr=no,
[#include <X11/Xlib.h>
])
if test x$have_shape_h_hdr = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XSHAPE)
fi
fi
AC_ARG_ENABLE(video-x11-xrandr,
AC_HELP_STRING([--enable-video-x11-xrandr], [enable X11 Xrandr extension for fullscreen [[default=yes]]]),
, enable_video_x11_xrandr=yes)
if test x$enable_video_x11_xrandr = xyes; then
definitely_enable_video_x11_xrandr=no
AC_CHECK_HEADER(X11/extensions/Xrandr.h,
have_xrandr_h_hdr=yes,
have_xrandr_h_hdr=no,
[#include <X11/Xlib.h>
])
if test x$have_xrandr_h_hdr = xyes; then
if test x$enable_x11_shared = xyes && test x$xrandr_lib != x ; then
echo "-- dynamic libXrandr -> $xrandr_lib"
AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR, "$xrandr_lib")
definitely_enable_video_x11_xrandr=yes
else
AC_CHECK_LIB(Xrandr, XRRQueryExtension, have_xrandr_lib=yes)
if test x$have_xrandr_lib = xyes ; then
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXrandr"
definitely_enable_video_x11_xrandr=yes
fi
fi
fi
fi
if test x$definitely_enable_video_x11_xrandr = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRANDR)
fi
AC_ARG_ENABLE(video-x11-xinput,
AC_HELP_STRING([--enable-video-x11-xinput], [enable X11 XInput extension for manymouse, tablets, etc [[default=yes]]]),
, enable_video_x11_xinput=yes)
if test x$enable_video_x11_xinput = xyes; then
definitely_enable_video_x11_xinput=no
AC_CHECK_HEADER(X11/extensions/XInput.h,
have_xinput_h_hdr=yes,
have_xinput_h_hdr=no,
[#include <X11/Xlib.h>
])
if test x$have_xinput_h_hdr = xyes; then
if test x$enable_x11_shared = xyes && test x$xinput_lib != x ; then
echo "-- dynamic libXi -> $xinput_lib"
AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT, "$xinput_lib")
definitely_enable_video_x11_xinput=yes
else
AC_CHECK_LIB(Xi, XOpenDevice, have_xinput_lib=yes)
if test x$have_xinput_lib = xyes ; then
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXi"
definitely_enable_video_x11_xinput=yes
fi
fi
fi
fi
if test x$definitely_enable_video_x11_xinput = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINPUT)
fi
AC_ARG_ENABLE(video-x11-scrnsaver,
AC_HELP_STRING([--enable-video-x11-scrnsaver], [enable X11 screensaver extension [[default=yes]]]),
, enable_video_x11_scrnsaver=yes)
if test x$enable_video_x11_scrnsaver = xyes; then
AC_CHECK_HEADER(X11/extensions/scrnsaver.h,
have_scrnsaver_h_hdr=yes,
have_scrnsaver_h_hdr=no,
[#include <X11/Xlib.h>
])
if test x$have_scrnsaver_h_hdr = xyes; then
if test x$enable_x11_shared = xyes && test x$xss_lib != x ; then
echo "-- dynamic libXss -> $xss_lib"
AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS, "$xss_lib")
definitely_enable_video_x11_scrnsaver=yes
else
AC_CHECK_LIB(Xss, XScreenSaverSuspend, have_xss_lib=yes)
if test x$have_xss_lib = xyes ; then
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXss"
definitely_enable_video_x11_scrnsaver=yes
fi
fi
fi
fi
if test x$definitely_enable_video_x11_scrnsaver = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_X11_SCRNSAVER)
fi
AC_ARG_ENABLE(video-x11-xrender,
AC_HELP_STRING([--enable-video-x11-xrender], [enable X11 Xrender extension [[default=yes]]]),
, enable_video_x11_xrender=yes)
if test x$enable_video_x11_xrender = xyes; then
AC_CHECK_HEADER(X11/extensions/Xrender.h,
have_xrender_h_hdr=yes,
have_xrender_h_hdr=no,
[#include <X11/Xlib.h>
])
if test x$have_xrender_h_hdr = xyes; then
if test x$enable_x11_shared = xyes && test x$xrender_lib != x ; then
echo "-- dynamic libXrender -> $xrender_lib"
AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER, "$xrender_lib")
definitely_enable_video_x11_xrender=yes
else
AC_CHECK_LIB(Xrender, XRenderQueryExtension, have_xrender_lib=yes)
if test x$have_xrender_lib = xyes ; then
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXrender"
definitely_enable_video_x11_xrender=yes
fi
fi
fi
fi
if test x$definitely_enable_video_x11_xrender = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRENDER)
fi
AC_ARG_ENABLE(video-x11-xdamage-xfixes,
AC_HELP_STRING([--enable-video-x11-xdamage-xfixes], [enable X11 Xdamage and Xfixes extensions [[default=yes]]]),
, enable_video_x11_xdamage=yes)
if test x$enable_video_x11_xdamage = xyes && test x$definitely_enable_video_x11_xrender = xyes ; then
AC_CHECK_HEADER(X11/extensions/Xdamage.h,
have_xdamage_h_hdr=yes,
have_xdamage_h_hdr=no,
[#include <X11/Xlib.h>
])
AC_CHECK_HEADER(X11/extensions/Xfixes.h,
have_xfixes_h_hdr=yes,
have_xfixes_h_hdr=no,
[#include <X11/Xlib.h>
])
if test x$have_xdamage_h_hdr = xyes && test x$have_xfixes_h_hdr = xyes ; then
if test x$enable_x11_shared = xyes && test x$xdamage_lib != x && test x$xfixes_lib != x ; then
echo "-- dynamic libXdamage -> $xdamage_lib"
echo "-- dynamic libXfixes -> $xfixes_lib"
AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XDAMAGE, "$xdamage_lib")
AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES, "$xfixes_lib")
definitely_enable_video_x11_xdamage=yes
definitely_enable_video_x11_xfixes=yes
else
AC_CHECK_LIB(Xdamage, XDamageQueryExtension, have_xdamage_lib=yes)
AC_CHECK_LIB(Xfixes, XFixesQueryExtension, have_xfixes_lib=yes)
if test x$have_xdamage_lib = xyes && test x$have_xfixes_lib = xyes ; then
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXdamage -lXfixes"
definitely_enable_video_x11_xdamage=yes
definitely_enable_video_x11_xfixes=yes
fi
fi
fi
fi
if test x$definitely_enable_video_x11_xdamage = xyes && test x$definitely_enable_video_x11_xfixes = xyes ; then
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XDAMAGE)
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XFIXES)
fi
AC_ARG_ENABLE(render-x11,
AC_HELP_STRING([--enable-render-x11], [enable the X11 render driver [[default=yes]]]),
, enable_render_x11=yes)
if test x$enable_render_x11 = xyes; then
AC_DEFINE(SDL_VIDEO_RENDER_X11)
fi
fi
fi
}
dnl Check for QNX photon video driver
CheckPHOTON()
{
AC_ARG_ENABLE(video-photon,
AC_HELP_STRING([--enable-video-photon], [use QNX Photon video driver [[default=yes]]]),
, 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
AC_DEFINE(SDL_VIDEO_DRIVER_PHOTON)
SOURCES="$SOURCES $srcdir/src/video/photon/*.c"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lph -lphrender"
have_video=yes
CheckOpenGLQNX
fi
fi
}
dnl Check for QNX photon video driver
CheckQNXGF()
{
AC_ARG_ENABLE(video-qnxgf,
AC_HELP_STRING([--enable-video-qnxgf], [use QNX GF video driver [[default=yes]]]),
, enable_video_qnxgf=yes)
if test x$enable_video = xyes -a x$enable_video_qnxgf = xyes; then
AC_MSG_CHECKING(for QNX GF support)
video_qnxgf=no
AC_TRY_COMPILE([
#include <gf/gf.h>
#include <gf/gf3d.h>
],[
gf_3d_config_info_t* gfinfo;
],[
video_qnxgf=yes
])
AC_MSG_RESULT($video_qnxgf)
if test x$video_qnxgf = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_QNXGF)
SOURCES="$SOURCES $srcdir/src/video/qnxgf/*.c"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lgf"
# Add HIDDI library for HID support using GF
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lhiddi"
have_video=yes
CheckOpenGLESQNX
fi
fi
}
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 Cocoa video driver for Mac OS X (but not Darwin)
CheckCOCOA()
{
AC_ARG_ENABLE(video-cocoa,
AC_HELP_STRING([--enable-video-cocoa], [use Cocoa 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_COCOA)
SOURCES="$SOURCES $srcdir/src/video/cocoa/*.m"
have_video=yes
fi
fi
}
dnl Find DirectFB
CheckDirectFB()
{
AC_ARG_ENABLE(video-directfb,
AC_HELP_STRING([--enable-video-directfb], [use DirectFB video driver [[default=no]]]),
, enable_video_directfb=no)
if test x$enable_video = xyes -a x$enable_video_directfb = xyes; then
video_directfb=no
DIRECTFB_REQUIRED_VERSION=1.0.0
AC_PATH_PROG(DIRECTFBCONFIG, directfb-config, no)
if test x$DIRECTFBCONFIG = xno; then
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test x$PKG_CONFIG != xno; then
if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb; then
DIRECTFB_CFLAGS=`$PKG_CONFIG --cflags directfb`
DIRECTFB_LIBS=`$PKG_CONFIG --libs directfb`
DIRECTFB_PREFIX=`$PKG_CONFIG --variable=prefix directfb`
video_directfb=yes
fi
fi
else
set -- `echo $DIRECTFB_REQUIRED_VERSION | sed 's/\./ /g'`
NEED_VERSION=`expr $1 \* 10000 + $2 \* 100 + $3`
set -- `directfb-config --version | sed 's/\./ /g'`
HAVE_VERSION=`expr $1 \* 10000 + $2 \* 100 + $3`
if test $HAVE_VERSION -ge $NEED_VERSION; then
DIRECTFB_CFLAGS=`$DIRECTFBCONFIG --cflags`
DIRECTFB_LIBS=`$DIRECTFBCONFIG --libs`
DIRECTFB_PREFIX=`$DIRECTFBCONFIG --prefix`
video_directfb=yes
fi
fi
if test x$video_directfb = xyes; then
# SuSE 11.1 installs directfb-config without directfb-devel
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $DIRECTFB_CFLAGS"
AC_CHECK_HEADER(directfb.h, have_directfb_hdr=yes, have_directfb_hdr=no)
CPPFLAGS="$save_CPPFLAGS"
video_directfb=$have_directfb_hdr
fi
AC_MSG_CHECKING(for DirectFB $DIRECTFB_REQUIRED_VERSION support)
AC_MSG_RESULT($video_directfb)
if test x$video_directfb = xyes; then
AC_ARG_ENABLE(directfb-shared,
AC_HELP_STRING([--enable-directfb-shared], [dynamically load directfb support [[default=yes]]]),
, enable_directfb_shared=yes)
AC_DEFINE(SDL_VIDEO_DRIVER_DIRECTFB)
SOURCES="$SOURCES $srcdir/src/video/directfb/*.c"
EXTRA_CFLAGS="$EXTRA_CFLAGS $DIRECTFB_CFLAGS"
AC_MSG_CHECKING(for directfb dynamic loading support)
directfb_shared=no
directfb_lib=[`find_lib "libdirectfb.so.*" "$DIRECTFB_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
if test x$have_loadso != xyes && \
test x$enable_directfb_shared = xyes; then
AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic directfb loading])
fi
if test x$have_loadso = xyes && \
test x$enable_directfb_shared = xyes && test x$directfb_lib != x; then
directfb_shared=yes
echo "-- $directfb_lib_spec -> $directfb_lib"
AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC, "$directfb_lib")
else
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $DIRECTFB_LIBS"
fi
AC_MSG_RESULT($directfb_shared)
have_video=yes
fi
fi
}
dnl Find FusionSound
CheckFusionSound()
{
AC_ARG_ENABLE(fusionsound,
AC_HELP_STRING([--enable-fusionsound], [use FusionSound audio driver [[default=no]]]),
, enable_fusionsound=no)
if test x$enable_audio = xyes -a x$enable_fusionsound = xyes; then
fusionsound=no
FUSIONSOUND_REQUIRED_VERSION=1.1.1
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
AC_MSG_CHECKING(for FusionSound $FUSIONSOUND_REQUIRED_VERSION support)
if test x$PKG_CONFIG != xno; then
if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $FUSIONSOUND_REQUIRED_VERSION fusionsound; then
FUSIONSOUND_CFLAGS=`$PKG_CONFIG --cflags fusionsound`
FUSIONSOUND_LIBS=`$PKG_CONFIG --libs fusionsound`
fusionsound=yes
fi
fi
AC_MSG_RESULT($fusionsound)
if test x$fusionsound = xyes; then
AC_DEFINE(SDL_AUDIO_DRIVER_FUSIONSOUND)
SOURCES="$SOURCES $srcdir/src/audio/fusionsound/*.c"
EXTRA_CFLAGS="$EXTRA_CFLAGS $FUSIONSOUND_CFLAGS"
AC_ARG_ENABLE(fusionsound-shared,
AC_HELP_STRING([--enable-fusionsound-shared], [dynamically load fusionsound audio support [[default=yes]]]),
, enable_fusionsound_shared=yes)
fusionsound_shared=no
AC_MSG_CHECKING(for FusionSound dynamic loading support)
if test x$have_loadso != xyes && \
test x$enable_fusionsound_shared = xyes; then
AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic fusionsound loading])
fi
if test x$have_loadso = xyes && \
test x$enable_fusionsound_shared = xyes; then
AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC, "libfusionsound.so")
fusionsound_shared=yes
else
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $FUSIONSOUND_LIBS"
fi
AC_MSG_RESULT($fusionsound_shared)
have_audio=yes
fi
fi
}
dnl rcg04172001 Set up the Null video driver.
CheckDummyVideo()
{
AC_ARG_ENABLE(video-dummy,
AC_HELP_STRING([--enable-video-dummy], [use dummy video driver [[default=yes]]]),
, enable_video_dummy=yes)
if test x$enable_video_dummy = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_DUMMY)
SOURCES="$SOURCES $srcdir/src/video/dummy/*.c"
have_video=yes
fi
}
dnl Check to see if OpenGL support is desired
AC_ARG_ENABLE(video-opengl,
AC_HELP_STRING([--enable-video-opengl], [include OpenGL support [[default=yes]]]),
, enable_video_opengl=yes)
dnl Find OpenGL
CheckOpenGLX11()
{
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
AC_DEFINE(SDL_VIDEO_OPENGL)
AC_DEFINE(SDL_VIDEO_OPENGL_GLX)
AC_DEFINE(SDL_VIDEO_RENDER_OGL)
fi
fi
}
dnl Find QNX 6.x Software OpenGL
CheckOpenGLQNX()
{
if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
AC_MSG_CHECKING(for QNX 6.x Photon OpenGL 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
AC_DEFINE(SDL_VIDEO_OPENGL)
AC_DEFINE(SDL_VIDEO_RENDER_OGL)
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lGL"
fi
fi
}
dnl Find QNX 6.3 and above OpenGL ES implementation
CheckOpenGLESQNX()
{
if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
AC_MSG_CHECKING(for QNX OpenGL ES (CM) support)
video_opengl=no
AC_TRY_COMPILE([
#include <GLES/egl.h>
],[
],[
video_opengl=yes
])
AC_MSG_RESULT($video_opengl)
if test x$video_opengl = xyes; then
AC_DEFINE(SDL_VIDEO_OPENGL_ES)
Date: Mon, 23 Mar 2009 09:17:24 +0200 From: "Mike Gorchak" Subject: New QNX patches Please apply patch qnx4.diff, which is attached. What has been done: 1)Added back OpenGL ES renderer for QNX target. Added few corrections to OpenGL ES renderer to let it work under QNX. OpenGL ES renderer do not support textures under QNX, so I think some additional work must be done. 2) Added GL_OES_query_matrix extension to SDL_opengles.h header file, which required by OpenGL ES 1.1 specification. 3) Added attribute clearing at the entrance of function SDL_GL_GetAttribure(). Added error checking into the function SDL_GL_GetAttribure(), because some attributes can't be obtained in OpenGL ES 1.0. 4) Porting testdyngles to OpenGL ES 1.0 (1.1 has glColor4ub() and glColor4f() functions, but 1.0 has glColor4f() only). 5) Added error checking after obtaining attributes using SDL_GL_GetAttribute() function to the testgl2 and testgles. 6) Small correction to testmultiaudio with printing errors. 7) Added software and accelerated OpenGL ES 1.0 support into the QNX GF driver. Please remove ./src/audio/nto directory - it will not be used anymore. Please create ./src/audio/qsa directory and add content of the archive qsa.tar.gz into this directory. I rewrote some sound code, added support for multiple audio cards, enumeration, etc. Added initial support for capture. As far as I can understand SDL 1.3 is not supporting audio capture right now ? Sam, Am I right ? Or audio capture must be supported through the PlayDevice routine ? And last, please put file SDL_gf_opengles.c to the ./src/video/qnxgf directory. It is OpenGL ES 1.1 emulation layer for some functions, which are not supported by OpenGL ES 1.0. --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403566
2009-03-24 10:33:12 +00:00
AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES)
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lGLES_CM"
else
AC_MSG_CHECKING(for QNX OpenGL ES (CL) support)
video_opengl=no
AC_TRY_COMPILE([
#define COMMON_LITE
#include <GLES/egl.h>
],[
],[
video_opengl=yes
])
AC_MSG_RESULT($video_opengl)
if test x$video_opengl = xyes; then
AC_DEFINE(SDL_VIDEO_OPENGL_ES)
Date: Mon, 23 Mar 2009 09:17:24 +0200 From: "Mike Gorchak" Subject: New QNX patches Please apply patch qnx4.diff, which is attached. What has been done: 1)Added back OpenGL ES renderer for QNX target. Added few corrections to OpenGL ES renderer to let it work under QNX. OpenGL ES renderer do not support textures under QNX, so I think some additional work must be done. 2) Added GL_OES_query_matrix extension to SDL_opengles.h header file, which required by OpenGL ES 1.1 specification. 3) Added attribute clearing at the entrance of function SDL_GL_GetAttribure(). Added error checking into the function SDL_GL_GetAttribure(), because some attributes can't be obtained in OpenGL ES 1.0. 4) Porting testdyngles to OpenGL ES 1.0 (1.1 has glColor4ub() and glColor4f() functions, but 1.0 has glColor4f() only). 5) Added error checking after obtaining attributes using SDL_GL_GetAttribute() function to the testgl2 and testgles. 6) Small correction to testmultiaudio with printing errors. 7) Added software and accelerated OpenGL ES 1.0 support into the QNX GF driver. Please remove ./src/audio/nto directory - it will not be used anymore. Please create ./src/audio/qsa directory and add content of the archive qsa.tar.gz into this directory. I rewrote some sound code, added support for multiple audio cards, enumeration, etc. Added initial support for capture. As far as I can understand SDL 1.3 is not supporting audio capture right now ? Sam, Am I right ? Or audio capture must be supported through the PlayDevice routine ? And last, please put file SDL_gf_opengles.c to the ./src/video/qnxgf directory. It is OpenGL ES 1.1 emulation layer for some functions, which are not supported by OpenGL ES 1.0. --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403566
2009-03-24 10:33:12 +00:00
AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES)
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lGLES_CLS"
fi
fi
fi
}
Fixed bug #925 Changed "win32" to "windows" --HG-- rename : include/SDL_config_win32.h => include/SDL_config_windows.h rename : src/events/scancodes_win32.h => src/events/scancodes_windows.h rename : src/haptic/win32/SDL_syshaptic.c => src/haptic/windows/SDL_syshaptic.c rename : src/joystick/win32/SDL_dxjoystick.c => src/joystick/windows/SDL_dxjoystick.c rename : src/joystick/win32/SDL_dxjoystick_c.h => src/joystick/windows/SDL_dxjoystick_c.h rename : src/joystick/win32/SDL_mmjoystick.c => src/joystick/windows/SDL_mmjoystick.c rename : src/loadso/win32/SDL_sysloadso.c => src/loadso/windows/SDL_sysloadso.c rename : src/main/win32/SDL_win32_main.c => src/main/windows/SDL_windows_main.c rename : src/main/win32/version.rc => src/main/windows/version.rc rename : src/thread/win32/SDL_sysmutex.c => src/thread/windows/SDL_sysmutex.c rename : src/thread/win32/SDL_syssem.c => src/thread/windows/SDL_syssem.c rename : src/thread/win32/SDL_systhread.c => src/thread/windows/SDL_systhread.c rename : src/thread/win32/SDL_systhread_c.h => src/thread/windows/SDL_systhread_c.h rename : src/thread/win32/win_ce_semaphore.c => src/thread/windows/win_ce_semaphore.c rename : src/thread/win32/win_ce_semaphore.h => src/thread/windows/win_ce_semaphore.h rename : src/timer/win32/SDL_systimer.c => src/timer/windows/SDL_systimer.c rename : src/video/win32/SDL_ceddrawrender.c => src/video/windows/SDL_ceddrawrender.c rename : src/video/win32/SDL_ceddrawrender.h => src/video/windows/SDL_ceddrawrender.h rename : src/video/win32/SDL_d3drender.c => src/video/windows/SDL_d3drender.c rename : src/video/win32/SDL_d3drender.h => src/video/windows/SDL_d3drender.h rename : src/video/win32/SDL_gapirender.c => src/video/windows/SDL_gapirender.c rename : src/video/win32/SDL_gapirender.h => src/video/windows/SDL_gapirender.h rename : src/video/win32/SDL_gapirender_c.h => src/video/windows/SDL_gapirender_c.h rename : src/video/win32/SDL_gdirender.c => src/video/windows/SDL_gdirender.c rename : src/video/win32/SDL_gdirender.h => src/video/windows/SDL_gdirender.h rename : src/video/win32/SDL_msctf.h => src/video/windows/SDL_msctf.h rename : src/video/win32/SDL_vkeys.h => src/video/windows/SDL_vkeys.h rename : src/video/win32/SDL_win32clipboard.c => src/video/windows/SDL_windowsclipboard.c rename : src/video/win32/SDL_win32clipboard.h => src/video/windows/SDL_windowsclipboard.h rename : src/video/win32/SDL_win32events.c => src/video/windows/SDL_windowsevents.c rename : src/video/win32/SDL_win32events.h => src/video/windows/SDL_windowsevents.h rename : src/video/win32/SDL_win32gamma.c => src/video/windows/SDL_windowsgamma.c rename : src/video/win32/SDL_win32gamma.h => src/video/windows/SDL_windowsgamma.h rename : src/video/win32/SDL_win32keyboard.c => src/video/windows/SDL_windowskeyboard.c rename : src/video/win32/SDL_win32keyboard.h => src/video/windows/SDL_windowskeyboard.h rename : src/video/win32/SDL_win32modes.c => src/video/windows/SDL_windowsmodes.c rename : src/video/win32/SDL_win32modes.h => src/video/windows/SDL_windowsmodes.h rename : src/video/win32/SDL_win32mouse.c => src/video/windows/SDL_windowsmouse.c rename : src/video/win32/SDL_win32mouse.h => src/video/windows/SDL_windowsmouse.h rename : src/video/win32/SDL_win32opengl.c => src/video/windows/SDL_windowsopengl.c rename : src/video/win32/SDL_win32opengl.h => src/video/windows/SDL_windowsopengl.h rename : src/video/win32/SDL_win32shape.c => src/video/windows/SDL_windowsshape.c rename : src/video/win32/SDL_win32shape.h => src/video/windows/SDL_windowsshape.h rename : src/video/win32/SDL_win32video.c => src/video/windows/SDL_windowsvideo.c rename : src/video/win32/SDL_win32video.h => src/video/windows/SDL_windowsvideo.h rename : src/video/win32/SDL_win32window.c => src/video/windows/SDL_windowswindow.c rename : src/video/win32/SDL_win32window.h => src/video/windows/SDL_windowswindow.h rename : src/video/win32/wmmsg.h => src/video/windows/wmmsg.h
2011-01-21 02:04:05 +00:00
dnl Check for Windows OpenGL
CheckWINDOWSGL()
{
if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
AC_DEFINE(SDL_VIDEO_OPENGL)
AC_DEFINE(SDL_VIDEO_OPENGL_WGL)
AC_DEFINE(SDL_VIDEO_RENDER_OGL)
fi
}
dnl Check for BeOS OpenGL
CheckBeGL()
{
if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
AC_DEFINE(SDL_VIDEO_OPENGL)
AC_DEFINE(SDL_VIDEO_OPENGL_BGL)
AC_DEFINE(SDL_VIDEO_RENDER_OGL)
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lGL"
fi
}
dnl Check for MacOS OpenGL
CheckMacGL()
{
if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
AC_DEFINE(SDL_VIDEO_OPENGL)
AC_DEFINE(SDL_VIDEO_OPENGL_CGL)
AC_DEFINE(SDL_VIDEO_RENDER_OGL)
case "$host" in
*-*-darwin*)
if test x$enable_video_cocoa = xyes; then
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,OpenGL"
fi
esac
fi
}
dnl See if we can use the new unified event interface in Linux 2.4
CheckInputEvents()
{
dnl Check for Linux 2.4 unified input event interface support
AC_ARG_ENABLE(input-events,
AC_HELP_STRING([--enable-input-events], [use Linux 2.4 unified input interface [[default=yes]]]),
, enable_input_events=yes)
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
AC_DEFINE(SDL_INPUT_LINUXEV)
fi
fi
}
dnl See if we can use the Touchscreen input library
CheckTslib()
{
AC_ARG_ENABLE(input-tslib,
AC_HELP_STRING([--enable-input-tslib], [use the Touchscreen library for input [[default=yes]]]),
, 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
AC_DEFINE(SDL_INPUT_TSLIB)
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lts"
fi
fi
}
dnl See what type of thread model to use on Linux and Solaris
CheckPTHREAD()
{
dnl Check for pthread support
AC_ARG_ENABLE(pthreads,
AC_HELP_STRING([--enable-pthreads], [use POSIX threads for multi-threading [[default=yes]]]),
, enable_pthreads=yes)
dnl This is used on Linux for glibc binary compatibility (Doh!)
AC_ARG_ENABLE(pthread-sem,
AC_HELP_STRING([--enable-pthread-sem], [use pthread semaphores [[default=yes]]]),
, enable_pthread_sem=yes)
case "$host" in
*-*-linux*|*-*-uclinux*)
pthread_cflags="-D_REENTRANT"
pthread_lib="-lpthread"
;;
*-*-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*|*-*-dragonfly*)
pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
pthread_lib="-pthread"
;;
*-*-netbsd*)
pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
pthread_lib="-lpthread"
;;
*-*-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"
;;
*-*-hpux11*)
pthread_cflags="-D_REENTRANT"
pthread_lib="-L/usr/lib -lpthread"
;;
*-*-qnx*)
pthread_cflags=""
pthread_lib=""
;;
*-*-osf*)
pthread_cflags="-D_REENTRANT"
if test x$ac_cv_prog_gcc = xyes; then
pthread_lib="-lpthread -lrt"
else
pthread_lib="-lpthread -lexc -lrt"
fi
;;
*)
pthread_cflags="-D_REENTRANT"
pthread_lib="-lpthread"
;;
esac
if test x$enable_threads = xyes -a x$enable_pthreads = xyes; then
# 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
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)
# Restore the compiler flags and libraries
CFLAGS="$ac_save_cflags"; LIBS="$ac_save_libs"
# Do futher testing if we have pthread support...
if test x$use_pthreads = xyes; then
AC_DEFINE(SDL_THREAD_PTHREAD)
EXTRA_CFLAGS="$EXTRA_CFLAGS $pthread_cflags"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $pthread_lib"
SDL_CFLAGS="$SDL_CFLAGS $pthread_cflags"
SDL_LIBS="$SDL_LIBS $pthread_lib"
Date: Sun, 26 Feb 2006 11:25:09 +0900 From: Hayashi Naoyuki Subject: Re: [SDL] CVS stable again, please update SDL ports Some problems are caused on Tru64 UNIX. If applying SDL12-osf1.path, these problems are fixed. 1. configure-script say "recursive mutexes... no" and "pthread semaphores... no". checking for pthreads... yes checking for recursive mutexes... no checking for pthread semaphores... no This is because it compiled without pthread_cflags and pthread_lib when checking recursive mutexes and pthread semaphores. 2. Compiling src/audio/mme/SDL_mmeaudio.c fails. cc: Severe: ./src/audio/mme/SDL_mmeaudio.c, line 25: Cannot find file <mme_api.h> specified in #include directive. (noinclfilef) #include <mme_api.h> -^ This is because BUILD_CFLAGS is wrong. 3. Compiling src/cdrom/osf/SDL_syscdrom.c fails. cc: Warning: ./src/cdrom/osf/SDL_syscdrom.c, line 176: Too few actual parameters in the invocation of the macro "SDL_stack_alloc". (toofewactuals) cdpath = SDL_stack_alloc(len); ------------------------------------^ cc: Error: ./src/cdrom/osf/SDL_syscdrom.c, line 176: Invalid expression. (badexpr) cdpath = SDL_stack_alloc(len); -----------------^ SDL_stack_alloc is defined in include/SDL_stdinc.h. #define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)*count) 4. Linking fails if running configure with --enable-x11-shared=yes. /usr/ccs/bin/ld: Warning: Unresolved: p_XData32 5. Compiling src/video/x11/SDL_x11dyn.c fails if running configure with --enable-x11-shared=no. cc: Error: ./src/video/x11/SDL_x11sym.h, line 149: In this statement, "_SmtBufferOverflow" is not declared. (undeclared) SDL_X11_SYM(1,void,_SmtBufferOverflow,(Display *dpy,register smtDisplayPtr)) ^ cc: Error: ./src/video/x11/SDL_x11sym.h, line 150: In this statement, "_SmtBufferOverflow" is not declared. (undeclared) SDL_X11_SYM(1,void,_SmtBufferOverflow,(Display *dpy,register smtDisplayPtr)) ^ cc: Error: ./src/video/x11/SDL_x11sym.h, line 150: In this statement, "_SmtIpError" is not declared. (undeclared) SDL_X11_SYM(1,void,_SmtIpError,(Display *dpy,register smtDisplayPtr, int)) ^ --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401442
2006-02-26 04:54:01 +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 recursive mutexes are available
AC_MSG_CHECKING(for recursive mutexes)
has_recursive_mutexes=no
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
AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX)
])
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
AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP)
])
fi
AC_MSG_RESULT($has_recursive_mutexes)
# 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
Date: Sun, 26 Feb 2006 11:25:09 +0900 From: Hayashi Naoyuki Subject: Re: [SDL] CVS stable again, please update SDL ports Some problems are caused on Tru64 UNIX. If applying SDL12-osf1.path, these problems are fixed. 1. configure-script say "recursive mutexes... no" and "pthread semaphores... no". checking for pthreads... yes checking for recursive mutexes... no checking for pthread semaphores... no This is because it compiled without pthread_cflags and pthread_lib when checking recursive mutexes and pthread semaphores. 2. Compiling src/audio/mme/SDL_mmeaudio.c fails. cc: Severe: ./src/audio/mme/SDL_mmeaudio.c, line 25: Cannot find file <mme_api.h> specified in #include directive. (noinclfilef) #include <mme_api.h> -^ This is because BUILD_CFLAGS is wrong. 3. Compiling src/cdrom/osf/SDL_syscdrom.c fails. cc: Warning: ./src/cdrom/osf/SDL_syscdrom.c, line 176: Too few actual parameters in the invocation of the macro "SDL_stack_alloc". (toofewactuals) cdpath = SDL_stack_alloc(len); ------------------------------------^ cc: Error: ./src/cdrom/osf/SDL_syscdrom.c, line 176: Invalid expression. (badexpr) cdpath = SDL_stack_alloc(len); -----------------^ SDL_stack_alloc is defined in include/SDL_stdinc.h. #define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)*count) 4. Linking fails if running configure with --enable-x11-shared=yes. /usr/ccs/bin/ld: Warning: Unresolved: p_XData32 5. Compiling src/video/x11/SDL_x11dyn.c fails if running configure with --enable-x11-shared=no. cc: Error: ./src/video/x11/SDL_x11sym.h, line 149: In this statement, "_SmtBufferOverflow" is not declared. (undeclared) SDL_X11_SYM(1,void,_SmtBufferOverflow,(Display *dpy,register smtDisplayPtr)) ^ cc: Error: ./src/video/x11/SDL_x11sym.h, line 150: In this statement, "_SmtBufferOverflow" is not declared. (undeclared) SDL_X11_SYM(1,void,_SmtBufferOverflow,(Display *dpy,register smtDisplayPtr)) ^ cc: Error: ./src/video/x11/SDL_x11sym.h, line 150: In this statement, "_SmtIpError" is not declared. (undeclared) SDL_X11_SYM(1,void,_SmtIpError,(Display *dpy,register smtDisplayPtr, int)) ^ --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401442
2006-02-26 04:54:01 +00:00
# Restore the compiler flags and libraries
CFLAGS="$ac_save_cflags"; LIBS="$ac_save_libs"
# Basic thread creation functions
SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_systhread.c"
# 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
# Mutexes
# We can fake these with semaphores if necessary
SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_sysmutex.c"
# Condition variables
# We can fake these with semaphores and mutexes if necessary
SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_syscond.c"
have_threads=yes
fi
fi
}
Fixed bug #925 Changed "win32" to "windows" --HG-- rename : include/SDL_config_win32.h => include/SDL_config_windows.h rename : src/events/scancodes_win32.h => src/events/scancodes_windows.h rename : src/haptic/win32/SDL_syshaptic.c => src/haptic/windows/SDL_syshaptic.c rename : src/joystick/win32/SDL_dxjoystick.c => src/joystick/windows/SDL_dxjoystick.c rename : src/joystick/win32/SDL_dxjoystick_c.h => src/joystick/windows/SDL_dxjoystick_c.h rename : src/joystick/win32/SDL_mmjoystick.c => src/joystick/windows/SDL_mmjoystick.c rename : src/loadso/win32/SDL_sysloadso.c => src/loadso/windows/SDL_sysloadso.c rename : src/main/win32/SDL_win32_main.c => src/main/windows/SDL_windows_main.c rename : src/main/win32/version.rc => src/main/windows/version.rc rename : src/thread/win32/SDL_sysmutex.c => src/thread/windows/SDL_sysmutex.c rename : src/thread/win32/SDL_syssem.c => src/thread/windows/SDL_syssem.c rename : src/thread/win32/SDL_systhread.c => src/thread/windows/SDL_systhread.c rename : src/thread/win32/SDL_systhread_c.h => src/thread/windows/SDL_systhread_c.h rename : src/thread/win32/win_ce_semaphore.c => src/thread/windows/win_ce_semaphore.c rename : src/thread/win32/win_ce_semaphore.h => src/thread/windows/win_ce_semaphore.h rename : src/timer/win32/SDL_systimer.c => src/timer/windows/SDL_systimer.c rename : src/video/win32/SDL_ceddrawrender.c => src/video/windows/SDL_ceddrawrender.c rename : src/video/win32/SDL_ceddrawrender.h => src/video/windows/SDL_ceddrawrender.h rename : src/video/win32/SDL_d3drender.c => src/video/windows/SDL_d3drender.c rename : src/video/win32/SDL_d3drender.h => src/video/windows/SDL_d3drender.h rename : src/video/win32/SDL_gapirender.c => src/video/windows/SDL_gapirender.c rename : src/video/win32/SDL_gapirender.h => src/video/windows/SDL_gapirender.h rename : src/video/win32/SDL_gapirender_c.h => src/video/windows/SDL_gapirender_c.h rename : src/video/win32/SDL_gdirender.c => src/video/windows/SDL_gdirender.c rename : src/video/win32/SDL_gdirender.h => src/video/windows/SDL_gdirender.h rename : src/video/win32/SDL_msctf.h => src/video/windows/SDL_msctf.h rename : src/video/win32/SDL_vkeys.h => src/video/windows/SDL_vkeys.h rename : src/video/win32/SDL_win32clipboard.c => src/video/windows/SDL_windowsclipboard.c rename : src/video/win32/SDL_win32clipboard.h => src/video/windows/SDL_windowsclipboard.h rename : src/video/win32/SDL_win32events.c => src/video/windows/SDL_windowsevents.c rename : src/video/win32/SDL_win32events.h => src/video/windows/SDL_windowsevents.h rename : src/video/win32/SDL_win32gamma.c => src/video/windows/SDL_windowsgamma.c rename : src/video/win32/SDL_win32gamma.h => src/video/windows/SDL_windowsgamma.h rename : src/video/win32/SDL_win32keyboard.c => src/video/windows/SDL_windowskeyboard.c rename : src/video/win32/SDL_win32keyboard.h => src/video/windows/SDL_windowskeyboard.h rename : src/video/win32/SDL_win32modes.c => src/video/windows/SDL_windowsmodes.c rename : src/video/win32/SDL_win32modes.h => src/video/windows/SDL_windowsmodes.h rename : src/video/win32/SDL_win32mouse.c => src/video/windows/SDL_windowsmouse.c rename : src/video/win32/SDL_win32mouse.h => src/video/windows/SDL_windowsmouse.h rename : src/video/win32/SDL_win32opengl.c => src/video/windows/SDL_windowsopengl.c rename : src/video/win32/SDL_win32opengl.h => src/video/windows/SDL_windowsopengl.h rename : src/video/win32/SDL_win32shape.c => src/video/windows/SDL_windowsshape.c rename : src/video/win32/SDL_win32shape.h => src/video/windows/SDL_windowsshape.h rename : src/video/win32/SDL_win32video.c => src/video/windows/SDL_windowsvideo.c rename : src/video/win32/SDL_win32video.h => src/video/windows/SDL_windowsvideo.h rename : src/video/win32/SDL_win32window.c => src/video/windows/SDL_windowswindow.c rename : src/video/win32/SDL_win32window.h => src/video/windows/SDL_windowswindow.h rename : src/video/win32/wmmsg.h => src/video/windows/wmmsg.h
2011-01-21 02:04:05 +00:00
dnl Determine whether the compiler can produce Windows executables
CheckWINDOWS()
{
Fixed bug #925 Changed "win32" to "windows" --HG-- rename : include/SDL_config_win32.h => include/SDL_config_windows.h rename : src/events/scancodes_win32.h => src/events/scancodes_windows.h rename : src/haptic/win32/SDL_syshaptic.c => src/haptic/windows/SDL_syshaptic.c rename : src/joystick/win32/SDL_dxjoystick.c => src/joystick/windows/SDL_dxjoystick.c rename : src/joystick/win32/SDL_dxjoystick_c.h => src/joystick/windows/SDL_dxjoystick_c.h rename : src/joystick/win32/SDL_mmjoystick.c => src/joystick/windows/SDL_mmjoystick.c rename : src/loadso/win32/SDL_sysloadso.c => src/loadso/windows/SDL_sysloadso.c rename : src/main/win32/SDL_win32_main.c => src/main/windows/SDL_windows_main.c rename : src/main/win32/version.rc => src/main/windows/version.rc rename : src/thread/win32/SDL_sysmutex.c => src/thread/windows/SDL_sysmutex.c rename : src/thread/win32/SDL_syssem.c => src/thread/windows/SDL_syssem.c rename : src/thread/win32/SDL_systhread.c => src/thread/windows/SDL_systhread.c rename : src/thread/win32/SDL_systhread_c.h => src/thread/windows/SDL_systhread_c.h rename : src/thread/win32/win_ce_semaphore.c => src/thread/windows/win_ce_semaphore.c rename : src/thread/win32/win_ce_semaphore.h => src/thread/windows/win_ce_semaphore.h rename : src/timer/win32/SDL_systimer.c => src/timer/windows/SDL_systimer.c rename : src/video/win32/SDL_ceddrawrender.c => src/video/windows/SDL_ceddrawrender.c rename : src/video/win32/SDL_ceddrawrender.h => src/video/windows/SDL_ceddrawrender.h rename : src/video/win32/SDL_d3drender.c => src/video/windows/SDL_d3drender.c rename : src/video/win32/SDL_d3drender.h => src/video/windows/SDL_d3drender.h rename : src/video/win32/SDL_gapirender.c => src/video/windows/SDL_gapirender.c rename : src/video/win32/SDL_gapirender.h => src/video/windows/SDL_gapirender.h rename : src/video/win32/SDL_gapirender_c.h => src/video/windows/SDL_gapirender_c.h rename : src/video/win32/SDL_gdirender.c => src/video/windows/SDL_gdirender.c rename : src/video/win32/SDL_gdirender.h => src/video/windows/SDL_gdirender.h rename : src/video/win32/SDL_msctf.h => src/video/windows/SDL_msctf.h rename : src/video/win32/SDL_vkeys.h => src/video/windows/SDL_vkeys.h rename : src/video/win32/SDL_win32clipboard.c => src/video/windows/SDL_windowsclipboard.c rename : src/video/win32/SDL_win32clipboard.h => src/video/windows/SDL_windowsclipboard.h rename : src/video/win32/SDL_win32events.c => src/video/windows/SDL_windowsevents.c rename : src/video/win32/SDL_win32events.h => src/video/windows/SDL_windowsevents.h rename : src/video/win32/SDL_win32gamma.c => src/video/windows/SDL_windowsgamma.c rename : src/video/win32/SDL_win32gamma.h => src/video/windows/SDL_windowsgamma.h rename : src/video/win32/SDL_win32keyboard.c => src/video/windows/SDL_windowskeyboard.c rename : src/video/win32/SDL_win32keyboard.h => src/video/windows/SDL_windowskeyboard.h rename : src/video/win32/SDL_win32modes.c => src/video/windows/SDL_windowsmodes.c rename : src/video/win32/SDL_win32modes.h => src/video/windows/SDL_windowsmodes.h rename : src/video/win32/SDL_win32mouse.c => src/video/windows/SDL_windowsmouse.c rename : src/video/win32/SDL_win32mouse.h => src/video/windows/SDL_windowsmouse.h rename : src/video/win32/SDL_win32opengl.c => src/video/windows/SDL_windowsopengl.c rename : src/video/win32/SDL_win32opengl.h => src/video/windows/SDL_windowsopengl.h rename : src/video/win32/SDL_win32shape.c => src/video/windows/SDL_windowsshape.c rename : src/video/win32/SDL_win32shape.h => src/video/windows/SDL_windowsshape.h rename : src/video/win32/SDL_win32video.c => src/video/windows/SDL_windowsvideo.c rename : src/video/win32/SDL_win32video.h => src/video/windows/SDL_windowsvideo.h rename : src/video/win32/SDL_win32window.c => src/video/windows/SDL_windowswindow.c rename : src/video/win32/SDL_win32window.h => src/video/windows/SDL_windowswindow.h rename : src/video/win32/wmmsg.h => src/video/windows/wmmsg.h
2011-01-21 02:04:05 +00:00
AC_MSG_CHECKING(Windows 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([
Fixed bug #925 Changed "win32" to "windows" --HG-- rename : include/SDL_config_win32.h => include/SDL_config_windows.h rename : src/events/scancodes_win32.h => src/events/scancodes_windows.h rename : src/haptic/win32/SDL_syshaptic.c => src/haptic/windows/SDL_syshaptic.c rename : src/joystick/win32/SDL_dxjoystick.c => src/joystick/windows/SDL_dxjoystick.c rename : src/joystick/win32/SDL_dxjoystick_c.h => src/joystick/windows/SDL_dxjoystick_c.h rename : src/joystick/win32/SDL_mmjoystick.c => src/joystick/windows/SDL_mmjoystick.c rename : src/loadso/win32/SDL_sysloadso.c => src/loadso/windows/SDL_sysloadso.c rename : src/main/win32/SDL_win32_main.c => src/main/windows/SDL_windows_main.c rename : src/main/win32/version.rc => src/main/windows/version.rc rename : src/thread/win32/SDL_sysmutex.c => src/thread/windows/SDL_sysmutex.c rename : src/thread/win32/SDL_syssem.c => src/thread/windows/SDL_syssem.c rename : src/thread/win32/SDL_systhread.c => src/thread/windows/SDL_systhread.c rename : src/thread/win32/SDL_systhread_c.h => src/thread/windows/SDL_systhread_c.h rename : src/thread/win32/win_ce_semaphore.c => src/thread/windows/win_ce_semaphore.c rename : src/thread/win32/win_ce_semaphore.h => src/thread/windows/win_ce_semaphore.h rename : src/timer/win32/SDL_systimer.c => src/timer/windows/SDL_systimer.c rename : src/video/win32/SDL_ceddrawrender.c => src/video/windows/SDL_ceddrawrender.c rename : src/video/win32/SDL_ceddrawrender.h => src/video/windows/SDL_ceddrawrender.h rename : src/video/win32/SDL_d3drender.c => src/video/windows/SDL_d3drender.c rename : src/video/win32/SDL_d3drender.h => src/video/windows/SDL_d3drender.h rename : src/video/win32/SDL_gapirender.c => src/video/windows/SDL_gapirender.c rename : src/video/win32/SDL_gapirender.h => src/video/windows/SDL_gapirender.h rename : src/video/win32/SDL_gapirender_c.h => src/video/windows/SDL_gapirender_c.h rename : src/video/win32/SDL_gdirender.c => src/video/windows/SDL_gdirender.c rename : src/video/win32/SDL_gdirender.h => src/video/windows/SDL_gdirender.h rename : src/video/win32/SDL_msctf.h => src/video/windows/SDL_msctf.h rename : src/video/win32/SDL_vkeys.h => src/video/windows/SDL_vkeys.h rename : src/video/win32/SDL_win32clipboard.c => src/video/windows/SDL_windowsclipboard.c rename : src/video/win32/SDL_win32clipboard.h => src/video/windows/SDL_windowsclipboard.h rename : src/video/win32/SDL_win32events.c => src/video/windows/SDL_windowsevents.c rename : src/video/win32/SDL_win32events.h => src/video/windows/SDL_windowsevents.h rename : src/video/win32/SDL_win32gamma.c => src/video/windows/SDL_windowsgamma.c rename : src/video/win32/SDL_win32gamma.h => src/video/windows/SDL_windowsgamma.h rename : src/video/win32/SDL_win32keyboard.c => src/video/windows/SDL_windowskeyboard.c rename : src/video/win32/SDL_win32keyboard.h => src/video/windows/SDL_windowskeyboard.h rename : src/video/win32/SDL_win32modes.c => src/video/windows/SDL_windowsmodes.c rename : src/video/win32/SDL_win32modes.h => src/video/windows/SDL_windowsmodes.h rename : src/video/win32/SDL_win32mouse.c => src/video/windows/SDL_windowsmouse.c rename : src/video/win32/SDL_win32mouse.h => src/video/windows/SDL_windowsmouse.h rename : src/video/win32/SDL_win32opengl.c => src/video/windows/SDL_windowsopengl.c rename : src/video/win32/SDL_win32opengl.h => src/video/windows/SDL_windowsopengl.h rename : src/video/win32/SDL_win32shape.c => src/video/windows/SDL_windowsshape.c rename : src/video/win32/SDL_win32shape.h => src/video/windows/SDL_windowsshape.h rename : src/video/win32/SDL_win32video.c => src/video/windows/SDL_windowsvideo.c rename : src/video/win32/SDL_win32video.h => src/video/windows/SDL_windowsvideo.h rename : src/video/win32/SDL_win32window.c => src/video/windows/SDL_windowswindow.c rename : src/video/win32/SDL_win32window.h => src/video/windows/SDL_windowswindow.h rename : src/video/win32/wmmsg.h => src/video/windows/wmmsg.h
2011-01-21 02:04:05 +00:00
*** Your compiler ($CC) does not produce Windows executables!
])
fi
Hi, I have prepared a set of patches to readd WindowsCE support to SDL 1.3. I've created a new GAPI/Rawframebuffer and a DirectDraw renderer. Both renderers are work in progress and there are several unimplemented cases. (Notably RenderLine/RenderPoint/RenderFill/QueryTexturePixels/UpdateTexture and texture blending ) Nevertheless I am successfully using these renderers together with the SDL software renderer. (On most devices the SDL software renderer will be much faster as there are only badly optimized vendor drivers available) I send these patches now in this unpolished state because there seems to be some interest in win ce and someone has to start supporting SDL 1.3 Now on to the patches: wince_events_window_fixes.patch fixes some wince incompatibilities and adds fullscreen support via SHFullScreen. NOTE: This patch shouldn't have any side effects on Windows, but I have NOT tested it on Windows, so please double-check. This patch doesn't dependent on the following ones. wince_renderers_system.patch This patch does all necessary modifications to the SDL system. - it adds the renderers to the configure system - it adds the renderers to win32video SDL_ceddrawrender.c SDL_ceddrawrender.h SDL_gapirender_c.h SDL_gapirender.c SDL_gapirender.h these files add the new render drivers and should be placed in src/video/win32 Some notes to people who want to test this: - I have only compiled sdl with ming32ce, so the VisualC files are not up to date - As mingw32ce has no ddraw.h this file must be taken from the MS SDK and modified to work with gcc - I had to modify line 2611 in configure.in to EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lcoredll -lcommctrl -lmmtimer -Wl,--image-base -Wl,0x10000" otherwise GetCPinfo wouldn't link. If someone knows whats causing this I'd be happy to hear about it. It would be great if these patches could make their way into SVN as this would make collaboration much much easier. I'm out of office for the next week and therefore will be unavailable via email. Regards Stefan --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403626
2009-06-07 02:44:46 +00:00
AC_MSG_CHECKING(Windows CE)
have_wince=no
AC_TRY_COMPILE([
#if !defined(_WIN32_WCE) && !defined(__MINGW32CE__)
Hi, I have prepared a set of patches to readd WindowsCE support to SDL 1.3. I've created a new GAPI/Rawframebuffer and a DirectDraw renderer. Both renderers are work in progress and there are several unimplemented cases. (Notably RenderLine/RenderPoint/RenderFill/QueryTexturePixels/UpdateTexture and texture blending ) Nevertheless I am successfully using these renderers together with the SDL software renderer. (On most devices the SDL software renderer will be much faster as there are only badly optimized vendor drivers available) I send these patches now in this unpolished state because there seems to be some interest in win ce and someone has to start supporting SDL 1.3 Now on to the patches: wince_events_window_fixes.patch fixes some wince incompatibilities and adds fullscreen support via SHFullScreen. NOTE: This patch shouldn't have any side effects on Windows, but I have NOT tested it on Windows, so please double-check. This patch doesn't dependent on the following ones. wince_renderers_system.patch This patch does all necessary modifications to the SDL system. - it adds the renderers to the configure system - it adds the renderers to win32video SDL_ceddrawrender.c SDL_ceddrawrender.h SDL_gapirender_c.h SDL_gapirender.c SDL_gapirender.h these files add the new render drivers and should be placed in src/video/win32 Some notes to people who want to test this: - I have only compiled sdl with ming32ce, so the VisualC files are not up to date - As mingw32ce has no ddraw.h this file must be taken from the MS SDK and modified to work with gcc - I had to modify line 2611 in configure.in to EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lcoredll -lcommctrl -lmmtimer -Wl,--image-base -Wl,0x10000" otherwise GetCPinfo wouldn't link. If someone knows whats causing this I'd be happy to hear about it. It would be great if these patches could make their way into SVN as this would make collaboration much much easier. I'm out of office for the next week and therefore will be unavailable via email. Regards Stefan --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403626
2009-06-07 02:44:46 +00:00
#error This is not Windows CE
#endif
],[
],[
have_wince=yes
])
AC_MSG_RESULT($have_wince)
dnl See if the user wants to redirect standard output to files
AC_ARG_ENABLE(stdio-redirect,
Fixed bug #925 Changed "win32" to "windows" --HG-- rename : include/SDL_config_win32.h => include/SDL_config_windows.h rename : src/events/scancodes_win32.h => src/events/scancodes_windows.h rename : src/haptic/win32/SDL_syshaptic.c => src/haptic/windows/SDL_syshaptic.c rename : src/joystick/win32/SDL_dxjoystick.c => src/joystick/windows/SDL_dxjoystick.c rename : src/joystick/win32/SDL_dxjoystick_c.h => src/joystick/windows/SDL_dxjoystick_c.h rename : src/joystick/win32/SDL_mmjoystick.c => src/joystick/windows/SDL_mmjoystick.c rename : src/loadso/win32/SDL_sysloadso.c => src/loadso/windows/SDL_sysloadso.c rename : src/main/win32/SDL_win32_main.c => src/main/windows/SDL_windows_main.c rename : src/main/win32/version.rc => src/main/windows/version.rc rename : src/thread/win32/SDL_sysmutex.c => src/thread/windows/SDL_sysmutex.c rename : src/thread/win32/SDL_syssem.c => src/thread/windows/SDL_syssem.c rename : src/thread/win32/SDL_systhread.c => src/thread/windows/SDL_systhread.c rename : src/thread/win32/SDL_systhread_c.h => src/thread/windows/SDL_systhread_c.h rename : src/thread/win32/win_ce_semaphore.c => src/thread/windows/win_ce_semaphore.c rename : src/thread/win32/win_ce_semaphore.h => src/thread/windows/win_ce_semaphore.h rename : src/timer/win32/SDL_systimer.c => src/timer/windows/SDL_systimer.c rename : src/video/win32/SDL_ceddrawrender.c => src/video/windows/SDL_ceddrawrender.c rename : src/video/win32/SDL_ceddrawrender.h => src/video/windows/SDL_ceddrawrender.h rename : src/video/win32/SDL_d3drender.c => src/video/windows/SDL_d3drender.c rename : src/video/win32/SDL_d3drender.h => src/video/windows/SDL_d3drender.h rename : src/video/win32/SDL_gapirender.c => src/video/windows/SDL_gapirender.c rename : src/video/win32/SDL_gapirender.h => src/video/windows/SDL_gapirender.h rename : src/video/win32/SDL_gapirender_c.h => src/video/windows/SDL_gapirender_c.h rename : src/video/win32/SDL_gdirender.c => src/video/windows/SDL_gdirender.c rename : src/video/win32/SDL_gdirender.h => src/video/windows/SDL_gdirender.h rename : src/video/win32/SDL_msctf.h => src/video/windows/SDL_msctf.h rename : src/video/win32/SDL_vkeys.h => src/video/windows/SDL_vkeys.h rename : src/video/win32/SDL_win32clipboard.c => src/video/windows/SDL_windowsclipboard.c rename : src/video/win32/SDL_win32clipboard.h => src/video/windows/SDL_windowsclipboard.h rename : src/video/win32/SDL_win32events.c => src/video/windows/SDL_windowsevents.c rename : src/video/win32/SDL_win32events.h => src/video/windows/SDL_windowsevents.h rename : src/video/win32/SDL_win32gamma.c => src/video/windows/SDL_windowsgamma.c rename : src/video/win32/SDL_win32gamma.h => src/video/windows/SDL_windowsgamma.h rename : src/video/win32/SDL_win32keyboard.c => src/video/windows/SDL_windowskeyboard.c rename : src/video/win32/SDL_win32keyboard.h => src/video/windows/SDL_windowskeyboard.h rename : src/video/win32/SDL_win32modes.c => src/video/windows/SDL_windowsmodes.c rename : src/video/win32/SDL_win32modes.h => src/video/windows/SDL_windowsmodes.h rename : src/video/win32/SDL_win32mouse.c => src/video/windows/SDL_windowsmouse.c rename : src/video/win32/SDL_win32mouse.h => src/video/windows/SDL_windowsmouse.h rename : src/video/win32/SDL_win32opengl.c => src/video/windows/SDL_windowsopengl.c rename : src/video/win32/SDL_win32opengl.h => src/video/windows/SDL_windowsopengl.h rename : src/video/win32/SDL_win32shape.c => src/video/windows/SDL_windowsshape.c rename : src/video/win32/SDL_win32shape.h => src/video/windows/SDL_windowsshape.h rename : src/video/win32/SDL_win32video.c => src/video/windows/SDL_windowsvideo.c rename : src/video/win32/SDL_win32video.h => src/video/windows/SDL_windowsvideo.h rename : src/video/win32/SDL_win32window.c => src/video/windows/SDL_windowswindow.c rename : src/video/win32/SDL_win32window.h => src/video/windows/SDL_windowswindow.h rename : src/video/win32/wmmsg.h => src/video/windows/wmmsg.h
2011-01-21 02:04:05 +00:00
AC_HELP_STRING([--enable-stdio-redirect], [Redirect STDIO to files on Windows [[default=yes]]]),
, enable_stdio_redirect=yes)
if test x$enable_stdio_redirect != xyes; then
EXTRA_CFLAGS="$EXTRA_CFLAGS -DNO_STDIO_REDIRECT"
fi
}
dnl Find the DirectX includes and libraries
CheckDIRECTX()
{
AC_ARG_ENABLE(directx,
Fixed bug #925 Changed "win32" to "windows" --HG-- rename : include/SDL_config_win32.h => include/SDL_config_windows.h rename : src/events/scancodes_win32.h => src/events/scancodes_windows.h rename : src/haptic/win32/SDL_syshaptic.c => src/haptic/windows/SDL_syshaptic.c rename : src/joystick/win32/SDL_dxjoystick.c => src/joystick/windows/SDL_dxjoystick.c rename : src/joystick/win32/SDL_dxjoystick_c.h => src/joystick/windows/SDL_dxjoystick_c.h rename : src/joystick/win32/SDL_mmjoystick.c => src/joystick/windows/SDL_mmjoystick.c rename : src/loadso/win32/SDL_sysloadso.c => src/loadso/windows/SDL_sysloadso.c rename : src/main/win32/SDL_win32_main.c => src/main/windows/SDL_windows_main.c rename : src/main/win32/version.rc => src/main/windows/version.rc rename : src/thread/win32/SDL_sysmutex.c => src/thread/windows/SDL_sysmutex.c rename : src/thread/win32/SDL_syssem.c => src/thread/windows/SDL_syssem.c rename : src/thread/win32/SDL_systhread.c => src/thread/windows/SDL_systhread.c rename : src/thread/win32/SDL_systhread_c.h => src/thread/windows/SDL_systhread_c.h rename : src/thread/win32/win_ce_semaphore.c => src/thread/windows/win_ce_semaphore.c rename : src/thread/win32/win_ce_semaphore.h => src/thread/windows/win_ce_semaphore.h rename : src/timer/win32/SDL_systimer.c => src/timer/windows/SDL_systimer.c rename : src/video/win32/SDL_ceddrawrender.c => src/video/windows/SDL_ceddrawrender.c rename : src/video/win32/SDL_ceddrawrender.h => src/video/windows/SDL_ceddrawrender.h rename : src/video/win32/SDL_d3drender.c => src/video/windows/SDL_d3drender.c rename : src/video/win32/SDL_d3drender.h => src/video/windows/SDL_d3drender.h rename : src/video/win32/SDL_gapirender.c => src/video/windows/SDL_gapirender.c rename : src/video/win32/SDL_gapirender.h => src/video/windows/SDL_gapirender.h rename : src/video/win32/SDL_gapirender_c.h => src/video/windows/SDL_gapirender_c.h rename : src/video/win32/SDL_gdirender.c => src/video/windows/SDL_gdirender.c rename : src/video/win32/SDL_gdirender.h => src/video/windows/SDL_gdirender.h rename : src/video/win32/SDL_msctf.h => src/video/windows/SDL_msctf.h rename : src/video/win32/SDL_vkeys.h => src/video/windows/SDL_vkeys.h rename : src/video/win32/SDL_win32clipboard.c => src/video/windows/SDL_windowsclipboard.c rename : src/video/win32/SDL_win32clipboard.h => src/video/windows/SDL_windowsclipboard.h rename : src/video/win32/SDL_win32events.c => src/video/windows/SDL_windowsevents.c rename : src/video/win32/SDL_win32events.h => src/video/windows/SDL_windowsevents.h rename : src/video/win32/SDL_win32gamma.c => src/video/windows/SDL_windowsgamma.c rename : src/video/win32/SDL_win32gamma.h => src/video/windows/SDL_windowsgamma.h rename : src/video/win32/SDL_win32keyboard.c => src/video/windows/SDL_windowskeyboard.c rename : src/video/win32/SDL_win32keyboard.h => src/video/windows/SDL_windowskeyboard.h rename : src/video/win32/SDL_win32modes.c => src/video/windows/SDL_windowsmodes.c rename : src/video/win32/SDL_win32modes.h => src/video/windows/SDL_windowsmodes.h rename : src/video/win32/SDL_win32mouse.c => src/video/windows/SDL_windowsmouse.c rename : src/video/win32/SDL_win32mouse.h => src/video/windows/SDL_windowsmouse.h rename : src/video/win32/SDL_win32opengl.c => src/video/windows/SDL_windowsopengl.c rename : src/video/win32/SDL_win32opengl.h => src/video/windows/SDL_windowsopengl.h rename : src/video/win32/SDL_win32shape.c => src/video/windows/SDL_windowsshape.c rename : src/video/win32/SDL_win32shape.h => src/video/windows/SDL_windowsshape.h rename : src/video/win32/SDL_win32video.c => src/video/windows/SDL_windowsvideo.c rename : src/video/win32/SDL_win32video.h => src/video/windows/SDL_windowsvideo.h rename : src/video/win32/SDL_win32window.c => src/video/windows/SDL_windowswindow.c rename : src/video/win32/SDL_win32window.h => src/video/windows/SDL_windowswindow.h rename : src/video/win32/wmmsg.h => src/video/windows/wmmsg.h
2011-01-21 02:04:05 +00:00
AC_HELP_STRING([--enable-directx], [use DirectX for Windows audio/video [[default=yes]]]),
, enable_directx=yes)
if test x$enable_directx = xyes; then
AC_CHECK_HEADER(d3d9.h, have_d3d=yes)
Hi, I have prepared a set of patches to readd WindowsCE support to SDL 1.3. I've created a new GAPI/Rawframebuffer and a DirectDraw renderer. Both renderers are work in progress and there are several unimplemented cases. (Notably RenderLine/RenderPoint/RenderFill/QueryTexturePixels/UpdateTexture and texture blending ) Nevertheless I am successfully using these renderers together with the SDL software renderer. (On most devices the SDL software renderer will be much faster as there are only badly optimized vendor drivers available) I send these patches now in this unpolished state because there seems to be some interest in win ce and someone has to start supporting SDL 1.3 Now on to the patches: wince_events_window_fixes.patch fixes some wince incompatibilities and adds fullscreen support via SHFullScreen. NOTE: This patch shouldn't have any side effects on Windows, but I have NOT tested it on Windows, so please double-check. This patch doesn't dependent on the following ones. wince_renderers_system.patch This patch does all necessary modifications to the SDL system. - it adds the renderers to the configure system - it adds the renderers to win32video SDL_ceddrawrender.c SDL_ceddrawrender.h SDL_gapirender_c.h SDL_gapirender.c SDL_gapirender.h these files add the new render drivers and should be placed in src/video/win32 Some notes to people who want to test this: - I have only compiled sdl with ming32ce, so the VisualC files are not up to date - As mingw32ce has no ddraw.h this file must be taken from the MS SDK and modified to work with gcc - I had to modify line 2611 in configure.in to EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lcoredll -lcommctrl -lmmtimer -Wl,--image-base -Wl,0x10000" otherwise GetCPinfo wouldn't link. If someone knows whats causing this I'd be happy to hear about it. It would be great if these patches could make their way into SVN as this would make collaboration much much easier. I'm out of office for the next week and therefore will be unavailable via email. Regards Stefan --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403626
2009-06-07 02:44:46 +00:00
AC_CHECK_HEADER(ddraw.h, have_ddraw=yes)
AC_CHECK_HEADER(dsound.h, have_dsound=yes)
AC_CHECK_HEADER(dinput.h, have_dinput=yes)
fi
}
dnl Check for the dlfcn.h interface for dynamically loading objects
CheckDLOPEN()
{
AC_ARG_ENABLE(sdl-dlopen,
AC_HELP_STRING([--enable-sdl-dlopen], [use dlopen for shared object loading [[default=yes]]]),
, enable_sdl_dlopen=yes)
if test x$enable_sdl_dlopen = xyes; then
AC_MSG_CHECKING(for dlopen)
have_dlopen=no
AC_TRY_COMPILE([
#include <dlfcn.h>
],[
#if defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED <= 1020
#error Use dlcompat for Mac OS X 10.2 compatibility
#endif
],[
have_dlopen=yes
])
AC_MSG_RESULT($have_dlopen)
if test x$have_dlopen = xyes; then
AC_CHECK_LIB(c, dlopen, EXTRA_LDFLAGS="$EXTRA_LDFLAGS",
AC_CHECK_LIB(dl, dlopen, EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldl",
AC_CHECK_LIB(ltdl, dlopen, EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lltdl")))
AC_DEFINE(SDL_LOADSO_DLOPEN)
SOURCES="$SOURCES $srcdir/src/loadso/dlopen/*.c"
have_loadso=yes
fi
fi
}
dnl Check for the usbhid(3) library on *BSD
CheckUSBHID()
{
if test x$enable_joystick = xyes; then
AC_CHECK_LIB(usbhid, hid_init, have_libusbhid=yes)
if test x$have_libusbhid = xyes; then
AC_CHECK_HEADER(usbhid.h, [USB_CFLAGS="-DHAVE_USBHID_H"])
AC_CHECK_HEADER(libusbhid.h, [USB_CFLAGS="-DHAVE_LIBUSBHID_H"])
USB_LIBS="$USB_LIBS -lusbhid"
else
AC_CHECK_HEADER(usb.h, [USB_CFLAGS="-DHAVE_USB_H"])
AC_CHECK_HEADER(libusb.h, [USB_CFLAGS="-DHAVE_LIBUSB_H"])
AC_CHECK_LIB(usb, hid_init, [USB_LIBS="$USB_LIBS -lusb"])
fi
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $USB_CFLAGS"
AC_MSG_CHECKING(for usbhid)
have_usbhid=no
AC_TRY_COMPILE([
#include <sys/types.h>
#if defined(HAVE_USB_H)
#include <usb.h>
#endif
#ifdef __DragonFly__
# include <bus/usb/usb.h>
# include <bus/usb/usbhid.h>
#else
# include <dev/usb/usb.h>
# include <dev/usb/usbhid.h>
#endif
#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 report_desc *repdesc;
struct usb_ctl_report *repbuf;
hid_kind_t hidkind;
],[
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([
#include <sys/types.h>
#if defined(HAVE_USB_H)
#include <usb.h>
#endif
#ifdef __DragonFly__
# include <bus/usb/usb.h>
# include <bus/usb/usbhid.h>
#else
# include <dev/usb/usb.h>
# include <dev/usb/usbhid.h>
#endif
#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
USB_CFLAGS="$USB_CFLAGS -DUSBHID_UCR_DATA"
fi
AC_MSG_RESULT($have_usbhid_ucr_data)
AC_MSG_CHECKING(for new usbhid API)
have_usbhid_new=no
AC_TRY_COMPILE([
#include <sys/types.h>
#if defined(HAVE_USB_H)
#include <usb.h>
#endif
#ifdef __DragonFly__
#include <bus/usb/usb.h>
#include <bus/usb/usbhid.h>
#else
#include <dev/usb/usb.h>
#include <dev/usb/usbhid.h>
#endif
#if defined(HAVE_USBHID_H)
#include <usbhid.h>
#elif defined(HAVE_LIBUSB_H)
#include <libusb.h>
#elif defined(HAVE_LIBUSBHID_H)
#include <libusbhid.h>
#endif
],[
report_desc_t d;
hid_start_parse(d, 1, 1);
],[
have_usbhid_new=yes
])
if test x$have_usbhid_new = xyes; then
USB_CFLAGS="$USB_CFLAGS -DUSBHID_NEW"
fi
AC_MSG_RESULT($have_usbhid_new)
AC_MSG_CHECKING(for struct joystick in machine/joystick.h)
have_machine_joystick=no
AC_TRY_COMPILE([
#include <machine/joystick.h>
],[
struct joystick t;
],[
have_machine_joystick=yes
])
if test x$have_machine_joystick = xyes; then
AC_DEFINE(SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H)
fi
AC_MSG_RESULT($have_machine_joystick)
AC_DEFINE(SDL_JOYSTICK_USBHID)
SOURCES="$SOURCES $srcdir/src/joystick/bsd/*.c"
EXTRA_CFLAGS="$EXTRA_CFLAGS $USB_CFLAGS"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $USB_LIBS"
have_joystick=yes
fi
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)
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lrt"
else
AC_CHECK_LIB(c, clock_gettime, have_clock_gettime=yes)
if test x$have_clock_gettime = xyes; then
AC_DEFINE(HAVE_CLOCK_GETTIME)
EXTRA_LDFLAGS="$EXTRA_LDFLAGS"
fi
fi
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
EXTRA_CFLAGS="$EXTRA_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 host platform!
case "$host" in
*-*-linux*|*-*-uclinux*|*-*-gnu*|*-*-k*bsd*-gnu|*-*-bsdi*|*-*-freebsd*|*-*-dragonfly*|*-*-netbsd*|*-*-openbsd*|*-*-sysv5*|*-*-solaris*|*-*-hpux*|*-*-irix*|*-*-aix*|*-*-osf*|*-*-minix*)
case "$host" in
*-*-linux*) ARCH=linux ;;
*-*-uclinux*) 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 ;;
*-*-dragonfly*) 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 ;;
*-*-minix*) ARCH=minix ;;
esac
CheckVisibilityHidden
CheckDummyVideo
CheckDiskAudio
CheckDummyAudio
CheckDLOPEN
CheckOSS
CheckDMEDIA
Date: Sun, 26 Feb 2006 11:25:09 +0900 From: Hayashi Naoyuki Subject: Re: [SDL] CVS stable again, please update SDL ports Some problems are caused on Tru64 UNIX. If applying SDL12-osf1.path, these problems are fixed. 1. configure-script say "recursive mutexes... no" and "pthread semaphores... no". checking for pthreads... yes checking for recursive mutexes... no checking for pthread semaphores... no This is because it compiled without pthread_cflags and pthread_lib when checking recursive mutexes and pthread semaphores. 2. Compiling src/audio/mme/SDL_mmeaudio.c fails. cc: Severe: ./src/audio/mme/SDL_mmeaudio.c, line 25: Cannot find file <mme_api.h> specified in #include directive. (noinclfilef) #include <mme_api.h> -^ This is because BUILD_CFLAGS is wrong. 3. Compiling src/cdrom/osf/SDL_syscdrom.c fails. cc: Warning: ./src/cdrom/osf/SDL_syscdrom.c, line 176: Too few actual parameters in the invocation of the macro "SDL_stack_alloc". (toofewactuals) cdpath = SDL_stack_alloc(len); ------------------------------------^ cc: Error: ./src/cdrom/osf/SDL_syscdrom.c, line 176: Invalid expression. (badexpr) cdpath = SDL_stack_alloc(len); -----------------^ SDL_stack_alloc is defined in include/SDL_stdinc.h. #define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)*count) 4. Linking fails if running configure with --enable-x11-shared=yes. /usr/ccs/bin/ld: Warning: Unresolved: p_XData32 5. Compiling src/video/x11/SDL_x11dyn.c fails if running configure with --enable-x11-shared=no. cc: Error: ./src/video/x11/SDL_x11sym.h, line 149: In this statement, "_SmtBufferOverflow" is not declared. (undeclared) SDL_X11_SYM(1,void,_SmtBufferOverflow,(Display *dpy,register smtDisplayPtr)) ^ cc: Error: ./src/video/x11/SDL_x11sym.h, line 150: In this statement, "_SmtBufferOverflow" is not declared. (undeclared) SDL_X11_SYM(1,void,_SmtBufferOverflow,(Display *dpy,register smtDisplayPtr)) ^ cc: Error: ./src/video/x11/SDL_x11sym.h, line 150: In this statement, "_SmtIpError" is not declared. (undeclared) SDL_X11_SYM(1,void,_SmtIpError,(Display *dpy,register smtDisplayPtr, int)) ^ --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401442
2006-02-26 04:54:01 +00:00
CheckMME
CheckALSA
CheckPulseAudio
CheckARTSC
CheckESD
CheckNAS
CheckX11
CheckDirectFB
CheckFusionSound
CheckOpenGLX11
CheckInputEvents
CheckTslib
CheckUSBHID
CheckPTHREAD
CheckClockGettime
CheckLinuxVersion
CheckRPATH
# Set up files for the audio library
if test x$enable_audio = xyes; then
case $ARCH in
sysv5|solaris|hpux)
AC_DEFINE(SDL_AUDIO_DRIVER_SUNAUDIO)
SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
have_audio=yes
;;
netbsd|openbsd)
AC_DEFINE(SDL_AUDIO_DRIVER_BSD)
SOURCES="$SOURCES $srcdir/src/audio/bsd/*.c"
have_audio=yes
;;
aix)
AC_DEFINE(SDL_AUDIO_DRIVER_PAUDIO)
SOURCES="$SOURCES $srcdir/src/audio/paudio/*.c"
have_audio=yes
;;
esac
fi
# Set up files for the joystick library
if test x$enable_joystick = xyes; then
case $ARCH in
linux)
AC_DEFINE(SDL_JOYSTICK_LINUX)
SOURCES="$SOURCES $srcdir/src/joystick/linux/*.c"
have_joystick=yes
;;
esac
fi
# Set up files for the haptic library
if test x$enable_haptic = xyes; then
if test x$use_input_events = xyes; then
case $ARCH in
linux)
AC_DEFINE(SDL_HAPTIC_LINUX)
SOURCES="$SOURCES $srcdir/src/haptic/linux/*.c"
have_haptic=yes
;;
esac
fi
fi
# Set up files for the power library
if test x$enable_power = xyes; then
case $ARCH in
linux)
AC_DEFINE(SDL_POWER_LINUX)
SOURCES="$SOURCES $srcdir/src/power/linux/*.c"
have_power=yes
;;
esac
fi
# Set up files for the thread library
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
fi
# Set up files for the timer library
if test x$enable_timers = xyes; then
AC_DEFINE(SDL_TIMER_UNIX)
SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
have_timers=yes
fi
;;
*-*-qnx*)
EXTRA_CFLAGS="-I/usr/include $CFLAGS"
EXTRA_LDLAGS="-L/usr/lib $LDFLAGS"
ARCH=qnx
CheckVisibilityHidden
CheckDummyVideo
CheckDiskAudio
CheckDummyAudio
CheckDLOPEN
CheckPulseAudio
CheckESD
CheckNAS
CheckPHOTON
CheckQNXGF
CheckX11
CheckOpenGLX11
CheckPTHREAD
CheckClockGettime
# Set up files for the audio library
if test x$enable_audio = xyes; then
Date: Mon, 23 Mar 2009 09:17:24 +0200 From: "Mike Gorchak" Subject: New QNX patches Please apply patch qnx4.diff, which is attached. What has been done: 1)Added back OpenGL ES renderer for QNX target. Added few corrections to OpenGL ES renderer to let it work under QNX. OpenGL ES renderer do not support textures under QNX, so I think some additional work must be done. 2) Added GL_OES_query_matrix extension to SDL_opengles.h header file, which required by OpenGL ES 1.1 specification. 3) Added attribute clearing at the entrance of function SDL_GL_GetAttribure(). Added error checking into the function SDL_GL_GetAttribure(), because some attributes can't be obtained in OpenGL ES 1.0. 4) Porting testdyngles to OpenGL ES 1.0 (1.1 has glColor4ub() and glColor4f() functions, but 1.0 has glColor4f() only). 5) Added error checking after obtaining attributes using SDL_GL_GetAttribute() function to the testgl2 and testgles. 6) Small correction to testmultiaudio with printing errors. 7) Added software and accelerated OpenGL ES 1.0 support into the QNX GF driver. Please remove ./src/audio/nto directory - it will not be used anymore. Please create ./src/audio/qsa directory and add content of the archive qsa.tar.gz into this directory. I rewrote some sound code, added support for multiple audio cards, enumeration, etc. Added initial support for capture. As far as I can understand SDL 1.3 is not supporting audio capture right now ? Sam, Am I right ? Or audio capture must be supported through the PlayDevice routine ? And last, please put file SDL_gf_opengles.c to the ./src/video/qnxgf directory. It is OpenGL ES 1.1 emulation layer for some functions, which are not supported by OpenGL ES 1.0. --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403566
2009-03-24 10:33:12 +00:00
AC_DEFINE(SDL_AUDIO_DRIVER_QSA)
SOURCES="$SOURCES $srcdir/src/audio/qsa/*.c"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lasound"
have_audio=yes
fi
# Set up files for the timer library
if test x$enable_timers = xyes; then
AC_DEFINE(SDL_TIMER_UNIX)
SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
have_timers=yes
fi
# Set up dummy files for the joystick for now
if test x$enable_joystick = xyes; then
AC_DEFINE(SDL_JOYSTICK_DUMMY)
SOURCES="$SOURCES $srcdir/src/joystick/dummy/*.c"
have_joystick=yes
fi
# Set up dummy files for the haptic for now
if test x$enable_haptic = xyes; then
AC_DEFINE(SDL_HAPTIC_DUMMY)
SOURCES="$SOURCES $srcdir/src/haptic/dummy/*.c"
have_haptic=yes
fi
;;
*-wince* | *-mingw32ce)
ARCH=win32
CheckDummyVideo
CheckDiskAudio
CheckDummyAudio
Fixed bug #925 Changed "win32" to "windows" --HG-- rename : include/SDL_config_win32.h => include/SDL_config_windows.h rename : src/events/scancodes_win32.h => src/events/scancodes_windows.h rename : src/haptic/win32/SDL_syshaptic.c => src/haptic/windows/SDL_syshaptic.c rename : src/joystick/win32/SDL_dxjoystick.c => src/joystick/windows/SDL_dxjoystick.c rename : src/joystick/win32/SDL_dxjoystick_c.h => src/joystick/windows/SDL_dxjoystick_c.h rename : src/joystick/win32/SDL_mmjoystick.c => src/joystick/windows/SDL_mmjoystick.c rename : src/loadso/win32/SDL_sysloadso.c => src/loadso/windows/SDL_sysloadso.c rename : src/main/win32/SDL_win32_main.c => src/main/windows/SDL_windows_main.c rename : src/main/win32/version.rc => src/main/windows/version.rc rename : src/thread/win32/SDL_sysmutex.c => src/thread/windows/SDL_sysmutex.c rename : src/thread/win32/SDL_syssem.c => src/thread/windows/SDL_syssem.c rename : src/thread/win32/SDL_systhread.c => src/thread/windows/SDL_systhread.c rename : src/thread/win32/SDL_systhread_c.h => src/thread/windows/SDL_systhread_c.h rename : src/thread/win32/win_ce_semaphore.c => src/thread/windows/win_ce_semaphore.c rename : src/thread/win32/win_ce_semaphore.h => src/thread/windows/win_ce_semaphore.h rename : src/timer/win32/SDL_systimer.c => src/timer/windows/SDL_systimer.c rename : src/video/win32/SDL_ceddrawrender.c => src/video/windows/SDL_ceddrawrender.c rename : src/video/win32/SDL_ceddrawrender.h => src/video/windows/SDL_ceddrawrender.h rename : src/video/win32/SDL_d3drender.c => src/video/windows/SDL_d3drender.c rename : src/video/win32/SDL_d3drender.h => src/video/windows/SDL_d3drender.h rename : src/video/win32/SDL_gapirender.c => src/video/windows/SDL_gapirender.c rename : src/video/win32/SDL_gapirender.h => src/video/windows/SDL_gapirender.h rename : src/video/win32/SDL_gapirender_c.h => src/video/windows/SDL_gapirender_c.h rename : src/video/win32/SDL_gdirender.c => src/video/windows/SDL_gdirender.c rename : src/video/win32/SDL_gdirender.h => src/video/windows/SDL_gdirender.h rename : src/video/win32/SDL_msctf.h => src/video/windows/SDL_msctf.h rename : src/video/win32/SDL_vkeys.h => src/video/windows/SDL_vkeys.h rename : src/video/win32/SDL_win32clipboard.c => src/video/windows/SDL_windowsclipboard.c rename : src/video/win32/SDL_win32clipboard.h => src/video/windows/SDL_windowsclipboard.h rename : src/video/win32/SDL_win32events.c => src/video/windows/SDL_windowsevents.c rename : src/video/win32/SDL_win32events.h => src/video/windows/SDL_windowsevents.h rename : src/video/win32/SDL_win32gamma.c => src/video/windows/SDL_windowsgamma.c rename : src/video/win32/SDL_win32gamma.h => src/video/windows/SDL_windowsgamma.h rename : src/video/win32/SDL_win32keyboard.c => src/video/windows/SDL_windowskeyboard.c rename : src/video/win32/SDL_win32keyboard.h => src/video/windows/SDL_windowskeyboard.h rename : src/video/win32/SDL_win32modes.c => src/video/windows/SDL_windowsmodes.c rename : src/video/win32/SDL_win32modes.h => src/video/windows/SDL_windowsmodes.h rename : src/video/win32/SDL_win32mouse.c => src/video/windows/SDL_windowsmouse.c rename : src/video/win32/SDL_win32mouse.h => src/video/windows/SDL_windowsmouse.h rename : src/video/win32/SDL_win32opengl.c => src/video/windows/SDL_windowsopengl.c rename : src/video/win32/SDL_win32opengl.h => src/video/windows/SDL_windowsopengl.h rename : src/video/win32/SDL_win32shape.c => src/video/windows/SDL_windowsshape.c rename : src/video/win32/SDL_win32shape.h => src/video/windows/SDL_windowsshape.h rename : src/video/win32/SDL_win32video.c => src/video/windows/SDL_windowsvideo.c rename : src/video/win32/SDL_win32video.h => src/video/windows/SDL_windowsvideo.h rename : src/video/win32/SDL_win32window.c => src/video/windows/SDL_windowswindow.c rename : src/video/win32/SDL_win32window.h => src/video/windows/SDL_windowswindow.h rename : src/video/win32/wmmsg.h => src/video/windows/wmmsg.h
2011-01-21 02:04:05 +00:00
CheckWINDOWS
if test x$enable_video = xyes; then
Fixed bug #925 Changed "win32" to "windows" --HG-- rename : include/SDL_config_win32.h => include/SDL_config_windows.h rename : src/events/scancodes_win32.h => src/events/scancodes_windows.h rename : src/haptic/win32/SDL_syshaptic.c => src/haptic/windows/SDL_syshaptic.c rename : src/joystick/win32/SDL_dxjoystick.c => src/joystick/windows/SDL_dxjoystick.c rename : src/joystick/win32/SDL_dxjoystick_c.h => src/joystick/windows/SDL_dxjoystick_c.h rename : src/joystick/win32/SDL_mmjoystick.c => src/joystick/windows/SDL_mmjoystick.c rename : src/loadso/win32/SDL_sysloadso.c => src/loadso/windows/SDL_sysloadso.c rename : src/main/win32/SDL_win32_main.c => src/main/windows/SDL_windows_main.c rename : src/main/win32/version.rc => src/main/windows/version.rc rename : src/thread/win32/SDL_sysmutex.c => src/thread/windows/SDL_sysmutex.c rename : src/thread/win32/SDL_syssem.c => src/thread/windows/SDL_syssem.c rename : src/thread/win32/SDL_systhread.c => src/thread/windows/SDL_systhread.c rename : src/thread/win32/SDL_systhread_c.h => src/thread/windows/SDL_systhread_c.h rename : src/thread/win32/win_ce_semaphore.c => src/thread/windows/win_ce_semaphore.c rename : src/thread/win32/win_ce_semaphore.h => src/thread/windows/win_ce_semaphore.h rename : src/timer/win32/SDL_systimer.c => src/timer/windows/SDL_systimer.c rename : src/video/win32/SDL_ceddrawrender.c => src/video/windows/SDL_ceddrawrender.c rename : src/video/win32/SDL_ceddrawrender.h => src/video/windows/SDL_ceddrawrender.h rename : src/video/win32/SDL_d3drender.c => src/video/windows/SDL_d3drender.c rename : src/video/win32/SDL_d3drender.h => src/video/windows/SDL_d3drender.h rename : src/video/win32/SDL_gapirender.c => src/video/windows/SDL_gapirender.c rename : src/video/win32/SDL_gapirender.h => src/video/windows/SDL_gapirender.h rename : src/video/win32/SDL_gapirender_c.h => src/video/windows/SDL_gapirender_c.h rename : src/video/win32/SDL_gdirender.c => src/video/windows/SDL_gdirender.c rename : src/video/win32/SDL_gdirender.h => src/video/windows/SDL_gdirender.h rename : src/video/win32/SDL_msctf.h => src/video/windows/SDL_msctf.h rename : src/video/win32/SDL_vkeys.h => src/video/windows/SDL_vkeys.h rename : src/video/win32/SDL_win32clipboard.c => src/video/windows/SDL_windowsclipboard.c rename : src/video/win32/SDL_win32clipboard.h => src/video/windows/SDL_windowsclipboard.h rename : src/video/win32/SDL_win32events.c => src/video/windows/SDL_windowsevents.c rename : src/video/win32/SDL_win32events.h => src/video/windows/SDL_windowsevents.h rename : src/video/win32/SDL_win32gamma.c => src/video/windows/SDL_windowsgamma.c rename : src/video/win32/SDL_win32gamma.h => src/video/windows/SDL_windowsgamma.h rename : src/video/win32/SDL_win32keyboard.c => src/video/windows/SDL_windowskeyboard.c rename : src/video/win32/SDL_win32keyboard.h => src/video/windows/SDL_windowskeyboard.h rename : src/video/win32/SDL_win32modes.c => src/video/windows/SDL_windowsmodes.c rename : src/video/win32/SDL_win32modes.h => src/video/windows/SDL_windowsmodes.h rename : src/video/win32/SDL_win32mouse.c => src/video/windows/SDL_windowsmouse.c rename : src/video/win32/SDL_win32mouse.h => src/video/windows/SDL_windowsmouse.h rename : src/video/win32/SDL_win32opengl.c => src/video/windows/SDL_windowsopengl.c rename : src/video/win32/SDL_win32opengl.h => src/video/windows/SDL_windowsopengl.h rename : src/video/win32/SDL_win32shape.c => src/video/windows/SDL_windowsshape.c rename : src/video/win32/SDL_win32shape.h => src/video/windows/SDL_windowsshape.h rename : src/video/win32/SDL_win32video.c => src/video/windows/SDL_windowsvideo.c rename : src/video/win32/SDL_win32video.h => src/video/windows/SDL_windowsvideo.h rename : src/video/win32/SDL_win32window.c => src/video/windows/SDL_windowswindow.c rename : src/video/win32/SDL_win32window.h => src/video/windows/SDL_windowswindow.h rename : src/video/win32/wmmsg.h => src/video/windows/wmmsg.h
2011-01-21 02:04:05 +00:00
AC_DEFINE(SDL_VIDEO_DRIVER_WINDOWS)
SOURCES="$SOURCES $srcdir/src/video/windows/*.c"
have_video=yes
AC_ARG_ENABLE(render-gdi,
AC_HELP_STRING([--enable-render-gdi], [enable the GDI render driver [[default=yes]]]),
, enable_render_gdi=yes)
if test x$enable_render_gdi = xyes; then
AC_DEFINE(SDL_VIDEO_RENDER_GDI)
fi
Hi, I have prepared a set of patches to readd WindowsCE support to SDL 1.3. I've created a new GAPI/Rawframebuffer and a DirectDraw renderer. Both renderers are work in progress and there are several unimplemented cases. (Notably RenderLine/RenderPoint/RenderFill/QueryTexturePixels/UpdateTexture and texture blending ) Nevertheless I am successfully using these renderers together with the SDL software renderer. (On most devices the SDL software renderer will be much faster as there are only badly optimized vendor drivers available) I send these patches now in this unpolished state because there seems to be some interest in win ce and someone has to start supporting SDL 1.3 Now on to the patches: wince_events_window_fixes.patch fixes some wince incompatibilities and adds fullscreen support via SHFullScreen. NOTE: This patch shouldn't have any side effects on Windows, but I have NOT tested it on Windows, so please double-check. This patch doesn't dependent on the following ones. wince_renderers_system.patch This patch does all necessary modifications to the SDL system. - it adds the renderers to the configure system - it adds the renderers to win32video SDL_ceddrawrender.c SDL_ceddrawrender.h SDL_gapirender_c.h SDL_gapirender.c SDL_gapirender.h these files add the new render drivers and should be placed in src/video/win32 Some notes to people who want to test this: - I have only compiled sdl with ming32ce, so the VisualC files are not up to date - As mingw32ce has no ddraw.h this file must be taken from the MS SDK and modified to work with gcc - I had to modify line 2611 in configure.in to EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lcoredll -lcommctrl -lmmtimer -Wl,--image-base -Wl,0x10000" otherwise GetCPinfo wouldn't link. If someone knows whats causing this I'd be happy to hear about it. It would be great if these patches could make their way into SVN as this would make collaboration much much easier. I'm out of office for the next week and therefore will be unavailable via email. Regards Stefan --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403626
2009-06-07 02:44:46 +00:00
AC_ARG_ENABLE(render-gapi,
AC_HELP_STRING([--enable-render-gapi], [enable the GAPI/RAWFRAMEBUFFER render driver [[default=yes]]]),
, enable_render_gapi=yes)
if test x$enable_render_gapi = xyes -a x$have_wince = xyes; then
AC_DEFINE(SDL_VIDEO_RENDER_GAPI)
fi
AC_ARG_ENABLE(render-ddraw,
AC_HELP_STRING([--enable-render-ddraw], [enable the Mobile DirectDraw render driver [[default=yes]]]),
, enable_render_ddraw=yes)
if test x$enable_render_ddraw = xyes -a x$have_wince = xyes -a x$have_ddraw = xyes; then
AC_DEFINE(SDL_VIDEO_RENDER_DDRAW)
fi
AC_ARG_ENABLE(render-d3d,
AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[default=yes]]]),
, enable_render_d3d=yes)
enable_render_d3d=no
if test x$enable_render_d3d = xyes -a x$have_d3d = xyes; then
AC_DEFINE(SDL_VIDEO_RENDER_D3D)
fi
fi
# Set up files for the audio library
if test x$enable_audio = xyes; then
AC_DEFINE(SDL_AUDIO_DRIVER_WINWAVEOUT)
SOURCES="$SOURCES $srcdir/src/audio/windib/*.c"
if test x$have_dsound = xyes; then
AC_DEFINE(SDL_AUDIO_DRIVER_DSOUND)
SOURCES="$SOURCES $srcdir/src/audio/windx5/*.c"
fi
have_audio=yes
fi
# Set up dummy files for the joystick for now
if test x$enable_joystick = xyes; then
AC_DEFINE(SDL_JOYSTICK_DUMMY)
SOURCES="$SOURCES $srcdir/src/joystick/dummy/*.c"
have_joystick=yes
fi
# Set up files for the thread library
if test x$enable_threads = xyes; then
Fixed bug #925 Changed "win32" to "windows" --HG-- rename : include/SDL_config_win32.h => include/SDL_config_windows.h rename : src/events/scancodes_win32.h => src/events/scancodes_windows.h rename : src/haptic/win32/SDL_syshaptic.c => src/haptic/windows/SDL_syshaptic.c rename : src/joystick/win32/SDL_dxjoystick.c => src/joystick/windows/SDL_dxjoystick.c rename : src/joystick/win32/SDL_dxjoystick_c.h => src/joystick/windows/SDL_dxjoystick_c.h rename : src/joystick/win32/SDL_mmjoystick.c => src/joystick/windows/SDL_mmjoystick.c rename : src/loadso/win32/SDL_sysloadso.c => src/loadso/windows/SDL_sysloadso.c rename : src/main/win32/SDL_win32_main.c => src/main/windows/SDL_windows_main.c rename : src/main/win32/version.rc => src/main/windows/version.rc rename : src/thread/win32/SDL_sysmutex.c => src/thread/windows/SDL_sysmutex.c rename : src/thread/win32/SDL_syssem.c => src/thread/windows/SDL_syssem.c rename : src/thread/win32/SDL_systhread.c => src/thread/windows/SDL_systhread.c rename : src/thread/win32/SDL_systhread_c.h => src/thread/windows/SDL_systhread_c.h rename : src/thread/win32/win_ce_semaphore.c => src/thread/windows/win_ce_semaphore.c rename : src/thread/win32/win_ce_semaphore.h => src/thread/windows/win_ce_semaphore.h rename : src/timer/win32/SDL_systimer.c => src/timer/windows/SDL_systimer.c rename : src/video/win32/SDL_ceddrawrender.c => src/video/windows/SDL_ceddrawrender.c rename : src/video/win32/SDL_ceddrawrender.h => src/video/windows/SDL_ceddrawrender.h rename : src/video/win32/SDL_d3drender.c => src/video/windows/SDL_d3drender.c rename : src/video/win32/SDL_d3drender.h => src/video/windows/SDL_d3drender.h rename : src/video/win32/SDL_gapirender.c => src/video/windows/SDL_gapirender.c rename : src/video/win32/SDL_gapirender.h => src/video/windows/SDL_gapirender.h rename : src/video/win32/SDL_gapirender_c.h => src/video/windows/SDL_gapirender_c.h rename : src/video/win32/SDL_gdirender.c => src/video/windows/SDL_gdirender.c rename : src/video/win32/SDL_gdirender.h => src/video/windows/SDL_gdirender.h rename : src/video/win32/SDL_msctf.h => src/video/windows/SDL_msctf.h rename : src/video/win32/SDL_vkeys.h => src/video/windows/SDL_vkeys.h rename : src/video/win32/SDL_win32clipboard.c => src/video/windows/SDL_windowsclipboard.c rename : src/video/win32/SDL_win32clipboard.h => src/video/windows/SDL_windowsclipboard.h rename : src/video/win32/SDL_win32events.c => src/video/windows/SDL_windowsevents.c rename : src/video/win32/SDL_win32events.h => src/video/windows/SDL_windowsevents.h rename : src/video/win32/SDL_win32gamma.c => src/video/windows/SDL_windowsgamma.c rename : src/video/win32/SDL_win32gamma.h => src/video/windows/SDL_windowsgamma.h rename : src/video/win32/SDL_win32keyboard.c => src/video/windows/SDL_windowskeyboard.c rename : src/video/win32/SDL_win32keyboard.h => src/video/windows/SDL_windowskeyboard.h rename : src/video/win32/SDL_win32modes.c => src/video/windows/SDL_windowsmodes.c rename : src/video/win32/SDL_win32modes.h => src/video/windows/SDL_windowsmodes.h rename : src/video/win32/SDL_win32mouse.c => src/video/windows/SDL_windowsmouse.c rename : src/video/win32/SDL_win32mouse.h => src/video/windows/SDL_windowsmouse.h rename : src/video/win32/SDL_win32opengl.c => src/video/windows/SDL_windowsopengl.c rename : src/video/win32/SDL_win32opengl.h => src/video/windows/SDL_windowsopengl.h rename : src/video/win32/SDL_win32shape.c => src/video/windows/SDL_windowsshape.c rename : src/video/win32/SDL_win32shape.h => src/video/windows/SDL_windowsshape.h rename : src/video/win32/SDL_win32video.c => src/video/windows/SDL_windowsvideo.c rename : src/video/win32/SDL_win32video.h => src/video/windows/SDL_windowsvideo.h rename : src/video/win32/SDL_win32window.c => src/video/windows/SDL_windowswindow.c rename : src/video/win32/SDL_win32window.h => src/video/windows/SDL_windowswindow.h rename : src/video/win32/wmmsg.h => src/video/windows/wmmsg.h
2011-01-21 02:04:05 +00:00
AC_DEFINE(SDL_THREAD_WINDOWS)
SOURCES="$SOURCES $srcdir/src/thread/windows/SDL_sysmutex.c"
SOURCES="$SOURCES $srcdir/src/thread/windows/SDL_syssem.c"
SOURCES="$SOURCES $srcdir/src/thread/windows/SDL_systhread.c"
SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
have_threads=yes
fi
# Set up files for the timer library
if test x$enable_timers = xyes; then
AC_DEFINE(SDL_TIMER_WINCE)
SOURCES="$SOURCES $srcdir/src/timer/wince/*.c"
have_timers=yes
fi
# Set up files for the shared object loading library
if test x$enable_loadso = xyes; then
Fixed bug #925 Changed "win32" to "windows" --HG-- rename : include/SDL_config_win32.h => include/SDL_config_windows.h rename : src/events/scancodes_win32.h => src/events/scancodes_windows.h rename : src/haptic/win32/SDL_syshaptic.c => src/haptic/windows/SDL_syshaptic.c rename : src/joystick/win32/SDL_dxjoystick.c => src/joystick/windows/SDL_dxjoystick.c rename : src/joystick/win32/SDL_dxjoystick_c.h => src/joystick/windows/SDL_dxjoystick_c.h rename : src/joystick/win32/SDL_mmjoystick.c => src/joystick/windows/SDL_mmjoystick.c rename : src/loadso/win32/SDL_sysloadso.c => src/loadso/windows/SDL_sysloadso.c rename : src/main/win32/SDL_win32_main.c => src/main/windows/SDL_windows_main.c rename : src/main/win32/version.rc => src/main/windows/version.rc rename : src/thread/win32/SDL_sysmutex.c => src/thread/windows/SDL_sysmutex.c rename : src/thread/win32/SDL_syssem.c => src/thread/windows/SDL_syssem.c rename : src/thread/win32/SDL_systhread.c => src/thread/windows/SDL_systhread.c rename : src/thread/win32/SDL_systhread_c.h => src/thread/windows/SDL_systhread_c.h rename : src/thread/win32/win_ce_semaphore.c => src/thread/windows/win_ce_semaphore.c rename : src/thread/win32/win_ce_semaphore.h => src/thread/windows/win_ce_semaphore.h rename : src/timer/win32/SDL_systimer.c => src/timer/windows/SDL_systimer.c rename : src/video/win32/SDL_ceddrawrender.c => src/video/windows/SDL_ceddrawrender.c rename : src/video/win32/SDL_ceddrawrender.h => src/video/windows/SDL_ceddrawrender.h rename : src/video/win32/SDL_d3drender.c => src/video/windows/SDL_d3drender.c rename : src/video/win32/SDL_d3drender.h => src/video/windows/SDL_d3drender.h rename : src/video/win32/SDL_gapirender.c => src/video/windows/SDL_gapirender.c rename : src/video/win32/SDL_gapirender.h => src/video/windows/SDL_gapirender.h rename : src/video/win32/SDL_gapirender_c.h => src/video/windows/SDL_gapirender_c.h rename : src/video/win32/SDL_gdirender.c => src/video/windows/SDL_gdirender.c rename : src/video/win32/SDL_gdirender.h => src/video/windows/SDL_gdirender.h rename : src/video/win32/SDL_msctf.h => src/video/windows/SDL_msctf.h rename : src/video/win32/SDL_vkeys.h => src/video/windows/SDL_vkeys.h rename : src/video/win32/SDL_win32clipboard.c => src/video/windows/SDL_windowsclipboard.c rename : src/video/win32/SDL_win32clipboard.h => src/video/windows/SDL_windowsclipboard.h rename : src/video/win32/SDL_win32events.c => src/video/windows/SDL_windowsevents.c rename : src/video/win32/SDL_win32events.h => src/video/windows/SDL_windowsevents.h rename : src/video/win32/SDL_win32gamma.c => src/video/windows/SDL_windowsgamma.c rename : src/video/win32/SDL_win32gamma.h => src/video/windows/SDL_windowsgamma.h rename : src/video/win32/SDL_win32keyboard.c => src/video/windows/SDL_windowskeyboard.c rename : src/video/win32/SDL_win32keyboard.h => src/video/windows/SDL_windowskeyboard.h rename : src/video/win32/SDL_win32modes.c => src/video/windows/SDL_windowsmodes.c rename : src/video/win32/SDL_win32modes.h => src/video/windows/SDL_windowsmodes.h rename : src/video/win32/SDL_win32mouse.c => src/video/windows/SDL_windowsmouse.c rename : src/video/win32/SDL_win32mouse.h => src/video/windows/SDL_windowsmouse.h rename : src/video/win32/SDL_win32opengl.c => src/video/windows/SDL_windowsopengl.c rename : src/video/win32/SDL_win32opengl.h => src/video/windows/SDL_windowsopengl.h rename : src/video/win32/SDL_win32shape.c => src/video/windows/SDL_windowsshape.c rename : src/video/win32/SDL_win32shape.h => src/video/windows/SDL_windowsshape.h rename : src/video/win32/SDL_win32video.c => src/video/windows/SDL_windowsvideo.c rename : src/video/win32/SDL_win32video.h => src/video/windows/SDL_windowsvideo.h rename : src/video/win32/SDL_win32window.c => src/video/windows/SDL_windowswindow.c rename : src/video/win32/SDL_win32window.h => src/video/windows/SDL_windowswindow.h rename : src/video/win32/wmmsg.h => src/video/windows/wmmsg.h
2011-01-21 02:04:05 +00:00
AC_DEFINE(SDL_LOADSO_WINDOWS)
SOURCES="$SOURCES $srcdir/src/loadso/windows/*.c"
have_loadso=yes
fi
# Set up the system libraries we need
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lcoredll -lcommctrl -lmmtimer"
# mingw32ce library
case "$host" in
*-mingw32ce)
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lmingwex"
;;
*)
;;
esac
Fixed bug #925 Changed "win32" to "windows" --HG-- rename : include/SDL_config_win32.h => include/SDL_config_windows.h rename : src/events/scancodes_win32.h => src/events/scancodes_windows.h rename : src/haptic/win32/SDL_syshaptic.c => src/haptic/windows/SDL_syshaptic.c rename : src/joystick/win32/SDL_dxjoystick.c => src/joystick/windows/SDL_dxjoystick.c rename : src/joystick/win32/SDL_dxjoystick_c.h => src/joystick/windows/SDL_dxjoystick_c.h rename : src/joystick/win32/SDL_mmjoystick.c => src/joystick/windows/SDL_mmjoystick.c rename : src/loadso/win32/SDL_sysloadso.c => src/loadso/windows/SDL_sysloadso.c rename : src/main/win32/SDL_win32_main.c => src/main/windows/SDL_windows_main.c rename : src/main/win32/version.rc => src/main/windows/version.rc rename : src/thread/win32/SDL_sysmutex.c => src/thread/windows/SDL_sysmutex.c rename : src/thread/win32/SDL_syssem.c => src/thread/windows/SDL_syssem.c rename : src/thread/win32/SDL_systhread.c => src/thread/windows/SDL_systhread.c rename : src/thread/win32/SDL_systhread_c.h => src/thread/windows/SDL_systhread_c.h rename : src/thread/win32/win_ce_semaphore.c => src/thread/windows/win_ce_semaphore.c rename : src/thread/win32/win_ce_semaphore.h => src/thread/windows/win_ce_semaphore.h rename : src/timer/win32/SDL_systimer.c => src/timer/windows/SDL_systimer.c rename : src/video/win32/SDL_ceddrawrender.c => src/video/windows/SDL_ceddrawrender.c rename : src/video/win32/SDL_ceddrawrender.h => src/video/windows/SDL_ceddrawrender.h rename : src/video/win32/SDL_d3drender.c => src/video/windows/SDL_d3drender.c rename : src/video/win32/SDL_d3drender.h => src/video/windows/SDL_d3drender.h rename : src/video/win32/SDL_gapirender.c => src/video/windows/SDL_gapirender.c rename : src/video/win32/SDL_gapirender.h => src/video/windows/SDL_gapirender.h rename : src/video/win32/SDL_gapirender_c.h => src/video/windows/SDL_gapirender_c.h rename : src/video/win32/SDL_gdirender.c => src/video/windows/SDL_gdirender.c rename : src/video/win32/SDL_gdirender.h => src/video/windows/SDL_gdirender.h rename : src/video/win32/SDL_msctf.h => src/video/windows/SDL_msctf.h rename : src/video/win32/SDL_vkeys.h => src/video/windows/SDL_vkeys.h rename : src/video/win32/SDL_win32clipboard.c => src/video/windows/SDL_windowsclipboard.c rename : src/video/win32/SDL_win32clipboard.h => src/video/windows/SDL_windowsclipboard.h rename : src/video/win32/SDL_win32events.c => src/video/windows/SDL_windowsevents.c rename : src/video/win32/SDL_win32events.h => src/video/windows/SDL_windowsevents.h rename : src/video/win32/SDL_win32gamma.c => src/video/windows/SDL_windowsgamma.c rename : src/video/win32/SDL_win32gamma.h => src/video/windows/SDL_windowsgamma.h rename : src/video/win32/SDL_win32keyboard.c => src/video/windows/SDL_windowskeyboard.c rename : src/video/win32/SDL_win32keyboard.h => src/video/windows/SDL_windowskeyboard.h rename : src/video/win32/SDL_win32modes.c => src/video/windows/SDL_windowsmodes.c rename : src/video/win32/SDL_win32modes.h => src/video/windows/SDL_windowsmodes.h rename : src/video/win32/SDL_win32mouse.c => src/video/windows/SDL_windowsmouse.c rename : src/video/win32/SDL_win32mouse.h => src/video/windows/SDL_windowsmouse.h rename : src/video/win32/SDL_win32opengl.c => src/video/windows/SDL_windowsopengl.c rename : src/video/win32/SDL_win32opengl.h => src/video/windows/SDL_windowsopengl.h rename : src/video/win32/SDL_win32shape.c => src/video/windows/SDL_windowsshape.c rename : src/video/win32/SDL_win32shape.h => src/video/windows/SDL_windowsshape.h rename : src/video/win32/SDL_win32video.c => src/video/windows/SDL_windowsvideo.c rename : src/video/win32/SDL_win32video.h => src/video/windows/SDL_windowsvideo.h rename : src/video/win32/SDL_win32window.c => src/video/windows/SDL_windowswindow.c rename : src/video/win32/SDL_win32window.h => src/video/windows/SDL_windowswindow.h rename : src/video/win32/wmmsg.h => src/video/windows/wmmsg.h
2011-01-21 02:04:05 +00:00
# The Windows platform requires special setup
SDLMAIN_SOURCES="$srcdir/src/main/windows/*.c"
EXTRA_CFLAGS="$EXTRA_CFLAGS -Dmain=SDL_main -D_WIN32_WCE=0x420"
EXTRA_LDFLAGS="-lSDLmain $EXTRA_LDFLAGS"
;;
*-*-cygwin* | *-*-mingw32*)
ARCH=win32
if test "$build" != "$host"; then # cross-compiling
# Default cross-compile location
ac_default_prefix=/usr/local/cross-tools/$host
else
# Look for the location of the tools and install there
if test "$BUILD_PREFIX" != ""; then
ac_default_prefix=$BUILD_PREFIX
fi
fi
CheckDummyVideo
CheckDiskAudio
CheckDummyAudio
Fixed bug #925 Changed "win32" to "windows" --HG-- rename : include/SDL_config_win32.h => include/SDL_config_windows.h rename : src/events/scancodes_win32.h => src/events/scancodes_windows.h rename : src/haptic/win32/SDL_syshaptic.c => src/haptic/windows/SDL_syshaptic.c rename : src/joystick/win32/SDL_dxjoystick.c => src/joystick/windows/SDL_dxjoystick.c rename : src/joystick/win32/SDL_dxjoystick_c.h => src/joystick/windows/SDL_dxjoystick_c.h rename : src/joystick/win32/SDL_mmjoystick.c => src/joystick/windows/SDL_mmjoystick.c rename : src/loadso/win32/SDL_sysloadso.c => src/loadso/windows/SDL_sysloadso.c rename : src/main/win32/SDL_win32_main.c => src/main/windows/SDL_windows_main.c rename : src/main/win32/version.rc => src/main/windows/version.rc rename : src/thread/win32/SDL_sysmutex.c => src/thread/windows/SDL_sysmutex.c rename : src/thread/win32/SDL_syssem.c => src/thread/windows/SDL_syssem.c rename : src/thread/win32/SDL_systhread.c => src/thread/windows/SDL_systhread.c rename : src/thread/win32/SDL_systhread_c.h => src/thread/windows/SDL_systhread_c.h rename : src/thread/win32/win_ce_semaphore.c => src/thread/windows/win_ce_semaphore.c rename : src/thread/win32/win_ce_semaphore.h => src/thread/windows/win_ce_semaphore.h rename : src/timer/win32/SDL_systimer.c => src/timer/windows/SDL_systimer.c rename : src/video/win32/SDL_ceddrawrender.c => src/video/windows/SDL_ceddrawrender.c rename : src/video/win32/SDL_ceddrawrender.h => src/video/windows/SDL_ceddrawrender.h rename : src/video/win32/SDL_d3drender.c => src/video/windows/SDL_d3drender.c rename : src/video/win32/SDL_d3drender.h => src/video/windows/SDL_d3drender.h rename : src/video/win32/SDL_gapirender.c => src/video/windows/SDL_gapirender.c rename : src/video/win32/SDL_gapirender.h => src/video/windows/SDL_gapirender.h rename : src/video/win32/SDL_gapirender_c.h => src/video/windows/SDL_gapirender_c.h rename : src/video/win32/SDL_gdirender.c => src/video/windows/SDL_gdirender.c rename : src/video/win32/SDL_gdirender.h => src/video/windows/SDL_gdirender.h rename : src/video/win32/SDL_msctf.h => src/video/windows/SDL_msctf.h rename : src/video/win32/SDL_vkeys.h => src/video/windows/SDL_vkeys.h rename : src/video/win32/SDL_win32clipboard.c => src/video/windows/SDL_windowsclipboard.c rename : src/video/win32/SDL_win32clipboard.h => src/video/windows/SDL_windowsclipboard.h rename : src/video/win32/SDL_win32events.c => src/video/windows/SDL_windowsevents.c rename : src/video/win32/SDL_win32events.h => src/video/windows/SDL_windowsevents.h rename : src/video/win32/SDL_win32gamma.c => src/video/windows/SDL_windowsgamma.c rename : src/video/win32/SDL_win32gamma.h => src/video/windows/SDL_windowsgamma.h rename : src/video/win32/SDL_win32keyboard.c => src/video/windows/SDL_windowskeyboard.c rename : src/video/win32/SDL_win32keyboard.h => src/video/windows/SDL_windowskeyboard.h rename : src/video/win32/SDL_win32modes.c => src/video/windows/SDL_windowsmodes.c rename : src/video/win32/SDL_win32modes.h => src/video/windows/SDL_windowsmodes.h rename : src/video/win32/SDL_win32mouse.c => src/video/windows/SDL_windowsmouse.c rename : src/video/win32/SDL_win32mouse.h => src/video/windows/SDL_windowsmouse.h rename : src/video/win32/SDL_win32opengl.c => src/video/windows/SDL_windowsopengl.c rename : src/video/win32/SDL_win32opengl.h => src/video/windows/SDL_windowsopengl.h rename : src/video/win32/SDL_win32shape.c => src/video/windows/SDL_windowsshape.c rename : src/video/win32/SDL_win32shape.h => src/video/windows/SDL_windowsshape.h rename : src/video/win32/SDL_win32video.c => src/video/windows/SDL_windowsvideo.c rename : src/video/win32/SDL_win32video.h => src/video/windows/SDL_windowsvideo.h rename : src/video/win32/SDL_win32window.c => src/video/windows/SDL_windowswindow.c rename : src/video/win32/SDL_win32window.h => src/video/windows/SDL_windowswindow.h rename : src/video/win32/wmmsg.h => src/video/windows/wmmsg.h
2011-01-21 02:04:05 +00:00
CheckWINDOWS
CheckWINDOWSGL
CheckDIRECTX
2011-01-25 05:41:36 +00:00
# Set up the core platform files
SOURCES="$SOURCES $srcdir/src/core/windows/*.c"
# Set up files for the video library
if test x$enable_video = xyes; then
Fixed bug #925 Changed "win32" to "windows" --HG-- rename : include/SDL_config_win32.h => include/SDL_config_windows.h rename : src/events/scancodes_win32.h => src/events/scancodes_windows.h rename : src/haptic/win32/SDL_syshaptic.c => src/haptic/windows/SDL_syshaptic.c rename : src/joystick/win32/SDL_dxjoystick.c => src/joystick/windows/SDL_dxjoystick.c rename : src/joystick/win32/SDL_dxjoystick_c.h => src/joystick/windows/SDL_dxjoystick_c.h rename : src/joystick/win32/SDL_mmjoystick.c => src/joystick/windows/SDL_mmjoystick.c rename : src/loadso/win32/SDL_sysloadso.c => src/loadso/windows/SDL_sysloadso.c rename : src/main/win32/SDL_win32_main.c => src/main/windows/SDL_windows_main.c rename : src/main/win32/version.rc => src/main/windows/version.rc rename : src/thread/win32/SDL_sysmutex.c => src/thread/windows/SDL_sysmutex.c rename : src/thread/win32/SDL_syssem.c => src/thread/windows/SDL_syssem.c rename : src/thread/win32/SDL_systhread.c => src/thread/windows/SDL_systhread.c rename : src/thread/win32/SDL_systhread_c.h => src/thread/windows/SDL_systhread_c.h rename : src/thread/win32/win_ce_semaphore.c => src/thread/windows/win_ce_semaphore.c rename : src/thread/win32/win_ce_semaphore.h => src/thread/windows/win_ce_semaphore.h rename : src/timer/win32/SDL_systimer.c => src/timer/windows/SDL_systimer.c rename : src/video/win32/SDL_ceddrawrender.c => src/video/windows/SDL_ceddrawrender.c rename : src/video/win32/SDL_ceddrawrender.h => src/video/windows/SDL_ceddrawrender.h rename : src/video/win32/SDL_d3drender.c => src/video/windows/SDL_d3drender.c rename : src/video/win32/SDL_d3drender.h => src/video/windows/SDL_d3drender.h rename : src/video/win32/SDL_gapirender.c => src/video/windows/SDL_gapirender.c rename : src/video/win32/SDL_gapirender.h => src/video/windows/SDL_gapirender.h rename : src/video/win32/SDL_gapirender_c.h => src/video/windows/SDL_gapirender_c.h rename : src/video/win32/SDL_gdirender.c => src/video/windows/SDL_gdirender.c rename : src/video/win32/SDL_gdirender.h => src/video/windows/SDL_gdirender.h rename : src/video/win32/SDL_msctf.h => src/video/windows/SDL_msctf.h rename : src/video/win32/SDL_vkeys.h => src/video/windows/SDL_vkeys.h rename : src/video/win32/SDL_win32clipboard.c => src/video/windows/SDL_windowsclipboard.c rename : src/video/win32/SDL_win32clipboard.h => src/video/windows/SDL_windowsclipboard.h rename : src/video/win32/SDL_win32events.c => src/video/windows/SDL_windowsevents.c rename : src/video/win32/SDL_win32events.h => src/video/windows/SDL_windowsevents.h rename : src/video/win32/SDL_win32gamma.c => src/video/windows/SDL_windowsgamma.c rename : src/video/win32/SDL_win32gamma.h => src/video/windows/SDL_windowsgamma.h rename : src/video/win32/SDL_win32keyboard.c => src/video/windows/SDL_windowskeyboard.c rename : src/video/win32/SDL_win32keyboard.h => src/video/windows/SDL_windowskeyboard.h rename : src/video/win32/SDL_win32modes.c => src/video/windows/SDL_windowsmodes.c rename : src/video/win32/SDL_win32modes.h => src/video/windows/SDL_windowsmodes.h rename : src/video/win32/SDL_win32mouse.c => src/video/windows/SDL_windowsmouse.c rename : src/video/win32/SDL_win32mouse.h => src/video/windows/SDL_windowsmouse.h rename : src/video/win32/SDL_win32opengl.c => src/video/windows/SDL_windowsopengl.c rename : src/video/win32/SDL_win32opengl.h => src/video/windows/SDL_windowsopengl.h rename : src/video/win32/SDL_win32shape.c => src/video/windows/SDL_windowsshape.c rename : src/video/win32/SDL_win32shape.h => src/video/windows/SDL_windowsshape.h rename : src/video/win32/SDL_win32video.c => src/video/windows/SDL_windowsvideo.c rename : src/video/win32/SDL_win32video.h => src/video/windows/SDL_windowsvideo.h rename : src/video/win32/SDL_win32window.c => src/video/windows/SDL_windowswindow.c rename : src/video/win32/SDL_win32window.h => src/video/windows/SDL_windowswindow.h rename : src/video/win32/wmmsg.h => src/video/windows/wmmsg.h
2011-01-21 02:04:05 +00:00
AC_DEFINE(SDL_VIDEO_DRIVER_WINDOWS)
SOURCES="$SOURCES $srcdir/src/video/windows/*.c"
have_video=yes
AC_ARG_ENABLE(render-gdi,
AC_HELP_STRING([--enable-render-gdi], [enable the GDI render driver [[default=yes]]]),
, enable_render_gdi=yes)
if test x$enable_render_gdi = xyes; then
AC_DEFINE(SDL_VIDEO_RENDER_GDI)
fi
AC_ARG_ENABLE(render-d3d,
AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[default=yes]]]),
, enable_render_d3d=yes)
if test x$enable_render_d3d = xyes -a x$have_d3d = xyes; then
AC_DEFINE(SDL_VIDEO_RENDER_D3D)
fi
fi
# Set up files for the audio library
if test x$enable_audio = xyes; then
AC_DEFINE(SDL_AUDIO_DRIVER_WINWAVEOUT)
SOURCES="$SOURCES $srcdir/src/audio/windib/*.c"
if test x$have_dsound = xyes; then
AC_DEFINE(SDL_AUDIO_DRIVER_DSOUND)
SOURCES="$SOURCES $srcdir/src/audio/windx5/*.c"
fi
have_audio=yes
fi
# Set up files for the joystick library
if test x$enable_joystick = xyes; then
if test x$have_dinput = xyes; then
AC_DEFINE(SDL_JOYSTICK_DINPUT)
Fixed bug #925 Changed "win32" to "windows" --HG-- rename : include/SDL_config_win32.h => include/SDL_config_windows.h rename : src/events/scancodes_win32.h => src/events/scancodes_windows.h rename : src/haptic/win32/SDL_syshaptic.c => src/haptic/windows/SDL_syshaptic.c rename : src/joystick/win32/SDL_dxjoystick.c => src/joystick/windows/SDL_dxjoystick.c rename : src/joystick/win32/SDL_dxjoystick_c.h => src/joystick/windows/SDL_dxjoystick_c.h rename : src/joystick/win32/SDL_mmjoystick.c => src/joystick/windows/SDL_mmjoystick.c rename : src/loadso/win32/SDL_sysloadso.c => src/loadso/windows/SDL_sysloadso.c rename : src/main/win32/SDL_win32_main.c => src/main/windows/SDL_windows_main.c rename : src/main/win32/version.rc => src/main/windows/version.rc rename : src/thread/win32/SDL_sysmutex.c => src/thread/windows/SDL_sysmutex.c rename : src/thread/win32/SDL_syssem.c => src/thread/windows/SDL_syssem.c rename : src/thread/win32/SDL_systhread.c => src/thread/windows/SDL_systhread.c rename : src/thread/win32/SDL_systhread_c.h => src/thread/windows/SDL_systhread_c.h rename : src/thread/win32/win_ce_semaphore.c => src/thread/windows/win_ce_semaphore.c rename : src/thread/win32/win_ce_semaphore.h => src/thread/windows/win_ce_semaphore.h rename : src/timer/win32/SDL_systimer.c => src/timer/windows/SDL_systimer.c rename : src/video/win32/SDL_ceddrawrender.c => src/video/windows/SDL_ceddrawrender.c rename : src/video/win32/SDL_ceddrawrender.h => src/video/windows/SDL_ceddrawrender.h rename : src/video/win32/SDL_d3drender.c => src/video/windows/SDL_d3drender.c rename : src/video/win32/SDL_d3drender.h => src/video/windows/SDL_d3drender.h rename : src/video/win32/SDL_gapirender.c => src/video/windows/SDL_gapirender.c rename : src/video/win32/SDL_gapirender.h => src/video/windows/SDL_gapirender.h rename : src/video/win32/SDL_gapirender_c.h => src/video/windows/SDL_gapirender_c.h rename : src/video/win32/SDL_gdirender.c => src/video/windows/SDL_gdirender.c rename : src/video/win32/SDL_gdirender.h => src/video/windows/SDL_gdirender.h rename : src/video/win32/SDL_msctf.h => src/video/windows/SDL_msctf.h rename : src/video/win32/SDL_vkeys.h => src/video/windows/SDL_vkeys.h rename : src/video/win32/SDL_win32clipboard.c => src/video/windows/SDL_windowsclipboard.c rename : src/video/win32/SDL_win32clipboard.h => src/video/windows/SDL_windowsclipboard.h rename : src/video/win32/SDL_win32events.c => src/video/windows/SDL_windowsevents.c rename : src/video/win32/SDL_win32events.h => src/video/windows/SDL_windowsevents.h rename : src/video/win32/SDL_win32gamma.c => src/video/windows/SDL_windowsgamma.c rename : src/video/win32/SDL_win32gamma.h => src/video/windows/SDL_windowsgamma.h rename : src/video/win32/SDL_win32keyboard.c => src/video/windows/SDL_windowskeyboard.c rename : src/video/win32/SDL_win32keyboard.h => src/video/windows/SDL_windowskeyboard.h rename : src/video/win32/SDL_win32modes.c => src/video/windows/SDL_windowsmodes.c rename : src/video/win32/SDL_win32modes.h => src/video/windows/SDL_windowsmodes.h rename : src/video/win32/SDL_win32mouse.c => src/video/windows/SDL_windowsmouse.c rename : src/video/win32/SDL_win32mouse.h => src/video/windows/SDL_windowsmouse.h rename : src/video/win32/SDL_win32opengl.c => src/video/windows/SDL_windowsopengl.c rename : src/video/win32/SDL_win32opengl.h => src/video/windows/SDL_windowsopengl.h rename : src/video/win32/SDL_win32shape.c => src/video/windows/SDL_windowsshape.c rename : src/video/win32/SDL_win32shape.h => src/video/windows/SDL_windowsshape.h rename : src/video/win32/SDL_win32video.c => src/video/windows/SDL_windowsvideo.c rename : src/video/win32/SDL_win32video.h => src/video/windows/SDL_windowsvideo.h rename : src/video/win32/SDL_win32window.c => src/video/windows/SDL_windowswindow.c rename : src/video/win32/SDL_win32window.h => src/video/windows/SDL_windowswindow.h rename : src/video/win32/wmmsg.h => src/video/windows/wmmsg.h
2011-01-21 02:04:05 +00:00
SOURCES="$SOURCES $srcdir/src/joystick/windows/SDL_dxjoystick.c"
2010-09-19 23:46:56 +00:00
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldinput8 -ldxguid -ldxerr8"
else
AC_DEFINE(SDL_JOYSTICK_WINMM)
Fixed bug #925 Changed "win32" to "windows" --HG-- rename : include/SDL_config_win32.h => include/SDL_config_windows.h rename : src/events/scancodes_win32.h => src/events/scancodes_windows.h rename : src/haptic/win32/SDL_syshaptic.c => src/haptic/windows/SDL_syshaptic.c rename : src/joystick/win32/SDL_dxjoystick.c => src/joystick/windows/SDL_dxjoystick.c rename : src/joystick/win32/SDL_dxjoystick_c.h => src/joystick/windows/SDL_dxjoystick_c.h rename : src/joystick/win32/SDL_mmjoystick.c => src/joystick/windows/SDL_mmjoystick.c rename : src/loadso/win32/SDL_sysloadso.c => src/loadso/windows/SDL_sysloadso.c rename : src/main/win32/SDL_win32_main.c => src/main/windows/SDL_windows_main.c rename : src/main/win32/version.rc => src/main/windows/version.rc rename : src/thread/win32/SDL_sysmutex.c => src/thread/windows/SDL_sysmutex.c rename : src/thread/win32/SDL_syssem.c => src/thread/windows/SDL_syssem.c rename : src/thread/win32/SDL_systhread.c => src/thread/windows/SDL_systhread.c rename : src/thread/win32/SDL_systhread_c.h => src/thread/windows/SDL_systhread_c.h rename : src/thread/win32/win_ce_semaphore.c => src/thread/windows/win_ce_semaphore.c rename : src/thread/win32/win_ce_semaphore.h => src/thread/windows/win_ce_semaphore.h rename : src/timer/win32/SDL_systimer.c => src/timer/windows/SDL_systimer.c rename : src/video/win32/SDL_ceddrawrender.c => src/video/windows/SDL_ceddrawrender.c rename : src/video/win32/SDL_ceddrawrender.h => src/video/windows/SDL_ceddrawrender.h rename : src/video/win32/SDL_d3drender.c => src/video/windows/SDL_d3drender.c rename : src/video/win32/SDL_d3drender.h => src/video/windows/SDL_d3drender.h rename : src/video/win32/SDL_gapirender.c => src/video/windows/SDL_gapirender.c rename : src/video/win32/SDL_gapirender.h => src/video/windows/SDL_gapirender.h rename : src/video/win32/SDL_gapirender_c.h => src/video/windows/SDL_gapirender_c.h rename : src/video/win32/SDL_gdirender.c => src/video/windows/SDL_gdirender.c rename : src/video/win32/SDL_gdirender.h => src/video/windows/SDL_gdirender.h rename : src/video/win32/SDL_msctf.h => src/video/windows/SDL_msctf.h rename : src/video/win32/SDL_vkeys.h => src/video/windows/SDL_vkeys.h rename : src/video/win32/SDL_win32clipboard.c => src/video/windows/SDL_windowsclipboard.c rename : src/video/win32/SDL_win32clipboard.h => src/video/windows/SDL_windowsclipboard.h rename : src/video/win32/SDL_win32events.c => src/video/windows/SDL_windowsevents.c rename : src/video/win32/SDL_win32events.h => src/video/windows/SDL_windowsevents.h rename : src/video/win32/SDL_win32gamma.c => src/video/windows/SDL_windowsgamma.c rename : src/video/win32/SDL_win32gamma.h => src/video/windows/SDL_windowsgamma.h rename : src/video/win32/SDL_win32keyboard.c => src/video/windows/SDL_windowskeyboard.c rename : src/video/win32/SDL_win32keyboard.h => src/video/windows/SDL_windowskeyboard.h rename : src/video/win32/SDL_win32modes.c => src/video/windows/SDL_windowsmodes.c rename : src/video/win32/SDL_win32modes.h => src/video/windows/SDL_windowsmodes.h rename : src/video/win32/SDL_win32mouse.c => src/video/windows/SDL_windowsmouse.c rename : src/video/win32/SDL_win32mouse.h => src/video/windows/SDL_windowsmouse.h rename : src/video/win32/SDL_win32opengl.c => src/video/windows/SDL_windowsopengl.c rename : src/video/win32/SDL_win32opengl.h => src/video/windows/SDL_windowsopengl.h rename : src/video/win32/SDL_win32shape.c => src/video/windows/SDL_windowsshape.c rename : src/video/win32/SDL_win32shape.h => src/video/windows/SDL_windowsshape.h rename : src/video/win32/SDL_win32video.c => src/video/windows/SDL_windowsvideo.c rename : src/video/win32/SDL_win32video.h => src/video/windows/SDL_windowsvideo.h rename : src/video/win32/SDL_win32window.c => src/video/windows/SDL_windowswindow.c rename : src/video/win32/SDL_win32window.h => src/video/windows/SDL_windowswindow.h rename : src/video/win32/wmmsg.h => src/video/windows/wmmsg.h
2011-01-21 02:04:05 +00:00
SOURCES="$SOURCES $srcdir/src/joystick/windows/SDL_mmjoystick.c"
fi
have_joystick=yes
fi
if test x$enable_haptic = xyes; then
if test x$have_dinput = xyes; then
AC_DEFINE(SDL_HAPTIC_DINPUT)
Fixed bug #925 Changed "win32" to "windows" --HG-- rename : include/SDL_config_win32.h => include/SDL_config_windows.h rename : src/events/scancodes_win32.h => src/events/scancodes_windows.h rename : src/haptic/win32/SDL_syshaptic.c => src/haptic/windows/SDL_syshaptic.c rename : src/joystick/win32/SDL_dxjoystick.c => src/joystick/windows/SDL_dxjoystick.c rename : src/joystick/win32/SDL_dxjoystick_c.h => src/joystick/windows/SDL_dxjoystick_c.h rename : src/joystick/win32/SDL_mmjoystick.c => src/joystick/windows/SDL_mmjoystick.c rename : src/loadso/win32/SDL_sysloadso.c => src/loadso/windows/SDL_sysloadso.c rename : src/main/win32/SDL_win32_main.c => src/main/windows/SDL_windows_main.c rename : src/main/win32/version.rc => src/main/windows/version.rc rename : src/thread/win32/SDL_sysmutex.c => src/thread/windows/SDL_sysmutex.c rename : src/thread/win32/SDL_syssem.c => src/thread/windows/SDL_syssem.c rename : src/thread/win32/SDL_systhread.c => src/thread/windows/SDL_systhread.c rename : src/thread/win32/SDL_systhread_c.h => src/thread/windows/SDL_systhread_c.h rename : src/thread/win32/win_ce_semaphore.c => src/thread/windows/win_ce_semaphore.c rename : src/thread/win32/win_ce_semaphore.h => src/thread/windows/win_ce_semaphore.h rename : src/timer/win32/SDL_systimer.c => src/timer/windows/SDL_systimer.c rename : src/video/win32/SDL_ceddrawrender.c => src/video/windows/SDL_ceddrawrender.c rename : src/video/win32/SDL_ceddrawrender.h => src/video/windows/SDL_ceddrawrender.h rename : src/video/win32/SDL_d3drender.c => src/video/windows/SDL_d3drender.c rename : src/video/win32/SDL_d3drender.h => src/video/windows/SDL_d3drender.h rename : src/video/win32/SDL_gapirender.c => src/video/windows/SDL_gapirender.c rename : src/video/win32/SDL_gapirender.h => src/video/windows/SDL_gapirender.h rename : src/video/win32/SDL_gapirender_c.h => src/video/windows/SDL_gapirender_c.h rename : src/video/win32/SDL_gdirender.c => src/video/windows/SDL_gdirender.c rename : src/video/win32/SDL_gdirender.h => src/video/windows/SDL_gdirender.h rename : src/video/win32/SDL_msctf.h => src/video/windows/SDL_msctf.h rename : src/video/win32/SDL_vkeys.h => src/video/windows/SDL_vkeys.h rename : src/video/win32/SDL_win32clipboard.c => src/video/windows/SDL_windowsclipboard.c rename : src/video/win32/SDL_win32clipboard.h => src/video/windows/SDL_windowsclipboard.h rename : src/video/win32/SDL_win32events.c => src/video/windows/SDL_windowsevents.c rename : src/video/win32/SDL_win32events.h => src/video/windows/SDL_windowsevents.h rename : src/video/win32/SDL_win32gamma.c => src/video/windows/SDL_windowsgamma.c rename : src/video/win32/SDL_win32gamma.h => src/video/windows/SDL_windowsgamma.h rename : src/video/win32/SDL_win32keyboard.c => src/video/windows/SDL_windowskeyboard.c rename : src/video/win32/SDL_win32keyboard.h => src/video/windows/SDL_windowskeyboard.h rename : src/video/win32/SDL_win32modes.c => src/video/windows/SDL_windowsmodes.c rename : src/video/win32/SDL_win32modes.h => src/video/windows/SDL_windowsmodes.h rename : src/video/win32/SDL_win32mouse.c => src/video/windows/SDL_windowsmouse.c rename : src/video/win32/SDL_win32mouse.h => src/video/windows/SDL_windowsmouse.h rename : src/video/win32/SDL_win32opengl.c => src/video/windows/SDL_windowsopengl.c rename : src/video/win32/SDL_win32opengl.h => src/video/windows/SDL_windowsopengl.h rename : src/video/win32/SDL_win32shape.c => src/video/windows/SDL_windowsshape.c rename : src/video/win32/SDL_win32shape.h => src/video/windows/SDL_windowsshape.h rename : src/video/win32/SDL_win32video.c => src/video/windows/SDL_windowsvideo.c rename : src/video/win32/SDL_win32video.h => src/video/windows/SDL_windowsvideo.h rename : src/video/win32/SDL_win32window.c => src/video/windows/SDL_windowswindow.c rename : src/video/win32/SDL_win32window.h => src/video/windows/SDL_windowswindow.h rename : src/video/win32/wmmsg.h => src/video/windows/wmmsg.h
2011-01-21 02:04:05 +00:00
SOURCES="$SOURCES $srcdir/src/haptic/windows/SDL_syshaptic.c"
have_haptic=yes
fi
fi
if test x$enable_power = xyes; then
AC_DEFINE(SDL_POWER_WINDOWS)
SOURCES="$SOURCES $srcdir/src/power/windows/SDL_syspower.c"
have_power=yes
fi
# Set up files for the thread library
if test x$enable_threads = xyes; then
Fixed bug #925 Changed "win32" to "windows" --HG-- rename : include/SDL_config_win32.h => include/SDL_config_windows.h rename : src/events/scancodes_win32.h => src/events/scancodes_windows.h rename : src/haptic/win32/SDL_syshaptic.c => src/haptic/windows/SDL_syshaptic.c rename : src/joystick/win32/SDL_dxjoystick.c => src/joystick/windows/SDL_dxjoystick.c rename : src/joystick/win32/SDL_dxjoystick_c.h => src/joystick/windows/SDL_dxjoystick_c.h rename : src/joystick/win32/SDL_mmjoystick.c => src/joystick/windows/SDL_mmjoystick.c rename : src/loadso/win32/SDL_sysloadso.c => src/loadso/windows/SDL_sysloadso.c rename : src/main/win32/SDL_win32_main.c => src/main/windows/SDL_windows_main.c rename : src/main/win32/version.rc => src/main/windows/version.rc rename : src/thread/win32/SDL_sysmutex.c => src/thread/windows/SDL_sysmutex.c rename : src/thread/win32/SDL_syssem.c => src/thread/windows/SDL_syssem.c rename : src/thread/win32/SDL_systhread.c => src/thread/windows/SDL_systhread.c rename : src/thread/win32/SDL_systhread_c.h => src/thread/windows/SDL_systhread_c.h rename : src/thread/win32/win_ce_semaphore.c => src/thread/windows/win_ce_semaphore.c rename : src/thread/win32/win_ce_semaphore.h => src/thread/windows/win_ce_semaphore.h rename : src/timer/win32/SDL_systimer.c => src/timer/windows/SDL_systimer.c rename : src/video/win32/SDL_ceddrawrender.c => src/video/windows/SDL_ceddrawrender.c rename : src/video/win32/SDL_ceddrawrender.h => src/video/windows/SDL_ceddrawrender.h rename : src/video/win32/SDL_d3drender.c => src/video/windows/SDL_d3drender.c rename : src/video/win32/SDL_d3drender.h => src/video/windows/SDL_d3drender.h rename : src/video/win32/SDL_gapirender.c => src/video/windows/SDL_gapirender.c rename : src/video/win32/SDL_gapirender.h => src/video/windows/SDL_gapirender.h rename : src/video/win32/SDL_gapirender_c.h => src/video/windows/SDL_gapirender_c.h rename : src/video/win32/SDL_gdirender.c => src/video/windows/SDL_gdirender.c rename : src/video/win32/SDL_gdirender.h => src/video/windows/SDL_gdirender.h rename : src/video/win32/SDL_msctf.h => src/video/windows/SDL_msctf.h rename : src/video/win32/SDL_vkeys.h => src/video/windows/SDL_vkeys.h rename : src/video/win32/SDL_win32clipboard.c => src/video/windows/SDL_windowsclipboard.c rename : src/video/win32/SDL_win32clipboard.h => src/video/windows/SDL_windowsclipboard.h rename : src/video/win32/SDL_win32events.c => src/video/windows/SDL_windowsevents.c rename : src/video/win32/SDL_win32events.h => src/video/windows/SDL_windowsevents.h rename : src/video/win32/SDL_win32gamma.c => src/video/windows/SDL_windowsgamma.c rename : src/video/win32/SDL_win32gamma.h => src/video/windows/SDL_windowsgamma.h rename : src/video/win32/SDL_win32keyboard.c => src/video/windows/SDL_windowskeyboard.c rename : src/video/win32/SDL_win32keyboard.h => src/video/windows/SDL_windowskeyboard.h rename : src/video/win32/SDL_win32modes.c => src/video/windows/SDL_windowsmodes.c rename : src/video/win32/SDL_win32modes.h => src/video/windows/SDL_windowsmodes.h rename : src/video/win32/SDL_win32mouse.c => src/video/windows/SDL_windowsmouse.c rename : src/video/win32/SDL_win32mouse.h => src/video/windows/SDL_windowsmouse.h rename : src/video/win32/SDL_win32opengl.c => src/video/windows/SDL_windowsopengl.c rename : src/video/win32/SDL_win32opengl.h => src/video/windows/SDL_windowsopengl.h rename : src/video/win32/SDL_win32shape.c => src/video/windows/SDL_windowsshape.c rename : src/video/win32/SDL_win32shape.h => src/video/windows/SDL_windowsshape.h rename : src/video/win32/SDL_win32video.c => src/video/windows/SDL_windowsvideo.c rename : src/video/win32/SDL_win32video.h => src/video/windows/SDL_windowsvideo.h rename : src/video/win32/SDL_win32window.c => src/video/windows/SDL_windowswindow.c rename : src/video/win32/SDL_win32window.h => src/video/windows/SDL_windowswindow.h rename : src/video/win32/wmmsg.h => src/video/windows/wmmsg.h
2011-01-21 02:04:05 +00:00
AC_DEFINE(SDL_THREAD_WINDOWS)
SOURCES="$SOURCES $srcdir/src/thread/windows/SDL_sysmutex.c"
SOURCES="$SOURCES $srcdir/src/thread/windows/SDL_syssem.c"
SOURCES="$SOURCES $srcdir/src/thread/windows/SDL_systhread.c"
SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
have_threads=yes
fi
# Set up files for the timer library
if test x$enable_timers = xyes; then
Fixed bug #925 Changed "win32" to "windows" --HG-- rename : include/SDL_config_win32.h => include/SDL_config_windows.h rename : src/events/scancodes_win32.h => src/events/scancodes_windows.h rename : src/haptic/win32/SDL_syshaptic.c => src/haptic/windows/SDL_syshaptic.c rename : src/joystick/win32/SDL_dxjoystick.c => src/joystick/windows/SDL_dxjoystick.c rename : src/joystick/win32/SDL_dxjoystick_c.h => src/joystick/windows/SDL_dxjoystick_c.h rename : src/joystick/win32/SDL_mmjoystick.c => src/joystick/windows/SDL_mmjoystick.c rename : src/loadso/win32/SDL_sysloadso.c => src/loadso/windows/SDL_sysloadso.c rename : src/main/win32/SDL_win32_main.c => src/main/windows/SDL_windows_main.c rename : src/main/win32/version.rc => src/main/windows/version.rc rename : src/thread/win32/SDL_sysmutex.c => src/thread/windows/SDL_sysmutex.c rename : src/thread/win32/SDL_syssem.c => src/thread/windows/SDL_syssem.c rename : src/thread/win32/SDL_systhread.c => src/thread/windows/SDL_systhread.c rename : src/thread/win32/SDL_systhread_c.h => src/thread/windows/SDL_systhread_c.h rename : src/thread/win32/win_ce_semaphore.c => src/thread/windows/win_ce_semaphore.c rename : src/thread/win32/win_ce_semaphore.h => src/thread/windows/win_ce_semaphore.h rename : src/timer/win32/SDL_systimer.c => src/timer/windows/SDL_systimer.c rename : src/video/win32/SDL_ceddrawrender.c => src/video/windows/SDL_ceddrawrender.c rename : src/video/win32/SDL_ceddrawrender.h => src/video/windows/SDL_ceddrawrender.h rename : src/video/win32/SDL_d3drender.c => src/video/windows/SDL_d3drender.c rename : src/video/win32/SDL_d3drender.h => src/video/windows/SDL_d3drender.h rename : src/video/win32/SDL_gapirender.c => src/video/windows/SDL_gapirender.c rename : src/video/win32/SDL_gapirender.h => src/video/windows/SDL_gapirender.h rename : src/video/win32/SDL_gapirender_c.h => src/video/windows/SDL_gapirender_c.h rename : src/video/win32/SDL_gdirender.c => src/video/windows/SDL_gdirender.c rename : src/video/win32/SDL_gdirender.h => src/video/windows/SDL_gdirender.h rename : src/video/win32/SDL_msctf.h => src/video/windows/SDL_msctf.h rename : src/video/win32/SDL_vkeys.h => src/video/windows/SDL_vkeys.h rename : src/video/win32/SDL_win32clipboard.c => src/video/windows/SDL_windowsclipboard.c rename : src/video/win32/SDL_win32clipboard.h => src/video/windows/SDL_windowsclipboard.h rename : src/video/win32/SDL_win32events.c => src/video/windows/SDL_windowsevents.c rename : src/video/win32/SDL_win32events.h => src/video/windows/SDL_windowsevents.h rename : src/video/win32/SDL_win32gamma.c => src/video/windows/SDL_windowsgamma.c rename : src/video/win32/SDL_win32gamma.h => src/video/windows/SDL_windowsgamma.h rename : src/video/win32/SDL_win32keyboard.c => src/video/windows/SDL_windowskeyboard.c rename : src/video/win32/SDL_win32keyboard.h => src/video/windows/SDL_windowskeyboard.h rename : src/video/win32/SDL_win32modes.c => src/video/windows/SDL_windowsmodes.c rename : src/video/win32/SDL_win32modes.h => src/video/windows/SDL_windowsmodes.h rename : src/video/win32/SDL_win32mouse.c => src/video/windows/SDL_windowsmouse.c rename : src/video/win32/SDL_win32mouse.h => src/video/windows/SDL_windowsmouse.h rename : src/video/win32/SDL_win32opengl.c => src/video/windows/SDL_windowsopengl.c rename : src/video/win32/SDL_win32opengl.h => src/video/windows/SDL_windowsopengl.h rename : src/video/win32/SDL_win32shape.c => src/video/windows/SDL_windowsshape.c rename : src/video/win32/SDL_win32shape.h => src/video/windows/SDL_windowsshape.h rename : src/video/win32/SDL_win32video.c => src/video/windows/SDL_windowsvideo.c rename : src/video/win32/SDL_win32video.h => src/video/windows/SDL_windowsvideo.h rename : src/video/win32/SDL_win32window.c => src/video/windows/SDL_windowswindow.c rename : src/video/win32/SDL_win32window.h => src/video/windows/SDL_windowswindow.h rename : src/video/win32/wmmsg.h => src/video/windows/wmmsg.h
2011-01-21 02:04:05 +00:00
AC_DEFINE(SDL_TIMER_WINDOWS)
SOURCES="$SOURCES $srcdir/src/timer/windows/*.c"
have_timers=yes
fi
# Set up files for the shared object loading library
if test x$enable_loadso = xyes; then
Fixed bug #925 Changed "win32" to "windows" --HG-- rename : include/SDL_config_win32.h => include/SDL_config_windows.h rename : src/events/scancodes_win32.h => src/events/scancodes_windows.h rename : src/haptic/win32/SDL_syshaptic.c => src/haptic/windows/SDL_syshaptic.c rename : src/joystick/win32/SDL_dxjoystick.c => src/joystick/windows/SDL_dxjoystick.c rename : src/joystick/win32/SDL_dxjoystick_c.h => src/joystick/windows/SDL_dxjoystick_c.h rename : src/joystick/win32/SDL_mmjoystick.c => src/joystick/windows/SDL_mmjoystick.c rename : src/loadso/win32/SDL_sysloadso.c => src/loadso/windows/SDL_sysloadso.c rename : src/main/win32/SDL_win32_main.c => src/main/windows/SDL_windows_main.c rename : src/main/win32/version.rc => src/main/windows/version.rc rename : src/thread/win32/SDL_sysmutex.c => src/thread/windows/SDL_sysmutex.c rename : src/thread/win32/SDL_syssem.c => src/thread/windows/SDL_syssem.c rename : src/thread/win32/SDL_systhread.c => src/thread/windows/SDL_systhread.c rename : src/thread/win32/SDL_systhread_c.h => src/thread/windows/SDL_systhread_c.h rename : src/thread/win32/win_ce_semaphore.c => src/thread/windows/win_ce_semaphore.c rename : src/thread/win32/win_ce_semaphore.h => src/thread/windows/win_ce_semaphore.h rename : src/timer/win32/SDL_systimer.c => src/timer/windows/SDL_systimer.c rename : src/video/win32/SDL_ceddrawrender.c => src/video/windows/SDL_ceddrawrender.c rename : src/video/win32/SDL_ceddrawrender.h => src/video/windows/SDL_ceddrawrender.h rename : src/video/win32/SDL_d3drender.c => src/video/windows/SDL_d3drender.c rename : src/video/win32/SDL_d3drender.h => src/video/windows/SDL_d3drender.h rename : src/video/win32/SDL_gapirender.c => src/video/windows/SDL_gapirender.c rename : src/video/win32/SDL_gapirender.h => src/video/windows/SDL_gapirender.h rename : src/video/win32/SDL_gapirender_c.h => src/video/windows/SDL_gapirender_c.h rename : src/video/win32/SDL_gdirender.c => src/video/windows/SDL_gdirender.c rename : src/video/win32/SDL_gdirender.h => src/video/windows/SDL_gdirender.h rename : src/video/win32/SDL_msctf.h => src/video/windows/SDL_msctf.h rename : src/video/win32/SDL_vkeys.h => src/video/windows/SDL_vkeys.h rename : src/video/win32/SDL_win32clipboard.c => src/video/windows/SDL_windowsclipboard.c rename : src/video/win32/SDL_win32clipboard.h => src/video/windows/SDL_windowsclipboard.h rename : src/video/win32/SDL_win32events.c => src/video/windows/SDL_windowsevents.c rename : src/video/win32/SDL_win32events.h => src/video/windows/SDL_windowsevents.h rename : src/video/win32/SDL_win32gamma.c => src/video/windows/SDL_windowsgamma.c rename : src/video/win32/SDL_win32gamma.h => src/video/windows/SDL_windowsgamma.h rename : src/video/win32/SDL_win32keyboard.c => src/video/windows/SDL_windowskeyboard.c rename : src/video/win32/SDL_win32keyboard.h => src/video/windows/SDL_windowskeyboard.h rename : src/video/win32/SDL_win32modes.c => src/video/windows/SDL_windowsmodes.c rename : src/video/win32/SDL_win32modes.h => src/video/windows/SDL_windowsmodes.h rename : src/video/win32/SDL_win32mouse.c => src/video/windows/SDL_windowsmouse.c rename : src/video/win32/SDL_win32mouse.h => src/video/windows/SDL_windowsmouse.h rename : src/video/win32/SDL_win32opengl.c => src/video/windows/SDL_windowsopengl.c rename : src/video/win32/SDL_win32opengl.h => src/video/windows/SDL_windowsopengl.h rename : src/video/win32/SDL_win32shape.c => src/video/windows/SDL_windowsshape.c rename : src/video/win32/SDL_win32shape.h => src/video/windows/SDL_windowsshape.h rename : src/video/win32/SDL_win32video.c => src/video/windows/SDL_windowsvideo.c rename : src/video/win32/SDL_win32video.h => src/video/windows/SDL_windowsvideo.h rename : src/video/win32/SDL_win32window.c => src/video/windows/SDL_windowswindow.c rename : src/video/win32/SDL_win32window.h => src/video/windows/SDL_windowswindow.h rename : src/video/win32/wmmsg.h => src/video/windows/wmmsg.h
2011-01-21 02:04:05 +00:00
AC_DEFINE(SDL_LOADSO_WINDOWS)
SOURCES="$SOURCES $srcdir/src/loadso/windows/*.c"
have_loadso=yes
fi
# Set up the system libraries we need
# SDL 1.3 is unicode, and unicows emulates this on Windows 98/ME
# You can get this here: http://libunicows.sourceforge.net/
#EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lunicows"
2010-09-19 23:46:56 +00:00
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lmsimg32 -lwinmm -limm32 -lole32 -loleaut32 -lversion -luuid"
Fixed bug #925 Changed "win32" to "windows" --HG-- rename : include/SDL_config_win32.h => include/SDL_config_windows.h rename : src/events/scancodes_win32.h => src/events/scancodes_windows.h rename : src/haptic/win32/SDL_syshaptic.c => src/haptic/windows/SDL_syshaptic.c rename : src/joystick/win32/SDL_dxjoystick.c => src/joystick/windows/SDL_dxjoystick.c rename : src/joystick/win32/SDL_dxjoystick_c.h => src/joystick/windows/SDL_dxjoystick_c.h rename : src/joystick/win32/SDL_mmjoystick.c => src/joystick/windows/SDL_mmjoystick.c rename : src/loadso/win32/SDL_sysloadso.c => src/loadso/windows/SDL_sysloadso.c rename : src/main/win32/SDL_win32_main.c => src/main/windows/SDL_windows_main.c rename : src/main/win32/version.rc => src/main/windows/version.rc rename : src/thread/win32/SDL_sysmutex.c => src/thread/windows/SDL_sysmutex.c rename : src/thread/win32/SDL_syssem.c => src/thread/windows/SDL_syssem.c rename : src/thread/win32/SDL_systhread.c => src/thread/windows/SDL_systhread.c rename : src/thread/win32/SDL_systhread_c.h => src/thread/windows/SDL_systhread_c.h rename : src/thread/win32/win_ce_semaphore.c => src/thread/windows/win_ce_semaphore.c rename : src/thread/win32/win_ce_semaphore.h => src/thread/windows/win_ce_semaphore.h rename : src/timer/win32/SDL_systimer.c => src/timer/windows/SDL_systimer.c rename : src/video/win32/SDL_ceddrawrender.c => src/video/windows/SDL_ceddrawrender.c rename : src/video/win32/SDL_ceddrawrender.h => src/video/windows/SDL_ceddrawrender.h rename : src/video/win32/SDL_d3drender.c => src/video/windows/SDL_d3drender.c rename : src/video/win32/SDL_d3drender.h => src/video/windows/SDL_d3drender.h rename : src/video/win32/SDL_gapirender.c => src/video/windows/SDL_gapirender.c rename : src/video/win32/SDL_gapirender.h => src/video/windows/SDL_gapirender.h rename : src/video/win32/SDL_gapirender_c.h => src/video/windows/SDL_gapirender_c.h rename : src/video/win32/SDL_gdirender.c => src/video/windows/SDL_gdirender.c rename : src/video/win32/SDL_gdirender.h => src/video/windows/SDL_gdirender.h rename : src/video/win32/SDL_msctf.h => src/video/windows/SDL_msctf.h rename : src/video/win32/SDL_vkeys.h => src/video/windows/SDL_vkeys.h rename : src/video/win32/SDL_win32clipboard.c => src/video/windows/SDL_windowsclipboard.c rename : src/video/win32/SDL_win32clipboard.h => src/video/windows/SDL_windowsclipboard.h rename : src/video/win32/SDL_win32events.c => src/video/windows/SDL_windowsevents.c rename : src/video/win32/SDL_win32events.h => src/video/windows/SDL_windowsevents.h rename : src/video/win32/SDL_win32gamma.c => src/video/windows/SDL_windowsgamma.c rename : src/video/win32/SDL_win32gamma.h => src/video/windows/SDL_windowsgamma.h rename : src/video/win32/SDL_win32keyboard.c => src/video/windows/SDL_windowskeyboard.c rename : src/video/win32/SDL_win32keyboard.h => src/video/windows/SDL_windowskeyboard.h rename : src/video/win32/SDL_win32modes.c => src/video/windows/SDL_windowsmodes.c rename : src/video/win32/SDL_win32modes.h => src/video/windows/SDL_windowsmodes.h rename : src/video/win32/SDL_win32mouse.c => src/video/windows/SDL_windowsmouse.c rename : src/video/win32/SDL_win32mouse.h => src/video/windows/SDL_windowsmouse.h rename : src/video/win32/SDL_win32opengl.c => src/video/windows/SDL_windowsopengl.c rename : src/video/win32/SDL_win32opengl.h => src/video/windows/SDL_windowsopengl.h rename : src/video/win32/SDL_win32shape.c => src/video/windows/SDL_windowsshape.c rename : src/video/win32/SDL_win32shape.h => src/video/windows/SDL_windowsshape.h rename : src/video/win32/SDL_win32video.c => src/video/windows/SDL_windowsvideo.c rename : src/video/win32/SDL_win32video.h => src/video/windows/SDL_windowsvideo.h rename : src/video/win32/SDL_win32window.c => src/video/windows/SDL_windowswindow.c rename : src/video/win32/SDL_win32window.h => src/video/windows/SDL_windowswindow.h rename : src/video/win32/wmmsg.h => src/video/windows/wmmsg.h
2011-01-21 02:04:05 +00:00
# The Windows platform requires special setup
VERSION_SOURCES="$srcdir/src/main/windows/*.rc"
SDLMAIN_SOURCES="$srcdir/src/main/windows/*.c"
SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows"
;;
*-*-beos* | *-*-haiku*)
ARCH=beos
ac_default_prefix=/boot/develop/tools/gnupro
CheckDummyVideo
CheckDiskAudio
CheckDummyAudio
CheckBWINDOW
CheckBeGL
# Set up files for the audio library
if test x$enable_audio = xyes; then
AC_DEFINE(SDL_AUDIO_DRIVER_BEOSAUDIO)
SOURCES="$SOURCES $srcdir/src/audio/baudio/*.cc"
have_audio=yes
fi
# Set up files for the joystick library
if test x$enable_joystick = xyes; then
AC_DEFINE(SDL_JOYSTICK_BEOS)
SOURCES="$SOURCES $srcdir/src/joystick/beos/*.cc"
have_joystick=yes
fi
# Set up files for the thread library
if test x$enable_threads = xyes; then
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
fi
# Set up files for the timer library
if test x$enable_timers = xyes; then
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
fi
# Set up files for the system power library
if test x$enable_power = xyes; then
AC_DEFINE(SDL_POWER_BEOS)
SOURCES="$SOURCES $srcdir/src/power/beos/*.c"
have_power=yes
fi
# The BeOS platform requires special setup.
SOURCES="$srcdir/src/main/beos/*.cc $SOURCES"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
;;
*-*-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
# 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)
ARCH=macosx
# Mac OS X builds with both the Carbon and OSX APIs at the moment
EXTRA_CFLAGS="$EXTRA_CFLAGS -DTARGET_API_MAC_CARBON"
EXTRA_CFLAGS="$EXTRA_CFLAGS -DTARGET_API_MAC_OSX"
CheckVisibilityHidden
CheckDummyVideo
CheckDiskAudio
CheckDummyAudio
CheckDLOPEN
# Set up files for the shared object loading library
# (this needs to be done before the dynamic X11 check)
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
fi
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
CheckX11
CheckMacGL
CheckOpenGLX11
CheckPTHREAD
# Good optimization on Mac OS X, yes...
EXTRA_CFLAGS="$EXTRA_CFLAGS -falign-loops=16"
# Need this or things might misbuild on a G3.
EXTRA_CFLAGS="$EXTRA_CFLAGS -force_cpusubtype_ALL"
# Set up files for the audio library
if test x$enable_audio = xyes; then
AC_DEFINE(SDL_AUDIO_DRIVER_COREAUDIO)
SOURCES="$SOURCES $srcdir/src/audio/macosx/*.c"
have_audio=yes
fi
# Set up files for the joystick library
if test x$enable_joystick = xyes; then
AC_DEFINE(SDL_JOYSTICK_IOKIT)
SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c"
have_joystick=yes
fi
# Set up files for the haptic library
if test x$enable_haptic = xyes; then
AC_DEFINE(SDL_HAPTIC_IOKIT)
SOURCES="$SOURCES $srcdir/src/haptic/darwin/*.c"
have_haptic=yes
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,ForceFeedback"
fi
# Set up files for the power library
if test x$enable_power = xyes; then
AC_DEFINE(SDL_POWER_MACOSX)
SOURCES="$SOURCES $srcdir/src/power/macosx/*.c"
have_power=yes
fi
# Set up files for the timer library
if test x$enable_timers = xyes; then
AC_DEFINE(SDL_TIMER_UNIX)
SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
have_timers=yes
fi
# Set up additional files for the file library
if test x$enable_file = xyes; then
SOURCES="$SOURCES $srcdir/src/file/cocoa/*.m"
fi
# The Mac OS X platform requires special setup.
EXTRA_CFLAGS="$EXTRA_CFLAGS -fpascal-strings"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lobjc"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Cocoa"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Carbon"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,IOKit"
# If audio is used, add the AudioUnit framework
if test x$enable_audio = xyes; then
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-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
;;
*-riscos)
ARCH=riscos
CheckOSS
CheckPTHREAD
# Set up files for the video library
if test x$enable_video = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_RISCOS)
SOURCES="$SOURCES $srcdir/src/video/riscos/*.c"
SOURCES="$SOURCES $srcdir/src/video/riscos/*.S"
have_video=yes
fi
# Set up files for the joystick library
if test x$enable_joystick = xyes; then
AC_DEFINE(SDL_JOYSTICK_RISCOS)
SOURCES="$SOURCES $srcdir/src/joystick/riscos/*.c"
have_joystick=yes
fi
# Set up files for the timer library
if test x$enable_timers = xyes; then
AC_DEFINE(SDL_TIMER_RISCOS)
SOURCES="$SOURCES $srcdir/src/timer/riscos/*.c"
have_timers=yes
fi
# The RISC OS platform requires special setup.
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ljpeg -ltiff -lpng -lz"
;;
*)
AC_MSG_ERROR([
*** Unsupported host: Please add to configure.in
])
;;
esac
# 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_haptic != xyes; then
if test x$enable_haptic = xyes; then
AC_DEFINE(SDL_HAPTIC_DISABLED)
fi
SOURCES="$SOURCES $srcdir/src/haptic/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
if test x$SDLMAIN_SOURCES = x; then
SDLMAIN_SOURCES="$srcdir/src/main/dummy/*.c"
fi
OBJECTS=`echo $SOURCES`
DEPENDS=`echo $SOURCES`
for EXT in asm cc m c S; do
OBJECTS=`echo "$OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.'$EXT',$(objects)/\1.lo,g'`
DEPENDS=`echo "$DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.$EXT,\\\\
\\$(objects)/\\2.lo: \\1/\\2.$EXT\\\\
\\$(LIBTOOL) --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
done
DEPENDS=`echo "$DEPENDS" | sed 's,\\$,\\\\$,g'`
VERSION_OBJECTS=`echo $VERSION_SOURCES`
VERSION_DEPENDS=`echo $VERSION_SOURCES`
VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'`
VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.rc,\\\\
\\$(objects)/\\2.o: \\1/\\2.rc\\\\
\\$(WINDRES) \\$< \\$@,g"`
VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed 's,\\$,\\\\$,g'`
SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES`
SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES`
SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'`
SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\
\\$(objects)/\\2.o: \\1/\\2.c\\\\
\\$(LIBTOOL) --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed 's,\\$,\\\\$,g'`
# Set runtime shared library paths as needed
if test "x$enable_rpath" = "xyes"; then
if test $ARCH = bsdi -o $ARCH = freebsd -o $ARCH = irix -o $ARCH = linux -o $ARCH = netbsd; then
SDL_RLD_FLAGS="-Wl,-rpath,\${libdir}"
fi
if test $ARCH = solaris; then
SDL_RLD_FLAGS="-R\${libdir}"
fi
else
SDL_RLD_FLAGS=""
fi
case "$ARCH" in
macosx)
# Evil hack to allow static linking on Mac OS X
SDL_STATIC_LIBS="\${libdir}/libSDL.a $EXTRA_LDFLAGS"
;;
*)
SDL_STATIC_LIBS="$SDL_LIBS $EXTRA_LDFLAGS"
;;
esac
dnl Expand the cflags and libraries needed by apps using SDL
AC_SUBST(SDL_CFLAGS)
AC_SUBST(SDL_LIBS)
AC_SUBST(SDL_STATIC_LIBS)
AC_SUBST(SDL_RLD_FLAGS)
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)
dnl Expand the sources and objects needed to build the library
AC_SUBST(ac_aux_dir)
AC_SUBST(INCLUDE)
AC_SUBST(OBJECTS)
AC_SUBST(VERSION_OBJECTS)
AC_SUBST(SDLMAIN_OBJECTS)
AC_SUBST(BUILD_CFLAGS)
AC_SUBST(EXTRA_CFLAGS)
AC_SUBST(BUILD_LDFLAGS)
AC_SUBST(EXTRA_LDFLAGS)
AC_SUBST(WINDRES)
AC_CONFIG_FILES([
Makefile sdl-config SDL.spec sdl.pc
])
AC_CONFIG_COMMANDS([default],
[cat >>Makefile <<__EOF__
# Build rules for objects
-include \$(OBJECTS:.lo=.d)
$DEPENDS
$VERSION_DEPENDS
$SDLMAIN_DEPENDS
__EOF__
], [
DEPENDS="$DEPENDS"
VERSION_DEPENDS="$VERSION_DEPENDS"
SDLMAIN_DEPENDS="$SDLMAIN_DEPENDS"
])
AC_OUTPUT