Only enable setuid/setgid binaries if requested.

Prior to this commit, if required to collect statistics by the
operating system, binaries were installed with the setuid or setgid
bit set. Since the actual cases where this is needed are rare, and
since it leaves a hole for exploitation, we now only do this if the
user explicitly requests it when building.

So setuid and setgid binaries are still available, you just need to
use --enable-setuid-binaries or --enable-setgid-binaries to enable
them. These options have no effect if the operating system has no need
for setuid or setgid binaries to collect statistics.
Make check an alias for test.

Ideally, the test suite would use the make check stuff properly, but
this is sufficient to allow things like "make distcheck" to work.
Only clean manpages with maintainer-clean.

We don't distribute the source files for rebuilding these, so it makes
no sense to clean them, or even distclean them. They're not intended
to be rebuilt be users of the tarball, only by people working from
the git sources.
Move the ChangeLog generation out of the Makefile.

Having it in the Makefile broke the distcheck target. The specific
failure case is if you do a VPATH configure, and then use the make
dist target, it regenerates the ChangeLog file rather than using the
one in $(srcdir) as it does for other distributed files. The reason it
does this is because there's a ChangeLog target in the Makefile.

This doesn't feel like a perfect solution, but it only makes life a
little harder for devs, and fixes potential breakages for users.
For consistent behaviour add config.{guess,sub}.

This makes it consistent across build platforms, and ensures that
anyone checking out our Git repository gets the same versions of these
files as we do. They match upstream so can be updated when needed.

It'd be nice to be able to rely on the operating system provided ones
being current, but at least in FreeBSD they're replaced by old ones. I
consider that a bug, but it's not been resolved yet.

They're sourced from here:

http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
Try to guess when a fixed sized buffer is used

  When a fixed sized buffer is used in struct utmpx and/or struct
  utmp, use only the size of the source.
explain why only AC_CANONICAL_HOST

explain (for dump maintainers like me) why we only need
AC_CANONICAL_HOST and why it's dumb to use --target
use strnlen in sg_lupdate_string

  if no strnlen is provided, use own one
move SG_LUPDATE_IF do to where it's used

  .. and copy all of the source, not only length-1 ;)
use update-length-restrict in case of ...

use update-length-restrict in case of utmp entries from file, too.
don't +1 strlen to often
always reserve room for trailing '\0'
fix some ansi c issues
deal with old and/or broken ethtool.h
add support for compilers without unspec array len

  There are compilers out there complaining about

  struct foo {
      char *bar;
      unsigned many[];
  };

  Provide tests and workarounds for hopefully all situations.
fix ugly typo
fix configure internal check regarding uvm/uvm.h
prefer __PACKAGE_->can() over accessing namespace
give more information about where we're running
add append mode for created log-files by default