# CTypes need to know the actual host we are building on.
# Signed-Off: Michael Dietrich <mdt@emdete.de>
|
old
|
new
|
|
| 1656 | 1656 | ffi_configfile): |
| 1657 | 1657 | from distutils.dir_util import mkpath |
| 1658 | 1658 | mkpath(ffi_builddir) |
| 1659 | | config_args = [] |
| | 1659 | config_args = ['--host=%s' % os.environ["CHOST"], ] |
| 1660 | 1660 | |
| 1661 | 1661 | # Pass empty CFLAGS because we'll just append the resulting |
| 1662 | 1662 | # CFLAGS to Python's; -g or -O2 is to be avoided. |
| 1663 | | cmd = "cd %s && env CFLAGS='' '%s/configure' %s" \ |
| 1664 | | % (ffi_builddir, ffi_srcdir, " ".join(config_args)) |
| | 1663 | cmd = "(cd %s && autoreconf) && (cd %s && env CFLAGS='' '%s/configure' %s)" \ |
| | 1664 | % (ffi_srcdir, ffi_builddir, ffi_srcdir, " ".join(config_args)) |
| 1665 | 1665 | |
| 1666 | 1666 | res = os.system(cmd) |
| 1667 | 1667 | if res or not os.path.exists(ffi_configfile): |
| 1668 | | print "Failed to configure _ctypes module" |
| | 1668 | print "Failed to configure _ctypes module (res=%d) or missing conffile=%s" % ( res, ffi_configfile ) |
| 1669 | 1669 | return False |
| 1670 | 1670 | |
| 1671 | 1671 | fficonfig = {} |