File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -155,7 +155,13 @@ else ifneq ($(HAVE_RULES),)
155155 $(error invalid HAVE_RULES value '$(HAVE_RULES)')
156156endif
157157
158- HAVE_EXECINFO_H =$(shell echo -e "\x23include <execinfo.h>" | $(CXX ) -c -xc - && echo "1" || echo "0")
158+ # older make versions do not support # in $(shell) and newer ones do not handle the escape sequence right
159+ SUPPORTS_HASH =$(shell echo "#define DEF" | $(CXX ) -c -xc - && echo "1" || echo "0")
160+ ifeq ($(SUPPORTS_HASH ) ,1)
161+ HAVE_EXECINFO_H=$(shell echo "\# include <execinfo.h>" | $(CXX) -c -xc - && echo "1" || echo "0")
162+ else
163+ HAVE_EXECINFO_H=$(shell echo "\# include <execinfo.h>" | $(CXX) -c -xc - && echo "1" || echo "0")
164+ endif
159165override CPPFLAGS += -DHAVE_EXECINFO_H=$(HAVE_EXECINFO_H )
160166
161167override CXXFLAGS += $(CXXOPTS )
You can’t perform that action at this time.
0 commit comments