@@ -1627,6 +1627,24 @@ export build_alias=\${build_alias:-\$(uname -m)-apple-darwin}
1627
1627
export CONFIG_SHELL=/bin/bash
1628
1628
export SHELL=/bin/bash
1629
1629
1630
+ # Ensure pkg-config is accessible during configure
1631
+ # Preserve system PATH and add any found pkg-config to it
1632
+ if [ -z "\${PKG_CONFIG:-}" ]; then
1633
+ # Look for pkg-config in Launchpad installation first, then system locations
1634
+ for pkg_path in \$HOME/.local/freedesktop.org/*/bin/pkg-config /opt/homebrew/bin/pkg-config /usr/local/bin/pkg-config /usr/bin/pkg-config; do
1635
+ if [ -x "\$pkg_path" ]; then
1636
+ export PKG_CONFIG="\$pkg_path"
1637
+ break
1638
+ fi
1639
+ done
1640
+ fi
1641
+
1642
+ # Ensure PATH includes directory containing pkg-config
1643
+ if [ -n "\${PKG_CONFIG:-}" ]; then
1644
+ PKG_CONFIG_DIR=\$(dirname "\$PKG_CONFIG")
1645
+ export PATH="\$PKG_CONFIG_DIR:\$PATH"
1646
+ fi
1647
+
1630
1648
# Override the iconv errno test function to always return success
1631
1649
# This completely bypasses the problematic runtime test
1632
1650
cat > /tmp/iconv_errno_override.c << 'EOF'
@@ -1741,6 +1759,24 @@ export build_alias=\${build_alias:-\$(uname -m)-apple-darwin}
1741
1759
export CONFIG_SHELL=/bin/bash
1742
1760
export SHELL=/bin/bash
1743
1761
1762
+ # Ensure pkg-config is accessible during configure
1763
+ # Preserve system PATH and add any found pkg-config to it
1764
+ if [ -z "\${PKG_CONFIG:-}" ]; then
1765
+ # Look for pkg-config in Launchpad installation first, then system locations
1766
+ for pkg_path in \$HOME/.local/freedesktop.org/*/bin/pkg-config /opt/homebrew/bin/pkg-config /usr/local/bin/pkg-config /usr/bin/pkg-config; do
1767
+ if [ -x "\$pkg_path" ]; then
1768
+ export PKG_CONFIG="\$pkg_path"
1769
+ break
1770
+ fi
1771
+ done
1772
+ fi
1773
+
1774
+ # Ensure PATH includes directory containing pkg-config
1775
+ if [ -n "\${PKG_CONFIG:-}" ]; then
1776
+ PKG_CONFIG_DIR=\$(dirname "\$PKG_CONFIG")
1777
+ export PATH="\$PKG_CONFIG_DIR:\$PATH"
1778
+ fi
1779
+
1744
1780
# Override the iconv errno test function to always return success
1745
1781
# This completely bypasses the problematic runtime test
1746
1782
cat > /tmp/iconv_errno_override.c << 'EOF'
0 commit comments