You can see the following
- Want to install pkg-config
Table of contents
Reference
- pkg-config Official Site: https://www.freedesktop.org/wiki/Software/pkg-config/
Install pkg-config
configure option
--prefix | The installation path |
---|---|
--with-internal-glib | Use internal glib |
For CentOS / Ubuntu / MacOS
※ When installing version 0.29.2
console
> cd /usr/local/src > sudo wget https://pkg-config.freedesktop.org/releases/pkg-config-0.29.2.tar.gz > sudo tar xvfz pkg-config-0.29.2.tar.gz > cd pkg-config-0.29.2 > sudo ./configure --prefix=/usr/local/pkg_config/0_29_2 --with-internal-glib > sudo make > sudo make install
Create Symbolic Link
Create installed libraries to under "/usr/local" by symbolic link.
※ When installing version 0.29.2
console
// /usr/local/bin > sudo ln -s /usr/local/pkg_config/0_29_2/bin/pkg-config /usr/local/bin/ // /usr/local/share/aclocal > sudo mkdir -p /usr/local/share/aclocal > sudo ln -s /usr/local/pkg_config/0_29_2/share/aclocal/pkg.m4 /usr/local/share/aclocal/
Set Environment Variable
Setting LD_LIBRARY_PATH and PKG_CONFIG_PATH variables is useful when building or executing other sources.
When copying or creating a symbolic link the library installed under /usr/local, it is recommended to set it.
console
> vim ~/.bash_profile
※ For CentOS / Ubuntu
.bash_profile
... export ACLOCAL_PATH=/usr/local/share/aclocal/:$ACLOCAL_PATH ...