From d63327469bdc80e4fcd3a914d626fbeabe6d4d1b Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Thu, 10 Oct 2013 01:18:50 +0300 Subject: subsurface-configure.pri: add another libxml/libxslt detection stage 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 Signed-off-by: Dirk Hohndel --- subsurface-configure.pri | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'subsurface-configure.pri') diff --git a/subsurface-configure.pri b/subsurface-configure.pri index 32d2d1685..043384800 100644 --- a/subsurface-configure.pri +++ b/subsurface-configure.pri @@ -73,7 +73,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): \ -- cgit v1.2.3-70-g09d2