Check pkg-config

This commit is contained in:
winlin 2020-04-13 19:50:40 +08:00
parent 61c7443c4b
commit bfe40f0115

View File

@ -110,7 +110,11 @@ function Ubuntu_prepare()
echo "The valgrind-dev is installed." echo "The valgrind-dev is installed."
fi fi
fi fi
pkg-config --version >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
echo "Please install pkg-config"; exit -1;
fi
echo "Tools for Ubuntu are installed." echo "Tools for Ubuntu are installed."
return 0 return 0
} }
@ -191,6 +195,10 @@ function Centos_prepare()
echo "The valgrind-devel is installed." echo "The valgrind-devel is installed."
fi fi
fi fi
pkg-config --version --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
echo "Please install pkg-config"; exit -1;
fi
echo "Tools for Centos are installed." echo "Tools for Centos are installed."
return 0 return 0