From 6dcba550c2c86b730657bd55db82eb8c3748618d Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 11 Sep 2017 14:06:07 +0200 Subject: [PATCH] Confirm that emcc is actually being used if EMSCRIPTEN is defined Fixes #544 --- configure.ac | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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"