Compiling a 4GL program against a --prefix install failed three times
over. Each fault hid the next, so they only came out one at a time.
1. The runtime could not find its own aubitrc.
resource.c has had an #ifdef AUBITETC for this all along, but nothing
ever defined it, so it fell back to a hardcoded /etc/opt/aubit4gl -
correct only when the prefix is the default. configure computes
AUBITETC as $sysconfdir/aubit4gl and installs there, so with
--prefix=/opt/aubit4gl the file went to
/opt/aubit4gl/etc/aubit4gl/aubitrc while every tool looked in
/etc/opt/aubit4gl/aubitrc and reported
*********** ERROR IN CONFIGURATION ***********
No aubitrc file has been found on your system
which surfaced as "ERROR: no TARGET_OS STOP." from bin/aubit, because
TARGET_OS comes from aubit-config, which could not read its config.
AC_DEFINE_UNQUOTED now tells the C code what configure chose.
2. None of the a4gl_API_*.h headers were installed.
The list filters each header on existence, so that one since removed
cannot break the install. That is right for the hand-written ones and
wrong for these: make generates them from the .spec files, long after
configure has run, so the test always failed and quietly dropped all
eight. Since a4gl_4gl_callable.h - which IS installed - includes
a4gl_API_exreport.h, the first compile against the install died with
"a4gl_API_exreport.h: No such file or directory". They are now listed
unconditionally; the filter stays on the headers it makes sense for.
3. json.h was not installed either, though a4gl_4gl_callable.h includes
it. It is as public as the rest of them, whatever its name suggests.
Found by copying only the listed headers into an empty directory and
compiling generated output against it until it stopped complaining -
json.h was the only one left, the rest of the include closure being
behind ifdefs that are not taken.
Verified on AlmaLinux 8: configure, make and make install with
--prefix=/opt/aubit4gl, then from the installed tree alone -
aubit-config answers TARGET_OS and A4GL_SQLTYPE, 18 headers are in
place including all eight generated ones, both PostgreSQL drivers are
present, and a program with a REPORT compiles and runs and prints what
it should. The source-tree path is unchanged and the fidelity probes
still pass.