diff options
author | Balazs Varga <balazs.varga.extern@allotropia.de> | 2023-10-05 18:21:48 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2023-10-05 21:37:09 +0200 |
commit | f3a0550b1dd0914e8cbc026a90e10ee3ae2dc8e3 (patch) | |
tree | d9d27112a00012fb9f3c864d26f1a94f30190f00 /configure.ac | |
parent | 74410e57bda7ec355e92ced5c21c956f83a0f6b7 (diff) |
tdf#101970 Introduce config option for building with or
without the not necessary template files.
The default is building with all templates, otherwise we can use:
--with-templates=no/yes
--with-templates -->yes
--without-templates -->no
Change-Id: I13f5b411057254771ad4021aa9521c153702af16
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157600
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index e9c6ba7561b9..987a5341cb57 100644 --- a/configure.ac +++ b/configure.ac @@ -2134,6 +2134,13 @@ AC_ARG_WITH(galleries, or to disable them ("no")]), ) +AC_ARG_WITH(templates, + AS_HELP_STRING([--with-templates], + [Specify we build with or without template files. It is possible either to + build with templates ("yes"), + or to disable them ("no")]), +) + AC_ARG_WITH(theme, AS_HELP_STRING([--with-theme="theme1 theme2..."], [Choose which themes to include. By default those themes with an '*' are included. @@ -3088,6 +3095,7 @@ if test "$enable_wasm_strip" = "yes"; then test_libzmf=no test_webdav=no with_galleries=no + with_templates=no with_webdav=no with_x=no @@ -3239,6 +3247,30 @@ fi AC_SUBST(WITH_GALLERY_BUILD) dnl =================================================================== +dnl Sort out various templates compilation options +dnl =================================================================== +WITH_TEMPLATES=TRUE +AC_MSG_CHECKING([build with or without template files]) +if test -n "${with_templates}"; then + if test "$with_templates" = "yes"; then + AC_MSG_RESULT([enable all templates]) + elif test "$with_templates" = "no"; then + WITH_TEMPLATES= + AC_MSG_RESULT([disable non-internal templates]) + else + AC_MSG_ERROR([unknown value --with-templates=$with_templates]) + fi +else + if test $_os != iOS -a $_os != Android -a $_os != Emscripten; then + AC_MSG_RESULT([enable all templates]) + else + WITH_TEMPLATES= + AC_MSG_RESULT([disable non-internal templates]) + fi +fi +AC_SUBST(WITH_TEMPLATES) + +dnl =================================================================== dnl Checks if ccache is available dnl =================================================================== CCACHE_DEPEND_MODE= @@ -5719,6 +5751,7 @@ if test "$cross_compiling" = "yes"; then fi test -n "$TARFILE_LOCATION" && sub_conf_opts="$sub_conf_opts --with-external-tar=$TARFILE_LOCATION" test "$with_galleries" = "no" -o -z "$WITH_GALLERY_BUILD" && sub_conf_opts="$sub_conf_opts --with-galleries=no --disable-database-connectivity" + test "$with_templates" = "no" -o -z "$WITH_TEMPLATES" && sub_conf_opts="$sub_conf_opts --with-templates=no" test -n "$with_help" -a "$with_help" != "no" && sub_conf_opts="$sub_conf_opts --with-help=$with_help" test "$enable_extensions" = yes || sub_conf_opts="$sub_conf_opts --disable-extensions" test "${enable_ld+set}" = set -a "$build_cpu" = "$host_cpu" && sub_conf_opts="$sub_conf_opts --enable-ld=${enable_ld}" |