How to retrieve prefix using pkg-config?
Jeffrey Walton
noloader at gmail.com
Sat Apr 4 04:30:32 UTC 2020
Hi Everyone,
I'm trying to build the GnuPG suite. The components do not honor
PKG_CONFIG_PATH so I need to do something like this:
if ! ./configure \
--prefix="${PREFIX}" \
--with-libgpg-error-prefix="$(pkg-config --prefix libgpg-error)";
then
echo "Failed to configure libgcrypt"
exit 1
fi
The code above is producing an error, "Unknown option --prefix". The
pkg-config(1) man page does not say how to extract the prefix to use.
How do I retrieve the prefix field from a *.pc file?
More information about the pkg-config
mailing list