Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix pcsclite dependency in openconnect.pc
On Windows and OSX, the PCSC support is provided by the system and not
a separate installation of libpcsclite. So don't require the pcsclite
package in the openconnect.pc file; instead add the appropriate thing
to Libs.private.

Reported-by: Björn Ketelaars <bjorn.ketelaars@hydroxide.nl>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Sep 25, 2016
1 parent d414fc0 commit 7f5fee6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
23 changes: 16 additions & 7 deletions configure.ac
Expand Up @@ -55,12 +55,12 @@ case $host_os in
AC_DEFINE(_GNU_SOURCE, 1, [_GNU_SOURCE])
symver_win32_strerror="openconnect__win32_strerror;"
# Win32 does have the SCard API
LIBPCSCLITE_LIBS=-lwinscard
LIBPCSCLITE_CFLAGS=" "
system_pcsc_libs="-lwinscard"
system_pcsc_cflags=
;;
*darwin*)
LIBPCSCLITE_LIBS="-Wl,-framework -Wl,PCSC"
LIBPCSCLITE_CFLAGS=" "
system_pcsc_libs="-Wl,-framework -Wl,PCSC"
system_pcsc_cflags=
;;
*)
# On FreeBSD the only way to get vsyslog() visible is to define
Expand Down Expand Up @@ -682,12 +682,21 @@ AC_ARG_WITH([libpcsclite],
AS_HELP_STRING([--without-libpcsclite],
[Build without libpcsclite library (for Yubikey support) [default=auto]]))
AS_IF([test "x$with_libpcsclite" != "xno"], [
PKG_CHECK_MODULES(LIBPCSCLITE, libpcsclite,
if test "$system_pcsc_libs" != ""; then
AC_SUBST(LIBPCSCLITE_LIBS, "$system_pcsc_libs")
AC_SUBST(LIBPCSCLITE_CFLAGS, "$system_pcsc_cflags")
AC_SUBST(system_pcsc_libs)
libpcsclite_pkg=yes
else
PKG_CHECK_MODULES(LIBPCSCLITE, libpcsclite,
[AC_SUBST(LIBPCSCLITE_PC, libpcsclite)
AC_DEFINE([HAVE_LIBPCSCLITE], 1, [Have libpcsclite])
libpcsclite_pkg=yes],
libpcsclite_pkg=no)
libpcsclite_pkg=no)
fi
], [libpcsclite_pkg=disabled])
if test "$libpcsclite_pkg" = "yes"; then
AC_DEFINE([HAVE_LIBPCSCLITE], 1, [Have libpcsclite])
fi
AM_CONDITIONAL(OPENCONNECT_LIBPCSCLITE, [test "$libpcsclite_pkg" = "yes"])

AC_ARG_WITH([libpskc],
Expand Down
2 changes: 1 addition & 1 deletion openconnect.pc.in
Expand Up @@ -9,5 +9,5 @@ Description: OpenConnect VPN client
Version: @VERSION@
Requires.private: @LIBPROXY_PC@ @ZLIB_PC@ @LIBLZ4_PC@ @SSL_PC@ @P11KIT_PC@ @LIBSTOKEN_PC@ @LIBPSKC_PC@ @LIBPCSCLITE_PC@ libxml-2.0
Libs: -L${libdir} -lopenconnect
Libs.private: @INTL_LIBS@
Libs.private: @INTL_LIBS@ @system_pcsc_libs@
Cflags: -I${includedir}

0 comments on commit 7f5fee6

Please sign in to comment.