summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-02-25 10:48:59 +0100
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-02-26 11:52:29 +0100
commit22f0c35dd2576b0121992ab09fe89e68c6532459 (patch)
tree32af9bb9bf08df716cb191cd4a8d6f2a999e6de3 /build
parent153b480b267a2d62e3b2d671d8018ab6e55dc8c4 (diff)
downloadastra-22f0c35dd2576b0121992ab09fe89e68c6532459.tar.gz
astra-22f0c35dd2576b0121992ab09fe89e68c6532459.tar.bz2
astra-22f0c35dd2576b0121992ab09fe89e68c6532459.tar.xz
astra-22f0c35dd2576b0121992ab09fe89e68c6532459.zip
Simplify with-python handling
Diffstat (limited to 'build')
-rw-r--r--build/linux/configure.ac15
1 files changed, 13 insertions, 2 deletions
diff --git a/build/linux/configure.ac b/build/linux/configure.ac
index f9755f9..525ca9d 100644
--- a/build/linux/configure.ac
+++ b/build/linux/configure.ac
@@ -165,8 +165,18 @@ AC_SUBST(HAVEMATLAB)
AC_ARG_WITH(python, [[ --with-python=path path of Python binary (optional)]],,)
HAVEPYTHON=no
-if test x"$with_python" != x; then
- AC_CHECK_FILE([$with_python],[PYTHON=$with_python],[AC_PATH_PROG([PYTHON], [$with_python], [AC_MSG_ERROR(Python binary not found)], [$PATH])])
+if test x"$with_python" != x -a x"$with_python" != xno; then
+ if test x"$with_python" = xyes; then
+ PYTHON=python
+ else
+ PYTHON="$with_python"
+ fi
+ AC_MSG_CHECKING(for python)
+ ASTRA_RUN_LOGOUTPUT(echo 'import sys' | $PYTHON -)
+ if test $? -ne 0; then
+ AC_MSG_ERROR(Python binary not found)]
+ fi
+ AC_MSG_RESULT([$PYTHON])
HAVEPYTHON=yes
AC_SUBST(PYTHON)
AC_MSG_CHECKING(for numpy module)
@@ -215,6 +225,7 @@ echo
echo "Summary of ASTRA Toolbox build options:"
echo " CUDA : $HAVECUDA"
echo " Matlab : $HAVEMATLAB"
+echo " Python : $HAVEPYTHON"
echo
echo " prefix : $prefix"
echo