Fix interval timer repeating interrupt because of wrong tracking of threashold passing
Interval timer 2012-04-11 fix completion: remove circumvention code

The fix made in April 2012 to interval timer processing
(git ref: 16ba4f7f73c8200c62f89b8cc25ffb786bd5c8df) was
intended to correct a problem with spurious timer pops
during IPL that the old OS standalone utilities couldn't
handle. It did that, but a piece of an old circumvention
for an interval timer problem got left in by mistake. The
now-extraneous circumvention, combined with the April fix,
caused the location 80 value fetched by the OS external
interrupt handler to get reset to a positive value before
OS was able to look at it, which resulted in OS ignoring
valid timer pops. This fix removes the extraneous code,
and OS now recognizes that a timer pop has occurred.
add autoconf subdir to aclocal scan

Since configure.ac uses macros from hercules.m4, make sure we pass -I to
aclocal so it knows to look in autoconf/ for that.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

if you don't have this flag, then doing a standard `autoreconf`
fails because the macro in the autoconf/ subdir isn't found.
-mike
fix modulesdir/datadir/localedir handling

The current logic tries to expand the path variables at configure time
(so that they can be written into config.h) rather than delaying the
expansion to make time.

Setup CPPFLAGS with the right -D values so that we can let make expand
the path vars and not worry about hacking around it inside of autoconf.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

this patch implemented a big TODO the configure.ac file itself listed. if you
read any autotool manual, it'll tell you that doing expansion of variables at
configure time is wrong because it breaks quite a number of edge cases.
letting make do the expansion means you can change paths at `make` time as
well as base path variables off of other path variables.

this is supposed to work, but doesn't:
$ ./configure
$ make prefix=/usr libdir=/usr/lib64

as is this:
$ ./configure --prefix='$(exec_prefix)' --exec-prefix=/usr

other bugs:
- some of the variables were incorrectly ignoring the standard variables that
already existed (HERC_LOCALEDIR vs $localedir)
- the checking of $libdir is simply wrong and fails with libdir values other
than lib or lib64
-mike
fix handling of ltdl/dlopen

Nothing was setting hc_cv_have_dlopen, so initialize that based on the
dlopen tests that libtool does for us.

With that in place, we can set hc_cv_have_lt_dlopen based on the included
ltdl flag.  This lets people who have a *nix system with libdl avoid the
ltdl code entirely.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

the git repo does not build for me -- it fails when trying to build its own
copy of ltdl.c. my guess is because hercules is trying to build ltdl.c itself
instead of using the libltdl subdir.

but rather than investigate that, i wanted to fix a different problem (that was
reported in the past but never addressed): hercules shouldn't always be using
its own copy of libltdl. it should be able to use the system one or, even
better, use the standard -ldl that *nix systems already have.

thus i fixed the code to stop hardcoding to "yes use local ltdl" to respect the
configure flag --with-included-ltdl. and then i fixed the variable
hc_cv_have_dlopen which the configure script tests, but never actually sets
anywhere.
-mike
work with older versions of libtool

Older versions won't have a --with-included-ltdl flag, so improve the
logic to only set hc_cv_have_lt_dlopen to no if that has explicitly
been set to no itself.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
use LT_MODULE_EXT if it exists for HDL_MODULE_SUFFIX

Newer versions of libtool provide LT_MODULE_EXT defines for code to use.
We can leverage that in case native dlopen interfaces are available so
we don't have to maintain the ext list ourselves.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>