Add a backport of http://bugs.python.org/issue16235 so we can use
python-config for cross builds.
This basically replaces the python version of python-config with a pure-shell
version that's already preprocessed when installed and doesn't depend
on the sysconfig import that usually leads to bad data/results.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
===================================================================
if test $enable_shared = "yes"; then
AC_DEFINE(Py_ENABLE_SHARED, 1, [Defined if Python is built as a shared library.])
else # shared is disabled
+AC_SUBST(PY_ENABLE_SHARED)
+LIBPL="${prefix}/lib/python${VERSION}/config"
# SO is the extension of shared libraries `(including the dot!)
# -- usually .so, .sl on HP-UX, .dll on Cygwin
-AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc)
+AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh)
AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix])
===================================================================
SUBDIRSTOO= Include Lib Misc Demo
# Files and directories to be distributed
-CONFIGFILES= configure configure.ac acconfig.h pyconfig.h.in Makefile.pre.in
+CONFIGFILES= configure configure.ac acconfig.h pyconfig.h.in Makefile.pre.in Misc/python-config.sh
DISTFILES= README ChangeLog $(CONFIGFILES)
DISTDIRS= $(SUBDIRS) $(SUBDIRSTOO) Ext-dummy
DIST= $(DISTFILES) $(DISTDIRS)