]> granicus.if.org Git - python/commitdiff
- Issue #17029: Let h2py search the multiarch system include directory.
authordoko@python.org <doko@python.org>
Fri, 25 Jan 2013 12:12:29 +0000 (13:12 +0100)
committerdoko@python.org <doko@python.org>
Fri, 25 Jan 2013 12:12:29 +0000 (13:12 +0100)
Makefile.pre.in
Misc/NEWS
Tools/scripts/h2py.py
configure
configure.ac

index c014236ce5cdb3adc53d5f8e9b25a2c06a71cbec..0b1cfcd0045662910bd713bb626f01e0a6452ccd 100644 (file)
@@ -97,6 +97,9 @@ PY_CORE_CFLAGS=       $(PY_CFLAGS) $(PY_CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE
 # Machine-dependent subdirectories
 MACHDEP=       @MACHDEP@
 
+# Multiarch directory (may be empty)
+MULTIARCH=     @MULTIARCH@
+
 # Install prefix for architecture-independent files
 prefix=                @prefix@
 
@@ -1040,6 +1043,7 @@ $(srcdir)/Lib/$(PLATDIR):
        export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
        export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
        export EXE; EXE="$(BUILDEXE)"; \
+       if [ -n "$(MULTIARCH)" ]; then export MULTIARCH; MULTIARCH=$(MULTIARCH); fi; \
        cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen
 
 python-config: $(srcdir)/Misc/python-config.in
index 4c95a123151e2e00b5b0024ac63c452864a879ea..43864ae493980e05c5c0b8c2323bd7657800af9c 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -861,6 +861,8 @@ Tests
 Build
 -----
 
+- Issue #17029: Let h2py search the multiarch system include directory.
+
 - Issue #16953: Fix socket module compilation on platforms with
   HAVE_BROKEN_POLL. Patch by Jeffrey Armstrong.
 
index 45aa439075cafb9b5c1bd801470e676c6865f108..4f871d90107f86c37cb5f5f0c66b6f8f2f4d4132 100755 (executable)
@@ -50,6 +50,11 @@ except KeyError:
         searchdirs=os.environ['INCLUDE'].split(';')
     except KeyError:
         searchdirs=['/usr/include']
+        try:
+            searchdirs.insert(0, os.path.join('/usr/include',
+                                              os.environ['MULTIARCH']))
+        except KeyError:
+            pass
 
 def main():
     global filedict
index 1f00599154cadd3ad2fdc8237a8991cba746affe..00a100705080fafbfdcd0bafdd64a7975865a540 100755 (executable)
--- a/configure
+++ b/configure
@@ -688,6 +688,7 @@ BLDLIBRARY
 DLLLIBRARY
 LDLIBRARY
 LIBRARY
+MULTIARCH
 BUILDEXEEXT
 EGREP
 GREP
@@ -4750,6 +4751,9 @@ hp*|HP*)
     esac;;
 esac
 
+MULTIARCH=$($CC --print-multiarch 2>/dev/null)
+
+
 
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
index 5ae0d5add075e6e8232e193590a27e34e06c07cc..379db323d9d95880aadab2f50f0341ae0486663f 100644 (file)
@@ -593,6 +593,9 @@ hp*|HP*)
     esac;;
 esac
 
+MULTIARCH=$($CC --print-multiarch 2>/dev/null)
+AC_SUBST(MULTIARCH)
+
 
 AC_SUBST(LIBRARY)
 AC_MSG_CHECKING(LIBRARY)