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

Skip to content

Commit 3e6e2ac

Browse files
author
doko@python.org
committed
- Issue #17029: Let h2py search the multiarch system include directory.
1 parent e7e9c32 commit 3e6e2ac

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

@@ -1040,6 +1043,7 @@ $(srcdir)/Lib/$(PLATDIR):
10401043
export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
10411044
export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
10421045
export EXE; EXE="$(BUILDEXE)"; \
1046+
if [ -n "$(MULTIARCH)" ]; then export MULTIARCH; MULTIARCH=$(MULTIARCH); fi; \
10431047
cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen
10441048

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

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -861,6 +861,8 @@ Tests
861861
Build
862862
-----
863863

864+
- Issue #17029: Let h2py search the multiarch system include directory.
865+
864866
- Issue #16953: Fix socket module compilation on platforms with
865867
HAVE_BROKEN_POLL. Patch by Jeffrey Armstrong.
866868

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
@@ -688,6 +688,7 @@ BLDLIBRARY
688688
DLLLIBRARY
689689
LDLIBRARY
690690
LIBRARY
691+
MULTIARCH
691692
BUILDEXEEXT
692693
EGREP
693694
GREP
@@ -4750,6 +4751,9 @@ hp*|HP*)
47504751
esac;;
47514752
esac
47524753

4754+
MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4755+
4756+
47534757

47544758

47554759
{ $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
@@ -593,6 +593,9 @@ hp*|HP*)
593593
esac;;
594594
esac
595595

596+
MULTIARCH=$($CC --print-multiarch 2>/dev/null)
597+
AC_SUBST(MULTIARCH)
598+
596599

597600
AC_SUBST(LIBRARY)
598601
AC_MSG_CHECKING(LIBRARY)

0 commit comments

Comments
 (0)
0