tools: use pkg-config to found libgc

In some platform (macosx+marports), the libgc library is not be located at
standard default position.
Fortunately, libgc seems to be registered with pkg-config under most
platforms.

Thus, use pkg-config in the generated makefiles to found the correct
flags and paths.

In c_src, some generated files are manually modified to provide a
working bootstrap under those platforms.

This is only a quick-and-dirty workaround. The real job must be polished
and generalized to solve the issue #864

Reported-by: Alexandre Blondin Massé <alexandre.blondin.masse@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>
bin: nitc does no more rely on procfs

procfs (/proc/) does not exists on some system (macosx).
So use `$BASH_SOURCE` to approximate the original source-file.

Maybe we should just rename back nitg to nitc.

Reported-by: Alexandre Blondin Massé <alexandre.blondin.masse@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>
toolcontext: nit_dir tries another heuristic on PATH if procfs is not available

procfs (/proc/) does not exists on some system (macosx).
Therefore the heuristic used to find nit_dir will fail on those system
when the command is invoked from the PATH.

The solution is to add another heuristic, where the program_name is
manually searched inside the directories of PATH in order to find the
original directory.

Reported-by: Alexandre Blondin Massé <alexandre.blondin.masse@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>
tests: fix saferun() return value when TIME is not set

Doing stuff after the command execution will temper its return value.

Signed-off-by: Jean Privat <jean@pryen.org>
README: add pkg-config as a requirement

Signed-off-by: Jean Privat <jean@pryen.org>