check if pkg-config is available

This commit is contained in:
edoapra 2023-09-01 14:19:15 -07:00
parent 612d72ebf1
commit 63c6ac73fc
No known key found for this signature in database
GPG key ID: 48E12DA1EDE9E1B0

View file

@ -159,8 +159,10 @@ function get_mpi_lib ()
fi
done
# homebrew hwloc
if pkg-config --exists hwloc; then
outlist="${outlist} $(pkg-config --libs-only-L hwloc 2> /dev/null) -lhwloc"
if [ $(command -v pkg-config 2> /dev/null) -ne 0 ]; then
if pkg-config --exists hwloc; then
outlist="${outlist} $(pkg-config --libs-only-L hwloc 2> /dev/null) -lhwloc"
fi
fi
echo ${outlist}
}