summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2023-01-12 15:45:11 +0200
committerTor Lillqvist <tml@collabora.com>2023-01-12 17:45:03 +0000
commit57eae105cdd6faeb7640f06cf4706fde9bf73fbf (patch)
tree2a266cc405e8a76098b96867d4c6e8eafab05283 /configure.ac
parentb3a15589915e8b60eae5878e53f90d706c79c106 (diff)
Adapt to newer Emscripten SDK
The __EMSCRIPTEN_major__, minor, and tiny macros are no longer predefined but only defined in <emscripten/version.h>. So grep that instead of running emcc -dM -E. Change-Id: I2383a906f9c746784449cd4606f653ab722b54de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145407 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 8 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 01219ec033be..93a1c89e3569 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1410,10 +1410,14 @@ EMSCRIPTEN_MIN_VERSION="${EMSCRIPTEN_MIN_MAJOR}.${EMSCRIPTEN_MIN_MINOR}.${EMSCRI
if test "$_os" = "Emscripten"; then
AC_MSG_CHECKING([if Emscripten is at least $EMSCRIPTEN_MIN_VERSION])
- EMSCRIPTEN_DEFINES=$(echo | emcc -dM -E - | $GREP __EMSCRIPTEN_)
- EMSCRIPTEN_MAJOR=$(echo "$EMSCRIPTEN_DEFINES" | $SED -ne 's/.*__EMSCRIPTEN_major__ //p')
- EMSCRIPTEN_MINOR=$(echo "$EMSCRIPTEN_DEFINES" | $SED -ne 's/.*__EMSCRIPTEN_minor__ //p')
- EMSCRIPTEN_TINY=$(echo "$EMSCRIPTEN_DEFINES" | $SED -ne 's/.*__EMSCRIPTEN_tiny__ //p')
+ AS_IF([test -z "$EMSDK"],
+ [AC_MSG_ERROR([No \$EMSDK environment variable.])])
+ EMSCRIPTEN_VERSION_H=$EMSDK/upstream/emscripten/cache/sysroot/include/emscripten/version.h
+ AS_IF([test ! -f "$EMSCRIPTEN_VERSION_H"],
+ [AC_MSG_ERROR([Could not find the <emscripten/version.h> in the Emscripten SDK.])])
+ EMSCRIPTEN_MAJOR=$($GREP __EMSCRIPTEN_major__ "$EMSCRIPTEN_VERSION_H" | $SED -ne 's/.*__EMSCRIPTEN_major__ //p')
+ EMSCRIPTEN_MINOR=$($GREP __EMSCRIPTEN_minor__ "$EMSCRIPTEN_VERSION_H" | $SED -ne 's/.*__EMSCRIPTEN_minor__ //p')
+ EMSCRIPTEN_TINY=$($GREP __EMSCRIPTEN_tiny__ "$EMSCRIPTEN_VERSION_H" | $SED -ne 's/.*__EMSCRIPTEN_tiny__ //p')
EMSCRIPTEN_VERSION="${EMSCRIPTEN_MAJOR}.${EMSCRIPTEN_MINOR}.${EMSCRIPTEN_TINY}"
check_semantic_version_three_prefixed EMSCRIPTEN MIN