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 <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Lubomir I. Ivanov 2013-10-10 01:18:50 +03:00 committed by Dirk Hohndel
parent 19c62bc509
commit d63327469b

View file

@ -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): \