mirror of
https://github.com/Z3Prover/z3
synced 2025-08-08 12:11:23 +00:00
Configure script aborts if python is not installed
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
87c2e5bc3c
commit
25f8086302
1 changed files with 12 additions and 32 deletions
42
configure.ac
42
configure.ac
|
@ -42,10 +42,14 @@ else
|
||||||
HAS_PYTHON="0"
|
HAS_PYTHON="0"
|
||||||
HAS_PYTHON_MSG="no"
|
HAS_PYTHON_MSG="no"
|
||||||
fi
|
fi
|
||||||
AC_SUBST(PYTHON_PACKAGE_DIR)
|
|
||||||
AC_SUBST(HAS_PYTHON)
|
|
||||||
rm -f tst_python.py
|
rm -f tst_python.py
|
||||||
|
|
||||||
|
if test "$HAS_PYTHON" = "0"; then
|
||||||
|
AC_MSG_ERROR([You need Python 2.x to generate the Z3 Makefiles.\nPlease download python at http://python.org])
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_SUBST(PYTHON_PACKAGE_DIR)
|
||||||
|
|
||||||
###################
|
###################
|
||||||
#
|
#
|
||||||
# Configuring bignum package
|
# Configuring bignum package
|
||||||
|
@ -167,45 +171,21 @@ AC_OUTPUT(scripts/config-debug.mk scripts/config-release.mk)
|
||||||
#
|
#
|
||||||
###################
|
###################
|
||||||
|
|
||||||
if test "$HAS_PYTHON" = "0"; then
|
|
||||||
if test -d build/Makefile; then
|
|
||||||
# Python is not installed, but Makefile was pre generated
|
|
||||||
# Just copy configuration and terminate
|
|
||||||
cp scripts/config-release.mk build/config.mk
|
|
||||||
cat <<EOF
|
|
||||||
Z3 was configured with success.
|
|
||||||
Host platform: $PLATFORM
|
|
||||||
Arithmetic: $ARITH
|
|
||||||
Python Support: $HAS_PYTHON_MSG
|
|
||||||
Python: $PYTHON
|
|
||||||
Prefix: $prefix
|
|
||||||
64-bit: $IS_X64
|
|
||||||
|
|
||||||
Type 'cd build; make' to compile Z3.
|
|
||||||
Type 'sudo make install' to install Z3.
|
|
||||||
Type 'sudo make install-z3py' to install Z3 Python (Z3Py) bindings.
|
|
||||||
EOF
|
|
||||||
else
|
|
||||||
AC_MSG_ERROR([Pre generated Makefiles were not detected. You need python to generate the Z3 Makefiles.\nPlease download python at http://python.org])
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
# Python is available, give user the option to generate the make files wherever they want
|
# Python is available, give user the option to generate the make files wherever they want
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
Z3 was configured with success.
|
Z3 was configured with success.
|
||||||
Host platform: $PLATFORM
|
Host platform: $PLATFORM
|
||||||
Arithmetic: $ARITH
|
Arithmetic: $ARITH
|
||||||
Python Support: $HAS_PYTHON_MSG
|
|
||||||
Python: $PYTHON
|
Python: $PYTHON
|
||||||
Prefix: $prefix
|
Prefix: $prefix
|
||||||
64-bit: $IS_X64
|
64-bit: $IS_X64
|
||||||
|
|
||||||
Type 'python scripts/mk_make.py' to generate Makefiles in the subdirectory 'build'.
|
To build and install Z3, execute:
|
||||||
Type 'cd build; make' to make Z3.
|
python scripts/mk_make.py
|
||||||
Type 'sudo make install' to install Z3.
|
cd build
|
||||||
Type 'sudo make install-z3py' to install Z3 Python (Z3Py) bindings.
|
make
|
||||||
|
sudo make install
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue