Skip to content

Commit

Permalink
- Issue #17029: Let h2py search the multiarch system include directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
doko@python.org committed Jan 25, 2013
2 parents d269b5e + 3e6e2ac commit 0c77bf7
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -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@

Expand Down Expand Up @@ -1119,6 +1122,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
Expand Down
2 changes: 2 additions & 0 deletions Misc/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,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.

Expand Down
5 changes: 5 additions & 0 deletions Tools/scripts/h2py.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@
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
Expand Down
4 changes: 4 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,7 @@ BLDLIBRARY
DLLLIBRARY
LDLIBRARY
LIBRARY
MULTIARCH
BUILDEXEEXT
EGREP
GREP
Expand Down Expand Up @@ -5351,6 +5352,9 @@ hp*|HP*)
esac;;
esac

MULTIARCH=$($CC --print-multiarch 2>/dev/null)




{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
Expand Down
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,9 @@ hp*|HP*)
esac;;
esac

MULTIARCH=$($CC --print-multiarch 2>/dev/null)
AC_SUBST(MULTIARCH)


AC_SUBST(LIBRARY)
AC_MSG_CHECKING(LIBRARY)
Expand Down

0 comments on commit 0c77bf7

Please sign in to comment.