diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2024-05-24 09:37:57 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2024-05-24 14:23:50 -0400 |
commit | 3a6c1f049bb3643c86eb87f6c69cf7c3d3c95c86 (patch) | |
tree | 8793e871cc4ee1b3d3ff82b73d04c9264aaf12a9 /build/pkgconf.sh | |
parent | 64fcb1d975e8ec8ac70f7ae8add2f7499e6fe6e9 (diff) | |
download | bfs-3a6c1f049bb3643c86eb87f6c69cf7c3d3c95c86.tar.xz |
configure: Use --with/--without for libraries
Diffstat (limited to 'build/pkgconf.sh')
-rwxr-xr-x | build/pkgconf.sh | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/build/pkgconf.sh b/build/pkgconf.sh index 96e4bf1..244c95d 100755 --- a/build/pkgconf.sh +++ b/build/pkgconf.sh @@ -26,22 +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 - ;; + # Check ${WITH_$LIB} + WITH_LIB="WITH_$(printf '%s' "$LIB" | tr 'a-z-' 'A-Z_')" + eval "WITH=\"\${$WITH_LIB:-}\"" + case "$WITH" 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 - build/cc.sh $CFLAGS $LDFLAGS build/use/$LIB.c $LDLIBS || exit 1 + build/cc.sh $CFLAGS $LDFLAGS build/with/$LIB.c $LDLIBS || exit 1 done fi |