Create the common location for all m4 autotool build scripts, build-aux/m4.
Update .gitignore.
This commit is contained in:
committed by
Wladimir J. van der Laan
parent
e5fc6631b9
commit
52a5f90360
14
build-aux/m4/bitcoin_subdir_to_include.m4
Normal file
14
build-aux/m4/bitcoin_subdir_to_include.m4
Normal file
@@ -0,0 +1,14 @@
|
||||
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} ${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}])
|
||||
if test "x${newinclpath}" != "x"; then
|
||||
eval "$1=\"\$$1\"' -I${newinclpath}'"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
Reference in New Issue
Block a user