bug-autoconf
[Top][All Lists]
Advanced

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

Re: AC_PROG_CC does not work correctly inside conditionals (autoconf 2.6


From: Ralf Wildenhues
Subject: Re: AC_PROG_CC does not work correctly inside conditionals (autoconf 2.61)
Date: Mon, 12 Mar 2007 16:20:07 +0100
User-agent: Mutt/1.5.14 (2007-03-03)

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

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