16.4.1 Testing C++ Implementations with Autoconf
Of the GNU Autotools, perhaps the most valuable contribution to the
portability of your C++ programs will come from Autoconf. All of the
portability issues raised in 16.2 Changeable C++ can be detected using
Autoconf macros.
Luc Maisonobe has written a large suite of macros for this purpose and
they can be found in the Autoconf macro archive (see section 23.5.1 Autoconf macro archive). If any of these macros become important enough, they may
become incorporated into the core Autoconf release. These macros
perform their tests by compiling small fragments of C++ code to ensure
that the compiler accepts them. As a side effect, these macros
typically use AC_DEFINE to define preprocessor macros of the form
HAVE_feature , which may then be exploited through conditional
compilation.
|