[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Invoking executables and AC_TRY_RUN

From: James Laird
Subject: Invoking executables and AC_TRY_RUN
Date: Tue, 28 Mar 2006 11:50:53 -0600 (CST)


When the AC_TRY_RUN macro runs a program, it invokes it with the simple 
When cross-compiling, obviously, this test will fail or produce output 
that isn't correct for the target platform.

However, on some multiprocessor machines with a separate execution node, 
it's possible to run test executables if they're preceded by a special 
invocation command.  For instance,
yod ./a.out
will run and produce informative results.

For our automated tests, we set a value we call RUNSERIAL to invoke each 
test (using either a homebrew invocation or automake's TEST_ENVIRONMENT 
variable).  It would be great if we could do the same thing in configure.

For instance, wedging a script that looks a little like this pseudocode:

    if [ $RUNSERIAL != "" ]; then
      $RUNSERIAL ./conftest

in the AC_RUN_IFELSE macro would let us run tests on these 
strange platforms without needing to edit the configure script ourselves.

I suspect that the "proper" autoconf answer is that we should run these
tests at build-time rather than at configure time.  I would argue that
this isn't exactly the cross-compiling case, because we really do have the
target machine present.  We just need to feed it the executables in the
correct way.  Also, it would take a lot of effort to port all of these 
tests from configure. :)

James Laird
Configuration and Build Support, HDF5

reply via email to

[Prev in Thread] Current Thread [Next in Thread]