* John Wohlbier wrote on Mon, Mar 02, 2009 at 04:51:27AM CET: > m4_define([AT_MPIRUN_PROGRAM], > [echo "$MPI_LIBS" > AS_IF([test -n "$MPI_LIBS"], > [AT_BANNER([executing mpirun -n $2 $1]) > AT_TESTED([$1]) > AT_SETUP([$1]) > AT_CHECK([mpirun -n $2 $1],[0],[ignore],[ignore]) > AT_CLEANUP]) > ]) > > I don't see results from the "echo" in any of the resulting files. Thus I > have no way of knowing if the AS_IF should even work since I don't know the > value of MPI_LIBS.
Ah, another specialty of Autotest. Shell code not enclosed in AT_SETUP/ AT_CLEANUP is pretty much dropped on the floor. I.e., the banners and the number of tests that a testsuite contains as a whole, is a constant determined at the time the testsuite is created. I guess you want something like this instead: m4_define([AT_MPIRUN_PROGRAM], [AT_BANNER([executing mpirun -n $2 $1]) AT_SETUP([$1]) echo foo "$MPI_LIBS" AS_IF([test -n "$MPI_LIBS"], [AT_CHECK([mpirun -n $2 $1],[0],[ignore],[ignore])]) AT_CLEANUP ]) but that will warn if no AT_CHECK is executed during the test. So: m4_define([AT_MPIRUN_PROGRAM], [AT_BANNER([executing mpirun -n $2 $1]) AT_SETUP([$1]) AT_CHECK([test -n "$MPI_LIBS" || exit 77]) AT_CHECK([mpirun -n $2 $1],[0],[ignore],[ignore]) AT_CLEANUP ]) Hope that helps. Cheers, Ralf _______________________________________________ Autoconf mailing list Autoconf@gnu.org http://lists.gnu.org/mailman/listinfo/autoconf