From 9737c90fe7dcb10c63bb878eb0397cb63e6c3e6a Mon Sep 17 00:00:00 2001 From: styan Date: Sat, 2 May 2020 23:04:30 +0000 Subject: [PATCH] Check that pkg-config(1) exists before use --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 86eb104..8760eae 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,15 @@ .POSIX: MAGICTLS=\ - if pkg-config --exists libtls; then\ + if command -v pkg-config >/dev/null 2>&1 &&\ + pkg-config --exists libtls; then\ export CFLAGS="$$CFLAGS `pkg-config --cflags libtls`";\ export LDFLAGS="$$LDFLAGS `pkg-config --libs libtls`";\ else\ export LDFLAGS="$$LDFLAGS -ltls";\ fi MAGICBSD=\ - if pkg-config --exists libbsd; then\ + if command -v pkg-config >/dev/null 2>&1 &&\ + pkg-config --exists libbsd; then\ export CFLAGS="$$CFLAGS `pkg-config --cflags libbsd`";\ export LDFLAGS="$$LDFLAGS `pkg-config --libs libbsd`";\ fi