8000 - Issue #17029: Let h2py search the multiarch system include directory. · python/cpython@0c77bf7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0c77bf7

Browse files
author
doko@python.org
committed
- Issue #17029: Let h2py search the multiarch system include directory.
2 parents d269b5e + 3e6e2ac commit 0c77bf7

File tree

5 files changed

+18
-0
lines changed

5 files changed

+18
-0
lines changed

Makefile.pre.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ PY_CORE_CFLAGS= $(PY_CFLAGS) $(PY_CPPFLAGS) $(CFLAGSFORSHARED) -DPy_BUILD_CORE
9797
# Machine-dependent subdirectories
9898
MACHDEP= @MACHDEP@
9999

100+
# Multiarch directory (may be empty)
101+
MULTIARCH= @MULTIARCH@
102+
100103
# Install prefix for architecture-independent files
101104
prefix= @prefix@
102105

@@ -1119,6 +1122,7 @@ $(srcdir)/Lib/$(PLATDIR):
11191122
export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
11201123
export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
11211124
export EXE; EXE="$(BUILDEXE)"; \
1125+
if [ -n "$(MULTIARCH)" ]; then export MULTIARCH; MULTIARCH=$(MULTIARCH); fi; \
11221126
cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen
11231127

11241128
python-config: $(srcdir)/Misc/python-config.in

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,8 @@ Tests
533533
Build
534534
-----
535535

536+
- Issue #17029: Let h2py search the multiarch system include directory.
537+
536538
- Issue #16953: Fix socket module compilation on platforms with
537539
HAVE_BROKEN_POLL. Patch by Jeffrey Armstrong.
538540

Tools/scripts/h2py.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@
5050
searchdirs=os.environ['INCLUDE'].split(';')
5151
except KeyError:
5252
searchdirs=['/usr/include']
53+
try:
54+
searchdirs.insert(0, os.path.join('/usr/include',
55+
os.environ['MULTIARCH']))
56+
except KeyError:
57+
pass
5358

5459
def main():
5560
global filedict

configure

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,7 @@ BLDLIBRARY
684684
DLLLIBRARY
685685
LDLIBRARY
686686
LIBRARY
687+
MULTIARCH
687688
BUILDEXEEXT
688689
EGREP
689690
GREP
@@ -5351,6 +5352,9 @@ hp*|HP*)
53515352
esac;;
53525353
esac
53535354

5355+
MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5356+
5357+
53545358

53555359

53565360
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5

configure.ac

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,9 @@ hp*|HP*)
764764
esac;;
765765
esac
766766

767+
MULTIARCH=$($CC --print-multiarch 2>/dev/null)
768+
AC_SUBST(MULTIARCH)
769+
767770

768771
AC_SUBST(LIBRARY)
769772
AC_MSG_CHECKING(LIBRARY)

0 commit comments

Comments
 (0)
0