mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-24 02:59:07 +08:00
Add XML_CATALOG_FILES for MacOS with Homebrew (#3188)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
e66243fcea
commit
57efa41d47
19
configure.ac
19
configure.ac
@ -432,6 +432,25 @@ AC_CHECK_PROG([have_asciidoc], asciidoc, true, false)
|
||||
AC_CHECK_PROG([have_xsltproc], xsltproc, true, false)
|
||||
if $have_asciidoc && $have_xsltproc; then
|
||||
AM_CONDITIONAL([ASCIIDOC], true)
|
||||
# MacOS with Homebrew requires the environment variable
|
||||
# XML_CATALOG_FILES for xsltproc.
|
||||
AM_CONDITIONAL([HAVE_XML_CATALOG_FILES], false)
|
||||
XML_CATALOG_FILES=
|
||||
AC_CHECK_PROG([have_brew], brew, true, false)
|
||||
if $have_brew; then
|
||||
brew_prefix=$(brew --prefix)
|
||||
catalog_file=$brew_prefix/etc/xml/catalog
|
||||
AC_CHECK_FILE($catalog_file,
|
||||
[
|
||||
AM_CONDITIONAL([HAVE_XML_CATALOG_FILES], true)
|
||||
XML_CATALOG_FILES=file:$catalog_file
|
||||
],
|
||||
[
|
||||
AC_MSG_ERROR([Missing file $catalog_file.])
|
||||
]
|
||||
)
|
||||
fi
|
||||
AC_SUBST([XML_CATALOG_FILES])
|
||||
else
|
||||
AM_CONDITIONAL([ASCIIDOC], false)
|
||||
fi
|
||||
|
@ -38,8 +38,13 @@ pdf: ${man_MANS:%=%.pdf}
|
||||
SUFFIXES = .asc .html .pdf
|
||||
|
||||
.asc:
|
||||
-asciidoc -b docbook -d manpage -o - $< | \
|
||||
if HAVE_XML_CATALOG_FILES
|
||||
asciidoc -b docbook -d manpage -o - $< | \
|
||||
XML_CATALOG_FILES=$(XML_CATALOG_FILES) xsltproc --nonet $(man_xslt) -
|
||||
else
|
||||
asciidoc -b docbook -d manpage -o - $< | \
|
||||
xsltproc --nonet $(man_xslt) -
|
||||
endif
|
||||
|
||||
.asc.html:
|
||||
asciidoc -b html5 -o $@ $<
|
||||
|
Loading…
Reference in New Issue
Block a user