diff --git a/configure.ac b/configure.ac index 31e95c05..a2f624f9 100644 --- a/configure.ac +++ b/configure.ac @@ -74,8 +74,14 @@ AC_ARG_ENABLE(asm, ]) AS_IF([test "x$EMSCRIPTEN" != "x"], [ - enable_asm="no" - AC_MSG_WARN([compiling to JavaScript - asm implementations disabled]) + 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"