On 03/06/2015 08:19 PM, Simon Sobisch wrote:
>>> GnuCOBOL currently only works with mpir if gmpcompat is used.
>> Could you perhaps elaborate your problem (?) in configuring MPIR with
> '--enable-gmpcompat'?
> 
> If mpir is configured with --enable-gmpcompat everything works.

Ok.

> But as
> GnuCOBOL is sometimes installed on systems where both gmp and mpir are
> already installed before (sometimes mpir is just for testing, sometimes
> mpir has both the header file and the library while gmp has only the
> library available) it would be nice to link against libmpir (and using
> the appropriate header).

I wouldn't really support that (other than by '--with-gmp=...' and the
like).

If /building/ GnuCOBOL needs the development package (with headers) of
(either) GMP or MPIR, you should simply require that, i.e., in the
latter case MPIR built with '--enable-gmpcompat' (but see also below).

To /use/ GnuCOBOL one presumably only needs the library (libgmp*).

Having both MPIR and GMP installed at the same time isn't much different
to having different versions of GMP (or MPIR) installed, with all
compile-time and run-time implications.

MPIR's '--enable-gmpcompat' doesn't [yet, at least ;-) ] do anything
magic AFAIK; it simply creates additional symbolic links or copies such
that filenames match.


> To say it short: it would be nice to not force people to (re-)build mpir
> with --enable-gmpcompat.

As mentioned, renaming or copying MPIR's files (probably also specifying
a different path when configuring GnuCOBOL) if needed should be
sufficient (and IMHO isn't too hard to ask for).

You could of course build some magic into GnuCOBOL's 'configure', but I
don't think it's worth the effort, compared to adding a few lines to the
installation instructions...


> The new configure already checks for libmpir and mpir.h if libgmp or
> gmp.h is not found and the building works but I'm unsure about the best
> way to do it.

For mpir.h, you could simply create a gmp.h which includes mpir.h if
necessary instead of changing source code; using libmpir* instead of
libgmp* presumably "only" involves messing around with some Makefile
variables (but sounds like you already managed that).

However, note that a (dynamically linked) GnuCOBOL binary built that way
then requires libmpir, shifting the problem to distribution, or closer
to the "end user" I imagine.


-leif

-- 
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mpir-devel+unsubscr...@googlegroups.com.
To post to this group, send email to mpir-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/mpir-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to