X-Git-Url: http://www.average.org/gitweb/?p=pam_pcsc_cr.git;a=blobdiff_plain;f=configure.ac;fp=configure.ac;h=28632b2ea58dc8b1bfc92ef98cdc2b160ad7f937;hp=0000000000000000000000000000000000000000;hb=4f3247d992b2d4152da0ebc0daf828c874e0b1f1;hpb=0894042d90da9c8ad0d03e875c727442e778a7d6 diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..28632b2 --- /dev/null +++ b/configure.ac @@ -0,0 +1,45 @@ +dnl Process this file with autoconf to produce a configure script. + +AC_INIT([pam_pcsc_cr], 0.0.1) +AC_CONFIG_SRCDIR([pam_pcsc_cr.c]) +AC_CONFIG_MACRO_DIR([m4]) +AM_INIT_AUTOMAKE +AM_CONFIG_HEADER([config.h]) +AC_LANG_C +AC_PROG_CC + +if test "X$CC" = "Xgcc"; then + CFLAGS="$CFLAGS -Wall -g" +fi + +AC_PROG_MAKE_SET +AC_SUBST(PROGS)dnl +AC_SUBST(LIBPROGS)dnl +AC_PROG_INSTALL +AM_PROG_LIBTOOL +PKG_PROG_PKG_CONFIG + +PKG_CHECK_MODULES([PCSC], [pcsclite]) +AC_ARG_WITH(pcsc-include-path, + [ --with-pcsc-include-path=PATH path to pcsclite includes], + [PCSC_CFLAGS="-I $withval"], + []) +AC_ARG_WITH(pcsc-lib-path, + [ --with-pcsc-lib-path=PATH path to pcsclite libs], + [PCSC_LIBS="-L $withval -lpcsclite"], + []) + +AC_SUBST(PCSC_LIBS) +AC_SUBST(PCSC_CFLAGS) + +dnl Checks for header files. +AC_HEADER_STDC +AC_HEADER_TIME + +AC_CHECK_LIB(libpcsclite, SCardEstablishContext) +if test x$ac_cv_lib_SCardEstablishContext != xyes; then + AC_MSG_ERROR([Cannot find usable libpcsclite]) +fi + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT