Re: OPENMP_FLAGS in autoconf not working

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

 



Hi,
Thanks a lot for your reply. But this (AC_LANG) is making make to
crash.
Copying your configure.ac, I am getting:

$./configure 
checking for gfortran... gfortran
checking whether the Fortran compiler works... yes
checking for Fortran compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU Fortran compiler... yes
checking whether gfortran accepts -g... yes
checking for gfortran option to support OpenMP... -fopenmp
OPENMP_FCFLAGS = -fopenmp
configure: creating ./config.status

$make
Makefile:15: *** missing separator.  Stop.

On Thu, 2016-06-23 at 10:24 -0400, Nick Bowler wrote:
> 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