1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT([pam_pcsc_cr], 0.0.1)
4 AC_CONFIG_SRCDIR([pam_pcsc_cr.c])
5 AC_CONFIG_MACRO_DIR([m4])
7 AM_CONFIG_HEADER([config.h])
11 if test "X$CC" = "Xgcc"; then
12 CFLAGS="$CFLAGS -Wall -g"
22 PKG_CHECK_MODULES([PCSC], [libpcsclite])
23 AC_ARG_WITH(pcsclite-include-path,
24 [ --with-pcsclite-include-path=PATH path to pcsclite includes],
25 [PCSC_CFLAGS="-I $withval"],
27 AC_ARG_WITH(pcsclite-lib-path,
28 [ --with-pcsclite-lib-path=PATH path to pcsclite libs],
29 [PCSC_LIBS="-L $withval -lpcsclite"],
34 CFLAGS="$PCSC_CFLAGS $CFLAGS"
35 LIBS="$PCSC_LIBS $LIBS"
39 dnl Checks for header files.
43 AC_CHECK_HEADERS([winscard.h reader.h], [],
44 [AC_MSG_ERROR([[pcsclite headers not found]])])
45 AC_CHECK_LIB([pcsclite], [SCardEstablishContext], [],
46 [AC_MSG_ERROR([[pcsclite library not useable]])])
48 AC_CONFIG_FILES([Makefile])