Skip to content
Browse files

Default PCSC CFLAGS from pkg-config

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3650 c6295689-39f2-0310-b995-f0e70906c6a9
  • Loading branch information...
1 parent abe9112 commit dc3f8f65098bdeadc20c62f1fa32b8a3cd8e8f13 alonbl committed Feb 3, 2009
Showing with 14 additions and 9 deletions.
  1. +14 −9 configure.ac
View
23 configure.ac
@@ -547,16 +547,21 @@ if test "${enable_openct}" = "yes"; then
fi
if test "${enable_pcsc}" = "yes"; then
- AC_ARG_VAR([PCSC_CFLAGS], [C compiler flags for pcsc])
-
- case "${host}" in
- *-*-darwin*)
- test -z "${PCSC_CFLAGS}" && PCSC_CFLAGS="-I/System/Library/Frameworks/PCSC.framework/Headers"
- ;;
- esac
-
if test "${WIN32}" != "yes"; then
- test -z "${PCSC_CFLAGS}" && PCSC_CFLAGS="-I/usr/include/PCSC"
+ PKG_CHECK_EXISTS(
+ [libpcsclite],
+ [PKG_CHECK_MODULES([PCSC], [libpcsclite])]
+ )
+ if test -z "${PCSC_CFLAGS}"; then
+ case "${host}" in
+ *-*-darwin*)
+ PCSC_CFLAGS="-I/System/Library/Frameworks/PCSC.framework/Headers"
+ ;;
+ *)
+ PCSC_CFLAGS="-I/usr/include/PCSC"
+ ;;
+ esac
+ fi
fi
saved_CFLAGS="${CFLAGS}"

0 comments on commit dc3f8f6

Please sign in to comment.
Something went wrong with that request. Please try again.