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
1
2
|
<br />
sudo port install pkgconfig<br />
|
Oops, if you receive this error
1
2
|
<br />
port command not found<br />
|
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
1
2
|
<br />
export PATH=$PATH:/opt/
local
/bin<br />
|
Fore more information about pkg-config, visit
1. Guide to pkg-config
2. pkg-config
参考:http://www.fantageek.com/318/install-pkg-config-for-mac-osx/