Use the following macro if you need to test run-time behavior of the system while configuring.
If the C compiler being used does not produce executables that run on
the system where
configure is being run, then the test program is
not run. If the optional shell commands action-if-cross-compiling
are given, they are run instead. Otherwise,
an error message and exits.
Try to provide a pessimistic default value to use when cross-compiling
makes run-time tests impossible. You do this by passing the optional
last argument to
autoconf prints a warning
message when creating
configure each time it encounters a call to
AC_TRY_RUN with no action-if-cross-compiling argument
given. You may ignore the warning, though users will not be able to
configure your package for cross-compiling. A few of the macros
distributed with Autoconf produce this warning message.
To configure for cross-compiling you can also choose a value for those parameters based on the canonical system name (see section Manual Configuration). Alternatively, set up a test results cache file with the correct values for the target system (see section Caching Results).
To provide a default for calls of
AC_TRY_RUN that are embedded in
other macros, including a few of the ones that come with Autoconf, you
AC_PROG_CC before running them. Then, if the shell
cross_compiling is set to `yes', use an alternate
method to get the results instead of calling the macros.
Go to the first, previous, next, last section, table of contents.