Re: OPENMP_FLAGS in autoconf not working

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

 



Hello,

On 6/23/16, Rudra Banerjee <bnrj.rudra@xxxxxxxxx> wrote:
> I am trying to compile a fortran code with gnu-autotools. The openmp
> specific lines in configure.ac is:
>
> AC_OPENMP
> AC_PROG_FC([gfortran])
> FCFLAGS="$OPENMP_FFLAGS -fcheck=all"

The tests performed by AC_OPENMP (and the variables set) depend on
the current language.  You have not posted a complete, compilable
configure.ac, but unless you've done something else to switch the
language, the default language is C.

It's also strange to test for openmp before testing the compiler --
this will probably not do what you intended.  Also, you are testing
for modern Fortran (AC_PROG_FC) yet OPENMP_FFLAGS is for Fortan 77,
which is probably not what you wanted.

Try this:

  AC_INIT([test], [0])

  AC_LANG([Fortran])
  AC_PROG_FC
  AC_OPENMP

  printf 'OPENMP_FCFLAGS = %s\n' "$OPENMP_FCFLAGS"

  AC_OUTPUT

Cheers,
  Nick

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf



[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux