Fwd: Patch for pkg-config file
Hugh McMaster
hugh.mcmaster at outlook.com
Wed Aug 21 11:30:54 UTC 2019
On Fri, 16 Aug 2019 at 5:34 am, Niels Möller wrote:
>
> Marc Glisse writes:
>
> >> For gmpxx, perhaps -lgmp should be added as well, either
> >>
> >> Libs: -L${libdir} -lgmpxx -lgmp
> >>
> >> or
> >>
> >> Libs: -L${libdir} -lgmpxx
> >> Libs.private: -lgmp
> >>
> >> ?
> >
> > I assume that "Requires: gmp" already handles that.
>
> Ah, so it references the gmp.pc file rather than the library directly
> (unlike the libm that was in an earlier version of the patch). Makes
> sense.
Correct. The output for `pkg-config --libs gmpxx’ is: <libdir> -lgmpxx -lgmp
‘Requires: gmp’ forces pkg-config to call gmp.pc, so if it isn’t found
the build fails.
You can do it by direct inclusion of the library, but won’t know if
it’s installed or not. I thought it best to Require since gmp is a
public dependency of gmpxx.
In answer to your question about installation directory for
pkg-config, the path is correct (i.e. <libdir>/pkgconfig).
Thank you both for your review.
Hugh
More information about the gmp-devel
mailing list