Hello Andreas,

Please keep the mailing list in Cc:, thanks.

* Andreas Kabel wrote on Mon, Mar 12, 2007 at 04:12:58PM CET:
> Ralf Wildenhues wrote:
> >
> >But say, what's the reason you want to call this conditionally?
> >Your package may or may not use a compiler?
> 
> I need to make a case distinction -- depending on whether or not
> multi-processor support is enabled (./configure --enable-mpi), I need to 
> go through  different sets of compilers (e.g., pathCC and g++ for 
> single-processor, mpiCC and mpCC for multi-processor); so my original 
> configure.ac looked something like
> 
> if test "$mpidisabled" = "yes"; then
>       AC_PROG_CC([pathCC xlC g++])
> else
>       AC_PROG_CC([mpiCC mpixlC])
> fi

Try this:
 
if test "$mpidisabled" = "yes"; then
        list_of_compilers="pathCC xlC g++"
else
        list_of_compilers="mpiCC mpixlC"
fi
AC_PROG_CC([$list_of_compilers]]

Also, you could consider the ACX_MPI module from the Autoconf Macro
Archive for MPI compilers and associated changes.

Cheers,
Ralf


Reply via email to