diff --git a/makefile b/makefile index 901c4a0edf250c93d0a22b740a02601f775ac3d4..a86e54808405b297bc9a4d4cc3e9eed5c5de48a5 100644 --- a/makefile +++ b/makefile @@ -31,10 +31,16 @@ ifneq (0, $(TCLAP_EXISTS)) $(error You need tclap installed) endif -TCLAP_EXISTS = $(shell g++ -c -o /dev/null -xc++ - <<< \\\#include\ \<cppunit/Test.h\> 2>/dev/null; echo $$?) -ifneq (0, $(TCLAP_EXISTS)) -$(error You need tclap installed) +CPPUNIT_EXISTS = $(shell g++ -c -o /dev/null -xc++ - <<< \\\#include\ \<cppunit/Test.h\> 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\(\"\\\(.*\\\)\"\)\;/\\\1/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 + SUBDIRS_WITH_MAKE = $(dir $(wildcard */makefile))