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>