Merge branch 'upstream/mirror/3.3' into 'merge-queue/3.4'

Conflicts:
	lib/Makefile.am
	lib/plugin.c
cfg: Fix cfg_is_config_version_older()

The function was given a configuration in the cfg argument, tested
that for NULL, but then used the global 'configuration' variable to
compute the config version.

It is very easily possible that the global configuration is NULL, but
cfg isn't, which in this case, led to a segmentation fault.

Reported-by: Peter Czanik <czanik@balabit.hu>
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
syslog-ng-ctl: Fix the linking with modern libtool

The Makefile.am for syslog-ng-ctl relied on lib/gsocket.c and
lib/gsockaddr.c getting compiled to gsocket.lo and gsockaddr.lo,
respectively. This is not always the case, sometimes the library name
gets prepended.

To work around this, add the two source files to syslog_ng_ctl_SOURCES
instead. This way, they'll get compiled again, but the result will
always work, and not rely on fragile convention.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
configure: Add support for GeoIP without pkg-config

If libgeoip is installed without a pkg-config data file, then fall
back to GEOIP_LIBS and GEOIP_CFLAGS, if set.

On systems that do not have the pkg-config data file for libgeoip,
running configure with GEOIP_LIBS and GEOIP_CFLAGS appropriately set,
along with --with-geoip, will enable the module.

Reported-by: Peter Czanik <czanik@balabit.hu>
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
travis: Simplify the config

We only need one apt-get install line, and no template for the IRC
notifications, the default is good enough.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
Make it possible to link crypto stuff directly into libsyslog-ng

There's been a long desire to be able to link libsyslog-ng-crypto
directly into libsyslog-ng, if so desired. To accomplish that, we
introduce a --with-embedded-crypto option to configure, which in turn
produces a WITH_EMBEDDED_CRYPTO automake conditional.

If that conditional is set, then the sources of libsyslog-ng-crypto
get appended to the libsyslog-ng sources, and -crypto is not built. In
the non-embedded case CRYPTO_LIBS will be set to
${top_builddir}/lib/libsyslog-ng-crypto.la, otherwise it will be
empty. All users of the -crypto module (afsocket, dbparser &
cryptofuns) have been updated to use $(CRYPTO_LIBS) instead of
hard-coding libsyslog-ng-crypto.la.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>