On Fri, 10 Apr 2009, Ian Lance Taylor wrote: > Add a new shell variable in configure.ac extra_mpfr_configure_args. Set > it to what you want to pass to the mpfr configure. Call > AC_SUBST(extra_mpfr_configure_args). In Makefile.in add a line > EXTRA_MPFR_CONFIGURE_ARGS = @extra_mpfr_configure_a...@. In > Makefile.def change the host_modules entry for module=mpfr to replace > --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp with > $(EXTRA_MPFR_CONFIGURE_ARGS). Run autoconf and autogen. > > Easy as cake.
Ah, but cake is only easy when someone else bakes it. :-) Anyway, thanks for the laser-like specific answer, that was extremely helpful. I'm testing a patch, but I have two notes to run by you. 1. You mentioned adding EXTRA_MPFR_CONFIGURE_ARGS to Makefile.in. (I think you mean Makefile.tpl, cause Makefile.in is generated?) Anyway, I managed to avoid adding the intermediate make variable and just put @extra_mpfr_configure_args@ in the module=mpfr entry and it worked. Is there some stylistic or syntactic reason to use the intermediate variable? It doesn't seem to be done 100% consistently. 2. In my previous message I said that mpfr worked by chance and the bug was latent but the situation fragile. That is true for mpfr-2.3.2. However the mpfr-2.4.1 tarball hard-errors on a double --with-gmp*, apparently by design. E.g. this is from building an unpatched gcc with in-tree mpfr-2.4.1 plus the configure flag --with-gmp=/opt/... > configure: error: Do not use --with-gmp-build and other --with-gmp options > simultaneously. > See `config.log' for more details. > make[1]: *** [configure-mpfr] Error 1 So IMHO when I finish testing we should install the patch on all active branches to forestall any issues when people upgrade to the later mpfr releases. Regards, --Kaveh