From 63c6ac73fc46199f925ce1df6602125ed6dbc985 Mon Sep 17 00:00:00 2001 From: edoapra Date: Fri, 1 Sep 2023 14:19:15 -0700 Subject: [PATCH] check if pkg-config is available --- src/tools/guess-mpidefs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tools/guess-mpidefs b/src/tools/guess-mpidefs index 473806b32c..cc5b64a7d8 100755 --- a/src/tools/guess-mpidefs +++ b/src/tools/guess-mpidefs @@ -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} }