diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2024-04-25 12:01:40 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2024-04-25 12:07:57 -0400 |
commit | 339c20aea74d5b4c6b8b178b478cc5530bc9af79 (patch) | |
tree | e0e856ca7dbf97ea1bfe95e0adc605acb5fc127c /config/pkgconf.sh | |
parent | 19189e3f6f18b13e4f9c947c99062e658e98827d (diff) | |
download | bfs-339c20aea74d5b4c6b8b178b478cc5530bc9af79.tar.xz |
config: Add BFS_USE_LIB* to config.h instead of CPPFLAGS
Diffstat (limited to 'config/pkgconf.sh')
-rwxr-xr-x | config/pkgconf.sh | 12 |
1 files changed, 12 insertions, 0 deletions
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 |