From 941dba17838a1a40f5a5862eb2f84ffec511911e Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Sat, 7 Sep 2013 19:43:25 +0000 Subject: configure: Check common include subdirectories for bdb headers, and refuse to use any version other than 4.8 by default --- src/m4/bitcoin_subdir_to_include.m4 | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/m4/bitcoin_subdir_to_include.m4 (limited to 'src/m4/bitcoin_subdir_to_include.m4') diff --git a/src/m4/bitcoin_subdir_to_include.m4 b/src/m4/bitcoin_subdir_to_include.m4 new file mode 100644 index 0000000000..9b37a75ef0 --- /dev/null +++ b/src/m4/bitcoin_subdir_to_include.m4 @@ -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 +]) -- cgit v1.2.3