configure: Disable non-PE import libraries if compiler support is missing.

This commit is contained in:
Alexandre Julliard 2024-06-26 10:27:15 +02:00
parent d7ad75e2d4
commit 84d8a24af7
2 changed files with 19 additions and 18 deletions

18
configure vendored
View file

@ -20253,16 +20253,14 @@ if test "x$ac_cv_cflags__Wno_format" = xyes
then :
EXTRACFLAGS="$EXTRACFLAGS -Wno-format"
fi ;;
*) if test -z "$PE_ARCHS"
then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working -mabi=ms" >&5
*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working -mabi=ms" >&5
printf %s "checking for working -mabi=ms... " >&6; }
if test ${ac_cv_mabi_ms+y}
then :
printf %s "(cached) " >&6
else $as_nop
CFLAGS="$CFLAGS -mabi=ms"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
int a(int b, ...) { __builtin_ms_va_list list; __builtin_ms_va_start(list,b); }
@ -20281,13 +20279,17 @@ else $as_nop
ac_cv_mabi_ms=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
CFLAGS=$saved_CFLAGS
CFLAGS=$saved_CFLAGS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mabi_ms" >&5
printf "%s\n" "$ac_cv_mabi_ms" >&6; }
test $ac_cv_mabi_ms = yes || as_fn_error $? "The compiler doesn't support -mabi=ms. Use gcc instead of clang, or install mingw-w64." "$LINENO" 5
fi
MSVCRTFLAGS="$MSVCRTFLAGS -mabi=ms" ;;
if test "x$ac_cv_mabi_ms" = xyes
then :
MSVCRTFLAGS="$MSVCRTFLAGS -mabi=ms"
else $as_nop
test -n "$PE_ARCHS" || as_fn_error $? "The compiler doesn't support -mabi=ms. Use gcc instead of clang, or install mingw-w64." "$LINENO" 5
DLLEXT=""
fi ;;
esac ;;
arm)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wincompatible-function-pointer-types" >&5

View file

@ -1966,17 +1966,16 @@ char*f(const char *h,char n) {return strchr(h,n);}]])],[ac_cv_c_logicalop_noisy=
dnl Mingw uses Windows 64-bit types, not Unix ones
cygwin*|mingw32*) WINE_TRY_CFLAGS([-Wno-format]) ;;
dnl Default to ms_abi on 64-bit
*) if test -z "$PE_ARCHS"
then
AC_CACHE_CHECK([for working -mabi=ms], ac_cv_mabi_ms,
[CFLAGS="$CFLAGS -mabi=ms"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
*) AC_CACHE_CHECK([for working -mabi=ms], ac_cv_mabi_ms,
[CFLAGS="$CFLAGS -mabi=ms"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
int a(int b, ...) { __builtin_ms_va_list list; __builtin_ms_va_start(list,b); }]])],
[ac_cv_mabi_ms=yes],[ac_cv_mabi_ms=no])
CFLAGS=$saved_CFLAGS])
test $ac_cv_mabi_ms = yes || AC_MSG_ERROR([The compiler doesn't support -mabi=ms. Use gcc instead of clang, or install mingw-w64.])
fi
MSVCRTFLAGS="$MSVCRTFLAGS -mabi=ms" ;;
[ac_cv_mabi_ms=yes],[ac_cv_mabi_ms=no])
CFLAGS=$saved_CFLAGS])
AS_VAR_IF([ac_cv_mabi_ms],[yes],
[MSVCRTFLAGS="$MSVCRTFLAGS -mabi=ms"],
[test -n "$PE_ARCHS" || AC_MSG_ERROR([The compiler doesn't support -mabi=ms. Use gcc instead of clang, or install mingw-w64.])
DLLEXT=""]) ;;
esac ;;
arm)
WINE_TRY_CFLAGS([-Wincompatible-function-pointer-types],[EXTRACFLAGS="$EXTRACFLAGS -Wno-error=incompatible-function-pointer-types"]) ;;