Skip to content

Commit

Permalink
configure: add MACHDEP and platform on MINGW
Browse files Browse the repository at this point in the history
Co-authored-by: Алексей <alexey.pawlow@gmail.com>
  • Loading branch information
Alexpux authored and lazka committed Jul 19, 2023
1 parent e3dde16 commit c6fd2e3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,9 @@ then
*-*-cygwin*)
ac_sys_system=Cygwin
;;
*-*-mingw*)
ac_sys_system=MINGW
;;
*-*-vxworks*)
ac_sys_system=VxWorks
;;
Expand Down Expand Up @@ -580,6 +583,7 @@ then
linux*) MACHDEP="linux";;
cygwin*) MACHDEP="cygwin";;
darwin*) MACHDEP="darwin";;
mingw*) MACHDEP="win32";;
'') MACHDEP="unknown";;
esac
fi
Expand All @@ -605,13 +609,24 @@ if test "$cross_compiling" = yes; then
;;
wasm32-*-* | wasm64-*-*)
_host_cpu=$host_cpu
;;
*-*-mingw*)
_host_cpu=
;;
*)
# for now, limit cross builds to known configurations
MACHDEP="unknown"
AC_MSG_ERROR([cross build not supported for $host])
esac
_PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"

case "$host_os" in
mingw*)
# As sys.platform() return 'win32' to build python and extantions
# we will use 'mingw' (in setup.py and etc.)
_PYTHON_HOST_PLATFORM=mingw
;;
esac
fi

# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
Expand Down

0 comments on commit c6fd2e3

Please sign in to comment.