diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2021-05-24 14:12:18 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2021-05-24 17:47:49 +0200 |
commit | 576a49d0276b1b5bf058cd1e17d3a9df6effb68a (patch) | |
tree | d0972d558234d1804addc3adf4b30409bc142382 /configure.ac | |
parent | d476bdb36798b8cb75002b22ea5bd4f5be4aebd5 (diff) |
configure: Improve help handling
To summerize my understanding of the help build:
LO can build three kinds of help: XML (local), HTML (local) and
HTML-online. Both local help variants can be included in help-
packs, which might be bundeled with the installer or provided as
separate packages. The HTML-online help is the external help
provided by help.libreoffice.org, which can provide an additional,
xapian-omega based, search mechanism. The XML help is build with
additional index and formating using internal tools. The xmlhelp
module is used to display the XML help. Both HTML-based help is
shown in a browser.
What this patch includes is:
* Adds --enable-xmlhelp for removing the xmlhelp support from the
build. Disable for iOS, Android and Emscripten. This was partly
included in HAVE_FEATURE_DESKTOP before.
* Rename WITH_HELP define to WITH_HELPPACKS, which reflects the
actual usage AFAIK.
* Depend --with-omindex on --with-help=online and don't override
the --with-help setting. Error out on conflicting options.
* Depend --with-helppack-integration on a build help variants,
which actually result in help packs.
Kind of reverts commit 2c38ea6d16b910294220cefaf8ae6a0683e6405a
("Building without --with-help is not supposed to disable help
functionality").
Change-Id: Ie4cb73905b3ed94e991d9f1bd75cfbd6de9da385
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 164 |
1 files changed, 94 insertions, 70 deletions
diff --git a/configure.ac b/configure.ac index 32cc3e1b1dd0..b39e7c933ad5 100644 --- a/configure.ac +++ b/configure.ac @@ -980,6 +980,7 @@ ios*) # iOS enable_postgresql_sdbc=no enable_extension_integration=no enable_report_builder=no + enable_xmlhelp=no with_ppds=no if test "$enable_ios_simulator" = "yes"; then host=x86_64-apple-darwin @@ -1076,6 +1077,7 @@ linux-android*) enable_odk=no enable_postgresql_sdbc=no enable_python=no + enable_xmlhelp=no test_cups=no test_dbus=no test_fontconfig=no @@ -1111,6 +1113,7 @@ emscripten) build_gstreamer_1_0=no enable_lpsolve=no enable_report_builder=no + enable_xmlhelp=no with_theme="breeze" test_cmis=no test_cups=no @@ -1899,6 +1902,11 @@ AC_ARG_ENABLE(wasm-strip, ,enable_wasm_strip=yes) +AC_ARG_ENABLE(xmlhelp, + AS_HELP_STRING([--disable-xmlhelp], + [Disable XML help support]), +,enable_xmlhelp=yes) + dnl =================================================================== dnl Optional Packages (--with/without-) dnl =================================================================== @@ -5235,6 +5243,92 @@ fi AC_SUBST(PKGFORMAT) dnl =================================================================== +dnl handle help related options +dnl =================================================================== + +ENABLE_HTMLHELP= +HELP_OMINDEX_PAGE= +HELP_ONLINE= +WITH_HELPPACKS= + +AC_MSG_CHECKING([which help to build]) +if test -n "$with_help" -a "$with_help" != "no"; then + GIT_NEEDED_SUBMODULES="helpcontent2 $GIT_NEEDED_SUBMODULES" + BUILD_TYPE="$BUILD_TYPE HELP" + case "$with_help" in + "html") + ENABLE_HTMLHELP=TRUE + WITH_HELPPACKS=TRUE + SCPDEFS="$SCPDEFS -DWITH_HELPPACKS" + AC_MSG_RESULT([HTML (local)]) + ;; + "online") + ENABLE_HTMLHELP=TRUE + HELP_ONLINE=TRUE + AC_MSG_RESULT([HTML (online)]) + ;; + yes) + WITH_HELPPACKS=TRUE + SCPDEFS="$SCPDEFS -DWITH_HELPPACKS" + BUILD_TYPE="$BUILD_TYPE HELPTOOLS" + AC_MSG_RESULT([XML (local)]) + ;; + *) + AC_MSG_ERROR([Unknown --with-help=$with_help]) + ;; + esac +else + AC_MSG_RESULT([no]) +fi + +AC_MSG_CHECKING([whether to enable xapian-omega support for online help]) +if test -n "$with_omindex" -a "$with_omindex" != "no"; then + if test "$HELP_ONLINE" != TRUE; then + AC_MSG_ERROR([Can't build xapian-omega index without --help=online]) + fi + case "$with_omindex" in + "server") + HELP_OMINDEX_PAGE=TRUE + AC_MSG_RESULT([SERVER]) + ;; + "noxap") + AC_MSG_RESULT([NOXAP]) + ;; + *) + AC_MSG_ERROR([Unknown --with-omindex=$with_omindex]) + ;; + esac +else + AC_MSG_RESULT([no]) +fi + +AC_MSG_CHECKING([whether to include the XML-help support]) +if test "$enable_xmlhelp" = yes; then + BUILD_TYPE="$BUILD_TYPE XMLHELP" + AC_DEFINE(HAVE_FEATURE_XMLHELP) + AC_MSG_RESULT([yes]) +else + if test "$with_help" = yes; then + add_warning "Building the XML help, but LO with disabled xmlhelp support. Generated help can't be accesssed from this LO build!" + fi + AC_MSG_RESULT([no]) +fi + +dnl Test whether to integrate helppacks into the product's installer +AC_MSG_CHECKING([for helppack integration]) +if test -z "$WITH_HELPPACKS" -o "$with_helppack_integration" = no; then + AC_MSG_RESULT([no integration]) +else + SCPDEFS="$SCPDEFS -DWITH_HELPPACK_INTEGRATION" + AC_MSG_RESULT([integration]) +fi + +AC_SUBST([ENABLE_HTMLHELP]) +AC_SUBST([HELP_OMINDEX_PAGE]) +AC_SUBST([HELP_ONLINE]) +# WITH_HELPPACKS is used only in configure + +dnl =================================================================== dnl Set up a different compiler to produce tools to run on the build dnl machine when doing cross-compilation dnl =================================================================== @@ -5666,65 +5760,6 @@ else fi AC_SUBST(DO_FETCH_TARBALLS) -AC_MSG_CHECKING([whether to build help]) -if test -n "$with_help" -a "$with_help" != "no" -a $_os != iOS -a $_os != Android; then - BUILD_TYPE="$BUILD_TYPE HELP" - GIT_NEEDED_SUBMODULES="helpcontent2 $GIT_NEEDED_SUBMODULES" - case "$with_help" in - "html") - ENABLE_HTMLHELP=TRUE - SCPDEFS="$SCPDEFS -DWITH_HELP" - AC_MSG_RESULT([HTML]) - ;; - "online") - ENABLE_HTMLHELP=TRUE - HELP_ONLINE=TRUE - AC_MSG_RESULT([HTML]) - ;; - yes) - SCPDEFS="$SCPDEFS -DWITH_HELP" - AC_MSG_RESULT([yes]) - ;; - *) - AC_MSG_ERROR([Unknown --with-help=$with_help]) - ;; - esac -else - AC_MSG_RESULT([no]) -fi -AC_SUBST([ENABLE_HTMLHELP]) -AC_SUBST([HELP_ONLINE]) - -AC_MSG_CHECKING([whether to enable xapian-omega support for help]) -if test -n "$with_omindex" -a "$with_omindex" != "no" -a $_os != iOS -a $_os != Android; then - BUILD_TYPE="$BUILD_TYPE HELP" - GIT_NEEDED_SUBMODULES="helpcontent2 $GIT_NEEDED_SUBMODULES" - case "$with_omindex" in - "server") - ENABLE_HTMLHELP=TRUE - HELP_ONLINE=TRUE - HELP_OMINDEX_PAGE=TRUE - AC_MSG_RESULT([SERVER]) - ;; - "noxap") - ENABLE_HTMLHELP=TRUE - HELP_ONLINE=TRUE - HELP_OMINDEX_PAGE=FALSE - AC_MSG_RESULT([NOXAP]) - ;; - *) - AC_MSG_ERROR([Unknown --with-omindex=$with_omindex]) - ;; - esac -else - HELP_OMINDEX_PAGE=FALSE - AC_MSG_RESULT([no]) -fi -AC_SUBST([ENABLE_HTMLHELP]) -AC_SUBST([HELP_OMINDEX_PAGE]) -AC_SUBST([HELP_ONLINE]) - - dnl Test whether to include MySpell dictionaries dnl =================================================================== AC_MSG_CHECKING([whether to include MySpell dictionaries]) @@ -12836,17 +12871,6 @@ for theme in $with_theme; do esac done -dnl =================================================================== -dnl Test whether to integrate helppacks into the product's installer -dnl =================================================================== -AC_MSG_CHECKING([for helppack integration]) -if test "$with_helppack_integration" = "no"; then - AC_MSG_RESULT([no integration]) -else - SCPDEFS="$SCPDEFS -DWITH_HELPPACK_INTEGRATION" - AC_MSG_RESULT([integration]) -fi - ############################################################################### # Extensions checking ############################################################################### |