configure.in
changeset 9278 8900afb78a19
parent 9252 a11e8f6d82d1
child 9315 541f12d1edcd
     1.1 --- a/configure.in	Sat Dec 13 02:33:52 2014 -0500
     1.2 +++ b/configure.in	Thu Dec 18 00:19:52 2014 -0500
     1.3 @@ -2130,6 +2130,40 @@
     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 +        AC_MSG_CHECKING(for EGL support)
    1.11 +        video_opengl_egl=no
    1.12 +        AC_TRY_COMPILE([
    1.13 +         #include <EGL/egl.h>
    1.14 +        ],[
    1.15 +        ],[
    1.16 +        video_opengl_egl=yes
    1.17 +        ])
    1.18 +        AC_MSG_RESULT($video_opengl_egl)
    1.19 +        if test x$video_opengl_egl = xyes; then
    1.20 +            AC_DEFINE(SDL_VIDEO_OPENGL_EGL, 1, [ ])
    1.21 +        fi
    1.22 +
    1.23 +        AC_MSG_CHECKING(for OpenGL ES v2 headers)
    1.24 +        video_opengles_v2=no
    1.25 +        AC_TRY_COMPILE([
    1.26 +         #include <GLES2/gl2.h>
    1.27 +         #include <GLES2/gl2ext.h>
    1.28 +        ],[
    1.29 +        ],[
    1.30 +        video_opengles_v2=yes
    1.31 +        ])
    1.32 +        AC_MSG_RESULT($video_opengles_v2)
    1.33 +        if test x$video_opengles_v2 = xyes; then
    1.34 +            AC_DEFINE(SDL_VIDEO_OPENGL_ES2, 1, [ ])
    1.35 +            AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES2, 1, [ ])
    1.36 +            SUMMARY_video="${SUMMARY_video} opengl_es2"
    1.37 +        fi
    1.38 +    fi
    1.39 +}
    1.40 +
    1.41  dnl See if we can use the new unified event interface in Linux 2.4
    1.42  CheckInputEvents()
    1.43  {
    1.44 @@ -3302,7 +3336,56 @@
    1.45              SOURCES="$SOURCES $srcdir/src/filesystem/nacl/*.c"
    1.46              have_filesystem=yes
    1.47          fi
    1.48 +        ;;
    1.49 +    *-*-emscripten* )
    1.50 +        if test x$enable_video = xyes; then
    1.51 +            AC_DEFINE(SDL_VIDEO_DRIVER_EMSCRIPTEN, 1, [ ])
    1.52 +            SOURCES="$SOURCES $srcdir/src/video/emscripten/*.c"
    1.53 +            have_video=yes
    1.54 +            SUMMARY_video="${SUMMARY_video} emscripten"
    1.55 +        fi
    1.56 +
    1.57 +        if test x$enable_audio = xyes; then
    1.58 +            AC_DEFINE(SDL_AUDIO_DRIVER_EMSCRIPTEN, 1, [ ])
    1.59 +            SOURCES="$SOURCES $srcdir/src/audio/emscripten/*.c"
    1.60 +            have_audio=yes
    1.61 +            SUMMARY_audio="${SUMMARY_audio} emscripten"
    1.62 +        fi
    1.63 +
    1.64 +        CheckVisibilityHidden
    1.65 +        CheckDummyVideo
    1.66 +        CheckDiskAudio
    1.67 +        CheckDummyAudio
    1.68 +        CheckDLOPEN
    1.69 +        CheckClockGettime
    1.70 +        CheckEmscriptenGLES
    1.71 +
    1.72 +         # Set up files for the power library
    1.73 +        if test x$enable_power = xyes; then
    1.74 +            AC_DEFINE(SDL_POWER_EMSCRIPTEN, 1, [ ])
    1.75 +            SOURCES="$SOURCES $srcdir/src/power/emscripten/*.c"
    1.76 +            have_power=yes
    1.77 +        fi
    1.78          
    1.79 +        # Set up files for the power library
    1.80 +        if test x$enable_joystick = xyes; then
    1.81 +            AC_DEFINE(SDL_JOYSTICK_EMSCRIPTEN, 1, [ ])
    1.82 +            SOURCES="$SOURCES $srcdir/src/joystick/emscripten/*.c"
    1.83 +            have_joystick=yes
    1.84 +        fi
    1.85 +
    1.86 +        # Set up files for the filesystem library
    1.87 +        if test x$enable_filesystem = xyes; then
    1.88 +            AC_DEFINE(SDL_FILESYSTEM_EMSCRIPTEN, 1, [ ])
    1.89 +            SOURCES="$SOURCES $srcdir/src/filesystem/emscripten/*.c"
    1.90 +            have_filesystem=yes
    1.91 +        fi
    1.92 +        # Set up files for the timer library
    1.93 +        if test x$enable_timers = xyes; then
    1.94 +            AC_DEFINE(SDL_TIMER_UNIX, 1, [ ])
    1.95 +            SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
    1.96 +            have_timers=yes
    1.97 +        fi
    1.98          ;;
    1.99      *)
   1.100          AC_MSG_ERROR([