From noloader at gmail.com Sat Apr 4 04:30:32 2020 From: noloader at gmail.com (Jeffrey Walton) Date: Sat, 4 Apr 2020 00:30:32 -0400 Subject: How to retrieve prefix using pkg-config? Message-ID: 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? From tfheen at err.no Sat Apr 4 05:00:04 2020 From: tfheen at err.no (Tollef Fog Heen) Date: Sat, 04 Apr 2020 07:00:04 +0200 Subject: How to retrieve prefix using pkg-config? In-Reply-To: (Jeffrey Walton's message of "Sat, 4 Apr 2020 00:30:32 -0400") References: Message-ID: <87r1x3yhez.fsf@err.no> ]] Jeffrey Walton > 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. The prefix is just a variable, so ?pkg-config --variable=prefix libgpg-error? should do what you want. -- Tollef Fog Heen UNIX is user friendly, it's just picky about who its friends are