configure.in
changeset 9164 494876610c49
parent 9155 dfeb88fc5a9d
child 9252 a11e8f6d82d1
equal deleted inserted replaced
9163:d05b5b2775ae 9164:494876610c49
  1727             fi
  1727             fi
  1728         fi
  1728         fi
  1729     fi
  1729     fi
  1730 }
  1730 }
  1731 
  1731 
  1732 dnl Set up the MX6 video driver if enabled
  1732 dnl Set up the Vivante video driver if enabled
  1733 CheckMX6Video()
  1733 CheckVivanteVideo()
  1734 {
  1734 {
  1735     AC_ARG_ENABLE(video-mx6,
  1735     AC_ARG_ENABLE(video-vivante,
  1736 AC_HELP_STRING([--enable-video-mx6], [use Freescale i.MX6 video driver [[default=no]]]),
  1736 AC_HELP_STRING([--enable-video-vivante], [use Vivante EGL video driver [[default=yes]]]),
  1737                   , enable_video_mx6=no)
  1737                   , enable_video_vivante=yes)
  1738     if test x$enable_video = xyes -a x$enable_video_mx6 = xyes; then
  1738     if test x$enable_video = xyes -a x$enable_video_vivante = xyes; then
  1739         AC_MSG_CHECKING(for Vivante GPU SDK)
  1739         AC_MSG_CHECKING(for Vivante VDK API)
  1740         have_viv_sdk=no
  1740         have_vivante_vdk=no
  1741         AC_TRY_COMPILE([
  1741         AC_TRY_COMPILE([
       
  1742           #define LINUX
       
  1743           #define EGL_API_FB
       
  1744           #include <gc_vdk.h>
       
  1745         ],[
       
  1746         ],[
       
  1747         have_vivante_vdk=yes
       
  1748         ])
       
  1749         AC_MSG_RESULT($have_vivante_vdk)
       
  1750 
       
  1751         AC_MSG_CHECKING(for Vivante FB API)
       
  1752         have_vivante_egl=no
       
  1753         AC_TRY_COMPILE([
       
  1754           #define LINUX
  1742           #define EGL_API_FB
  1755           #define EGL_API_FB
  1743           #include <EGL/eglvivante.h>
  1756           #include <EGL/eglvivante.h>
  1744         ],[
  1757         ],[
  1745         ],[
  1758         ],[
  1746         have_viv_sdk=yes
  1759         have_vivante_egl=yes
  1747         ])
  1760         ])
  1748         AC_MSG_RESULT($have_viv_sdk)
  1761         AC_MSG_RESULT($have_vivante_egl)
  1749         if test x$have_viv_sdk = xyes; then
  1762 
  1750             AC_DEFINE(SDL_VIDEO_DRIVER_MX6, 1, [ ])
  1763         if test x$have_vivante_vdk = xyes -o x$have_vivante_egl = xyes; then
  1751             SOURCES="$SOURCES $srcdir/src/video/mx6/*.c"
  1764             AC_DEFINE(SDL_VIDEO_DRIVER_VIVANTE, 1, [ ])
  1752             SUMMARY_video="${SUMMARY_video} mx6"
  1765             EXTRA_CFLAGS="$EXTRA_CFLAGS -DLINUX -DEGL_API_FB"
       
  1766             if test x$have_vivante_vdk = xyes; then
       
  1767                 AC_DEFINE(SDL_VIDEO_DRIVER_VIVANTE_VDK, 1, [ ])
       
  1768                 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lVDK"
       
  1769             fi
       
  1770             SOURCES="$SOURCES $srcdir/src/video/vivante/*.c"
       
  1771             SUMMARY_video="${SUMMARY_video} vivante"
  1753             have_video=yes
  1772             have_video=yes
  1754         fi
  1773         fi
  1755     fi
  1774     fi
  1756 }
  1775 }
  1757 
  1776 
  1985 {
  2004 {
  1986     if test x$enable_video = xyes -a x$enable_video_opengles = xyes; then
  2005     if test x$enable_video = xyes -a x$enable_video_opengles = xyes; then
  1987         AC_MSG_CHECKING(for EGL support)
  2006         AC_MSG_CHECKING(for EGL support)
  1988         video_opengl_egl=no
  2007         video_opengl_egl=no
  1989         AC_TRY_COMPILE([
  2008         AC_TRY_COMPILE([
  1990          #define EGL_API_FB
  2009           #define LINUX
  1991          #include <EGL/egl.h>
  2010           #define EGL_API_FB
  1992          #include <EGL/eglext.h>
  2011           #include <EGL/egl.h>
       
  2012           #include <EGL/eglext.h>
  1993         ],[
  2013         ],[
  1994         ],[
  2014         ],[
  1995         video_opengl_egl=yes
  2015         video_opengl_egl=yes
  1996         ])
  2016         ])
  1997         AC_MSG_RESULT($video_opengl_egl)
  2017         AC_MSG_RESULT($video_opengl_egl)
  2266     dnl This is used on Linux for glibc binary compatibility (Doh!)
  2286     dnl This is used on Linux for glibc binary compatibility (Doh!)
  2267     AC_ARG_ENABLE(pthread-sem,
  2287     AC_ARG_ENABLE(pthread-sem,
  2268 AC_HELP_STRING([--enable-pthread-sem], [use pthread semaphores [[default=yes]]]),
  2288 AC_HELP_STRING([--enable-pthread-sem], [use pthread semaphores [[default=yes]]]),
  2269                   , enable_pthread_sem=yes)
  2289                   , enable_pthread_sem=yes)
  2270     case "$host" in
  2290     case "$host" in
  2271 	 *-*-androideabi*)
  2291          *-*-androideabi*)
  2272             pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
  2292             pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
  2273             pthread_lib=""
  2293             pthread_lib=""
  2274 	    ;;
  2294             ;;
  2275         *-*-linux*|*-*-uclinux*)
  2295         *-*-linux*|*-*-uclinux*)
  2276             pthread_cflags="-D_REENTRANT"
  2296             pthread_cflags="-D_REENTRANT"
  2277             pthread_lib="-lpthread"
  2297             pthread_lib="-lpthread"
  2278             ;;
  2298             ;;
  2279         *-*-bsdi*)
  2299         *-*-bsdi*)
  2844         CheckUSBHID
  2864         CheckUSBHID
  2845         CheckPTHREAD
  2865         CheckPTHREAD
  2846         CheckClockGettime
  2866         CheckClockGettime
  2847         CheckLinuxVersion
  2867         CheckLinuxVersion
  2848         CheckRPATH
  2868         CheckRPATH
  2849         CheckMX6Video
  2869         CheckVivanteVideo
  2850         # Set up files for the audio library
  2870         # Set up files for the audio library
  2851         if test x$enable_audio = xyes; then
  2871         if test x$enable_audio = xyes; then
  2852           case $ARCH in
  2872           case $ARCH in
  2853             sysv5|solaris|hpux)
  2873             sysv5|solaris|hpux)
  2854                 AC_DEFINE(SDL_AUDIO_DRIVER_SUNAUDIO, 1, [ ])
  2874                 AC_DEFINE(SDL_AUDIO_DRIVER_SUNAUDIO, 1, [ ])