You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
602 B
15 lines
602 B
11 years ago
|
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
|
||
11 years ago
|
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`]
|
||
11 years ago
|
AC_MSG_RESULT([${newinclpath}])
|
||
11 years ago
|
if test "x${newinclpath}" != "x"; then
|
||
|
eval "$1=\"\$$1\"' -I${newinclpath}'"
|
||
|
fi
|
||
11 years ago
|
fi
|
||
|
])
|