Install pkg-config for Mac OSX
For those who don’t know about pkg-config, it is a tool that help we compile applications and libraries by inserting the correct compiler options.
Now, how can we install pkg-config for Mac OSX ?
Get MacPort
For no headache, install MacPort. It helps a lot when install open source software on the Mac.
Install here http://www.macports.org/install.php. You should choose “pkg” installer for quick use. Remember to select the right Mac version
Install pkg-config
Run Terminal. Cd to where you want to install pkg-config, and enter this
[code language=”css”]
sudo port install pkgconfig
[/code]
Oops, if you receive this error
[code language=”css”]
port command not found
[/code]
It is because port is install in /opt/local/bin by default. You should add /opt/local/bin to your PATH
Run Terminal, and enter this for temporary PATH append
[code language=”css”]
export PATH=$PATH:/opt/local/bin
[/code]
Fore more information about pkg-config, visit