1
dnl @synopsis GP_VA_COPY
3
dnl Checks whether one of these compiles and links:
8
dnl In case of 1 or 2, AC_DEFINE(HAVE_VA_COPY).
9
dnl In case of 2, AC_DEFINE(va_copy,__va_copy)
11
dnl In code, use it like this
12
dnl #ifdef HAVE_VA_COPY
13
dnl ... code with va_copy ...
15
dnl ... code without va_copy or with error ...
18
AC_DEFUN([GP_VA_COPY],[dnl
20
AC_CHECK_HEADER([stdarg.h],[],[
22
Building $PACKAGE_NAME requires <stdarg.h>.
33
have_va_copy="va_copy"
41
have_va_copy="__va_copy"
42
AC_DEFINE([va_copy],[__va_copy],[__va_copy() was the originally proposed name])
46
AC_MSG_CHECKING([for va_copy() or replacement])
47
AC_MSG_RESULT([$have_va_copy])
49
if test "x$have_va_copy" != "xno"; then
50
AC_DEFINE([HAVE_VA_COPY],1,[Whether we have the va_copy() function])