commit 4134dc1b4a37b65f8176d799f03342583b49d932
parent c036a43801d60b620262687e4bb6d98f97e23dbd
Author: Alexandre Oliveira <eu@aoalmeida.com>
Date: Mon, 2 Nov 2020 19:37:26 +0100
Check if pkg-config is valid before checking for libs
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/config.sh b/config.sh
@@ -85,6 +85,11 @@ find_library() {
name="$1"
pc="$2"
printf "Checking for %s... " "$name"
+ if ! command -v pkg-config >/dev/null
+ then
+ printf "ERROR: pkg-config not found\n"
+ return 1
+ fi
if ! pkg-config "$pc" 2>/dev/null
then
printf "NOT FOUND\n"