Dear Alexei, You wrote:
I understand why such feature is useful. But it doesn't work properly.
My point in that last email was to assert that it *does* work.
That is, /usr/lib/libgmp.so.? is used anyway, unless I manually set LDFLAGS, i.e.
LDFLAGS="-Wl,--rpath=~/package/gmp/4.2.2/lib" ../configure --with-gmp=~/package/gmp/4.2.2 --disable-static
Are you absolutely 100% sure? I swear I don't have to manually set LDFLAGS. I just tried again just using --with-gmp=/opt/gmp-4.2.2 --disable-static and the link line looks like this: g++ -shared -nostdlib /usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.1.2/crtbeginS.o .libs/cl_alloca.o .libs/cl_as_exception.o [...] -Wl,--rpath -Wl,/opt/gmp-4.2.2/lib -Wl,--rpath -Wl,/opt/gmp-4.2.2/lib -L/opt/gmp-4.2.2/lib /opt/gmp-4.2.2/lib/libgmp.so -L/usr/lib/gcc/x86_64-linux-gnu/4.1.2 -L/usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/4.1.2/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../lib64/crtn.o -Wl,-soname -Wl,libcln.so.5 -o .libs/libcln.so.5.0.2 Cheers -richy. PS: I've applied the two patches you sent. Thanks. -- Richard B. Kreckel <http://www.ginac.de/~kreckel/>