
Bruno Haible wrote:
Roberto Bagnara wrote:
Moreover all the generated Makefile's have
CPPFLAGS =
so that compilation fails miserably because gmpxx.h cannot be found.
This is because two other .m4 macros reset CPPFLAGS to empty. This patch fixes it:
[...]
Thanks Bruno!
Also, with the current macro, it's apparently needed to specify both --with-libgmp-prefix=/tmp/jank and --with-libgmpxx-prefix=/tmp/jank. The following two patches let the user get away with just one of these.
The first one should be used if some of your programs need only libgmp but not libgmpxx. The second one can be used if all you ever link with is libgmpxx. (I've tested the second one in three configurations: with libgmp installed as shared libs, installed as static libs, and installed as static libs with .la files removed.)
[...]
I think the first one is what we need. We test first for libgmp and then for libgmpxx so that we can detect the (quite common) situation whereby the user has compiled GMP without the --enable-cxx option. That way we are able to print a more informative error message. Thanks again! Cheers,
Roberto