Skip to content

Commit

Permalink
Add default configuration for MINGW
Browse files Browse the repository at this point in the history
Co-authored-by: Алексей <[email protected]>
Co-authored-by: Christoph Reiter <[email protected]>
  • Loading branch information
Alexpux and lazka committed Jul 19, 2023
1 parent c6fd2e3 commit 75adb15
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Misc/config_mingw
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# configure defaults for mingw* hosts

# mingw functions to ignore
ac_cv_func_ftruncate=ignore # implement it as _chsize

# mingw-w64 functions to ignore
ac_cv_func_truncate=ignore
ac_cv_func_alarm=ignore

# files to ignore
ac_cv_file__dev_ptmx=ignore #NOTE: under MSYS environment device exist
ac_cv_file__dev_ptc=no
11 changes: 11 additions & 0 deletions Misc/cross_mingw32
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# configure defaults for mingw32 host if cross-build

ac_cv_little_endian_double=yes
ac_cv_big_endian_double=no
ac_cv_mixed_endian_double=no

ac_cv_tanh_preserves_zero_sign=yes

ac_cv_wchar_t_signed=no

ac_cv_have_size_t_format=no
22 changes: 22 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,28 @@ AC_CACHE_CHECK([for -Wl,--no-as-needed], [ac_cv_wl_no_as_needed], [
])
AC_SUBST(NO_AS_NEEDED)

# initialize default configuration
py_config=
case $host in
*-*-mingw*) py_config=mingw ;;
esac
if test -n "$py_config" ; then
AC_MSG_NOTICE([loading configure defaults from .../Misc/config_$py_config"])
. "$srcdir/Misc/config_$py_config"
fi

# initialize defaults for cross-builds
if test "$cross_compiling" = yes; then
py_config=$host_os
case $py_config in
mingw32*) py_config=mingw32 ;;
esac
if test -f "$srcdir/Misc/cross_$py_config" ; then
AC_MSG_NOTICE([loading cross defaults from .../Misc/cross_$py_config"])
. "$srcdir/Misc/cross_$py_config"
fi
fi

AC_MSG_CHECKING([for the Android API level])
cat > conftest.c <<EOF
#ifdef __ANDROID__
Expand Down

0 comments on commit 75adb15

Please sign in to comment.