From 339c20aea74d5b4c6b8b178b478cc5530bc9af79 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 25 Apr 2024 12:01:40 -0400 Subject: config: Add BFS_USE_LIB* to config.h instead of CPPFLAGS --- config/pkgconf.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'config/pkgconf.sh') diff --git a/config/pkgconf.sh b/config/pkgconf.sh index 2dbad76..2fb2f1e 100755 --- a/config/pkgconf.sh +++ b/config/pkgconf.sh @@ -26,6 +26,18 @@ esac if [ -z "$MODE" ]; then # Check whether the libraries exist at all for LIB; do + # Check ${USE_$LIB} + USE_LIB="USE_$(printf '%s' "$LIB" | tr 'a-z-' 'A-Z_')" + eval "USE=\"\${$USE_LIB:-}\"" + case "$USE" in + y|1) + continue + ;; + n|0) + exit 1 + ;; + esac + CFLAGS=$("$0" --cflags "$LIB") || exit 1 LDFLAGS=$("$0" --ldflags "$LIB") || exit 1 LDLIBS=$("$0" --ldlibs "$LIB") || exit 1 -- cgit v1.2.3