configure.ac |   29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)

New commits:
commit ce4e8a5686933511070722db2215784aceef98ce
Author:     Stephan Bergmann <stephan.bergm...@allotropia.de>
AuthorDate: Wed Feb 19 00:22:56 2025 +0100
Commit:     Stephan Bergmann <stephan.bergm...@allotropia.de>
CommitDate: Wed Feb 19 09:52:35 2025 +0100

    Emscripten: Make --with-main-module easier to extend in the future
    
    ...beyond calc and writer
    
    Change-Id: I68a1e65cc45c4188c50b27172d644818ac874def
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181856
    Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de>
    Tested-by: Jenkins

diff --git a/configure.ac b/configure.ac
index 0fb92dd7f3f8..c38c158ad8d2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2190,7 +2190,7 @@ AC_ARG_WITH(main-module,
     AS_HELP_STRING([--with-main-module=<writer/calc>],
         [Specify which main module to build for wasm.
         Default value is 'writer'.]),
-, [with_main_module=calc,writer])
+, [with_main_module='calc writer'])
 
 if test "$_os" = Emscripten; then
     AC_ARG_ENABLE(emscripten-jspi,
@@ -4203,14 +4203,20 @@ if test "$cross_compiling" = "yes"; then
         ENABLE_WASM_STRIP=TRUE
     fi
     if test "$_os" = "Emscripten"; then
-        if test "$with_main_module" = ''; then
-            ENABLE_WASM_STRIP_CALC=TRUE
-            ENABLE_WASM_STRIP_WRITER=TRUE
-        elif test "$with_main_module" = "calc"; then
-            ENABLE_WASM_STRIP_WRITER=TRUE
-        elif test "$with_main_module" = "writer"; then
-            ENABLE_WASM_STRIP_CALC=TRUE
-        fi
+        ENABLE_WASM_STRIP_CALC=TRUE
+        ENABLE_WASM_STRIP_WRITER=TRUE
+        for i in $with_main_module; do
+            case "$i" in
+            calc)
+                ENABLE_WASM_STRIP_CALC=
+                ;;
+            writer)
+                ENABLE_WASM_STRIP_WRITER=
+                ;;
+            *)
+                AC_MSG_ERROR([Unknown --with-main-module "$i"])
+            esac
+        done
     fi
 else
     CROSS_COMPILING=
commit fe678ffc6f6f0e851c3b7b7b0c8a1b8219b819a2
Author:     Stephan Bergmann <stephan.bergm...@allotropia.de>
AuthorDate: Wed Feb 19 00:00:58 2025 +0100
Commit:     Stephan Bergmann <stephan.bergm...@allotropia.de>
CommitDate: Wed Feb 19 09:52:26 2025 +0100

    Emscripten: No need to pass --with-main-module into build configure
    
    No idea why 97ee126d69859d01abfbdb55450d27afb71bf9b1 "WASM add Calc as 
optional
    build result, make it build & run" had added that.  ENABLE_WASM_STRIP_CALC 
and
    ENABLE_WASM_STRIP_WRITER will always be set to empty values in 
config_build.mk
    anyway.
    
    Change-Id: I07a3863f8396149481507f5ed558d130e34a44dc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181855
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de>
    Reviewed-by: Balazs Varga <balazs.varga.ext...@allotropia.de>

diff --git a/configure.ac b/configure.ac
index f5f04c8eff42..0fb92dd7f3f8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6108,11 +6108,6 @@ if test "$cross_compiling" = "yes"; then
     test "${enable_fuzzers}" = yes && sub_conf_opts="$sub_conf_opts 
--without-system-libxml"
     if test "$_os" = "Emscripten"; then
         sub_conf_opts="$sub_conf_opts --without-system-libxml 
--without-system-fontconfig --without-system-freetype --without-system-zlib"
-        if test "${with_main_module+set}" = set; then
-            sub_conf_opts="$sub_conf_opts 
--with-main-module=${with_main_module}"
-        else
-            sub_conf_opts="$sub_conf_opts --with-main-module=writer"
-        fi
     fi
     # windows uses full-internal python and that in turn relies on openssl, so 
also enable openssl
     # when cross-compiling for aarch64, overriding the defaults below

Reply via email to