mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-28 04:52:36 +02:00
configure: BITCOIN_SUBDIR_TO_INCLUDE: Improve compatibility with paths including space and multiline cpp output
This commit is contained in:
parent
c006ab29ce
commit
f93e7c0e10
@ -9,7 +9,7 @@ AC_DEFUN([BITCOIN_SUBDIR_TO_INCLUDE],[
|
|||||||
AC_MSG_RESULT([default])
|
AC_MSG_RESULT([default])
|
||||||
else
|
else
|
||||||
echo "#include <$2$3.h>" >conftest.cpp
|
echo "#include <$2$3.h>" >conftest.cpp
|
||||||
newinclpath=`${CXXCPP} ${CPPFLAGS} -M conftest.cpp 2>/dev/null | [ tr -d '\\n\\r\\\\' | sed -e 's/^.*[[:space:]:]\(\/[^[:space:]]*\)]$3[\.h[[:space:]].*$/\1/' -e t -e d`]
|
newinclpath=$(${CXXCPP} ${CPPFLAGS} -M conftest.cpp 2>/dev/null | sed [-E -e ':a' -e '/\\$/!b b' -e N -e 's/\\\n/ /' -e 't a' -e ':b' -e 's/^[^:]*:[[:space:]]*(([^[:space:]\]|\\.)*[[:space:]])*(([^[:space:]\]|\\.)*)]$3\.h[([[:space:]].*)?$/\3/' -e 't' -e d])
|
||||||
AC_MSG_RESULT([${newinclpath}])
|
AC_MSG_RESULT([${newinclpath}])
|
||||||
if test "${newinclpath}" != ""; then
|
if test "${newinclpath}" != ""; then
|
||||||
eval "$1=\"\$$1\"' -I${newinclpath}'"
|
eval "$1=\"\$$1\"' -I${newinclpath}'"
|
||||||
|
Loading…
Reference in New Issue
Block a user