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-02-23 18:23:03 +0000
commit1cabf62a78a5d0cdef38dd16ad35fb20ab182529 (patch)
treed0992da0e39e45fab2b9e705575f57924932a421 /configure.ac
parentfddade544feaeed62d3c6f7ca990fc9c1e1f5e09 (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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147516 Tested-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 75543fcdb289..05534dc6a8c2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1403,10 +1403,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