Hello, I just tried to use gpgpcsc from [1]. I propose this patch to make it compile under GNU/Linux (Debian Lenny in my case)
This patch will correct different problems: - do not hardcode the path for includes and libs but use pkg-config instead - use " instead of ' in Makefile variables to allow arguments expansion and use of back quote - use SCARD_SCOPE_SYSTEM instead of SCARD_SCOPE_GLOBAL since SCARD_SCOPE_SYSTEM is not defined by pcsc-lite - use an unsigned type for state used in SCardStatus. The patch works for me. Please apply it to the CVS code. Regards, [1] http://gprolog.cvs.sourceforge.net/gprolog/contribs/gplpcsc/ -- Dr. Ludovic Rousseau
? testapdu Index: Makefile =================================================================== RCS file: /cvsroot/gprolog/contribs/gplpcsc/Makefile,v retrieving revision 1.2 diff -r1.2 Makefile 1,2c1,2 < MUSCLE_HDRS = -I/usr/local/include < MUSCLE_LIBS = -L/usr/local/lib -lpcsclite -lcrypto -lpthread --- > MUSCLE_HDRS = `pkg-config --cflags libpcsclite` > MUSCLE_LIBS = `pkg-config --libs libpcsclite` -lcrypto -lpthread 4,5c4,5 < CFLAGS='-Wall -g $(MUSCLE_HDRS)' < LFLAGS='$(MUSCLE_LIBS)' --- > CFLAGS="-Wall -g $(MUSCLE_HDRS)" > LFLAGS="$(MUSCLE_LIBS)" Index: pcsc/muscle_c.c =================================================================== RCS file: /cvsroot/gprolog/contribs/gplpcsc/pcsc/muscle_c.c,v retrieving revision 1.1.1.1 diff -r1.1.1.1 muscle_c.c 35c35 < rv = SCardEstablishContext( SCARD_SCOPE_GLOBAL, pcHost, NULL, hContext ); --- > rv = SCardEstablishContext( SCARD_SCOPE_SYSTEM, pcHost, NULL, hContext > ); 128c128 < scard_status_C(long hCard, long* state, PlTerm atrL) --- > scard_status_C(long hCard, unsigned long* state, PlTerm atrL)
_______________________________________________ Users-prolog mailing list [email protected] http://lists.gnu.org/mailman/listinfo/users-prolog
