This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [configury patch] don't add 'mpfr' to --with-mpfr-dir
Tobias.Schlueter@Physik.Uni-Muenchen.DE writes:
> > one could argue the other way round: the /mpfr infix is missing from
> > gmplibs here. According to the installation docs
> >
> > --with-gmp=pathname
> > --with-mpfr=pathname
> > --with-gmp-dir=pathname
> > --with-mpfr-dir=pathname
> > If you don't have GMP (the GNU Multiple Precision library) and the MPFR
> > Libraries installed in a standard location and you want to build the
> > Fortran front-end, you can explicitly specify the directory where they
> > are installed (`--with-gmp=gmpinstalldir',
> > `--with-mpfr=mpfrinstalldir') or where you built them without
> > installing (`--with-gmp-dir=gmpbuilddir',
> > `--with-mpfr-dir=gmpbuilddir').
> >
> > i.e. the arg to --with-mpfr-dir is supposed to be gmpbuilddir. With this
> > patch and gmp build with --enable-mpfr, you need to know that mpfr is built
> > inside an mpfr subdir. On the other hand, omitting mpfr is correct if you
> > have a separate build of e.g. mpfr 2.1.1.
>
> This looks like the documentation is out of date or at least misleading. If
It seems so, yes.
> your mpfr is the one built together with gmp, --with-mpfr-dir is not needed.
This seems not to be the case: in an uninstalled gmp built with
--enable-mpfr, libmpfr.a lives in an mpfr subdir, but this isn't referenced
anywhere in toplevel configure, so libmpfr.a won't be found (nor, as I
mentioned, mpfr.h in case of a VPATH build).
> Also, the way --with-mpfr-dir worked made it impossible to use a standalone mpfr
> that wasn't installed, effectively rendering that option useless.
Useless at least for that case, agreed. I'm not sure which variant (gmp
--with-mpfr or gmp with standalone mpfr) is more common nowadays, but both
should work of course.
Rainer