From: sfeil on
I am looking for a general outline, describing what I need to do to
relocate resources, that are built using the gnu ./configure auto
build system on a *nix computer.

I have a monthly subscription with a shell account. This account
allows me to compile and run programs on there server. I have a single
user account and do not have access to modify the contents of
directories outside of my $HOME directory. So I will need to put the
libraries that I build under my home directory.

I decided that I would follow the standard of /usr/local directory
structure. The only difference would be that I would use $HOME/local
to hold the bin, lib, man and other directories. So I thought that
using "./configure --prefix $HOME/local" would do the job. I was able
to compile the underlaying libraries with this setup, however when I
started compiling the program that required those libraries, it
started complaining. Looking in the "config.log" file I found the
following lines.

Package mad was not found in the pkg-config search path.
Perhaps you should add the directory containing `mad.pc'

I found "libmad.a", "libmad.la" and "libmad.so" in my $HOME/local/lib
directory, but I was not able to find "mad.pc". Is the "gnu build
system" suppose to create the mad.pc file when I build madlib? How do
I tell it where to install the file? Do I have to write them myself?
From: J G Miller on
On Monday, February 15th, 2010 at 09:53:31h -0800, sFeil pondered:

> So I will need to put the libraries that I build under
> my home directory.

Not only do you need to put the libraries (usually of the
shared type .so) under your ${HOME}/apps/lib directory,
you also need to put the header files under your ${HOME}/apps/include,
and for configure to work properly for building some software you will
also need to put the library package configurations scripts .pc under
your directory.

> Package mad was not found in the pkg-config search path. Perhaps you
> should add the directory containing `mad.pc'

You forgot to install the mad.pc file under ${HOME}/apps/lib/pkgconfig
when you built and install the mad libraries.

> Is the "gnu build system" suppose to create the mad.pc file when I
> build madlib?

It should have done and installed it under your --prefix=${HOME}/apps
hierarchy at ${HOME}/apps/lib/pkgconfig

Check the Makefile which was created when you did the
../configure --prefix=${HOME}/apps during the building of madlib.

Here is the mad.pc file from the Debian package for the madlib development
files.

prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: mad
Description: MPEG Audio Decoder
Requires:
Version: 0.15.0b
Libs: -L${libdir} -lmad
Cflags: -I${includedir}


> Do I have to write them myself?

Not if the custom madlib build procedure works as it should.
Check the contents of your madlib tar archive for mad.pc