mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-23 18:49:08 +08:00
autoconf: Set PKG_CONFIG_PATH required for Homebrew (macOS)
If no PKG_CONFIG_PATH was provided by the user, it is now set automatically on hosts which have the `brew` command. MacOS with Homebrew needs PKG_CONFIG_PATH to find icu4c and libarchive. Signed-off-by: Stefan Weil <stweil@notebook11.fritz.box>
This commit is contained in:
parent
853aa66962
commit
22ec41fb66
11
configure.ac
11
configure.ac
@ -446,6 +446,15 @@ esac
|
||||
|
||||
AC_SEARCH_LIBS([pthread_create], [pthread])
|
||||
|
||||
# Set PKG_CONFIG_PATH for MacOS with Homebrew unless it is already set.
|
||||
AC_CHECK_PROG([have_brew], brew, true, false)
|
||||
if $have_brew; then
|
||||
brew_prefix=$(brew --prefix)
|
||||
if test -z "$PKG_CONFIG_PATH"; then
|
||||
PKG_CONFIG_PATH=$brew_prefix/opt/icu4c/lib/pkgconfig:$brew_prefix/opt/libarchive/lib/pkgconfig
|
||||
export PKG_CONFIG_PATH
|
||||
fi
|
||||
fi
|
||||
|
||||
# ----------------------------------------
|
||||
# Check for programs needed to build documentation.
|
||||
@ -465,9 +474,7 @@ AS_IF([test "$enable_doc" != "no"], [
|
||||
if $have_asciidoc && $have_xsltproc; then
|
||||
AM_CONDITIONAL([ASCIIDOC], true)
|
||||
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
|
||||
if test -f $catalog_file; then
|
||||
AM_CONDITIONAL([HAVE_XML_CATALOG_FILES], true)
|
||||
|
Loading…
Reference in New Issue
Block a user