configure.ac |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 27edc0027ee2ebdb00cbe4f3d50fba77f6dc1fdc
Author:     Tor Lillqvist <[email protected]>
AuthorDate: Mon Apr 21 15:14:21 2025 +0300
Commit:     Tomaž Vajngerl <[email protected]>
CommitDate: Tue Dec 2 09:59:25 2025 +0100

    Accept Homebrew pkg-config also on an Intel Macs
    
    On Intel Macs, Homebrew sadly uses the installation prefix /usr/local
    and not /opt/homebrew.
    
    Change-Id: I96a15dc69292799168cb67514b841a977dc353ad
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194588
    Reviewed-by: Tomaž Vajngerl <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>

diff --git a/configure.ac b/configure.ac
index 299004028d03..dbdd67a0c211 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7000,7 +7000,9 @@ if test $_os = Darwin; then
     if test -n "$PKG_CONFIG"; then
         if test "$PKG_CONFIG" = /usr/bin/pkg-config && ls -l 
/usr/bin/pkg-config | $GREP -q Mono.framework; then
             AC_MSG_ERROR([yes, from Mono. This *will* break the build. Please 
remove or hide $PKG_CONFIG])
-        elif test "$PKG_CONFIG" = "/opt/homebrew/bin/pkg-config"; then
+        elif test `uname -m` = "arm64" -a "$PKG_CONFIG" = 
"/opt/homebrew/bin/pkg-config"; then
+            AC_MSG_RESULT([yes, from Homebrew. This is OK.])
+        elif [[[ `uname -m` == "x86_64" && "$PKG_CONFIG" == 
"/usr/local/bin/pkg-config" && `readlink "$PKG_CONFIG"` == 
../Cellar/pkgconf/*/bin/pkg-config ]]]; then
             AC_MSG_RESULT([yes, from Homebrew. This is OK.])
         else
             if test "$enable_bogus_pkg_config" = "yes"; then

Reply via email to