Skip to content
Snippets Groups Projects
Commit 5e0e2084 authored by Jan Trávníček's avatar Jan Trávníček
Browse files

fix xml2 library test

parent 2e9710c8
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,12 @@ SUBDIRS_BINS = aecho2 \
atrim2 \
tniceprint \
 
define NEW_LINE
endef
export NEW_LINE
 
ifneq (3.81, $(firstword $(sort $(MAKE_VERSION) 3.81)))
$(error version $(MAKE_VERSION) is not supported. You need at least 3.82 is needed for make to work)
......@@ -42,29 +48,16 @@ ifneq (0, $(TCLAP_EXISTS))
$(error You need tclap installed)
endif
 
CPPUNIT_EXISTS = $(shell $(CXX) -c -o /dev/null -xc++ - <<< \\\#include\ \<cppunit/Test.h\> 2>/dev/null; echo $$?)
CPPUNIT_EXISTS = $(shell $(CXX) -o /dev/null -lcppunit -xc++ - <<< $$'\#include <cppunit/Test.h>\nint main() {\nreturn 0;\n}' 2>/dev/null; echo $$?)
ifneq (0, $(CPPUNIT_EXISTS))
$(error You need cppunit installed)
endif
 
CPPUNIT_SO_TMP = $(shell ld --verbose | grep SEARCH | tr \ \\\n | sed s/SEARCH_DIR//g | sed s/\(\\\"//g | sed s/\\\"\)\\\;//g | sed s/^=//g | sort -u | sed \s/$$/\\/libcppunit.so*/g\)
CPPUNIT_SO_EXISTS = $(shell ls $(CPPUNIT_SO_TMP) 2>/dev/null | wc -l)
ifeq (0, $(CPPUNIT_SO_EXISTS))
$(error You need cppunit installed)
endif
LIBXML2_EXISTS = $(shell $(CXX) -c -o /dev/null -xc++ - <<< \\\#include\ \<libxml/xmlreader.h\> 2>/dev/null; echo $$?)
LIBXML2_EXISTS = $(shell $(CXX) -o /dev/null -lxml2 -xc++ - <<< $$'\#include <libxml/xmlreader.h>\nint main() {\nreturn 0;\n}' 2>/dev/null; echo $$?)
ifneq (0, $(LIBXML2_EXISTS))
$(error You need libxml2 installed)
endif
 
LIBXML2_SO_TMP = $(shell ld --verbose | grep SEARCH | tr \ \\\n | sed s/SEARCH_DIR//g | sed s/\(\\\"//g | sed s/\\\"\)\\\;//g | sed s/^=//g | sort -u | sed \s/$$/\\/libxml2.so*/g\)
$(info $(LIBXML2_SO_TMP))
LIBXML2_SO_EXISTS = $(shell ls $(LIBXML2_SO_TMP) 2>/dev/null | wc -l)
ifeq (0, $(LIBXML2_SO_EXISTS))
$(error You need libxml2 installed)
endif
 
SUBDIRS_WITH_MAKE = $(dir $(wildcard */makefile))
 
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment