[libxml2] Fix windows build from lzma addition



commit 2d84ea149b448ace1576f729cd6040968625d27d
Author: Rob Richards <rrichards cdatazone org>
Date:   Wed Mar 21 10:37:06 2012 -0400

    Fix windows build from lzma addition

 win32/Makefile.msvc |    6 ++++++
 win32/configure.js  |    8 ++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/win32/Makefile.msvc b/win32/Makefile.msvc
index be47b5d..cc93372 100644
--- a/win32/Makefile.msvc
+++ b/win32/Makefile.msvc
@@ -58,6 +58,9 @@ CFLAGS = $(CFLAGS) /D "HAVE_PTHREAD_H"
 !if "$(WITH_ZLIB)" == "1"
 CFLAGS = $(CFLAGS) /D "HAVE_ZLIB_H"
 !endif
+!if "$(WITH_LZMA)" == "1"
+CFLAGS = $(CFLAGS) /D "HAVE_LZMA_H"
+!endif
 CFLAGS = $(CFLAGS) /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
 
 # The linker and its options.
@@ -79,6 +82,9 @@ LIBS = $(LIBS) icu.lib
 # LIBS = $(LIBS) zdll.lib
 LIBS = $(LIBS) zlib.lib
 !endif
+!if "$(WITH_LZMA)" == "1"
+LIBS = $(LIBS) liblzma.lib
+!endif
 !if "$(WITH_THREADS)" == "posix"
 LIBS = $(LIBS) pthreadVC.lib
 !endif
diff --git a/win32/configure.js b/win32/configure.js
index a815cbb..11d2898 100644
--- a/win32/configure.js
+++ b/win32/configure.js
@@ -43,6 +43,7 @@ var withIconv = true;
 var withIcu = false;
 var withIso8859x = false;
 var withZlib = false;
+var withLzma = false;
 var withDebug = true;
 var withMemDebug = false;
 var withRunDebug = false;
@@ -128,6 +129,7 @@ function usage()
 	txt += "  icu:        Enable icu support (" + (withIcu? "yes" : "no")  + ")\n";
 	txt += "  iso8859x:   Enable ISO8859X support (" + (withIso8859x? "yes" : "no")  + ")\n";
 	txt += "  zlib:       Enable zlib support (" + (withZlib? "yes" : "no")  + ")\n";
+	txt += "  lzma:       Enable lzma support (" + (withLzma? "yes" : "no")  + ")\n";
 	txt += "  xml_debug:  Enable XML debbugging module (" + (withDebug? "yes" : "no")  + ")\n";
 	txt += "  mem_debug:  Enable memory debugger (" + (withMemDebug? "yes" : "no")  + ")\n";
 	txt += "  run_debug:  Enable memory debugger (" + (withRunDebug? "yes" : "no")  + ")\n";
@@ -238,6 +240,7 @@ function discoverVersion()
 	vf.WriteLine("WITH_ICU=" + (withIcu? "1" : "0"));
 	vf.WriteLine("WITH_ISO8859X=" + (withIso8859x? "1" : "0"));
 	vf.WriteLine("WITH_ZLIB=" + (withZlib? "1" : "0"));
+	vf.WriteLine("WITH_LZMA=" + (withLzma? "1" : "0"));
 	vf.WriteLine("WITH_DEBUG=" + (withDebug? "1" : "0"));
 	vf.WriteLine("WITH_MEM_DEBUG=" + (withMemDebug? "1" : "0"));
 	vf.WriteLine("WITH_RUN_DEBUG=" + (withRunDebug? "1" : "0"));
@@ -328,6 +331,8 @@ function configureLibxml()
 			of.WriteLine(s.replace(/\ WITH_ISO8859X\@/, withIso8859x? "1" : "0"));
 		} else if (s.search(/\ WITH_ZLIB\@/) != -1) {
 			of.WriteLine(s.replace(/\ WITH_ZLIB\@/, withZlib? "1" : "0"));
+		} else if (s.search(/\ WITH_LZMA\@/) != -1) {
+			of.WriteLine(s.replace(/\ WITH_LZMA\@/, withLzma? "1" : "0"));
 		} else if (s.search(/\ WITH_DEBUG\@/) != -1) {
 			of.WriteLine(s.replace(/\ WITH_DEBUG\@/, withDebug? "1" : "0"));
 		} else if (s.search(/\ WITH_MEM_DEBUG\@/) != -1) {
@@ -473,6 +478,8 @@ for (i = 0; (i < WScript.Arguments.length) && (error == 0); i++) {
 			withIso8859x = strToBool(arg.substring(opt.length + 1, arg.length));
 		else if (opt == "zlib")
 			withZlib = strToBool(arg.substring(opt.length + 1, arg.length));
+		else if (opt == "lzma")
+			withLzma = strToBool(arg.substring(opt.length + 1, arg.length));
 		else if (opt == "xml_debug")
 			withDebug = strToBool(arg.substring(opt.length + 1, arg.length));
 		else if (opt == "mem_debug")
@@ -656,6 +663,7 @@ txtOut += "     iconv support: " + boolToStr(withIconv) + "\n";
 txtOut += "     icu   support: " + boolToStr(withIcu) + "\n";
 txtOut += "  iso8859x support: " + boolToStr(withIso8859x) + "\n";
 txtOut += "      zlib support: " + boolToStr(withZlib) + "\n";
+txtOut += "      lzma support: " + boolToStr(withLzma) + "\n";
 txtOut += "  Debugging module: " + boolToStr(withDebug) + "\n";
 txtOut += "  Memory debugging: " + boolToStr(withMemDebug) + "\n";
 txtOut += " Runtime debugging: " + boolToStr(withRunDebug) + "\n";



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]