Boost and Autoconf

AC_CHECK_HEADERS actually does a a compile check, not an existence check. So you have to set C++ support for compilation tests in order for boost headers to compile (default is C, docs here):

AC_LANG_PUSH([C++])
AC_CHECK_HEADERS([boost/foreach.hpp], [],
    [AC_MSG_ERROR(You need the Boost libraries.)])
AC_LANG_POP([C++])

There's also a collection of Boost autoconf macros at the GNU Autoconf Archive. You'll probably need at least AX_BOOST_BASE. Other macros for the other Boost libs are there also.