PAC_HEADER_STDARG

Check whether standard args are defined and whether they are old style or new style

Synopsis

PAC_HEADER_STDARG(action if works, action if oldstyle, action if fails)

Output Effects

Defines HAVE_STDARG_H if the header exists. defines

Notes

It isnt enough to check for stdarg. Even gcc doesnt get it right; on some systems, the gcc version of stdio.h loads stdarg.h with the wrong options (causing it to choose the old style va_start etc).

The original test tried the two-arg version first; the old-style va_start took only a single arg. This turns out to be VERY tricky, because some compilers (e.g., Solaris) are quite happy to accept the *wrong* number of arguments to a macro! Instead, we try to find a clean compile version, using our special PAC_C_TRY_COMPILE_CLEAN command.