<p>Using <code>configure --prefix=/home/user/libX</code> will create a directory hierarchy under <code>/home/user/libX</code> which will include <code>lib</code>, <code>bin</code>, <code>share</code> and so on. It's actually more common to use <code>/opt/libX-</code><em>version</em> for this kind of thing, rather than <code>/home/user/libX</code>, but either works. I'll refer to this as <code>$PREFIX</code>.</p>
<p>To use the software you've built and installed, you'll have to set some environment variables. If it's a program, for example, you'll need to add the <code>bin</code> subdirectory to <code>PATH</code>. If it's a library you'll need to use two different variables, one for building and the other for running.</p>
<p>Most libraries install a <code>pkg-config</code> description file which has a suffix of <code>.pc</code> and other software then calls <code>pkg-config</code> to locate the library during that software's <code>configure</code> stage. To enable <code>pkg-config</code> to find the .<code>pc</code> file for <code>libX</code> you'll need to add its directory to <code>PKG_CONFIG_PATH</code>. For example, set <code>PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH</code>. If the program isn't using <code>pkg-config</code> to locate <code>libX</code>, and doesn't accept a <code>--with-libX=</code>... you may be able to force it using the <code>LIBRARY_PATH</code> variable.</p>
<p>At run time, the system needs to know where to look for the <code>libX</code> binary (<code>.so</code> file). If this isn't in one of the standard places (like <code>/lib</code> and <code>/usr/lib</code>) then its directory needs to be in the <code>LD_LIBRARY_PATH</code> variable. For example, set <code>LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH</code>.</p>
<p>You can put these permanently into your environment, or you can create a shell script that sets them locally and then invokes a command given on the command line (eg using <code>exec "$@"</code>). I prefer using the per-command solution because you can seriously destabilize your system by using built-from-source libraries with every program you run. It's better to use them just for the programs that actually need them.</p>
<p>If you find yourself using a lot of bleeding-edge libraries, you might do better to install a development or unstable version of your distro, such as Debian sid or the alpha of the next version of Ubuntu. Alternatively you might find that someone is already building advanced versions of the packages you're interested in. Ubuntu's PPA system is good for this, for example. I don't know if SUSE has anything similar.</p>