5.5. Using Configuration Names

Although feature tests are definitely the best approach, a 'configure' script may occasionally have to make a decision based on a configuration name. This may be necessary if certain code must be compiled differently based on something that cannot be tested using a standard Autoconf feature test. For instance, the expect package needs to find information about the system's 'tty' implementation; this can't reliably be done when cross-compiling without examining the particular configuration name.

It is normally better to test for particular features rather than to test for a particular system type. This is because as Unix and other operating systems evolve, different systems copy features from one another.

When there ...

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.