Fix version parsing in win32/configure.js
Adjust to configure.ac changes.
Should fix #185.
diff --git a/win32/configure.js b/win32/configure.js
index e2ab31d..3d407b8 100644
--- a/win32/configure.js
+++ b/win32/configure.js
@@ -208,15 +208,15 @@
while (cf.AtEndOfStream != true) {
ln = cf.ReadLine();
s = new String(ln);
- if (s.search(/^LIBXML_MAJOR_VERSION=/) != -1) {
- vf.WriteLine(s);
- verMajor = s.substring(s.indexOf("=") + 1, s.length);
- } else if(s.search(/^LIBXML_MINOR_VERSION=/) != -1) {
- vf.WriteLine(s);
- verMinor = s.substring(s.indexOf("=") + 1, s.length);
- } else if(s.search(/^LIBXML_MICRO_VERSION=/) != -1) {
- vf.WriteLine(s);
- verMicro = s.substring(s.indexOf("=") + 1, s.length);
+ if (m = s.match(/^m4_define\(\[MAJOR_VERSION\], (\w+)\)/)) {
+ vf.WriteLine("LIBXSLT_MAJOR_VERSION=" + m[1]);
+ verMajor = m[1];
+ } else if(m = s.match(/^m4_define\(\[MINOR_VERSION\], (\w+)\)/)) {
+ vf.WriteLine("LIBXSLT_MINOR_VERSION=" + m[1]);
+ verMinor = m[1];
+ } else if(m = s.match(/^m4_define\(\[MICRO_VERSION\], (\w+)\)/)) {
+ vf.WriteLine("LIBXSLT_MICRO_VERSION=" + m[1]);
+ verMicro = m[1];
} else if(s.search(/^LIBXML_MICRO_VERSION_SUFFIX=/) != -1) {
vf.WriteLine(s);
verMicroSuffix = s.substring(s.indexOf("=") + 1, s.length);