Re: autoconf question
> configure doesn't find it. I agree that the Linux Accounting should fix this
> by providing the file in sys rather than linux ---- but how do I fix configure
> in the meantime?
Ahh, sorry, I misunderstood the question. As long as you've badgered
the maintainers of linux accounting to fix their patch, the
configure.in work around seems good enough (preferably with a dnl
comment indicating why it is a temporary [debian specific?] patch.)
If you want to make the same package work on linux and correct
systems, though, note that the macro is
AC_CHECK_HEADER(header-file, action-if-found, action-if-not-found)
The patch fragment you posted doesn't include enough for me to
give you a complete fix, but essentially you can do
AC_CHECK_HEADER(sys/acct.h,
.... whatever is there now ...,
AC_CHECK_HEADER(linux/acct.h,
.... same stuff as above ....,
... original not-found clause))
You might need to change the second clause to use
AC_DEFINE(HAVE_LINUX_ACCT_H)
as well, and change the code that does the inclusion of
#ifdef HAVE_SYS_ACCT_H
#include <sys/acct.h>
#endif
by simply adding
#ifdef HAVE_LINUX_ACCT_H
#include <linux/acct.h>
#endif
Note that this way if it *does* find sys/acct.h, it ignores the linux
bracnch, so when the maintainers of the accounting patch finally fix
it, your package automatically does the right thing...
Reply to: