Added David Hedbor's Qtopia patches

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40372
This commit is contained in:
Sam Lantinga 2002-05-19 20:06:01 +00:00
parent 4c4f326af1
commit 965965962a
20 changed files with 1613 additions and 25 deletions

View file

@ -322,15 +322,15 @@ CheckESD()
[ --enable-esd support the Enlightened Sound Daemon [default=yes]],
, enable_esd=yes)
if test x$enable_audio = xyes -a x$enable_esd = xyes; then
use_esd=no
use_esd=no
AM_PATH_ESD(0.2.8, use_esd=yes)
if test x$use_esd = xyes; then
if test x$use_esd = xyes; then
AC_ARG_ENABLE(esd-shared,
[ --enable-esd-shared dynamically load ESD audio support [default=no]],
, enable_esd_shared=no)
esd_lib_spec=`echo $ESD_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libesd.so.*/'`
esd_lib=`ls $esd_lib_spec | head -1 | sed 's/.*\/\(.*\)/\1/'`
echo "-- $esd_lib_spec -> $esd_lib"
esd_lib=`ls $esd_lib_spec | head -1 | sed 's/.*\/\(.*\)/\1/'`
echo "-- $esd_lib_spec -> $esd_lib"
if test x$enable_dlopen != xyes && \
test x$enable_esd_shared = xyes; then
AC_MSG_ERROR([You must have dlopen() support and use the --enable-dlopen option])
@ -338,7 +338,7 @@ CheckESD()
if test x$enable_dlopen = xyes && \
test x$enable_esd_shared = xyes && test x$esd_lib != x; then
CFLAGS="$CFLAGS -DESD_SUPPORT -DESD_DYNAMIC=\$(esd_lib) $ESD_CFLAGS"
AC_SUBST(esd_lib)
AC_SUBST(esd_lib)
else
CFLAGS="$CFLAGS -DESD_SUPPORT $ESD_CFLAGS"
SYSTEM_LIBS="$SYSTEM_LIBS $ESD_LIBS"
@ -379,8 +379,8 @@ CheckARTSC()
[ --enable-arts-shared dynamically load aRts audio support [default=no]],
, enable_arts_shared=no)
arts_lib_spec=`echo $ARTSC_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libartsc.so.*/'`
arts_lib=`ls $arts_lib_spec | head -1 | sed 's/.*\/\(.*\)/\1/'`
echo "-- $arts_lib_spec -> $arts_lib"
arts_lib=`ls $arts_lib_spec | head -1 | sed 's/.*\/\(.*\)/\1/'`
echo "-- $arts_lib_spec -> $arts_lib"
if test x$enable_dlopen != xyes && \
test x$enable_arts_shared = xyes; then
AC_MSG_ERROR([You must have dlopen() support and use the --enable-dlopen option])
@ -388,7 +388,7 @@ CheckARTSC()
if test x$enable_dlopen = xyes && \
test x$enable_arts_shared = xyes && test x$arts_lib != x; then
CFLAGS="$CFLAGS -DARTSC_SUPPORT -DARTSC_DYNAMIC=\$(arts_lib) $ARTSC_CFLAGS"
AC_SUBST(arts_lib)
AC_SUBST(arts_lib)
else
CFLAGS="$CFLAGS -DARTSC_SUPPORT $ARTSC_CFLAGS"
SYSTEM_LIBS="$SYSTEM_LIBS $ARTSC_LIBS"
@ -1165,7 +1165,7 @@ CheckPTHREAD()
#include <pthread.h>
],[
pthread_mutexattr_t attr;
#ifdef linux
#if defined(linux) && !(defined(__arm__) && defined(QWS))
pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
#else
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
@ -1349,6 +1349,36 @@ CheckBWINDOW()
VIDEO_DRIVERS="$VIDEO_DRIVERS bwindow/libvideo_bwindow.la"
}
dnl Set up the QTopia video driver if enabled
CheckQtopia()
{
AC_ARG_ENABLE(video-qtopia,
[ --enable-video-qtopia use Qtopia video driver [default=no]],
, enable_video_qtopia=no)
if test x$enable_video = xyes -a x$enable_video_qtopia = xyes; then
AC_MSG_CHECKING(for Qtopia support)
video_qtopia=no
AC_LANG_CPLUSPLUS
OLD_CXX="$CXXFLAGS"
CXXFLAGS="-DQT_QWS_EBX -fno-rtti -fno-exceptions -DQT_QWS_CUSTOM -DQWS -I${QPEDIR}/include -I${QTDIR}/include/ -DNO_DEBUG"
AC_TRY_COMPILE([
#include <qpe/qpeapplication.h>
],[
],[
video_qtopia=yes
])
CXXFLAGS="$OLD_CXX"
AC_MSG_RESULT($video_qtopia)
if test x$video_qtopia = xyes; then
CFLAGS="$CFLAGS -DENABLE_QTOPIA -DQT_QWS_EBX -DQT_QWS_CUSTOM -DQWS -I${QPEDIR}/include -I${QTDIR}/include/ -DNO_DEBUG -fno-rtti -fno-exceptions"
SYSTEM_LIBS="$SYSTEM_LIBS -:${QPEDIR}/lib -L${QTDIR}/lib/ -lqpe -lqte"
VIDEO_SUBDIRS="$VIDEO_SUBDIRS qtopia"
VIDEO_DRIVERS="$VIDEO_DRIVERS qtopia/libvideo_qtopia.la"
fi
AC_LANG_C
fi
}
dnl Set up the Mac toolbox video driver for Mac OS 7-9
CheckTOOLBOX()
{
@ -1420,7 +1450,7 @@ case "$target" in
ARCH=linux
CheckDummyVideo
CheckDiskAudio
CheckDLOPEN
CheckDLOPEN
CheckNASM
CheckOSS
CheckALSA
@ -1436,11 +1466,18 @@ case "$target" in
CheckGGI
CheckSVGA
CheckAAlib
CheckQtopia
CheckOpenGL
CheckInputEvents
CheckPTHREAD
# Set up files for the main() stub
COPY_ARCH_SRC(src/main, linux, SDL_main.c)
if test "x$video_qtopia" = "xyes"; then
COPY_ARCH_SRC(src/main, linux, SDL_Qtopia_main.cc)
SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
SDL_LIBS="-lSDLmain $SDL_LIBS"
else
COPY_ARCH_SRC(src/main, linux, SDL_main.c)
fi
# Set up files for the audio library
# We use the OSS and ALSA API's, not the Sun audio API
#if test x$enable_audio = xyes; then
@ -1479,7 +1516,11 @@ case "$target" in
else
COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
if test x$has_recursive_mutexes != xyes; then
COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
else
COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
fi
COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
fi
fi
@ -1492,7 +1533,7 @@ case "$target" in
ARCH=bsdi
CheckDummyVideo
CheckDiskAudio
CheckDLOPEN
CheckDLOPEN
CheckNASM
CheckOSS
CheckARTSC
@ -1544,7 +1585,7 @@ case "$target" in
ARCH=freebsd
CheckDummyVideo
CheckDiskAudio
CheckDLOPEN
CheckDLOPEN
CheckVGL
CheckNASM
CheckOSS
@ -1601,7 +1642,7 @@ case "$target" in
ARCH=netbsd
CheckDummyVideo
CheckDiskAudio
CheckDLOPEN
CheckDLOPEN
CheckNASM
CheckOSS
CheckARTSC
@ -1656,7 +1697,7 @@ case "$target" in
ARCH=openbsd
CheckDummyVideo
CheckDiskAudio
CheckDLOPEN
CheckDLOPEN
CheckNASM
CheckOSS
CheckARTSC
@ -1715,7 +1756,7 @@ case "$target" in
ARCH=sysv5
CheckDummyVideo
CheckDiskAudio
CheckDLOPEN
CheckDLOPEN
CheckNASM
CheckOSS
CheckARTSC
@ -1765,7 +1806,7 @@ case "$target" in
CFLAGS="$CFLAGS -D__ELF__" # Fix for nasm on Solaris x86
CheckDummyVideo
CheckDiskAudio
CheckDLOPEN
CheckDLOPEN
CheckNASM
CheckOSS
CheckARTSC
@ -1814,7 +1855,7 @@ case "$target" in
ARCH=irix
CheckDummyVideo
CheckDiskAudio
CheckDLOPEN
CheckDLOPEN
CheckDMEDIA
CheckESD
CheckNAS
@ -1877,7 +1918,7 @@ case "$target" in
ARCH=hpux
CheckDummyVideo
CheckDiskAudio
CheckDLOPEN
CheckDLOPEN
CheckOSS
CheckNAS
CheckX11
@ -1925,7 +1966,7 @@ case "$target" in
ARCH=aix
CheckDummyVideo
CheckDiskAudio
CheckDLOPEN
CheckDLOPEN
CheckOSS
CheckNAS
CheckX11
@ -1971,7 +2012,7 @@ case "$target" in
ARCH=osf
CheckDummyVideo
CheckDiskAudio
CheckDLOPEN
CheckDLOPEN
CheckNAS
CheckX11
CheckGGI
@ -2018,7 +2059,7 @@ case "$target" in
ARCH=qnx
CheckDummyVideo
CheckDiskAudio
CheckDLOPEN
CheckDLOPEN
CheckNAS
CheckPHOTON
CheckX11
@ -2330,6 +2371,7 @@ AC_SUBST(ARCH)
# Set the conditional variables for this target
AM_CONDITIONAL(TARGET_LINUX, test $ARCH = linux)
AM_CONDITIONAL(TARGET_QTOPIA, test "x$video_qtopia" = "xyes")
AM_CONDITIONAL(TARGET_SOLARIS, test $ARCH = solaris)
AM_CONDITIONAL(TARGET_IRIX, test $ARCH = irix)
AM_CONDITIONAL(TARGET_BSDI, test $ARCH = bsdi)
@ -2486,6 +2528,7 @@ src/video/dummy/Makefile
src/video/ataricommon/Makefile
src/video/xbios/Makefile
src/video/gem/Makefile
src/video/qtopia/Makefile
src/events/Makefile
src/joystick/Makefile
src/joystick/amigaos/Makefile