summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJannick <thirdedition@gmx.net>2020-10-28 10:59:27 -0400
committerZack Weinberg <zackw@panix.com>2020-10-28 11:07:21 -0400
commit7b7a4f9ccd9c0583fcfc928b62ba5ab28cfbd68c (patch)
tree602f101066ca5333921d6395969f71b0a8952a9d
parent35a1c64600894ecc3b06b6c4b273952db7c8fc83 (diff)
downloadautoconf-7b7a4f9ccd9c0583fcfc928b62ba5ab28cfbd68c.tar.gz
Treat msys(2) the same as cygwin when looking at host_os.
In most cases, checks depending on the value of $host_os should treat *-*-cygwin*, *-*-msys*, and *-*-mingw* all the same. * lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS): Discard -lkernel32 on msys* as well. When not discarding -lkernel32, deduplicate it, like other -l options. * lib/autoconf/functions.m4 (AC_FUNC_MALLOC, AC_FUNC_REALLOC): msys* also guarantee to return nonnull for malloc(0)/realloc(0). * tests/local.at (at_check_env): Also ignore MSYS as an environment variable.
-rw-r--r--lib/autoconf/fortran.m47
-rw-r--r--lib/autoconf/functions.m44
-rw-r--r--tests/local.at3
3 files changed, 9 insertions, 5 deletions
diff --git a/lib/autoconf/fortran.m4 b/lib/autoconf/fortran.m4
index 59a8859b..16bd9cb0 100644
--- a/lib/autoconf/fortran.m4
+++ b/lib/autoconf/fortran.m4
@@ -665,9 +665,12 @@ while test $[@%:@] != 1; do
|-LANG:=* | -LIST:* | -LNO:* | -link)
;;
-lkernel32)
+ # Ignore this library only on Windows-like systems.
case $host_os in
- *cygwin*) ;;
- *) ac_cv_[]_AC_LANG_ABBREV[]_libs="$ac_cv_[]_AC_LANG_ABBREV[]_libs $ac_arg"
+ cygwin* | msys* ) ;;
+ *)
+ _AC_LIST_MEMBER_IF($ac_arg, $ac_cv_[]_AC_LANG_ABBREV[]_libs, ,
+ ac_cv_[]_AC_LANG_ABBREV[]_libs="$ac_cv_[]_AC_LANG_ABBREV[]_libs $ac_arg")
;;
esac
;;
diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4
index 4598b408..e474984f 100644
--- a/lib/autoconf/functions.m4
+++ b/lib/autoconf/functions.m4
@@ -961,7 +961,7 @@ AC_CACHE_CHECK([for GNU libc compatible malloc], ac_cv_func_malloc_0_nonnull,
[case "$host_os" in # ((
# Guess yes on platforms where we know the result.
*-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
- | hpux* | solaris* | cygwin* | mingw*)
+ | hpux* | solaris* | cygwin* | mingw* | msys* )
ac_cv_func_malloc_0_nonnull=yes ;;
# If we don't know, assume the worst.
*) ac_cv_func_malloc_0_nonnull=no ;;
@@ -1467,7 +1467,7 @@ AC_CACHE_CHECK([for GNU libc compatible realloc], ac_cv_func_realloc_0_nonnull,
[case "$host_os" in # ((
# Guess yes on platforms where we know the result.
*-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
- | hpux* | solaris* | cygwin* | mingw*)
+ | hpux* | solaris* | cygwin* | mingw* | msys* )
ac_cv_func_realloc_0_nonnull=yes ;;
# If we don't know, assume the worst.
*) ac_cv_func_realloc_0_nonnull=no ;;
diff --git a/tests/local.at b/tests/local.at
index b9f866f7..374e530c 100644
--- a/tests/local.at
+++ b/tests/local.at
@@ -366,7 +366,8 @@ if test -f state-env.before && test -f state-env.after; then
[OPENMP_CFLAGS],
[LIBS|LIB@&t@OBJS|LTLIBOBJS|LDFLAGS],
[INSTALL(_(DATA|PROGRAM|SCRIPT))?],
- [CYGWIN|ISC|MINGW32|MINIX|EMXOS2|XENIX|EXEEXT|OBJEXT],
+ [EXEEXT|OBJEXT],
+ [CYGWIN|EMXOS2|ISC|MINGW32|MINIX|MSYS|XENIX],
[X_(CFLAGS|(EXTRA_|PRE_)?LIBS)|x_(includes|libraries)|(have|no)_x],
[(host|build|target)(_(alias|cpu|vendor|os))?],
[cross_compiling|U],