r22893 - gnucash/branches/2.4 - [r22892][Bug #697402] configure doesn't find python on Debian

John Ralls jralls at code.gnucash.org
Tue Apr 9 19:02:26 EDT 2013


Author: jralls
Date: 2013-04-09 19:02:25 -0400 (Tue, 09 Apr 2013)
New Revision: 22893
Trac: http://svn.gnucash.org/trac/changeset/22893

Modified:
   gnucash/branches/2.4/configure.ac
   gnucash/branches/2.4/macros/ac_python_devel.m4
Log:
[r22892][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.

Modified: gnucash/branches/2.4/configure.ac
===================================================================
--- gnucash/branches/2.4/configure.ac	2013-04-09 23:00:51 UTC (rev 22892)
+++ gnucash/branches/2.4/configure.ac	2013-04-09 23:02:25 UTC (rev 22893)
@@ -1196,17 +1196,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/branches/2.4/macros/ac_python_devel.m4
===================================================================
--- gnucash/branches/2.4/macros/ac_python_devel.m4	2013-04-09 23:00:51 UTC (rev 22892)
+++ gnucash/branches/2.4/macros/ac_python_devel.m4	2013-04-09 23:02:25 UTC (rev 22893)
@@ -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