X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=configure.ac;fp=configure.ac;h=5fd23e58dd1cbb49f701954a3b355226a096d0b2;hb=b6e49b3a7d123c5616559e1016bed82a78c9ee58;hp=dfb44a1cf7916d66b270d22f62a62d3cc8d68cf0;hpb=9cd5375cdc1c902da2e6a5cb70d01934a6b71d22;p=util-vserver.git diff --git a/configure.ac b/configure.ac index dfb44a1..5fd23e5 100644 --- a/configure.ac +++ b/configure.ac @@ -453,22 +453,27 @@ dnl ######################## dnl Check for Python AM_PATH_PYTHON(,, [:]) +if test "x$PYTHON" != x:; then + ensc_have_python=true +else + ensc_have_python=false +fi ensc_python_config=python-config AC_ARG_WITH(python, AC_HELP_STRING([--with-python=FILE], [use FILE to query Python build details (default: python-config)]), [ case "$withval" in - (no) PYTHON=:;; + (no) ensc_have_python=false;; (yes) ;; (*) ensc_python_config="$withval";; esac]) -if $ensc_python_config --cflags > /dev/null 2>&1; then +if $ensc_have_python && $ensc_python_config --cflags > /dev/null 2>&1; then PYTHON_CFLAGS=`$ensc_python_config --cflags` PYTHON_LDFLAGS=`$ensc_python_config --ldflags` AC_SUBST(PYTHON_CFLAGS) AC_SUBST(PYTHON_LDFLAGS) else - PYTHON=: + ensc_have_python=false fi -AM_CONDITIONAL([HAVE_PYTHON], [test "x$PYTHON" != x:]) +AM_CONDITIONAL([HAVE_PYTHON], [$ensc_have_python]) dnl Python stuff ends here dnl ########################