syslog-ng.h: remove unused GSource priorities

These were not used since syslog-ng 3.3, get rid of them.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
GlobalConfig: cfg_read_config() filename arg const

This has some viral effect, which is also followed up by the patch. It
needs to be const as the relocatable binaries work declare some of the
paths to be const which were not such before and it's nicer anyway.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
syslog-ng.h: remove non-core PATH macros

These should be defined in the respective plugin and not the core.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
syslog-ng.h: remove unused default_modules variable declaration
cache: added a new module that encapsulates generic caching of values

This module adds a generic caching implementation that resolves values
on-demand and stores values in a GHashTable. No expiration and size
limits are possible as of now, these can be added later on.

The hash is indexed by a simple string key.

Signed-off-by: Viktor Juhasz <jviktor@balabit.hu>
Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
reloc: new module that implements autoconf path expansion

In autoconf the installation layout is controlled by shell variables that
are expanded recursively.

For instance, we have a prefix variable and then this gets referenced in
sysconfdir by having the value '${prefix}/etc'

Earlier, the configure script did the expansion prior to putting these
values in config.h, now this is being pushed to the syslog-ng binary
so it can be relocated after compilation.

The new reloc module implements the shell-like substitution and
a PathResolver class which can be used with a Cache instance to resolve
autoconf-style directory layouts.

Signed-off-by: Viktor Juhasz <jviktor@balabit.hu>
Signed-off-by: Tamas Pal <folti@balabit.hu>
Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
reloc: implement relocatable syslog-ng binaries

This patch changes the configure script not to expand the directory
layout variables before pushing them to the C code. Rather,
they will contain ${prefix} style variable references that get
resolved at runtime.

In addition to the configure changes, this patch also changes syslog-ng to
invoke get_installation_path() at the proper places so at runtime
these really get resolved.

With this patch, it is now possible to define SYSLOGNG_PREFIX environment
variable and syslog-ng will look for all its installed parts under
that directory in the layout set by the configure script.

Signed-off-by: Viktor Juhasz <jviktor@balabit.hu>
Signed-off-by: Tamas Pal <folti@balabit.hu>
Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>