configure
changeset 8833 ae720d61d14d
parent 8828 0b7aae26e494
child 8840 9b6ddcbdea65
     1.1 --- a/configure	Thu Jun 05 15:37:33 2014 -0700
     1.2 +++ b/configure	Fri Jun 06 15:45:59 2014 -0300
     1.3 @@ -18984,6 +18984,55 @@
     1.4      fi
     1.5  }
     1.6  
     1.7 +CheckNativeClient()
     1.8 +{
     1.9 +        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    1.10 +/* end confdefs.h.  */
    1.11 +
    1.12 +          #if !defined(__native_client__)
    1.13 +          #error "NO NACL"
    1.14 +          #endif
    1.15 +
    1.16 +int
    1.17 +main ()
    1.18 +{
    1.19 +
    1.20 +
    1.21 +  ;
    1.22 +  return 0;
    1.23 +}
    1.24 +_ACEOF
    1.25 +if ac_fn_c_try_compile "$LINENO"; then :
    1.26 +
    1.27 +        $as_echo "#define SDL_VIDEO_DRIVER_NACL 1" >>confdefs.h
    1.28 +
    1.29 +        $as_echo "#define SDL_AUDIO_DRIVER_NACL 1" >>confdefs.h
    1.30 +
    1.31 +
    1.32 +$as_echo "#define HAVE_POW 1" >>confdefs.h
    1.33 +
    1.34 +
    1.35 +$as_echo "#define HAVE_OPENGLES2 1" >>confdefs.h
    1.36 +
    1.37 +
    1.38 +$as_echo "#define SDL_VIDEO_OPENGL_ES2 1" >>confdefs.h
    1.39 +
    1.40 +
    1.41 +$as_echo "#define SDL_VIDEO_RENDER_OGL_ES2 1" >>confdefs.h
    1.42 +
    1.43 +
    1.44 +        SDL_LIBS="-lppapi_simple -lppapi_gles2 $SDL_LIBS"
    1.45 +
    1.46 +        SDLMAIN_SOURCES="$srcdir/src/main/nacl/*.c"
    1.47 +        SOURCES="$SOURCES $srcdir/src/audio/nacl/*.c"
    1.48 +        SUMMARY_audio="${SUMMARY_audio} nacl"
    1.49 +        SOURCES="$SOURCES $srcdir/src/video/nacl/*.c"
    1.50 +        SUMMARY_video="${SUMMARY_video} nacl opengles2"
    1.51 +
    1.52 +fi
    1.53 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    1.54 +}
    1.55 +
    1.56  
    1.57  CheckX11()
    1.58  {
    1.59 @@ -23156,6 +23205,21 @@
    1.60              EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit"
    1.61          fi
    1.62          ;;
    1.63 +    *-nacl|*-pnacl)
    1.64 +        ARCH=nacl
    1.65 +        CheckNativeClient
    1.66 +        CheckDummyAudio
    1.67 +        CheckDummyVideo
    1.68 +        CheckInputEvents
    1.69 +        # Set up files for the timer library
    1.70 +        if test x$enable_timers = xyes; then
    1.71 +            $as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h
    1.72 +
    1.73 +            SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
    1.74 +            have_timers=yes
    1.75 +        fi
    1.76 +        CheckPTHREAD
    1.77 +        ;;
    1.78      *)
    1.79          as_fn_error $? "
    1.80  *** Unsupported host:  Please add to configure.in