Description: detect both python3.3 includes locations
Author: Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com>
Forwarded: yes
Last-Update: 2012-10-25

Index: postgresql-9.2-9.2.2/config/python.m4
===================================================================
--- postgresql-9.2-9.2.2.orig/config/python.m4	2012-12-08 16:07:59.500783640 +0100
+++ postgresql-9.2-9.2.2/config/python.m4	2012-12-08 16:08:04.052783813 +0100
@@ -34,6 +34,11 @@
 python_version=`${PYTHON} -c "import sys; print(sys.version[[:3]])"`
 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
 python_includespec=`${PYTHON} -c "import distutils.sysconfig; print('-I'+distutils.sysconfig.get_python_inc())"`
+python_platincludespec=`${PYTHON} -c "import distutils.sysconfig; print('-I'+distutils.sysconfig.get_python_inc(plat_specific=True))"`
+if test x"$python_includespec" != x"$python_platincludespec"
+then
+    python_includespec="$python_includespec $python_platincludespec"
+fi
 
 AC_SUBST(python_majorversion)[]dnl
 AC_SUBST(python_version)[]dnl
Index: postgresql-9.2-9.2.2/configure
===================================================================
--- postgresql-9.2-9.2.2.orig/configure	2012-12-08 16:07:59.500783640 +0100
+++ postgresql-9.2-9.2.2/configure	2012-12-08 16:08:04.404783827 +0100
@@ -7338,6 +7338,11 @@
 python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
 python_includespec=`${PYTHON} -c "import distutils.sysconfig; print('-I'+distutils.sysconfig.get_python_inc())"`
+python_platincludespec=`${PYTHON} -c "import distutils.sysconfig; print('-I'+distutils.sysconfig.get_python_inc(plat_specific=True))"`
+if test x"$python_includespec" != x"$python_platincludespec"
+then
+    python_includespec="$python_includespec $python_platincludespec"
+fi
 
 # This should be enough of a message.
 { $as_echo "$as_me:$LINENO: result: $python_configdir" >&5
