AUDIT: r22892 - gnucash/trunk - [Bug #697402] configure doesn't find python on Debian
John Ralls
jralls at code.gnucash.org
Tue Apr 9 19:00:51 EDT 2013
Author: jralls
Date: 2013-04-09 19:00:51 -0400 (Tue, 09 Apr 2013)
New Revision: 22892
Trac: http://svn.gnucash.org/trac/changeset/22892
Modified:
gnucash/trunk/configure.ac
gnucash/trunk/macros/ac_python_devel.m4
Log:
[Bug #697402] configure doesn't find python on Debian
Lose the PKG_CHECK_MODULES for python and make sure that Python.h is
present and findable in AC_PYTHON_DEVEL instead.
BP
Modified: gnucash/trunk/configure.ac
===================================================================
--- gnucash/trunk/configure.ac 2013-04-09 18:56:51 UTC (rev 22891)
+++ gnucash/trunk/configure.ac 2013-04-09 23:00:51 UTC (rev 22892)
@@ -1048,17 +1048,16 @@
)
if test x${enable_python} = "xtrue"
then
- # Check for Python. We require python-2.4 because our implementation
- # doesn't run with earlier version anymore. Building Python from
- # source creates python.pc, Debian installs python2.pc, and Fedora
- # 17 makes both.
- PKG_CHECK_MODULES(PYTHON, python >= 2.4 , , [
- PKG_CHECK_MODULES(PYTHON, python2 >= 2.4 , , [
- AC_MSG_ERROR([Could not find python >= 2.4. If you use --enable-python, you MUST have python installed!])
+ # Check for Python. We require python-2.4
+
+ AM_PATH_PYTHON(2.4,,[
+ AC_MSG_ERROR([Could not find python >= 2.4. If you use --enable-python, you MUST have python installed!])
])
- ])
- AM_PATH_PYTHON(2.4)
AC_PYTHON_DEVEL(>= '2.4')
+ if [ "x${PYTHON}" = "x" ]
+ then
+ AC_MSG_ERROR([Could not find Python development files. Make sure that the correct python-devel package is installed.])
+ fi
SWIG_PYTHON
_COMPONENTS="$_COMPONENTS python"
fi
Modified: gnucash/trunk/macros/ac_python_devel.m4
===================================================================
--- gnucash/trunk/macros/ac_python_devel.m4 2013-04-09 18:56:51 UTC (rev 22891)
+++ gnucash/trunk/macros/ac_python_devel.m4 2013-04-09 23:00:51 UTC (rev 22892)
@@ -26,6 +26,9 @@
if test -z "$python_path" ; then
AC_MSG_ERROR([cannot find Python include path])
fi
+ if ! test -f "$python_path/Python.h" ; then
+ AC_MSG_ERROR([cannot find Python.h in $python_path])
+ fi
AC_SUBST([PYTHON_CPPFLAGS],[-I$python_path])
# Check for Python library path
More information about the gnucash-changes
mailing list