Building from source without homebrew or any other package manager.
Download the latest version of the [https://pkg-config.freedesktop.org/releases/?C=M;O=A](pkg-config source).
LDFLAGS="-framework CoreFoundation -framework Carbon" ./configure --with-internal-glib
make
sudo make install
Thank you very much to everyone for the contributions, you helped me to finally get pkg-config to compile
What I learn from this is that we can't go through life blindly, we have to learn to use the tools, for me this worked to fix the errors compiling in Apple Silicon M2 (2025):
I install my self compiled stuff in /opt/pokemon
This commands make the tric:
tar xvf pkg-config-0.29.2.tar.gz
mkdir pkg-config-build
cd pkg-config-build
export CFLAGS="-Wno-int-conversion"
export CXXFLAGS="-Wno-int-conversion"
../pkg-config-0.29.2/configure --prefix=/opt/pokemon --exec-prefix=/opt/pokemon --with-internal-glib
make
make install