MPFR 2.2.0 Release Candidate

Vincent Lefevre vincent at vinc17.org
Thu Sep 15 15:22:07 CEST 2005


Hi Roberto,

Thanks for your report.

On 2005-09-15 14:51:27 +0200, Roberto Bagnara wrote:
> The only glitch was that neither
> 
>   ./configure --prefix=/home2/bagnara
> 
> nor
> 
>  ./configure --prefix=/home2/bagnara --with-gmp-dir=/home2/bagnara

--with-gmp-dir is not standard. The MPFR documentation says:

  --with-gmp=DIR          GMP install directory

The other options are given by "./configure --help".

> succeeded in finding GMP, but
> 
>  ./configure --prefix=/home2/bagnara 
>  --with-gmp-include=/home2/bagnara/include \
>      --with-gmp-lib=/home2/bagnara/lib

Equivalently (I think), you can write:

  ./configure --prefix=/home2/bagnara --with-gmp=/home2/bagnara

> did work.  Since GMP was indeed configured with --prefix=/home2/bagnara,
> this seems to indicate that MPFR's --with-gmp-dir option is not working
> as expected.  In this respect, let me mention that in the Parma Polyhedra
> Library project (http://www.cs.unipr.it/ppl/) our life changed when we
> adopted Bruno Haible's macros (distributed with gettext).

Do you use MPFR for this project? If yes, then we can mention that
on the MPFR web page.

> In
> 
>   http://www.cs.unipr.it/cgi-bin/cvsweb.cgi/ppl/m4/
> 
> see the files lib-*.m4 and, for an example of use,
> the file ac_check_gmp.m4.

OK, I've seen

dnl Check how to link with libgmp.
AC_LIB_LINKFLAGS([gmp])

Perhaps this could be useful to us, as we have a linking problem with
GMP on AIX. Patrick?

> Apart from the big advantage that, in our experience, they work no
> matter how hairy is the environment in which they operate, they also
> implement the assumption that the --prefix argument is a good place
> to look for things (if the user wants to install MPFR there, it is
> quite likely he has already installed GMP there).

We do not want to add search directories in a non-standard way.
If the --prefix directory should be searched for too, then I think
this is the job of autoconf. But this isn't necessarily a good idea,
since it may be difficult to get rid of it if the user doesn't want
this directory.

BTW, the simplest way if you want to install things in your home is
to use aliases and environment variables. For instance, I have:

conflocal: aliased to ./configure --prefix=$HOME --exec-prefix=$HOME/$ARCHTYPE

and all my path variables ($PATH, $LIBRARY_PATH and so on) include
directories based on $HOME and $HOME/$ARCHTYPE when need be.

Regards,

-- 
Vincent Lefèvre <vincent at vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA


More information about the gmp-discuss mailing list