autogen.sh portability fixes
- Do not assume tar has --version, as BSD tar does not - Allow specifying python binary through PYTHONBIN in case it is e.g. python2.7 BUG: 764655 Change-Id: I71f0f4830e10915782775de811c92db8e6ab4c55 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/6281 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
This commit is contained in:
parent
56b82b5294
commit
fd2e62404c
13
autogen.sh
13
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user