./configure bugs on OS X

Daniel Macks <[email protected]> Thu, 10 Jun 2021 07:05:24 -0400
Newsgroups gmane.network.slrn.user
Message-ID <[email protected]>
Building slrn-1.0.3a fails on recent OS X because the compiler treats implicit function declarations as errors, which causes some ./configure tests to fail to detect features that actually exist on this platform:

: checking for an implementation of va_copy()... no
: checking for an implementation of __va_copy()... no
: checking whether va_lists can be copied by value... no

Those first two should be "yes". According to config.log, the problems look like:

: conftest.c:93:4: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))'
:           exit (1);
:           ^
: conftest.c:93:4: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit'

Putting '#include <stdlib.h>' (not just stdarg.h) in the AC_ VA_COPY function fixes it.

dan
-- 
Daniel Macks
[email protected]