[mpich-devel] overzealous F90/F90FLAGS error

Jeff Hammond jeff.science at gmail.com
Tue Jan 13 10:53:35 CST 2015


On Tue, Jan 13, 2015 at 8:50 AM, Dave Goodell (dgoodell)
<dgoodell at cisco.com> wrote:
> On Jan 13, 2015, at 10:20 AM, Jeff Hammond <jeff.science at gmail.com> wrote:
>
>> I understand that configure is trying to help the user do the right
>> thing (set FC and FCFLAGS), but this is the wrong way to do it.
>>
>> This is the code that I would like to see removed:
>>
>> # Since F90/F90FLAGS are replaced by FC/FCFLAGS, rather than silently
>> # substituting them, i.e. FC=$F90 and FCFLAGS=$F90FLAGS, we choose to emit
>> # an error message and abort to avoid any ambiguous/hidden bug in choosing
>> # Fortran90 compilers.
>> if test -n "$F90" -o -n "$F90FLAGS" ; then
>>    AC_MSG_ERROR([F90 and F90FLAGS are replaced by FC and FCFLAGS
>> respectively in this configure, please unset F90/F90FLAGS and set
>> FC/FCFLAGS instead and rerun configure again.])
>> fi
>
> Rather than remove this code altogether, it might be better to change the logic to complain more like this (untested):
>
> if test -n "$F90" && test "x$F90" != "x$FC" ; then
>     AC_MSG_ERROR([F90 set but not equal to FC.  This is almost certainly a mistake.  Either unset F90 or set F90="$FC"])
> elif test -n "$F90FLAGS" && test "x$F90FLAGS" != "x$FCFLAGS" ; then
>     AC_MSG_ERROR([F90FLAGS set but not equal to FCFLAGS.  This is almost certainly a mistake.  Either unset F90FLAGS or set F90FLAGS="$FCFLAGS"])

Except there are systems where FC=xlf2008_r F90=xlf90_r F77=xlf77_r is
the right thing to do.  Thankfully, I no longer have to deal with such
system, so I bring this up as an academic point.

Jeff

-- 
Jeff Hammond
jeff.science at gmail.com
http://jeffhammond.github.io/


More information about the devel mailing list