Skip to content

Commit

Permalink
Issue python#17594: MINGW: preset configure defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
Roumen Petrov authored and Faraz Shahbazker committed Sep 17, 2019
1 parent 19eef91 commit 8af8b02
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 @@ -747,6 +747,28 @@ fi
MULTIARCH=$($CC --print-multiarch 2>/dev/null)
AC_SUBST(MULTIARCH)

# 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 platform triplet based on compiler characteristics])
cat >> conftest.c <<EOF
#undef bfin
Expand Down

0 comments on commit 8af8b02

Please sign in to comment.