From e380a12a8b742e7391f5df1aefa6c0dd7c90664c Mon Sep 17 00:00:00 2001 From: Dominik Charousset Date: Mon, 21 Oct 2019 08:44:46 +0200 Subject: [PATCH] Fix check for cmake commands on POSIX shells --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 9a27b09daa..be22b4b477 100755 --- a/configure +++ b/configure @@ -335,9 +335,9 @@ done if [ -z "$CMakeCommand" ]; then # prefer cmake3 over "regular" cmake (cmake == cmake2 on RHEL) - if type cmake3 &> /dev/null ; then + if command -v cmake3 >/dev/null 2>&1 ; then CMakeCommand="cmake3" - elif type cmake &> /dev/null ; then + elif command -v cmake >/dev/null 2>&1 ; then CMakeCommand="cmake" else echo "This package requires CMake, please install it first."