From: David McFarland corngood@gmail.com
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])