Module: wine
Branch: master
Commit: cda2886fd3018c9e8c12791238db481b528f6a65
URL: https://gitlab.winehq.org/wine/wine/-/commit/cda2886fd3018c9e8c12791238db48…
Author: Zebediah Figura <zfigura(a)codeweavers.com>
Date: Sat Aug 12 17:43:08 2023 -0500
configure: Fail if --enable-archs is used and any cross-compiler is missing.
For example, currently, if --enable-archs=i386,x86_64 is used, and there is an
x86_64 cross compiler present but no i386 cross compiler, Wine will silently
remove i386 from the list of cross-compiled architechtures, and only compile
PE code for x86_64. This seems quite undesirable.
I am not aware of any practical reason for this to happen. Debian does ship
i686 and x86_64 MinGW compilers in separate packages, though, so it is possible
in theory.
---
configure | 33 ++++++++++++++++-----------------
configure.ac | 18 ++++++++++--------
2 files changed, 26 insertions(+), 25 deletions(-)
diff --git a/configure b/configure
index d5e699ca7d9..829741a5c0e 100755
--- a/configure
+++ b/configure
@@ -10512,11 +10512,6 @@ test -n "$x86_64_CC" || x86_64_CC="false"
esac
fi
- if eval test \"x\$"${wine_arch}_CC"\" = x"false"
-then :
- continue
-fi
-
saved_CC=$CC
saved_CFLAGS=$CFLAGS
saved_LDFLAGS=$LDFLAGS
@@ -10531,7 +10526,11 @@ fi
target=""
as_wine_cv_crosscc=`printf "%s\n" "ac_cv_${wine_arch}_crosscc" | $as_tr_sh`
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC works" >&5
+ if eval test \"x\$"${wine_arch}_CC"\" = x"false"
+then :
+
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC works" >&5
printf %s "checking whether $CC works... " >&6; }
if eval test \${$as_wine_cv_crosscc+y}
then :
@@ -10559,6 +10558,7 @@ fi
eval ac_res=\$$as_wine_cv_crosscc
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
+fi
if eval test \"x\$"$as_wine_cv_crosscc"\" = x"yes"
then :
set x $CC
@@ -10627,6 +10627,11 @@ fi
if test -z "$target"
then
+ if test ${enable_archs+y}
+then :
+ as_fn_error $? "MinGW $wine_arch compiler not found.
+This is an error since --enable-archs=$wine_arch was requested." "$LINENO" 5
+fi
CC=$saved_CC
CFLAGS=$saved_CFLAGS
LDFLAGS=$saved_LDFLAGS
@@ -10676,6 +10681,11 @@ printf "%s\n" "unsupported" >&6; }
CC=$saved_CC
CFLAGS=$saved_CFLAGS
LDFLAGS=$saved_LDFLAGS
+ if test ${enable_archs+y}
+then :
+ as_fn_error $? "MinGW $wine_arch compiler supporting C99 not found.
+This is an error since --enable-archs=$wine_arch was requested." "$LINENO" 5
+fi
continue
;;
x*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $res" >&5
@@ -11648,17 +11658,6 @@ if test $HOST_ARCH = aarch64
then
test "x$PE_ARCHS" != x || as_fn_error $? "PE cross-compilation is required for ARM64, please install clang/llvm-dlltool/lld, or llvm-mingw." "$LINENO" 5
DLLEXT=""
-else
- if test "x$PE_ARCHS" = "x"
-then :
- case "x$with_mingw" in
- x) as_fn_append wine_notices "|MinGW compiler not found, cross-compiling PE files won't be supported." ;;
- xno) ;;
- *) as_fn_error $? "MinGW compiler not found, cross-compiling PE files won't be supported.
-This is an error since --with-mingw was requested." "$LINENO" 5 ;;
-esac
-
-fi
fi
diff --git a/configure.ac b/configure.ac
index 0a683212866..90f4fd3809d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -849,8 +849,6 @@ do
;;
esac])
- AS_VAR_IF([${wine_arch}_CC],[false],[continue])
-
saved_CC=$CC
saved_CFLAGS=$CFLAGS
saved_LDFLAGS=$LDFLAGS
@@ -864,9 +862,10 @@ do
target=""
AS_VAR_PUSHDEF([wine_cv_crosscc],[ac_cv_${wine_arch}_crosscc])
- AC_CACHE_CHECK([whether $CC works],[wine_cv_crosscc],
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
- [AS_VAR_SET([wine_cv_crosscc],[yes])],[AS_VAR_SET([wine_cv_crosscc],[no])])])
+ AS_VAR_IF([${wine_arch}_CC],[false],[],
+ [AC_CACHE_CHECK([whether $CC works],[wine_cv_crosscc],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
+ [AS_VAR_SET([wine_cv_crosscc],[yes])],[AS_VAR_SET([wine_cv_crosscc],[no])])])])
AS_VAR_IF([wine_cv_crosscc],[yes],
[set x $CC
shift
@@ -903,6 +902,9 @@ do
if test -z "$target"
then
+ AS_VAR_SET_IF([enable_archs],
+ [AC_MSG_ERROR([MinGW $wine_arch compiler not found.
+This is an error since --enable-archs=$wine_arch was requested.])])
CC=$saved_CC
CFLAGS=$saved_CFLAGS
LDFLAGS=$saved_LDFLAGS
@@ -930,6 +932,9 @@ do
CC=$saved_CC
CFLAGS=$saved_CFLAGS
LDFLAGS=$saved_LDFLAGS
+ AS_VAR_SET_IF([enable_archs],
+ [AC_MSG_ERROR([MinGW $wine_arch compiler supporting C99 not found.
+This is an error since --enable-archs=$wine_arch was requested.])])
continue
;;
x*) AC_MSG_RESULT([$res])
@@ -1009,9 +1014,6 @@ if test $HOST_ARCH = aarch64
then
test "x$PE_ARCHS" != x || AC_MSG_ERROR([PE cross-compilation is required for ARM64, please install clang/llvm-dlltool/lld, or llvm-mingw.])
DLLEXT=""
-else
- WINE_NOTICE_WITH(mingw,[test "x$PE_ARCHS" = "x"],
- [MinGW compiler not found, cross-compiling PE files won't be supported.])
fi
dnl **** External libraries ****
Module: wine
Branch: master
Commit: d405a688ba6b5042775d733f57d00ba6318e1d0f
URL: https://gitlab.winehq.org/wine/wine/-/commit/d405a688ba6b5042775d733f57d00b…
Author: David McFarland <corngood(a)gmail.com>
Date: Sun Aug 13 22:43:50 2023 -0300
configure: Fix caching of PCSCLITE_LIBS on mac.
ac_cv_lib_pcsclite_SCardEstablishContext=yes would be cached, causing
AC_CHECK_LIB to use -lpcsclite on the second run.
Fixes: f74c4af257e0856e6607d2823e4f03109111a4b6
---
configure | 10 ++++++----
configure.ac | 8 +++++---
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index 97f92d0bc72..d5e699ca7d9 100755
--- a/configure
+++ b/configure
@@ -15853,12 +15853,14 @@ fi
if test "x$ac_cv_lib_pcsclite_SCardEstablishContext" != xyes && test "$ac_cv_header_PCSC_pcsclite_h" = "yes"
then
- PCSCLITE_LIBS="-framework PCSC"
-
- ac_cv_lib_pcsclite_SCardEstablishContext=yes
+ case $host_os in
+ darwin*|macosx*)
+ PCSCLITE_LIBS="-framework PCSC"
+ ;;
+ esac
fi
fi
-if test "x$ac_cv_lib_pcsclite_SCardEstablishContext" != xyes
+if test "x$PCSCLITE_LIBS" = x || test "$ac_cv_header_PCSC_pcsclite_h" != "yes"
then :
case "x$with_pcsclite" in
x) as_fn_append wine_notices "|libpcsclite not found, smart cards won't be supported." ;;
diff --git a/configure.ac b/configure.ac
index 38e61526a06..0a683212866 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1396,11 +1396,13 @@ then
AC_CHECK_LIB(pcsclite,SCardEstablishContext,[AC_SUBST(PCSCLITE_LIBS,["-lpcsclite"])])
if test "x$ac_cv_lib_pcsclite_SCardEstablishContext" != xyes && test "$ac_cv_header_PCSC_pcsclite_h" = "yes"
then
- AC_SUBST(PCSCLITE_LIBS,"-framework PCSC")
- ac_cv_lib_pcsclite_SCardEstablishContext=yes
+ case $host_os in
+ darwin*|macosx*)
+ AC_SUBST(PCSCLITE_LIBS,"-framework PCSC") ;;
+ esac
fi
fi
-WINE_NOTICE_WITH(pcsclite,[test "x$ac_cv_lib_pcsclite_SCardEstablishContext" != xyes],
+WINE_NOTICE_WITH(pcsclite,[test "x$PCSCLITE_LIBS" = x || test "$ac_cv_header_PCSC_pcsclite_h" != "yes"],
[libpcsclite not found, smart cards won't be supported.],
[enable_winscard])