BinReloc
========

Check http://autopackage.org/docs/binreloc/

This component is able to determine relative paths to $prefix/bin,
$prefix/share, etc. (instead of relying on purely hard-coded values
set at compile time).

This makes your application relocatable. In particular, Autopackage
can install your application in either /usr, /usr/local, or ~/.local
from the same binary package.

It is used to determine the default path to the share/ directory,
which contains the default font, icon and editor sounds.


I used binreloc-2.0.tar.gz

binreloc.m4 was added in acsite.m4. Keep it updated. I included a fix
from SVN (trunk hasn't been released for 2 years?!) to properly
support autoconf >= 2.60. See http://trac.autopackage.org/ticket/95

To avoid using a redundant AM_CFLAGS=$(BINRELOC_CFLAGS) in
Makefile.am, I added #include <config.h> in binreloc.c. Both define
ENABLE_BINRELOC according to ./configure.

AM_BINRELOC was also renamed to AP_BINRELOC to avoid a warning from
aclocal (configure.ac:165: warning: macro `AM_BINRELOC' not found in
library), due to the use of reserved 'AM_' prefix.


Beware that BinReloc is working for the Linux kernel only. This is not
a portable way to find where the binary is installed. Under Woe, one
can use GetModuleFilename(). Under other OSes, we could fallback to,
eg, datadir='../share' and datadir='/usr/local/share' (compile-time).


A more portable alternative can be found in the 'relocatable-prog'
module from Gnulib. However, relocatability is not enabled by default,
and one of the maintainers mentions undocumented (and unfixed)
security issues...
(http://lists.gnu.org/archive/html/bug-gnulib/2007-10/msg00043.html)
Don't they want people to use it? :/
