From 70bdf9b9a734d8ed09f09e76004d8c5bba6489f9 Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Mon, 6 Nov 2017 21:58:51 -0500 Subject: [PATCH] Make additional libraries optional. --- build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build b/build index cd2110e..6d1364e 100755 --- a/build +++ b/build @@ -155,10 +155,10 @@ use() { if (( enabled )); then if haslib "$lib"; then - echo >&2 "INFO: Enabled $option (lib$lib)." for lib in "$lib" "$@"; do - ldflags+=( -l"$lib" ) + haslib "$lib" && ldflags+=( -l"$lib" ) done + echo >&2 "INFO: Enabled $option (lib$lib)." return 0 elif [[ $requisite == required ]]; then