>From d503c59dc903cfb5129d566698016c1bb0398c96 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Thu, 17 Oct 2019 10:22:20 +0100 Subject: [PATCH] Allow configure to find libxml2 installed by homebrew * configure.ac: Add Homebrew provided .pc file to PKG_CONFIG_PATH. --- configure.ac | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac index 33d725c804..62ab35ab5a 100644 --- a/configure.ac +++ b/configure.ac @@ -4041,6 +4041,11 @@ AC_DEFUN ### mingw32 doesn't use -lxml2, since it loads the library dynamically. HAVE_LIBXML2=no if test "${with_xml2}" != "no"; then + if test -n "$BREW"; then + # Makesure pkg-config can find any version installed by homebrew. + export PKG_CONFIG_PATH="$PKG_CONFIG_PATH$PATH_SEPARATOR`$BREW --prefix libxml2 2>/dev/null`/lib/pkgconfig" + fi + ### I'm not sure what the version number should be, so I just guessed. EMACS_CHECK_MODULES([LIBXML2], [libxml-2.0 > 2.6.17]) # Built-in libxml2 on OS X 10.8 lacks libxml-2.0.pc. -- 2.21.0