[Top][All Lists]

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

link and run a (fortran) program redirecting its stdout/stderr

From: Stefano Lattarini
Subject: link and run a (fortran) program redirecting its stdout/stderr
Date: Mon, 12 Oct 2009 21:20:04 +0200
User-agent: KMail/1.12.0 (Linux/2.6.26-1-686; KDE/4.3.0; i686; ; )


I have to compile and link a Fortran 77 test program. and then run it
redirecting its stdout/stderr (I need to do so to verify that the `stop'
builtin is silent when called without arguments -- unfortunately this is
not always the case, e.g. when using gfortran-4.0).

I thought at first to use AC_RUN_IFELSE, but it doesn't seem to offer
a way to redirect the stdout/stderr of the program it runs.

So I thought to use AC_LINK_IFELSE instead, and then run the
linked program by hand, doing the proper redirections (as well
logging to `config.log') by hand. Unfortunately, the code created
by AC_LINK_IFELSE removes the linked program (among the other
things), thus it's useless for me.

And obviously, I don't want to dive in autoconf internals, starting
to use stuff like `$ac_compile' or `ac_fn_f77_try_link' (I think the
reasons against this approach are so many and so abvious not to
require any further explanation).

So I'm stuck.  Do you have any advice about how to accompilsh my
intended purpose?  Any help would be appreciated.


reply via email to

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