summaryrefslogtreecommitdiffstats
path: root/config/pkgconf.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-04-25 12:01:40 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-04-25 12:07:57 -0400
commit339c20aea74d5b4c6b8b178b478cc5530bc9af79 (patch)
treee0e856ca7dbf97ea1bfe95e0adc605acb5fc127c /config/pkgconf.sh
parent19189e3f6f18b13e4f9c947c99062e658e98827d (diff)
downloadbfs-339c20aea74d5b4c6b8b178b478cc5530bc9af79.tar.xz
config: Add BFS_USE_LIB* to config.h instead of CPPFLAGS
Diffstat (limited to 'config/pkgconf.sh')
-rwxr-xr-xconfig/pkgconf.sh12
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