summaryrefslogtreecommitdiffstats
path: root/config/pkgconf.sh
diff options
context:
space:
mode:
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