diff options
author | Brendan Cully <brendan@kublai.com> | 2005-12-15 18:36:24 +0000 |
---|---|---|
committer | Brendan Cully <brendan@kublai.com> | 2005-12-15 18:36:24 +0000 |
commit | 6d47cd7c44116a7de8f83e054ac3f92994dded26 (patch) | |
tree | 2e101db3aaec0849507d3c3b9c3874add1e6d5a1 /m4/funcs.m4 | |
parent | 1a388b03c75af3c4b8361f21a25db473277809d8 (diff) |
Add mutt_buffer_printf function, with autoconf test for va_copy.
Diffstat (limited to 'm4/funcs.m4')
-rw-r--r-- | m4/funcs.m4 | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/m4/funcs.m4 b/m4/funcs.m4 new file mode 100644 index 00000000..d7157f3e --- /dev/null +++ b/m4/funcs.m4 @@ -0,0 +1,22 @@ +dnl XIPH_ macros are GPL, from http://svn.xiph.org/icecast/trunk/m4 +dnl +# XIPH_FUNC_VA_COPY +# Test for implementation of va_copy, or define appropriately if missing +AC_DEFUN([XIPH_FUNC_VA_COPY], +[dnl +AC_MSG_CHECKING([for va_copy]) +AC_TRY_LINK([#include <stdarg.h>], [va_list ap1, ap2; va_copy(ap1, ap2);], + AC_MSG_RESULT([va_copy]), + [dnl + AH_TEMPLATE([va_copy], [define if va_copy is not available]) + AC_TRY_LINK([#include <stdarg.h>], [va_list ap1, ap2; __va_copy(ap1, ap2);], + [dnl + AC_DEFINE([va_copy], [__va_copy]) + AC_MSG_RESULT([__va_copy])], + [dnl + AC_DEFINE([va_copy(dest,src)], [memcpy(&dest,&src,sizeof(va_list))]) + AC_MSG_RESULT([memcpy]) + ]) + ]) +]) +])dnl XIPH_FUNC_VA_COPY |