]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Treat msys(2) the same as cygwin when looking at host_os.
authorJannick <thirdedition@gmx.net>
Wed, 28 Oct 2020 14:59:27 +0000 (10:59 -0400)
committerZack Weinberg <zackw@panix.com>
Wed, 28 Oct 2020 15:07:21 +0000 (11:07 -0400)
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.

lib/autoconf/fortran.m4
lib/autoconf/functions.m4
tests/local.at

index 59a8859b1135aaee75ff091ab5700415676cdeb8..16bd9cb0ee81329bd573ae19c37f2116183f6fca 100644 (file)
@@ -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
          ;;
index 4598b40831ebe458630dcc549fa74b55abf825df..e474984f692035295a40a36ef323bc6781580336 100644 (file)
@@ -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 ;;
index b9f866f75ad04b579605d551c1807f71815aa045..374e530cfa3cd0e13c05dc5e2bde209ac6540dd9 100644 (file)
@@ -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],