commit 901356fd58f89561f9ba32cdacebc4026f66ca9b
Author: Pavel Sanda <[email protected]>
Date:   Tue Mar 16 23:14:19 2021 +0100

    Allow bundled saxon not to be installed.
---
 config/lyxinclude.m4 |   13 +++++++++++++
 configure.ac         |    2 ++
 lib/Makefile.am      |    8 +++++++-
 3 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4
index 5d6bb1d..b7abe0d 100644
--- a/config/lyxinclude.m4
+++ b/config/lyxinclude.m4
@@ -939,3 +939,16 @@ AC_DEFUN([LYX_SET_VERSION_INFO],
  AC_SUBST(LYX_USERDIR_VER,"$lyx_userdir_ver")
 ])
 
+AC_DEFUN([LYX_CHECK_WITH_SAXON],
+[
+       lyx_use_saxon=true
+       AC_ARG_WITH(saxon, AS_HELP_STRING([--without-saxon],[do not install 
saxon library (epub export)]))
+       test "$with_saxon" = "no" && lyx_use_saxon=false
+
+       if $lyx_use_saxon ; then
+               AC_MSG_RESULT(Set to installing internal saxon.)
+       fi
+
+       AM_CONDITIONAL(SAXON_INSTALL, $lyx_use_saxon)
+    ])
+
diff --git a/configure.ac b/configure.ac
index f258db9..d7a49c5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -196,6 +196,8 @@ AC_FUNC_SELECT_ARGTYPES
 LYX_CHECK_SPELL_ENGINES
 LYX_USE_INCLUDED_MYTHES
 
+LYX_CHECK_WITH_SAXON
+
 lyx_client_subdir=true
 dnl LIBS already contains some X extra libs that may interfere.
 save_LIBS="$LIBS"
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 7aec137..ae02d70 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -2872,10 +2872,16 @@ dist_xtemplates_DATA = \
 dist_scripts_DATA += scripts/docbook2epub.py
 
 #2) xslt processor - Saxon 6.5.5
-dist_scripts_DATA += \
+SAXON_FILES = \
        scripts/saxon6.LICENSE.txt \
        scripts/saxon6.5.5.jar
 
+if SAXON_INSTALL
+dist_scripts_DATA += $(SAXON_FILES)
+else
+dist_noinst_DATA += $(SAXON_FILES)
+endif
+
 #3) xslt Stylesheets 1.79.2
 docbookdir = $(pkgdatadir)/docbook
 dist_docbook_DATA = \
-- 
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to