autoconf: Writing Tests

1 
1 6 Writing Tests
1 ***************
1 
1 If the existing feature tests don't do something you need, you have to
1 write new ones.  These macros are the building blocks.  They provide
1 ways for other macros to check whether various kinds of features are
1 available and report the results.
1 
1    This chapter contains some suggestions and some of the reasons why
1 the existing tests are written the way they are.  You can also learn a
1 lot about how to write Autoconf tests by looking at the existing ones.
1 If something goes wrong in one or more of the Autoconf tests, this
1 information can help you understand the assumptions behind them, which
1 might help you figure out how to best solve the problem.
1 
1    These macros check the output of the compiler system of the current
1 language (⇒Language Choice).  They do not cache the results of
1 their tests for future use (⇒Caching Results), because they don't
1 know enough about the information they are checking for to generate a
1 cache variable name.  They also do not print any messages, for the same
1 reason.  The checks for particular kinds of features call these macros
1 and do cache their results and print messages about what they're
1 checking for.
1 
1    When you write a feature test that could be applicable to more than
1 one software package, the best thing to do is encapsulate it in a new
1 macro.  ⇒Writing Autoconf Macros, for how to do that.
1 

Menu