Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Aug 2018 10:07:53 +0000
From:      Anton Shterenlikht <as@cmplx.uk>
To:        =?utf-8?Q?T=C4=B3l?= Coosemans <tijl@FreeBSD.org>
Cc:        Anton Shterenlikht <as@cmplx.uk>, freebsd-fortran@freebsd.org
Subject:   Re: autotools & Fortran
Message-ID:  <20180808100753.GA8136@jail0199.vps.exonetric.net>
In-Reply-To: <20180807123139.1cdce2d3@kalimero.tijl.coosemans.org>
References:  <201808061546.w76FkgbJ065837@jail0199.vps.exonetric.net> <20180807123139.1cdce2d3@kalimero.tijl.coosemans.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Tijl

On Tue, Aug 07, 2018 at 12:31:39PM +0200, Tijl Coosemans wrote:
> On Mon, 6 Aug 2018 15:46:42 GMT Anton Shterenlikht <as@cmplx.uk> wrote:
> > Hello
> > 
> > I've several questions on using autotools
> > in Fortran projects. Perhaps somebody can
> > answer here or point to existing examples.
> > 
> > 1. I have something like this right now:
> > 
> > use, intrinsic :: iso_fortran_env
> > integer, parameter :: fk = real32
> > 
> > What I want is to set fk to "real32", "real64" or "real128"
> > via autotools, so that I can build with 3 different
> > real kinds via a command line option.
> > 
> > Ideally I want to avoid preprocessing.
> > 
> > Is this feasible?
> 
> use, intrinsic :: iso_fortran_env
> integer, parameter :: fk = @REAL_TYPE@
> 
> % mv filename filename.in
> 
> And in configure.ac:
> 
> AC_SUBST([REAL_TYPE],[real32])
> AC_CONFIG_FILES([filename])

Thank you!

Anton



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180808100753.GA8136>