configure: Check common include subdirectories for bdb headers, and refuse to use any version other than 4.8 by default

This commit is contained in:
Luke Dashjr
2013-09-07 19:43:25 +00:00
parent b4d8d03b86
commit 941dba1783
5 changed files with 86 additions and 2 deletions

View File

@@ -0,0 +1,12 @@
dnl BITCOIN_SUBDIR_TO_INCLUDE([CPPFLAGS-VARIABLE-NAME],[SUBDIRECTORY-NAME],[HEADER-FILE])
dnl SUBDIRECTORY-NAME must end with a path separator
AC_DEFUN([BITCOIN_SUBDIR_TO_INCLUDE],[
if test "x$2" = "x"; then
AC_MSG_RESULT([default])
else
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`]
AC_MSG_RESULT([${newinclpath}])
eval "$1=\"\$$1\"' -I${newinclpath}'"
fi
])