configure.in
changeset 8833 ae720d61d14d
parent 8828 0b7aae26e494
child 8840 9b6ddcbdea65
     1.1 --- a/configure.in	Thu Jun 05 15:37:33 2014 -0700
     1.2 +++ b/configure.in	Fri Jun 06 15:45:59 2014 -0300
     1.3 @@ -1317,6 +1317,32 @@
     1.4      fi
     1.5  }
     1.6  
     1.7 +dnl Check for Native Client stuff
     1.8 +CheckNativeClient()
     1.9 +{
    1.10 +        AC_TRY_COMPILE([
    1.11 +          #if !defined(__native_client__)
    1.12 +          #error "NO NACL"
    1.13 +          #endif
    1.14 +        ],[
    1.15 +        ],[
    1.16 +        AC_DEFINE(SDL_VIDEO_DRIVER_NACL)
    1.17 +        AC_DEFINE(SDL_AUDIO_DRIVER_NACL)
    1.18 +        AC_DEFINE(HAVE_POW, 1, [ ])
    1.19 +        AC_DEFINE(HAVE_OPENGLES2, 1, [ ])
    1.20 +        AC_DEFINE(SDL_VIDEO_OPENGL_ES2, 1, [ ])
    1.21 +        AC_DEFINE(SDL_VIDEO_RENDER_OGL_ES2, 1, [ ])
    1.22 +
    1.23 +        SDL_LIBS="-lppapi_simple -lppapi_gles2 $SDL_LIBS"
    1.24 +
    1.25 +        SDLMAIN_SOURCES="$srcdir/src/main/nacl/*.c"
    1.26 +        SOURCES="$SOURCES $srcdir/src/audio/nacl/*.c"
    1.27 +        SUMMARY_audio="${SUMMARY_audio} nacl"
    1.28 +        SOURCES="$SOURCES $srcdir/src/video/nacl/*.c"
    1.29 +        SUMMARY_video="${SUMMARY_video} nacl opengles2"
    1.30 +        ])
    1.31 +}
    1.32 +
    1.33  
    1.34  dnl Find the X11 include and library directories
    1.35  CheckX11()
    1.36 @@ -3119,6 +3145,20 @@
    1.37              EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit"
    1.38          fi
    1.39          ;;
    1.40 +    *-nacl|*-pnacl)
    1.41 +        ARCH=nacl
    1.42 +        CheckNativeClient
    1.43 +        CheckDummyAudio
    1.44 +        CheckDummyVideo
    1.45 +        CheckInputEvents
    1.46 +        # Set up files for the timer library
    1.47 +        if test x$enable_timers = xyes; then
    1.48 +            AC_DEFINE(SDL_TIMER_UNIX)
    1.49 +            SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
    1.50 +            have_timers=yes
    1.51 +        fi
    1.52 +        CheckPTHREAD      
    1.53 +        ;;
    1.54      *)
    1.55          AC_MSG_ERROR([
    1.56  *** Unsupported host:  Please add to configure.in