system-source: Use so_rcvbuf(8192) on Linux

Some Linux kernel messages are particularly long (iscsi, for example),
so in order to not get garbage out, we need to increase the socket
buffer size, and 8k is big enough for now.

Reported-by: shih dane <daneshih1125@gmail.com>
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
Major copyright & license fixups

Update all the copyright years in pretty much any file touched in the
past 2-2.5 years, and clarify the licensing situation:

lib/ is LGPL2.1+, modules/ is GPL2+, both with an OpenSSL
exception. Updated the top-level COPYING file to reflect the changed
paths too, and LGPL.txt was replaced with the text of LGPL 2.1
(instead of LGPL 3, when the sources were under 2.1+).

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
tfgeoip: $(geoip) template function

This implements a $(geoip) template function using libgeoip, based on
a patch from Csaba Major. The function can be used to look up the
2-letter country code of any IPv4 address or host passed to the function.

Currently only the 2-letter codes are supported, and only from the
default database, and only for IPv4 addresses (or hosts). Adding
further functionality can be done on demand, however.

Signed-off-by: Csaba Major <csaba.major@balabit.com>
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
configure: Support silent rules, if available

Building with silent rules enabled has the advantage of producing
shorter output, and making warnings and other anomalies stand out
better. Building verbosely is still the default, but silent rules can
now be turned on by passing V=0 to make.

Silent rules support is only available if using a recent enough
automake to build the makefiles.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
Silence a few warnings

A couple of files were using strlen(), memcmp() and similar things
from <string.h> without explicitly including it, and the gcc on
FreeBSD9 complained about that - lets silence that by explicitly
including said header. While there, also add other missing include
statements.

Furthermore, a few mismatched prototype warnings, unused variables and
other minor things were cleaned up aswell.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
plugin: Fix a minor memory leak in plugin_list_modules()

When listing modules, the configuration was not used anywhere: it was
just allocated and never free'd.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
system-source: Use follow-freq(1) on FreeBSD prior to 9.1

FreeBSD prior to 9.1 does not have a kqueue-pollable /dev/klog, so
syslog-ng would fall back to using timers, except that follow-freq()
is explicitly set to zero, also diabling timer-based polling. This has
the effect of making syslog-ng not read from /dev/klog at all.

To work around the issue, on FreeBSD prior to 9.1, use follow-freq(1)
for /dev/klog when using the system() source.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
ivykis: Update to the latest 0.30 stable

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
Improved silent-rules support

This adds a few harmless things to the lex/yacc and doc building
rules, so their output will be shortened when using V=0. The variables
have no effect when using an automake that does not support
silent-rules, so it's completely backwards compatible.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>