22.3.2. Testing System Features at Application Runtime

When pondering how to handle a difficult portability problem or configurable option, consider whether the problem is better solved by performing tests at runtime or by providing a configuration file to customize the application. Keep in mind that the results of tests that Autoconf can perform ultimately affect how the program will be built (and can limit the number of machines that the program can be moved to without recompiling it). In the following example, this consideration had to be made in a real-life project:

The pthreads for Win32 project has sought to provide a standards-compliant implementation for the POSIX threads API. It does so by mapping the POSIX API functions into small functions ...

Get GNU Autoconf, Automake, and Libtool now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.