Confirm that emcc is actually being used if EMSCRIPTEN is defined

Fixes #544
This commit is contained in:
Frank Denis 2017-09-11 14:06:07 +02:00
parent 0ae678b0f9
commit 6dcba550c2

View File

@ -74,8 +74,14 @@ AC_ARG_ENABLE(asm,
])
AS_IF([test "x$EMSCRIPTEN" != "x"], [
AX_CHECK_COMPILE_FLAG([-s ASSERTIONS=0], [
enable_asm="no"
AC_MSG_WARN([compiling to JavaScript - asm implementations disabled])
], [
AC_MSG_WARN([EMSCRIPTEN environment variable defined, but emcc doesn't appear to be used - Assuming compilation to native code])
CFLAGS="$CFLAGS -U__EMSCRIPTEN__"
unset EMSCRIPTEN
])
])
AS_IF([test "$host_os" = "nacl" -o "$host_os" = "pnacl"], [
enable_asm="no"