autoconf
[Top][All Lists]
Advanced

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

Re: OPENMP_FLAGS in autoconf not working


From: Nick Bowler
Subject: Re: OPENMP_FLAGS in autoconf not working
Date: Thu, 23 Jun 2016 10:24:40 -0400

Hello,

On 6/23/16, Rudra Banerjee <address@hidden> 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



reply via email to

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