Allow building against emsdk that uses Emscripten trunk

(see
<https://github.com/emscripten-core/emsdk/?tab=readme-ov-file#how-do-i-track-the-latest-emscripten-development-with-the-sdk>),
which has emscripten/main/ instead of upstream/emscripten/

Change-Id: I10dfc7e30cddf8a798cb70104126b45757fcba63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172219
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
This commit is contained in:
Stephan Bergmann 2024-08-21 20:22:47 +02:00
parent e0d424c707
commit 962c76d85b

View file

@ -1446,6 +1446,9 @@ if test "$_os" = "Emscripten"; then
AS_IF([test -z "$EMSDK"],
[AC_MSG_ERROR([No \$EMSDK environment variable.])])
EMSCRIPTEN_VERSION_H=$EMSDK/upstream/emscripten/cache/sysroot/include/emscripten/version.h
if test ! -f "$EMSCRIPTEN_VERSION_H"; then
EMSCRIPTEN_VERSION_H=$EMSDK/emscripten/main/cache/sysroot/include/emscripten/version.h
fi
fi
if test -f "$EMSCRIPTEN_VERSION_H"; then
EMSCRIPTEN_MAJOR=$($GREP __EMSCRIPTEN_major__ "$EMSCRIPTEN_VERSION_H" | $SED -ne 's/.*__EMSCRIPTEN_major__ //p')