Invoking executables and AC_TRY_RUN

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

 



Hi,

When the AC_TRY_RUN macro runs a program, it invokes it with the simple 
command
./a.out
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
    else
      ./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



_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux