changing gmp install name

Jason Moxham
Tue, 7 Jan 2003 17:11:35 +0000

On Tuesday 07 Jan 2003 2:21 pm, Niels M=F6ller wrote:
> Jason Moxham <> writes:
> > No , I asked if it's possible to change the gmp install name , so I c=
> > just treat the modified gmp package like a normal one and just type
> > configure , make , make install  to install it under a different name=
> I think the recommended way to have several gmp versions installed at
> once it to simply install them under a different prefix.
> When compiling programs that use gmp, you set LDFLAGS and CPPFLAGS so
> that it uses the right version. If you're linking dynamically, you
> will also want to use -R (-Wl,-rpath, on linux, IIRC) toy make sure
> that your binaries also pick up the right library at run time.
> If for some reason that simple scheme doesn't work for you, you
> probably need to explain why.
> > I know how to write scripts to do all this before and after . What I
> > expect the answer to be is something like a varible "package name"
> > in which I would change from "GMP" to "GMP_TEST"
> I'm afraid it's harder than that to change it in You
> first need to change the line
> to
> and then search and replace all occurances of libgmp. You probably
> also need to understand and change the LIBGMP_LT_* definitions at the
> top of the file.
> I've never used libtool, perhaps there's some other trick you can do
> with it.
> /Niels

Excelent , thanks


tar xzf gmp-4.1.2.tar.gz
cd gmp-4.1.2
sed -e s/libgmp/libjaygmp/g > temp1
sed -e s/LIBGMP/LIBJAYGMP/g temp1 > temp2
sed -e "s/gmp\.h/jaygmp.h/g" temp2 >
sed -e "s/gmp\.h/jaygmp.h/g" > temp1
sed -e s/libgmp/libjaygmp/g temp1 >
rm temp1 temp2
cd ..
mv gmp-4.1.2 jaygmp-4.1.2
tar cjf jaygmp-4.1.2.tar.bz2 jaygmp-4.1.2
rm -r jaygmp-4.1.2

to create a new package jaygmp , which can use the usual ./configure ; ma=
ke ;=20
make install to use it , and using "#include "jaygmp.h" in the C programs=
-ljaygmp on the compile line.

A few problems remain , make check fails , --enable-cxx fails , probably=20
--enable-mpfr fails , the info files are still under gmp , and who's know=
what else :)

This appears to work , although info files are still under gmp