Module: wine Branch: master Commit: 84d8a24af71d79ddc0fa1122c168816e04e9075d URL: https://gitlab.winehq.org/wine/wine/-/commit/84d8a24af71d79ddc0fa1122c168816...
Author: Alexandre Julliard julliard@winehq.org Date: Wed Jun 26 10:27:15 2024 +0200
configure: Disable non-PE import libraries if compiler support is missing.
---
configure | 18 ++++++++++-------- configure.ac | 19 +++++++++---------- 2 files changed, 19 insertions(+), 18 deletions(-)
diff --git a/configure b/configure index c506c72ad8b..2373cf89da8 100755 --- a/configure +++ b/configure @@ -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 diff --git a/configure.ac b/configure.ac index 7fe5477daf7..43bba37a39b 100644 --- a/configure.ac +++ b/configure.ac @@ -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"]) ;;