Module: wine Branch: master Commit: 4a4d35244120ce7d2abdd207a8a81a0b03c349c2 URL: https://gitlab.winehq.org/wine/wine/-/commit/4a4d35244120ce7d2abdd207a8a81a0...
Author: David McFarland corngood@gmail.com Date: Tue Aug 15 10:13:50 2023 -0300
configure: Don't require pcsclite header for winscard.
The header is unused, and the header check fails with:
configure:7860: checking for PCSC/pcsclite.h configure:7860: gcc -m32 -c -g -O2 conftest.c >&5 In file included from conftest.c:50: [...]/include/PCSC/pcsclite.h:45:10: fatal error: wintypes.h: No such file or directory 45 | #include <wintypes.h> | ^~~~~~~~~~~~
Fixes: d405a688ba6b5042775d733f57d00ba6318e1d0f
---
configure | 21 ++++++--------------- configure.ac | 15 +++++---------- include/config.h.in | 3 --- 3 files changed, 11 insertions(+), 28 deletions(-)
diff --git a/configure b/configure index 181835823f2..8359c78f65b 100755 --- a/configure +++ b/configure @@ -7857,12 +7857,6 @@ if test "x$ac_cv_header_OpenCL_opencl_h" = xyes then : printf "%s\n" "#define HAVE_OPENCL_OPENCL_H 1" >>confdefs.h
-fi -ac_fn_c_check_header_compile "$LINENO" "PCSC/pcsclite.h" "ac_cv_header_PCSC_pcsclite_h" "$ac_includes_default" -if test "x$ac_cv_header_PCSC_pcsclite_h" = xyes -then : - printf "%s\n" "#define HAVE_PCSC_PCSCLITE_H 1" >>confdefs.h - fi ac_fn_c_check_header_compile "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" if test "x$ac_cv_header_arpa_inet_h" = xyes @@ -15849,18 +15843,15 @@ if test "x$ac_cv_lib_pcsclite_SCardEstablishContext" = xyes then : PCSCLITE_LIBS="-lpcsclite"
+else $as_nop + case $host_os in + darwin*|macosx*) PCSCLITE_LIBS="-framework PCSC" + ;; + esac fi
- if test "x$ac_cv_lib_pcsclite_SCardEstablishContext" != xyes && test "$ac_cv_header_PCSC_pcsclite_h" = "yes" - then - case $host_os in - darwin*|macosx*) - PCSCLITE_LIBS="-framework PCSC" - ;; - esac - fi fi -if test "x$PCSCLITE_LIBS" = x || test "$ac_cv_header_PCSC_pcsclite_h" != "yes" +if test "x$PCSCLITE_LIBS" = x 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 4f7ba4c61bc..4e25e5d7306 100644 --- a/configure.ac +++ b/configure.ac @@ -403,7 +403,6 @@ AC_CHECK_HEADERS(\ CL/cl.h \ EGL/egl.h \ OpenCL/opencl.h \ - PCSC/pcsclite.h \ arpa/inet.h \ arpa/nameser.h \ asm/types.h \ @@ -1395,16 +1394,12 @@ WINE_NOTICE_WITH(pcap,[test "x$ac_cv_lib_pcap_pcap_init" != xyes], dnl **** Check for libpcsclite **** if test "x$with_pcsclite" != "xno" 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 - case $host_os in - darwin*|macosx*) - AC_SUBST(PCSCLITE_LIBS,"-framework PCSC") ;; - esac - fi + AC_CHECK_LIB(pcsclite,SCardEstablishContext,[AC_SUBST(PCSCLITE_LIBS,["-lpcsclite"])], + [case $host_os in + darwin*|macosx*) AC_SUBST(PCSCLITE_LIBS,"-framework PCSC") ;; + esac]) fi -WINE_NOTICE_WITH(pcsclite,[test "x$PCSCLITE_LIBS" = x || test "$ac_cv_header_PCSC_pcsclite_h" != "yes"], +WINE_NOTICE_WITH(pcsclite,[test "x$PCSCLITE_LIBS" = x], [libpcsclite not found, smart cards won't be supported.], [enable_winscard])
diff --git a/include/config.h.in b/include/config.h.in index 41011c3b0b8..9836ec64cf9 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -297,9 +297,6 @@ /* Define to 1 if you have the <pcap/pcap.h> header file. */ #undef HAVE_PCAP_PCAP_H
-/* Define to 1 if you have the <PCSC/pcsclite.h> header file. */ -#undef HAVE_PCSC_PCSCLITE_H - /* Define to 1 if you have the `pipe2' function. */ #undef HAVE_PIPE2