By convention, ./configure
scripts provide a --prefix
option fo this. So for example
./configure --prefix=/usr/local
or
./configure --prefix=/opt
(for much software, /usr/local
is the default).
You can usually run ./configure --help
to see this and other options that may affect the installation path e.g.
$ ./configure --help | grep install
--prefix=PREFIX install architecture-independent files in PREFIX
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
By default, `make install' will install all the files in
an installation prefix other than `/usr/local' using `--prefix',
Fine tuning of the installation directories:
--program-prefix=PREFIX prepend PREFIX to installed program names
--program-suffix=SUFFIX append SUFFIX to installed program names
--program-transform-name=PROGRAM run sed PROGRAM on installed program names
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]