configure.in
changeset 371 db0cc6034336
parent 360 8c1f8c4d2dd1
child 378 6089cd59e3ca
     1.1 --- a/configure.in	Sun May 19 19:54:01 2002 +0000
     1.2 +++ b/configure.in	Sun May 19 20:06:01 2002 +0000
     1.3 @@ -322,15 +322,15 @@
     1.4  [  --enable-esd            support the Enlightened Sound Daemon [default=yes]],
     1.5                    , enable_esd=yes)
     1.6      if test x$enable_audio = xyes -a x$enable_esd = xyes; then
     1.7 -	use_esd=no
     1.8 +        use_esd=no
     1.9          AM_PATH_ESD(0.2.8, use_esd=yes)
    1.10 -	if test x$use_esd = xyes; then
    1.11 +        if test x$use_esd = xyes; then
    1.12              AC_ARG_ENABLE(esd-shared,
    1.13  [  --enable-esd-shared     dynamically load ESD audio support [default=no]],
    1.14                            , enable_esd_shared=no)
    1.15              esd_lib_spec=`echo $ESD_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libesd.so.*/'`
    1.16 -	    esd_lib=`ls $esd_lib_spec | head -1 | sed 's/.*\/\(.*\)/\1/'`
    1.17 -	    echo "-- $esd_lib_spec -> $esd_lib"
    1.18 +            esd_lib=`ls $esd_lib_spec | head -1 | sed 's/.*\/\(.*\)/\1/'`
    1.19 +            echo "-- $esd_lib_spec -> $esd_lib"
    1.20              if test x$enable_dlopen != xyes && \
    1.21                 test x$enable_esd_shared = xyes; then
    1.22                  AC_MSG_ERROR([You must have dlopen() support and use the --enable-dlopen option])
    1.23 @@ -338,7 +338,7 @@
    1.24              if test x$enable_dlopen = xyes && \
    1.25                 test x$enable_esd_shared = xyes && test x$esd_lib != x; then
    1.26                  CFLAGS="$CFLAGS -DESD_SUPPORT -DESD_DYNAMIC=\$(esd_lib) $ESD_CFLAGS"
    1.27 -		AC_SUBST(esd_lib)
    1.28 +                AC_SUBST(esd_lib)
    1.29              else
    1.30                  CFLAGS="$CFLAGS -DESD_SUPPORT $ESD_CFLAGS"
    1.31                  SYSTEM_LIBS="$SYSTEM_LIBS $ESD_LIBS"
    1.32 @@ -379,8 +379,8 @@
    1.33  [  --enable-arts-shared     dynamically load aRts audio support [default=no]],
    1.34                                , enable_arts_shared=no)
    1.35                  arts_lib_spec=`echo $ARTSC_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libartsc.so.*/'`
    1.36 -	        arts_lib=`ls $arts_lib_spec | head -1 | sed 's/.*\/\(.*\)/\1/'`
    1.37 -	        echo "-- $arts_lib_spec -> $arts_lib"
    1.38 +                arts_lib=`ls $arts_lib_spec | head -1 | sed 's/.*\/\(.*\)/\1/'`
    1.39 +                echo "-- $arts_lib_spec -> $arts_lib"
    1.40                  if test x$enable_dlopen != xyes && \
    1.41                     test x$enable_arts_shared = xyes; then
    1.42                      AC_MSG_ERROR([You must have dlopen() support and use the --enable-dlopen option])
    1.43 @@ -388,7 +388,7 @@
    1.44                  if test x$enable_dlopen = xyes && \
    1.45                     test x$enable_arts_shared = xyes && test x$arts_lib != x; then
    1.46                      CFLAGS="$CFLAGS -DARTSC_SUPPORT -DARTSC_DYNAMIC=\$(arts_lib) $ARTSC_CFLAGS"
    1.47 -		    AC_SUBST(arts_lib)
    1.48 +                    AC_SUBST(arts_lib)
    1.49                  else
    1.50                      CFLAGS="$CFLAGS -DARTSC_SUPPORT $ARTSC_CFLAGS"
    1.51                      SYSTEM_LIBS="$SYSTEM_LIBS $ARTSC_LIBS"
    1.52 @@ -1165,7 +1165,7 @@
    1.53                #include <pthread.h>
    1.54              ],[
    1.55                pthread_mutexattr_t attr;
    1.56 -              #ifdef linux
    1.57 +              #if defined(linux) && !(defined(__arm__) && defined(QWS))
    1.58                pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
    1.59                #else
    1.60                pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
    1.61 @@ -1349,6 +1349,36 @@
    1.62      VIDEO_DRIVERS="$VIDEO_DRIVERS bwindow/libvideo_bwindow.la"
    1.63  }
    1.64  
    1.65 +dnl Set up the QTopia video driver if enabled
    1.66 +CheckQtopia()
    1.67 +{
    1.68 +    AC_ARG_ENABLE(video-qtopia,
    1.69 +[  --enable-video-qtopia   use Qtopia video driver [default=no]],
    1.70 +                  , enable_video_qtopia=no)
    1.71 +    if test x$enable_video = xyes -a x$enable_video_qtopia = xyes; then
    1.72 +        AC_MSG_CHECKING(for Qtopia support)
    1.73 +        video_qtopia=no
    1.74 +        AC_LANG_CPLUSPLUS
    1.75 +        OLD_CXX="$CXXFLAGS"
    1.76 +        CXXFLAGS="-DQT_QWS_EBX -fno-rtti -fno-exceptions -DQT_QWS_CUSTOM -DQWS -I${QPEDIR}/include -I${QTDIR}/include/ -DNO_DEBUG"
    1.77 +        AC_TRY_COMPILE([
    1.78 +         #include <qpe/qpeapplication.h>
    1.79 +        ],[
    1.80 +        ],[
    1.81 +        video_qtopia=yes
    1.82 +        ])
    1.83 +        CXXFLAGS="$OLD_CXX"
    1.84 +        AC_MSG_RESULT($video_qtopia)
    1.85 +        if test x$video_qtopia = xyes; then
    1.86 +            CFLAGS="$CFLAGS -DENABLE_QTOPIA -DQT_QWS_EBX -DQT_QWS_CUSTOM -DQWS -I${QPEDIR}/include -I${QTDIR}/include/ -DNO_DEBUG -fno-rtti -fno-exceptions"
    1.87 +            SYSTEM_LIBS="$SYSTEM_LIBS -:${QPEDIR}/lib -L${QTDIR}/lib/ -lqpe -lqte"
    1.88 +            VIDEO_SUBDIRS="$VIDEO_SUBDIRS qtopia"
    1.89 +            VIDEO_DRIVERS="$VIDEO_DRIVERS qtopia/libvideo_qtopia.la"
    1.90 +        fi
    1.91 +        AC_LANG_C
    1.92 +    fi
    1.93 +}
    1.94 +
    1.95  dnl Set up the Mac toolbox video driver for Mac OS 7-9
    1.96  CheckTOOLBOX()
    1.97  {
    1.98 @@ -1420,7 +1450,7 @@
    1.99          ARCH=linux
   1.100          CheckDummyVideo
   1.101          CheckDiskAudio
   1.102 -	CheckDLOPEN
   1.103 +        CheckDLOPEN
   1.104          CheckNASM
   1.105          CheckOSS
   1.106          CheckALSA
   1.107 @@ -1436,11 +1466,18 @@
   1.108          CheckGGI
   1.109          CheckSVGA
   1.110          CheckAAlib
   1.111 +        CheckQtopia
   1.112          CheckOpenGL
   1.113          CheckInputEvents
   1.114          CheckPTHREAD
   1.115          # Set up files for the main() stub
   1.116 -        COPY_ARCH_SRC(src/main, linux, SDL_main.c)
   1.117 +        if test "x$video_qtopia" = "xyes"; then
   1.118 +          COPY_ARCH_SRC(src/main, linux, SDL_Qtopia_main.cc)
   1.119 +          SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
   1.120 +          SDL_LIBS="-lSDLmain $SDL_LIBS"
   1.121 +        else
   1.122 +          COPY_ARCH_SRC(src/main, linux, SDL_main.c)
   1.123 +        fi
   1.124          # Set up files for the audio library
   1.125          # We use the OSS and ALSA API's, not the Sun audio API
   1.126          #if test x$enable_audio = xyes; then
   1.127 @@ -1479,7 +1516,11 @@
   1.128              else
   1.129                  COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
   1.130                  COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
   1.131 -                COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
   1.132 +                if test x$has_recursive_mutexes != xyes; then
   1.133 +                    COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
   1.134 +                else
   1.135 +                    COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
   1.136 +                fi
   1.137                  COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
   1.138              fi
   1.139          fi
   1.140 @@ -1492,7 +1533,7 @@
   1.141          ARCH=bsdi
   1.142          CheckDummyVideo
   1.143          CheckDiskAudio
   1.144 -	CheckDLOPEN
   1.145 +        CheckDLOPEN
   1.146          CheckNASM
   1.147          CheckOSS
   1.148          CheckARTSC
   1.149 @@ -1544,7 +1585,7 @@
   1.150          ARCH=freebsd
   1.151          CheckDummyVideo
   1.152          CheckDiskAudio
   1.153 -	CheckDLOPEN
   1.154 +        CheckDLOPEN
   1.155          CheckVGL
   1.156          CheckNASM
   1.157          CheckOSS
   1.158 @@ -1601,7 +1642,7 @@
   1.159          ARCH=netbsd
   1.160          CheckDummyVideo
   1.161          CheckDiskAudio
   1.162 -	CheckDLOPEN
   1.163 +        CheckDLOPEN
   1.164          CheckNASM
   1.165          CheckOSS
   1.166          CheckARTSC
   1.167 @@ -1656,7 +1697,7 @@
   1.168          ARCH=openbsd
   1.169          CheckDummyVideo
   1.170          CheckDiskAudio
   1.171 -	CheckDLOPEN
   1.172 +        CheckDLOPEN
   1.173          CheckNASM
   1.174          CheckOSS
   1.175          CheckARTSC
   1.176 @@ -1715,7 +1756,7 @@
   1.177          ARCH=sysv5
   1.178          CheckDummyVideo
   1.179          CheckDiskAudio
   1.180 -	CheckDLOPEN
   1.181 +        CheckDLOPEN
   1.182          CheckNASM
   1.183          CheckOSS
   1.184          CheckARTSC
   1.185 @@ -1765,7 +1806,7 @@
   1.186          CFLAGS="$CFLAGS -D__ELF__" # Fix for nasm on Solaris x86
   1.187          CheckDummyVideo
   1.188          CheckDiskAudio
   1.189 -	CheckDLOPEN
   1.190 +        CheckDLOPEN
   1.191          CheckNASM
   1.192          CheckOSS
   1.193          CheckARTSC
   1.194 @@ -1814,7 +1855,7 @@
   1.195          ARCH=irix
   1.196          CheckDummyVideo
   1.197          CheckDiskAudio
   1.198 -	CheckDLOPEN
   1.199 +        CheckDLOPEN
   1.200          CheckDMEDIA
   1.201          CheckESD
   1.202          CheckNAS
   1.203 @@ -1877,7 +1918,7 @@
   1.204          ARCH=hpux
   1.205          CheckDummyVideo
   1.206          CheckDiskAudio
   1.207 -	CheckDLOPEN
   1.208 +        CheckDLOPEN
   1.209          CheckOSS
   1.210          CheckNAS
   1.211          CheckX11
   1.212 @@ -1925,7 +1966,7 @@
   1.213          ARCH=aix
   1.214          CheckDummyVideo
   1.215          CheckDiskAudio
   1.216 -	CheckDLOPEN
   1.217 +        CheckDLOPEN
   1.218          CheckOSS
   1.219          CheckNAS
   1.220          CheckX11
   1.221 @@ -1971,7 +2012,7 @@
   1.222          ARCH=osf
   1.223          CheckDummyVideo
   1.224          CheckDiskAudio
   1.225 -	CheckDLOPEN
   1.226 +        CheckDLOPEN
   1.227          CheckNAS
   1.228          CheckX11
   1.229          CheckGGI
   1.230 @@ -2018,7 +2059,7 @@
   1.231          ARCH=qnx
   1.232          CheckDummyVideo
   1.233          CheckDiskAudio
   1.234 -	CheckDLOPEN
   1.235 +        CheckDLOPEN
   1.236          CheckNAS
   1.237          CheckPHOTON
   1.238          CheckX11
   1.239 @@ -2330,6 +2371,7 @@
   1.240  
   1.241  # Set the conditional variables for this target
   1.242  AM_CONDITIONAL(TARGET_LINUX, test $ARCH = linux)
   1.243 +AM_CONDITIONAL(TARGET_QTOPIA, test "x$video_qtopia" = "xyes")
   1.244  AM_CONDITIONAL(TARGET_SOLARIS, test $ARCH = solaris)
   1.245  AM_CONDITIONAL(TARGET_IRIX, test $ARCH = irix)
   1.246  AM_CONDITIONAL(TARGET_BSDI, test $ARCH = bsdi)
   1.247 @@ -2486,6 +2528,7 @@
   1.248  src/video/ataricommon/Makefile
   1.249  src/video/xbios/Makefile
   1.250  src/video/gem/Makefile
   1.251 +src/video/qtopia/Makefile
   1.252  src/events/Makefile
   1.253  src/joystick/Makefile
   1.254  src/joystick/amigaos/Makefile