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

index 1ce78b21527d40b4d97b3c527663806d5409ac9f..519aa2650297c688b05fcc242a9362b57b03f147 100644 (file)
@@ -86,6 +86,9 @@ PY_CFLAGS=    $(CFLAGS) $(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@
 
@@ -980,6 +983,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 8d84806f28fd91df175710bfef4b44dda2f38354..edd5c1e62366790a3c966b9d5405de93a86adc32 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -706,6 +706,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 c681e236ba1e78c15ea2d0f93c758736bae68584..c64501e604d76123fc66a8c2c2b888f82313cbfe 100755 (executable)
@@ -58,6 +58,12 @@ except KeyError:
                 raise KeyError
         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 056f69ba29642a276788b300e87ae9d6a5243ce0..10d77b123087995998207a6533590a15e991a668 100755 (executable)
--- a/configure
+++ b/configure
@@ -686,6 +686,7 @@ BUILDEXEEXT
 EGREP
 GREP
 CPP
+MULTIARCH
 MAINCC
 CXX
 OBJEXT
@@ -4281,6 +4282,9 @@ $as_echo "$as_me: WARNING:
   " >&2;}
 fi
 
+MULTIARCH=$($CC --print-multiarch 2>/dev/null)
+
+
 
 # checks for UNIX variants that set C preprocessor variables
 
index db6b0b26c5ef59b654193f742252d3fc8c3b3cec..0c6bba8405b9e0dfdb4a4ecd4b23c41ef72ef933 100644 (file)
@@ -603,6 +603,9 @@ then
   ])
 fi
 
+MULTIARCH=$($CC --print-multiarch 2>/dev/null)
+AC_SUBST(MULTIARCH)
+
 
 # checks for UNIX variants that set C preprocessor variables
 AC_USE_SYSTEM_EXTENSIONS