configure: fix syntax error with NetBSD
authorDmitry Fomichev <dmitry.fomichev@wdc.com>
Mon, 17 Aug 2020 23:47:08 +0000 (08:47 +0900)
committerJens Axboe <axboe@kernel.dk>
Wed, 19 Aug 2020 13:05:17 +0000 (07:05 -0600)
commit3e48f7c9de6166a62bcca7371c3c74025be952f2
tree3a61f05b27dfdbab7ddb75812abc13a85387c32f
parent3c1f3ca75b447a2bd0a93deb0a2a1210529d2ccb
configure: fix syntax error with NetBSD

The recent patch to detect for pkg-config presence has introduced some
bash-specific code to configure script. This lead to syntax errors
while running configure under some other shells, such as (d)ash.

Avoid ${!var} indirect substitution syntax and stop using "local"
keyword which is non-POSIX-standard. Address a few minor shellcheck
complaints about the code in same function.

Fixes: 162f8c2a96ae ("configure: check if pkg-config is installed")
Reviewed-by: Sitsofe Wheeler <sitsofe@yahoo.com>
Signed-off-by: Dmitry Fomichev <dmitry.fomichev@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
configure