Skip to content

Commit 75adb15

Browse files
Alexpuxlazka
andcommitted
Add default configuration for MINGW
Co-authored-by: Алексей <[email protected]> Co-authored-by: Christoph Reiter <[email protected]>
1 parent c6fd2e3 commit 75adb15

File tree

3 files changed

+45
-0
lines changed

3 files changed

+45
-0
lines changed

Misc/config_mingw

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# configure defaults for mingw* hosts
2+
3+
# mingw functions to ignore
4+
ac_cv_func_ftruncate=ignore # implement it as _chsize
5+
6+
# mingw-w64 functions to ignore
7+
ac_cv_func_truncate=ignore
8+
ac_cv_func_alarm=ignore
9+
10+
# files to ignore
11+
ac_cv_file__dev_ptmx=ignore #NOTE: under MSYS environment device exist
12+
ac_cv_file__dev_ptc=no

Misc/cross_mingw32

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# configure defaults for mingw32 host if cross-build
2+
3+
ac_cv_little_endian_double=yes
4+
ac_cv_big_endian_double=no
5+
ac_cv_mixed_endian_double=no
6+
7+
ac_cv_tanh_preserves_zero_sign=yes
8+
9+
ac_cv_wchar_t_signed=no
10+
11+
ac_cv_have_size_t_format=no

configure.ac

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,6 +1178,28 @@ AC_CACHE_CHECK([for -Wl,--no-as-needed], [ac_cv_wl_no_as_needed], [
11781178
])
11791179
AC_SUBST(NO_AS_NEEDED)
11801180

1181+
# initialize default configuration
1182+
py_config=
1183+
case $host in
1184+
*-*-mingw*) py_config=mingw ;;
1185+
esac
1186+
if test -n "$py_config" ; then
1187+
AC_MSG_NOTICE([loading configure defaults from .../Misc/config_$py_config"])
1188+
. "$srcdir/Misc/config_$py_config"
1189+
fi
1190+
1191+
# initialize defaults for cross-builds
1192+
if test "$cross_compiling" = yes; then
1193+
py_config=$host_os
1194+
case $py_config in
1195+
mingw32*) py_config=mingw32 ;;
1196+
esac
1197+
if test -f "$srcdir/Misc/cross_$py_config" ; then
1198+
AC_MSG_NOTICE([loading cross defaults from .../Misc/cross_$py_config"])
1199+
. "$srcdir/Misc/cross_$py_config"
1200+
fi
1201+
fi
1202+
11811203
AC_MSG_CHECKING([for the Android API level])
11821204
cat > conftest.c <<EOF
11831205
#ifdef __ANDROID__

0 commit comments

Comments
 (0)