summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@libreoffice.org>2019-09-22 10:46:17 -0300
committerOlivier Hallot <olivier.hallot@libreoffice.org>2019-10-01 15:00:27 +0200
commitb2a81fefb185daea728a756ebc7b46c626d36080 (patch)
tree2defa251b3463cd09ad25bfadc8a478ae2db9495 /configure.ac
parent93d6bef4428d92c74e13a3f17b78be7026c782ba (diff)
redmine#2555 replace Help online Google search
This is the core/ part of the patch. Add xapian-omega search to online Help. The patch replaces Google custom search with xapian-omega search. A new build key is introduced. --with-omindex=server : Localizes and adds the xapian result page, adds the xapian form to each Help page. --with-omindex=noxap : do not localize the result template and do not add a form in the Help page. --with-omindex will force Online Help build. Default is noxap NOTES: - searches returns resuls only on localized Help pages, avoiding same resulis in many languages. -xapian-omega databases must be built in server TODO: - Tweak the xapian-omega result page CSS and markup. Change-Id: I5e3fe4191a3b054e3b6403f7cb5640953d92ba42 Reviewed-on: https://gerrit.libreoffice.org/79368 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac41
1 files changed, 41 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index ce79ad5395af..30bd03c24123 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1972,6 +1972,17 @@ AC_ARG_WITH(help,
],
,)
+AC_ARG_WITH(omindex,
+ AS_HELP_STRING([--with-omindex],
+ [Enable the support of xapian-omega index for online help.])
+ [
+ Usage: --with-omindex=server prepare the pages for omindex
+ but let xapian-omega be built in server.
+ --with-omindex=noxap do not prepare online pages
+ for xapian-omega
+ ],
+,)
+
libo_FUZZ_ARG_WITH(java,
AS_HELP_STRING([--with-java=<java command>],
[Specify the name of the Java interpreter command. Typically "java"
@@ -4968,6 +4979,36 @@ 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])