build: provide a sysusers.d file

This allows systemd-sysusers to create _lldpd user/group. See:
 http://www.freedesktop.org/software/systemd/man/sysusers.d.html

This is currently untested.
build: check for needed commands in autogen.sh

And display a more informative message.
build: check if pkg-config is correctly installed in ./autogen.sh

Absence of pkg-config leads to some odd messages:

    configure.ac:27: error: possibly undefined macro: AC_SUBST
          If this token and others are legitimate, please use m4_pattern_allow.
          See the Autoconf documentation.
    configure.ac:163: error: possibly undefined macro: AC_MSG_FAILURE
    configure:21413: error: possibly undefined macro: AC_MSG_CHECKING
    configure:21418: error: possibly undefined macro: AC_TRY_LINK
    configure:21423: error: possibly undefined macro: AC_MSG_RESULT
    configure:21432: error: possibly undefined macro: AC_MSG_NOTICE
    configure:21894: error: possibly undefined macro: AC_PATH_TOOL
    configure:21896: error: possibly undefined macro: AC_MSG_ERROR
    configure:21975: error: possibly undefined macro: AC_DEFINE_UNQUOTED

We try to detect this situation by looking for `PKG_CHECK_MODULES` macro
in `aclocal.m4`. If not present, we issue some useful tips, like
installing the package or telling aclocal the location of
`pkg.m4` (mostly for OSX users).
debian: ship files in debian/etc/lldpd.d
interfaces: only use physical interfaces to get a chassis ID
Revert "debian: ship files in debian/etc/lldpd.d"

This reverts commit 8e9bf5cd846b462bc7811a58133811f9082779d9.
lldpd: abort when some options are repeated

Some options don't have to be repeated. Later options would override
earlier and this is usually an error. Better just abort in this case.
debian: also install bash completion
debian: also install zsh completion
lib: make a copy of state_data, since pointer can be re-used

make a copy of state_data, since pointer can be re-used and the comparison checks
can still give false positives

Signed-off-by: kanna <kanna@cumulusnetworks.com>
lib: don't check for NULL before free
build: allow use of older versions of json-c

json-c library was first just named json. When requesting compilation
with json-c, also check for this library.
client: ship /etc/lldpd.d and put a README file in it
debian: ship /etc/lldpd.d
build: use AC_CONFIG_FILES only to generate Makefiles

Other kind of files may get partially expanded variables. For example,
`@sbindir@` is expanded to `${exec_prefix}/sbin` which won't work in a
regular configuration file.

While this could be done easily with GNU Make, using automake doesn't
allow us to use pattern rules or stuff like that. Therefore, there are a
lot of repetitions to declare the files we need to transform.
build: use @sbindir@ instead of @prefix@/sbin

Thanks to the previous commit, this is now possible.
build: remove useless variables from pkgconfig file

Because the content of liblldpctl.pc is now fully expanded, the
variables at the top are now useless. Remove them.
lldpd: also try /usr/lib/os-release if /etc/os-release is not present

Usually, `/etc/os-release` is a symlink to `/usr/lib/os-release` but on
some of them, programs are expected to fallback to
`/usr/lib/os-release`.
build: hide invocation of sed command to generate some files

Replace them with `AM_V_GEN`.
lldpd: check if capabilities are available/supported before enabling them

Different platforms can support different capabilities. we need to enable
only those that the platform can support

Signed-off-by: kanna <kanna@cumulusnetworks.com>