[libxml2] Add xptr_locs flag to win32/configure.js



commit e08d8c37f596fd254520361d65306e17c9e4b053
Author: Joey Arhar <jarhar chromium org>
Date:   Fri May 6 10:17:57 2022 -0700

    Add xptr_locs flag to win32/configure.js
    
    The xptr_locs flag was added in commit 67070107 but no flag was added to
    win32/configure.js, leading a compile error I had on windows where the
    @WITH_XPTR_LOCS@ macro was not replaced properly on windows.

 win32/configure.js | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/win32/configure.js b/win32/configure.js
index e98df081..84994284 100644
--- a/win32/configure.js
+++ b/win32/configure.js
@@ -37,6 +37,7 @@ var withC14n = true;
 var withCatalog = true;
 var withXpath = true;
 var withXptr = true;
+var withXptrLocs = false;
 var withXinclude = true;
 var withIconv = true;
 var withIcu = false;
@@ -122,6 +123,7 @@ function usage()
        txt += "  catalog:    Enable catalog support (" + (withCatalog? "yes" : "no")  + ")\n";
        txt += "  xpath:      Enable XPath support (" + (withXpath? "yes" : "no")  + ")\n";
        txt += "  xptr:       Enable XPointer support (" + (withXptr? "yes" : "no")  + ")\n";
+       txt += "  xptr_locs:  Enable XPointer locs support (" + (withXptrLocs? "yes" : "no")  + ")\n";
        txt += "  xinclude:   Enable XInclude support (" + (withXinclude? "yes" : "no")  + ")\n";
        txt += "  iconv:      Enable iconv support (" + (withIconv? "yes" : "no")  + ")\n";
        txt += "  icu:        Enable icu support (" + (withIcu? "yes" : "no")  + ")\n";
@@ -218,6 +220,7 @@ function discoverVersion()
        vf.WriteLine("WITH_CATALOG=" + (withCatalog? "1" : "0"));
        vf.WriteLine("WITH_XPATH=" + (withXpath? "1" : "0"));
        vf.WriteLine("WITH_XPTR=" + (withXptr? "1" : "0"));
+       vf.WriteLine("WITH_XPTR_LOCS=" + (withXptrLocs? "1" : "0"));
        vf.WriteLine("WITH_XINCLUDE=" + (withXinclude? "1" : "0"));
        vf.WriteLine("WITH_ICONV=" + (withIconv? "1" : "0"));
        vf.WriteLine("WITH_ICU=" + (withIcu? "1" : "0"));
@@ -316,6 +319,8 @@ function configureLibxml()
                        of.WriteLine(s.replace(/\@WITH_XPATH\@/, withXpath? "1" : "0"));
                } else if (s.search(/\@WITH_XPTR\@/) != -1) {
                        of.WriteLine(s.replace(/\@WITH_XPTR\@/, withXptr? "1" : "0"));
+               } else if (s.search(/\@WITH_XPTR_LOCS\@/) != -1) {
+                       of.WriteLine(s.replace(/\@WITH_XPTR_LOCS\@/, withXptrLocs? "1" : "0"));
                } else if (s.search(/\@WITH_XINCLUDE\@/) != -1) {
                        of.WriteLine(s.replace(/\@WITH_XINCLUDE\@/, withXinclude? "1" : "0"));
                } else if (s.search(/\@WITH_ICONV\@/) != -1) {
@@ -469,6 +474,8 @@ for (i = 0; (i < WScript.Arguments.length) && (error == 0); i++) {
                        withXpath = strToBool(arg.substring(opt.length + 1, arg.length));
                else if (opt == "xptr")
                        withXptr = strToBool(arg.substring(opt.length + 1, arg.length));
+               else if (opt == "xptr_locs")
+                       withXptrLocs = strToBool(arg.substring(opt.length + 1, arg.length));
                else if (opt == "xinclude")
                        withXinclude = strToBool(arg.substring(opt.length + 1, arg.length));
                else if (opt == "iconv")
@@ -656,6 +663,7 @@ txtOut += "      C14N support: " + boolToStr(withC14n) + "\n";
 txtOut += "   Catalog support: " + boolToStr(withCatalog) + "\n";
 txtOut += "     XPath support: " + boolToStr(withXpath) + "\n";
 txtOut += "  XPointer support: " + boolToStr(withXptr) + "\n";
+txtOut += "     XPointer locs: " + boolToStr(withXptrLocs) + "\n";
 txtOut += "  XInclude support: " + boolToStr(withXinclude) + "\n";
 txtOut += "     iconv support: " + boolToStr(withIconv) + "\n";
 txtOut += "     icu   support: " + boolToStr(withIcu) + "\n";


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