[PATCH 3/5] subsurface-configure.pri: add another libxml/libxslt detection stage
Lubomir I. Ivanov
neolit123 at gmail.com
Wed Oct 9 11:35:50 UTC 2013
From: "Lubomir I. Ivanov" <neolit123 at gmail.com>
libxml and libxslt use custom -config scripts which brake
qmake and make on Win32. The output of executing a .sh or .cmd
script with the same name produces garbled output. The output
of executables with the same name is untested, but a bit excessive
as a solution.
To work around the issue add another detection stage, which checks
if the previous output from (e.g.) xml2-config is empty and try
to use pkg-config instead.
Signed-off-by: Lubomir I. Ivanov <neolit123 at gmail.com>
---
subsurface-configure.pri | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/subsurface-configure.pri b/subsurface-configure.pri
index 00222da..916bbdf 100644
--- a/subsurface-configure.pri
+++ b/subsurface-configure.pri
@@ -72,7 +72,16 @@ XML2_CFLAGS = $$system(xml2-config --cflags 2>$$NUL)
XSLT_CFLAGS = $$system(xslt-config --cflags 2>$$NUL)
XML2_LIBS = $$system(xml2-config --libs 2>$$NUL)
XSLT_LIBS = $$system(xslt-config --libs 2>$$NUL)
+
link_pkgconfig {
+ isEmpty(XML2_CFLAGS)|isEmpty(XML2_LIBS) {
+ XML2_CFLAGS = $$system(pkg-config --cflags libxml2 2> $$NUL)
+ XML2_LIBS = $$system(pkg-config --libs libxml2 2> $$NUL)
+ }
+ isEmpty(XSLT_CFLAGS)|isEmpty(XSLT_LIBS) {
+ XSLT_CFLAGS = $$system(pkg-config --cflags libxslt 2> $$NUL)
+ XSLT_LIBS = $$system(pkg-config --libs libxslt 2> $$NUL)
+ }
isEmpty(XML2_CFLAGS)|isEmpty(XML2_LIBS): \
error("Could not find libxml2. Did you forget to install it?")
isEmpty(XSLT_CFLAGS)|isEmpty(XSLT_LIBS): \
--
1.7.11.msysgit.0
More information about the subsurface
mailing list