I have some experience with Gentoo, so I know the compiler meaning of CFLAGS, but when I try to configure https://github.com/OpenSC/pam_pkcs11 :

# ./bootstrap&&./configure&&make clean&&make&&make install
checking for winscard.h... no
configure: error: winscard.h not found, install pcsc-lite, or use PCSC_CFLAGS=... ./configure

I do have pcsc though(repo version):

# dpkg -l pcscd
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                   Version                  Architecture             Description
ii  pcscd                                  1.8.10-1ubuntu1          amd64                    Middleware to access a smart card using PC/SC (daemon side)

I don't want to install pcsc_lite though, because I have had a lot of trouble getting my smartcard reader to work and I don't really want to go through that again. That's why I'm interested in CFLAGS. Is there a way that I can point the ./compile to pcscd?

  • 1
    How did you install pcscd? unless you installed it from source, setting variables (whether PCSC_CFLAGS or the more general CFLAGS) on the ./configure command line won't help, since your system won't have the missing header file anywhere (it is provided by the libpcsclite-dev development package). – steeldriver May 18 '15 at 20:10
  • @steeldriver I installed from repo and it worked fine thanks. Please submit as an answer – Wilhelm Erasmus May 18 '15 at 21:33

Quoted from wikipedia

CFLAGS are the name of environment variables or of Makefile variables that can be set to specify additional switches to be passed to a compiler in the process of building computer software.

These variables are usually set inside a Makefile and are then appended to the command line when the compiler is invoked. If they are not specified in the Makefile, then they will be read from the environment, if present.

you can easily install it from repository not from source code

sudo apt-get install libpcsclite-dev

Not the answer you're looking for? Browse other questions tagged or ask your own question.