summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 8 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 5cef3735a..005f8f5db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -863,13 +863,20 @@ else
WITH_PYTHON_LIB=`${__PYTHON} -c 'from distutils.sysconfig import *; print get_python_lib(1)'`
WITH_PYTHON_SUBDIR=python
WITH_PYTHON_SUBPACKAGE=1
+ save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -I$WITH_PYTHON_INCLUDE"
+ AC_CHECK_HEADER([Python.h],
+ [WITH_PYTHON_SUBPACKAGE=1],
+ [WITH_PYTHON_SUBPACKAGE=0])
+ CPPFLAGS="$save_CPPFLAGS"
fi
AC_SUBST(WITH_PYTHON_SUBDIR)
-AC_SUBST(WITH_PYTHON_SUBPACKAGE)
AC_SUBST(WITH_PYTHON_INCLUDE)
AC_SUBST(WITH_PYTHON_LIB)
+AM_CONDITIONAL(PYTHON,[test "$WITH_PYTHON_SUBPACKAGE" = "1"])
+
AC_PATH_PROG(__DOXYGEN, doxygen, no, $PATH)
dnl
dnl Auto-detect whether doxygen generated API docs should be included.