There is an excellent boost.m4 macro, which you can include in your project in the m4 subdirectory. These macros are located with AC_CONFIG_MACRO_DIR([m4]) in configure.ac .
Add ACLOCAL_AMFLAGS = -I m4 --install to the top level Makefile.am used by automake .
This is why it is such a good macro:
BOOST_REQUIRE([1.54],[ACTION-IF-NOT-FOUND])
This will define BOOST_CPPFLAGS , which you can add to CPPFLAGS , use in AC_SUBST , etc.
For individual Boost components, you can specify debug assemblies, static assemblies, etc. But the most typical (usually) multithreaded dynamic libraries, for example,
BOOST_FILESYSTEM([mt])
will define BOOST_FILESYSTEM_LIBS and BOOST_FILESYSTEM_LDFLAGS . As another bonus, if a library uses, say, Boost.System, then these library dependencies are automatically added to LIBS , LDFLAGS , etc.
You should simply indicate that a Boost installation is required, rather than trying to distribute it. It is easy to build and install from the source or from precompiled packages. The first one takes a lot of time, but it is best to have an โoptimizedโ build in the system. There is a lot of software that can use the (robust and optimized) Boost implementation.
Then use the BOOST_REQUIRE error message if no version is available.
source share