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 removed the
("$datadir" = '${prefix}/share') test because $datadir evals to
"${datarootdir}" with a recent Autoconf so the test will always fail.

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.


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? :/
