diff options
-rwxr-xr-x | autogen.sh | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/autogen.sh b/autogen.sh index f937e6be0d0..cd8603b66d3 100755 --- a/autogen.sh +++ b/autogen.sh @@ -55,11 +55,20 @@ else fi # Check for tar -env tar --version > /dev/null 2>&1 +env tar -cf /dev/null /dev/null > /dev/null 2>&1 if [ $? -ne 0 ]; then MISSING="$MISSING tar" fi +# Check for python +if [ "x${PYTHONBIN}" = "x" ]; then + PYTHONBIN=python +fi +env ${PYTHONBIN} -V > /dev/null 2>&1 +if [ $? -ne 0 ]; then + MISSING="$MISSING python" +fi + ## If dependencies are missing, warn the user and abort if [ "x$MISSING" != "x" ]; then echo "Aborting." @@ -77,7 +86,7 @@ fi ## generate gf-error-codes.h from error-codes.json echo "Generate gf-error-codes.h ..." -if ./gen-headers.py; then +if ${PYTHONBIN} ./gen-headers.py; then if ! mv -fv gf-error-codes.h libglusterfs/src/gf-error-codes.h; then exit 1 fi |