From abf424903e3d9cf37339567fe7d4d5f278b1f78c Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Mon, 18 Jan 2016 03:02:13 +0100 Subject: [PATCH] geanypy: Update bundled ax_python_devel.m4 to latest upstream This actually fixes building on Debian Unstable that ships ax_python_devel.m4 in autoconf-archive, and apparently aclocal prefers system directories. So we get the system version, which happens to be the latest, which changed API. To avoid breaking older systems that would also ship ax_python_devel.m4 but in an older version with the older API, keep using the old API too. --- geanypy/m4/ax_python_devel.m4 | 100 +++++++++++++++++----------------- geanypy/src/Makefile.am | 3 +- 2 files changed, 53 insertions(+), 50 deletions(-) diff --git a/geanypy/m4/ax_python_devel.m4 b/geanypy/m4/ax_python_devel.m4 index a62b860de..f18ed8a01 100644 --- a/geanypy/m4/ax_python_devel.m4 +++ b/geanypy/m4/ax_python_devel.m4 @@ -12,8 +12,8 @@ # in your configure.ac. # # This macro checks for Python and tries to get the include path to -# 'Python.h'. It provides the $(PYTHON_CPPFLAGS) and $(PYTHON_LDFLAGS) -# output variables. It also exports $(PYTHON_EXTRA_LIBS) and +# 'Python.h'. It provides the $(PYTHON_CPPFLAGS) and $(PYTHON_LIBS) output +# variables. It also exports $(PYTHON_EXTRA_LIBS) and # $(PYTHON_EXTRA_LDFLAGS) for embedding Python in your code. # # You can search for some particular version of Python by passing a @@ -34,11 +34,12 @@ # LICENSE # # Copyright (c) 2009 Sebastian Huber -# Copyright (c) 2009 Alan W. Irwin +# Copyright (c) 2009 Alan W. Irwin # Copyright (c) 2009 Rafael Laboissiere -# Copyright (c) 2009 Andrew Collier +# Copyright (c) 2009 Andrew Collier # Copyright (c) 2009 Matteo Settenvini # Copyright (c) 2009 Horst Knorr +# Copyright (c) 2013 Daniel Mullner # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the @@ -66,7 +67,7 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 8 +#serial 18 AU_ALIAS([AC_PYTHON_DEVEL], [AX_PYTHON_DEVEL]) AC_DEFUN([AX_PYTHON_DEVEL],[ @@ -98,7 +99,7 @@ AC_DEFUN([AX_PYTHON_DEVEL],[ This version of the AC@&t@_PYTHON_DEVEL macro doesn't work properly with versions of Python before 2.1.0. You may need to re-run configure, setting the -variables PYTHON_CPPFLAGS, PYTHON_LDFLAGS, PYTHON_SITE_PKG, +variables PYTHON_CPPFLAGS, PYTHON_LIBS, PYTHON_SITE_PKG, PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand. Moreover, to disable this check, set PYTHON_NOVERSIONCHECK to something else than an empty string. @@ -153,8 +154,14 @@ $ac_distutils_result]) if test -z "$PYTHON_CPPFLAGS"; then python_path=`$PYTHON -c "import distutils.sysconfig; \ print (distutils.sysconfig.get_python_inc ());"` + plat_python_path=`$PYTHON -c "import distutils.sysconfig; \ + print (distutils.sysconfig.get_python_inc (plat_specific=1));"` if test -n "${python_path}"; then - python_path="-I$python_path" + if test "${plat_python_path}" != "${python_path}"; then + python_path="-I$python_path -I$plat_python_path" + else + python_path="-I$python_path" + fi fi PYTHON_CPPFLAGS=$python_path fi @@ -165,7 +172,7 @@ $ac_distutils_result]) # Check for Python library path # AC_MSG_CHECKING([for Python library path]) - if test -z "$PYTHON_LDFLAGS"; then + if test -z "$PYTHON_LIBS"; then # (makes two attempts to ensure we've got a version number # from the interpreter) ac_python_version=`cat<