Everything should just work out of the box without poking. This change
makes that goal to be yet agian one step closer. In same go make all
autotools related variable substitutions better.
Requested-by: Martijn van Brummelen <martijn@brumit.nl>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
With older automake versions one can end up after ./bootstrap with
situation where test-driver script is missing, and subsequent compilation
fails. Requiring automake 1.12 should usually help, but unfortunately
the case Dennis reported is different.
Something goes wrong with 1.13 and autoconf 2.69, in 32 bit RHEL system.
That sort of system seems to require AM_PROG_CC_C_O, and even when that
is added following error happens. It is yet unknown to me why this is
the case.
parallel-tests: error: required file 'build-aux/test-driver' not found
Reference: http://git.savannah.gnu.org/cgit/automake.git/tree/NEWS?id=v1.12#n113
Reported-by: Dennis Ortsen <dortsen@gmail.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The problem with the detection of gcc's __builtin_expect, the autoconf
set up uses EX_COMPILE_IFELSE which only compiles the test code with gcc
-c, it does not link so a missing __builtin_expect is treated as a
missing symbol and is not detected.
Reported-by: Conor McCarthy <mr.spuratic@gmail.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
For reasons see excellent paper 'Recursive Make Considered Harmful' by
Peter Miller.
References: http://miller.emu.id.au/pmiller/books/rmch/
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
When ./bootstrap has ran it tells to
- invoke gl_EARLY in ./configure.ac, right after AC_PROG_CC_C99,
Also AC_USE_SYSTEM_EXTENSIONS is needed to suppress spurious gnulib
warnings.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The docs directory needs to be handled properly, e.g., create Makefile
which nothing, when doxygen is not enabled.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
When ./configure --enable-doxygen is used one can browse internal api
documentation from docs/html directory.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The gnulib will set AC_GNU_SOURCE equivivelant if necessary. The awk is
relevant only for contrib stuff, and compiler program was something I had
not understood quite right some years ago when I added it.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
I have no idea why that was there. My guess is that I had no idea at the
time I added the line what it does.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Making dhcpd.conf and dhcpd.leases file references being dynamic causes
manual contents being replaced at compile time, so make some other data
items dynamic as well.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Add gnulib modules which make sense and remove few. The stuff gnulib
takes care can be dropped from configure.am.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This will mean better portability, and a good reason to get rid of
various portability autotools directives which where part of this
project.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The problem is, that you simply count all lease occurrences in
dhcpd.leases, but only the last ones for each ip address are
valid. The lease file is more like a logfile of what has been
done, than a real database. To fix the counting issue, I'm using
a single hash (from uthash.h [1]) for the counting. This way
only the last lease entry for each IP gets into my counting
structure.
When you remove the duplicates in prepare_data(), you don't have
the information anymore, if the active lease entry or the free
lease entry came last. Simply deleting each ip from the touches
array, that is already in the leases array, gives you a big
chance to count wrong. Another way of fixing this would be to
not only store the ips in your arrays, but a structure containing
the ip and a global lease entry counter. Then you could delete
all entries except for the latest.
[1] http://uthash.sourceforge.net/
Reported-by: Huangy
Signed-off-by: Enno Gröper <groepeen@cms.hu-berlin.de>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Add recent changes to autotools header, function and compiler
capability checks. The patch also adds to .gitignore autoscan
outputs.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The program_invocation_short_name portability code is copied
from util-linux project almost as is.
Reported-by: Roar Pettersen <rope1968@gmail.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The eprintf removed and replaced with err & warn. Option parsing
no longer tries to find missing optargs, which are getopts should
notice. Few complier warnings got to be removed as well. Finally
the commments will no longer exceed standard terminal width.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>