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: Andreas Kabel
Subject: Re: AC_PROG_CC does not work correctly inside conditionals (autoconf 2.61)
Date: Mon, 12 Mar 2007 10:43:20 -0700
User-agent: Netscape/7.0 (compatible;MSIE 6.0; Windows 98)

Ralf Wildenhues wrote:
> Hello Andreas,
> 
> Please keep the mailing list in Cc:, thanks.
> 
OK, fixed.

> * 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]]
> 

Yes, that's the workaround I came up with as well.

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

Will do. Thanks,

        Andreas


> 
> Cheers,
> Ralf





reply via email to

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