Skip to content

Commit c6fd2e3

Browse files
Alexpuxlazka
authored andcommitted
configure: add MACHDEP and platform on MINGW
Co-authored-by: Алексей <[email protected]>
1 parent e3dde16 commit c6fd2e3

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

configure.ac

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,9 @@ then
545545
*-*-cygwin*)
546546
ac_sys_system=Cygwin
547547
;;
548+
*-*-mingw*)
549+
ac_sys_system=MINGW
550+
;;
548551
*-*-vxworks*)
549552
ac_sys_system=VxWorks
550553
;;
@@ -580,6 +583,7 @@ then
580583
linux*) MACHDEP="linux";;
581584
cygwin*) MACHDEP="cygwin";;
582585
darwin*) MACHDEP="darwin";;
586+
mingw*) MACHDEP="win32";;
583587
'') MACHDEP="unknown";;
584588
esac
585589
fi
@@ -605,13 +609,24 @@ if test "$cross_compiling" = yes; then
605609
;;
606610
wasm32-*-* | wasm64-*-*)
607611
_host_cpu=$host_cpu
612+
;;
613+
*-*-mingw*)
614+
_host_cpu=
608615
;;
609616
*)
610617
# for now, limit cross builds to known configurations
611618
MACHDEP="unknown"
612619
AC_MSG_ERROR([cross build not supported for $host])
613620
esac
614621
_PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
622+
623+
case "$host_os" in
624+
mingw*)
625+
# As sys.platform() return 'win32' to build python and extantions
626+
# we will use 'mingw' (in setup.py and etc.)
627+
_PYTHON_HOST_PLATFORM=mingw
628+
;;
629+
esac
615630
fi
616631

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

0 commit comments

Comments
 (0)