-
Notifications
You must be signed in to change notification settings - Fork 8
Regeneration of autotools files not possible #14
Description
This is more of a note to myself, but if anyone can help feel free to chime in.
In current Debian we usually try to regenerate all automake/autoconf files on package build time to ensure support for newer architectures etc. This is currently not possible with gnarwl.
The first error you hit is
autoheader: warning: missing template: DEFAULT_MTA
autoheader: Use AC_DEFINE([DEFAULT_MTA], [], [Description])
autoheader: warning: missing template: MAXLINE
autoheader: warning: missing template: UMASK
autoreconf: /usr/bin/autoheader failed with exit status: 1
I think this is the fix, but I don't get all this autotools stuff at all and I figured it out with try-and-error
--- a/configure.ac
+++ b/configure.ac
@@ -30,8 +30,8 @@
AC_CHECK_FUNCS([iconv])
-AC_DEFINE_UNQUOTED(UMASK,$permmask)
-AC_DEFINE_UNQUOTED(MAXLINE,$maxline)
-AC_DEFINE_UNQUOTED(DEFAULT_MTA,$mta)
+AC_DEFINE_UNQUOTED(UMASK,[$permmask], [File creation mask for database files])
+AC_DEFINE_UNQUOTED(MAXLINE,[$maxline], [Maximum input buffer line length])
+AC_DEFINE_UNQUOTED(DEFAULT_MTA,[$mta], [MTA to use])
AC_OUTPUT
The second error you get is an actual compilation error
config.c:29:13: error: ‘LVL_CRIT’ undeclared here (not in a function); did you mean ‘LOG_CRIT’?
29 | int verbose=LVL_CRIT;
| ^~~~~~~~
| LOG_CRIT
config.c: In function ‘setDefaults’:
LVL_CRIT is defined in the upstream conf.h.in. However, this gets moved to conf.h.in~ by autoheader and regenerated (and subsequently processed into conf.h) with only the settings from configure.ac.
I think the previous author just edited conf.h.in by hand and never bothered to regenerate the files.