mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
autotools: fix subdir m4 check, never let it return -I
If BDB_CPPFLAGS returns only "-I", the next argument sent to the preprocessor is treated as a path. There are 2 fixes here: 1. Check in CPPFLAGS, as a user might have manually passed a path to check. 2. Ensure the value is not empty before setting BDB_CPPFLAGS to "-I value"
This commit is contained in:
parent
2e9c8aed31
commit
c546dc05bb
@ -5,8 +5,10 @@ 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} -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 | [ tr -d '\\n\\r\\\\' | sed -e 's/^.*[[:space:]:]\(\/[^[:space:]]*\)]$3[\.h[[:space:]].*$/\1/' -e t -e d`]
|
||||||
AC_MSG_RESULT([${newinclpath}])
|
AC_MSG_RESULT([${newinclpath}])
|
||||||
|
if test "x${newinclpath}" != "x"; then
|
||||||
eval "$1=\"\$$1\"' -I${newinclpath}'"
|
eval "$1=\"\$$1\"' -I${newinclpath}'"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
])
|
])
|
||||||
|
Loading…
Reference in New Issue
Block a user