Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to compile programs under Solaris in my Home directory.
Ive had experience with simple installs which work with just

   $> CD src
   $> ./configure --prefix=/home/peter
   $> make
   $> make install

But with more involved programs, with dependencies on special libraries, how do I have the system look into my home directory for these? and how would I compile them into my home dir?

share|improve this question
up vote 2 down vote accepted

I have to do things like that when I cross compile applications. If ./configure supports it, you can check with --help, you can do something like the following

./configure --extra-ldflags=-L/root/Installs/ffmpeg/forWin/usr/lib --extra-cflags=-I/root/Installs/ffmpeg/forWin/usr/include

There's one entry for libraries, and one for includes, however, there is always the old school way of just appending it before either configure or make

LDFLAGS='-L/root/Installs/ffmpeg/forWin/usr/lib' CFLAGS='-I/root/Installs/ffmpeg/forWin/usr/include' ./configure
LDFLAGS='-L/root/Installs/ffmpeg/forWin/usr/lib' CFLAGS='-I/root/Installs/ffmpeg/forWin/usr/include' make

For make I think they can be specified either before or after, however don't quote me on it.

share|improve this answer

It depends.

If you're building software that uses configure, most configure scripts will allow you to specify paths to third party libs. Do configure --help and look for --with-feature=/path/to/software.

As other answers have mentioned, configure and other scripts tend to look at the environment variables CFLAGS LDFLAGS and LIBS. You can set CFLAGS with -I/include/paths and -L/library/paths and that may help.

Worst case, you may need to edit Makefiles to reset those paths.

If you want the software to live someplace, configure scripts tend to have --prefix= argument to specify install dir. Or you may have to edit a Makefile.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .