Attached are changes to the win32/Make.rules.mak and
src/libopensc/Makefile.mak to add in the support to compile on Windows
with or without zlib This is similar to method used with OpenSSL already
in the these files. Previous code submissions include the
#ifdef HAVE_ZLIB_H in the source files.

I have compiled with VC 2005 and run on XP with and without zlib, and
the card-piv.c code acts as expected, only able to read a compressed
certificate if compiled with zlib.

(This should also work with the SCB make process, but I did not try it.)

So I hope I have addressed your concerns about being able to
compile with and without zlib on any platform


Thanks.

Douglas E. Engert wrote:
More in Windows and zlib.

Looking at the SCB trunk/Makefile.mak, lines 81-83:

perl -p -e "s/#ZLIB_DEF/ZLIB_DEF/g" -i~ win32\Make.rules.mak
perl -p -e "s/C:\\ZLIB\\INCLUDE/$(DESTP)\\include/g" -i~ win32\Make.rules.mak
perl -p -e "s/C:\\ZLIB\\LIB/$(DESTP)\\lib/g" -i~ win32\Make.rules.mak

I don't see these targets lines in the OpenSC win32\Make.rules/mak

Was there some uncommited change to OpenSC used to build the SCB?
I assume it looks similar to the  OPENSSL_DEF lines in Make.rules.mak.






--

 Douglas E. Engert  <[EMAIL PROTECTED]>
 Argonne National Laboratory
 9700 South Cass Avenue
 Argonne, Illinois  60439
 (630) 252-5444
Index: win32/Make.rules.mak
===================================================================
--- win32/Make.rules.mak	(revision 3124)
+++ win32/Make.rules.mak	(working copy)
@@ -21,7 +21,19 @@
 PROGRAMS_OPENSSL = pkcs15-init.exe cryptoflex-tool.exe netkey-tool.exe
 !ENDIF
 
-COPTS = /D_CRT_SECURE_NO_DEPRECATE /Zi /MD /nologo /DHAVE_CONFIG_H /I$(TOPDIR)\src\include /I$(TOPDIR)\src\include\opensc /I$(TOPDIR)\src\common $(OPENSSL_INCL_DIR) $(LIBLTDL_INCL) /D_WIN32_WINNT=0x0400 $(OPENSSL_DEF)
+# If you want support for zlib (Used for PIV, infocamere and actalis:
+# - Download zlib and build
+# - uncomment the line starting with ZLIB_DEF 
+# - set the ZLIB_INCL_DIR below to the zlib include lib proceeded by "/I"
+# - set the ZLIB_LIB  below to your zlib lib file
+#ZLIB_DEF = /DHAVE_ZLIB_H
+!IF "$(ZLIB_DEF)" == "/DHAVE_ZLIB_H"
+ZLIB_INCL_DIR = /IC:\ZLIB\INCLUDE
+ZLIB_LIB = C:\ZLIB\LIB\zlib.lib 
+!ENDIF
+
+
+COPTS = /D_CRT_SECURE_NO_DEPRECATE /Zi /MD /nologo /DHAVE_CONFIG_H /I$(TOPDIR)\src\include /I$(TOPDIR)\src\include\opensc /I$(TOPDIR)\src\common $(OPENSSL_INCL_DIR) $(ZLIB_INCL_DIR) $(LIBLTDL_INCL) /D_WIN32_WINNT=0x0400 $(OPENSSL_DEF) $(ZLIB_DEF)
 LINKFLAGS = /DEBUG /NOLOGO /INCREMENTAL:NO /MACHINE:IX86
 
 
Index: src/libopensc/Makefile.mak
===================================================================
--- src/libopensc/Makefile.mak	(revision 3124)
+++ src/libopensc/Makefile.mak	(working copy)
@@ -29,6 +29,7 @@
 	card-oberthur.obj card-belpic.obj card-atrust-acos.obj \
 	card-incrypto34.obj card-piv.obj\
 	muscle.obj card-muscle.obj muscle-filesystem.obj \
+	compression.obj p15card-helper.obj \
 	\
 	pkcs15-openpgp.obj pkcs15-infocamere.obj pkcs15-starcert.obj \
 	pkcs15-tcos.obj pkcs15-esteid.obj pkcs15-postecert.obj \
@@ -43,5 +44,5 @@
 
 $(TARGET): $(OBJECTS) ..\scconf\scconf.lib ..\common\common.lib
 	perl $(TOPDIR)\win32\makedef.pl $*.def $* $(OBJECTS)
-	link $(LINKFLAGS) /dll /def:$*.def /implib:$*.lib /out:$(TARGET) $(OBJECTS) ..\scconf\scconf.lib ..\common\common.lib winscard.lib $(OPENSSL_LIB) gdi32.lib $(LIBLTDL_LIB) advapi32.lib ws2_32.lib
+	link $(LINKFLAGS) /dll /def:$*.def /implib:$*.lib /out:$(TARGET) $(OBJECTS) ..\scconf\scconf.lib ..\common\common.lib winscard.lib $(OPENSSL_LIB) $(ZLIB_LIB) gdi32.lib $(LIBLTDL_LIB) advapi32.lib ws2_32.lib
 	if EXIST $(TARGET).manifest mt -manifest $(TARGET).manifest -outputresource:$(TARGET);2
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to