gperftools: modify makefile to install in a different folder?

504 views Asked by At

I was installing gperftools:

https://code.google.com/p/gperftools/

Everything worked, and I see that the project links to /usr/local/lib

I'd like to put the library in a folder local to my project, instead.

The reasoning behind this is that I'm putting the project on different machines, and I just need to link against the libprofiler and libtcmalloc libraries, instead of the entire package, that also comes with the pprof and such.

The machines also have different architectures, so I actually need to build into that directory, instead of copy-pasting over

Is this a trivial thing to do?

1

There are 1 answers

0
Wintermute On BEST ANSWER

gperftools uses autoconf/automake, so you can do

./configure --prefix=/path/to/whereever 
make
make install

This works for all autotools projects, unless they are severely broken.

On that note, it is generally a good idea to read the INSTALL file in a source tree to find out about this sort of stuff. There is one in the gperftools sources, and this is documented there.