configure
changeset 9278 8900afb78a19
parent 9252 a11e8f6d82d1
child 9315 541f12d1edcd
     1.1 --- a/configure	Sat Dec 13 02:33:52 2014 -0500
     1.2 +++ b/configure	Thu Dec 18 00:19:52 2014 -0500
     1.3 @@ -21385,6 +21385,78 @@
     1.4      fi
     1.5  }
     1.6  
     1.7 +CheckEmscriptenGLES()
     1.8 +{
     1.9 +    if test x$enable_video = xyes -a x$enable_video_opengles = xyes; then
    1.10 +        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGL support" >&5
    1.11 +$as_echo_n "checking for EGL support... " >&6; }
    1.12 +        video_opengl_egl=no
    1.13 +        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    1.14 +/* end confdefs.h.  */
    1.15 +
    1.16 +         #include <EGL/egl.h>
    1.17 +
    1.18 +int
    1.19 +main ()
    1.20 +{
    1.21 +
    1.22 +
    1.23 +  ;
    1.24 +  return 0;
    1.25 +}
    1.26 +_ACEOF
    1.27 +if ac_fn_c_try_compile "$LINENO"; then :
    1.28 +
    1.29 +        video_opengl_egl=yes
    1.30 +
    1.31 +fi
    1.32 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    1.33 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_opengl_egl" >&5
    1.34 +$as_echo "$video_opengl_egl" >&6; }
    1.35 +        if test x$video_opengl_egl = xyes; then
    1.36 +
    1.37 +$as_echo "#define SDL_VIDEO_OPENGL_EGL 1" >>confdefs.h
    1.38 +
    1.39 +        fi
    1.40 +
    1.41 +        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenGL ES v2 headers" >&5
    1.42 +$as_echo_n "checking for OpenGL ES v2 headers... " >&6; }
    1.43 +        video_opengles_v2=no
    1.44 +        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    1.45 +/* end confdefs.h.  */
    1.46 +
    1.47 +         #include <GLES2/gl2.h>
    1.48 +         #include <GLES2/gl2ext.h>
    1.49 +
    1.50 +int
    1.51 +main ()
    1.52 +{
    1.53 +
    1.54 +
    1.55 +  ;
    1.56 +  return 0;
    1.57 +}
    1.58 +_ACEOF
    1.59 +if ac_fn_c_try_compile "$LINENO"; then :
    1.60 +
    1.61 +        video_opengles_v2=yes
    1.62 +
    1.63 +fi
    1.64 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    1.65 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_opengles_v2" >&5
    1.66 +$as_echo "$video_opengles_v2" >&6; }
    1.67 +        if test x$video_opengles_v2 = xyes; then
    1.68 +
    1.69 +$as_echo "#define SDL_VIDEO_OPENGL_ES2 1" >>confdefs.h
    1.70 +
    1.71 +
    1.72 +$as_echo "#define SDL_VIDEO_RENDER_OGL_ES2 1" >>confdefs.h
    1.73 +
    1.74 +            SUMMARY_video="${SUMMARY_video} opengl_es2"
    1.75 +        fi
    1.76 +    fi
    1.77 +}
    1.78 +
    1.79  CheckInputEvents()
    1.80  {
    1.81              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Linux 2.4 unified input interface" >&5
    1.82 @@ -23483,7 +23555,68 @@
    1.83              SOURCES="$SOURCES $srcdir/src/filesystem/nacl/*.c"
    1.84              have_filesystem=yes
    1.85          fi
    1.86 -
    1.87 +        ;;
    1.88 +    *-*-emscripten* )
    1.89 +        if test x$enable_video = xyes; then
    1.90 +
    1.91 +$as_echo "#define SDL_VIDEO_DRIVER_EMSCRIPTEN 1" >>confdefs.h
    1.92 +
    1.93 +            SOURCES="$SOURCES $srcdir/src/video/emscripten/*.c"
    1.94 +            have_video=yes
    1.95 +            SUMMARY_video="${SUMMARY_video} emscripten"
    1.96 +        fi
    1.97 +
    1.98 +        if test x$enable_audio = xyes; then
    1.99 +
   1.100 +$as_echo "#define SDL_AUDIO_DRIVER_EMSCRIPTEN 1" >>confdefs.h
   1.101 +
   1.102 +            SOURCES="$SOURCES $srcdir/src/audio/emscripten/*.c"
   1.103 +            have_audio=yes
   1.104 +            SUMMARY_audio="${SUMMARY_audio} emscripten"
   1.105 +        fi
   1.106 +
   1.107 +        CheckVisibilityHidden
   1.108 +        CheckDummyVideo
   1.109 +        CheckDiskAudio
   1.110 +        CheckDummyAudio
   1.111 +        CheckDLOPEN
   1.112 +        CheckClockGettime
   1.113 +        CheckEmscriptenGLES
   1.114 +
   1.115 +         # Set up files for the power library
   1.116 +        if test x$enable_power = xyes; then
   1.117 +
   1.118 +$as_echo "#define SDL_POWER_EMSCRIPTEN 1" >>confdefs.h
   1.119 +
   1.120 +            SOURCES="$SOURCES $srcdir/src/power/emscripten/*.c"
   1.121 +            have_power=yes
   1.122 +        fi
   1.123 +
   1.124 +        # Set up files for the power library
   1.125 +        if test x$enable_joystick = xyes; then
   1.126 +
   1.127 +$as_echo "#define SDL_JOYSTICK_EMSCRIPTEN 1" >>confdefs.h
   1.128 +
   1.129 +            SOURCES="$SOURCES $srcdir/src/joystick/emscripten/*.c"
   1.130 +            have_joystick=yes
   1.131 +        fi
   1.132 +
   1.133 +        # Set up files for the filesystem library
   1.134 +        if test x$enable_filesystem = xyes; then
   1.135 +
   1.136 +$as_echo "#define SDL_FILESYSTEM_EMSCRIPTEN 1" >>confdefs.h
   1.137 +
   1.138 +            SOURCES="$SOURCES $srcdir/src/filesystem/emscripten/*.c"
   1.139 +            have_filesystem=yes
   1.140 +        fi
   1.141 +        # Set up files for the timer library
   1.142 +        if test x$enable_timers = xyes; then
   1.143 +
   1.144 +$as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h
   1.145 +
   1.146 +            SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
   1.147 +            have_timers=yes
   1.148 +        fi
   1.149          ;;
   1.150      *)
   1.151          as_fn_error $? "