14659 |
@node Present But Cannot Be Compiled |
@node Present But Cannot Be Compiled |
14660 |
@section Header Present But Cannot Be Compiled |
@section Header Present But Cannot Be Compiled |
14661 |
|
|
14662 |
The most important guideline to bare in mind when checking for |
The most important guideline to bear in mind when checking for |
14663 |
features is to mock as much as possible the intended use. |
features is to mimic as much as possible the intended use. |
14664 |
Unfortunately, old versions of @code{AC_CHECK_HEADER} and |
Unfortunately, old versions of @code{AC_CHECK_HEADER} and |
14665 |
@code{AC_CHECK_HEADERS} failed to follow this idea, and used to call |
@code{AC_CHECK_HEADERS} failed to follow this idea, and called |
14666 |
the preprocessor, instead of the compiler, to check for headers. As a |
the preprocessor, instead of the compiler, to check for headers. As a |
14667 |
result, incompatibilities between headers went unnoticed during |
result, incompatibilities between headers went unnoticed during |
14668 |
configuration, and maintainers finally had to deal with this issue |
configuration, and maintainers finally had to deal with this issue |
14669 |
elsewhere. |
elsewhere. |
14670 |
|
|
14671 |
Since Autoconf 2.56 both checks are performed, and @code{configure} |
As of Autoconf 2.56 both checks are performed, and @code{configure} |
14672 |
complains loudly if the compiler and the preprocessor do not agree. |
complains loudly if the compiler and the preprocessor do not agree. |
14673 |
For the time being the result is that of the preprocessor, so that |
For the time being the result used is that of the preprocessor, to give |
14674 |
maintainers can adjust their @file{configure.ac}, but in the near |
maintainers time to adjust their @file{configure.ac}, but in the near |
14675 |
future, the compiler only will be considered. |
future, only the compiler will be considered. |
14676 |
|
|
14677 |
Consider the following example: |
Consider the following example: |
14678 |
|
|