summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2001-04-30 01:57:26 +0200
committerKevin Ryde <user42@zip.com.au>2001-04-30 01:57:26 +0200
commit67a5e3c92f003c611df9cc7ee7e737c48fd73ff1 (patch)
treee4913d7df846fbe23161ae7303b992acc246da38 /aclocal.m4
parentea5ff0c67dc313509863797d2c9eb92a2c1e5b64 (diff)
downloadgmp-67a5e3c92f003c611df9cc7ee7e737c48fd73ff1.tar.gz
Regenerate for:
* acinclude.m4 (GMP_C_STDARG): New macro.
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m434
1 files changed, 34 insertions, 0 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 8ef7be030..e0422b2a0 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1440,6 +1440,40 @@ fi
])
+dnl GMP_C_STDARG
+dnl ------------
+dnl Test whether to use <stdarg.h> or <varargs.h>.
+dnl
+dnl Notice the AC_DEFINE here is HAVE_STDARG to avoid clashing with
+dnl HAVE_STDARG_H which could arise from AC_CHECK_HEADERS.
+dnl
+dnl This test might be slight overkill, after all there's really only going
+dnl to be ANSI or K&R and the two can be differentiated by AC_PROG_CC_STDC
+dnl or very likely by the setups for _PROTO in gmp.h. On the other hand
+dnl this test is nice and direct, being what we're going to actually use.
+
+AC_DEFUN(GMP_C_STDARG,
+[AC_CACHE_CHECK([whether <stdarg.h> exists and works],
+ gmp_cv_c_stdarg,
+[AC_TRY_COMPILE(
+[#include <stdarg.h>
+int foo (int x, ...)
+{
+ va_list ap;
+ int y;
+ va_start (ap, x);
+ y = va_arg (ap, int);
+ va_end (ap);
+ return y;
+}],,
+gmp_cv_c_stdarg=yes, gmp_cv_c_stdarg=no)
+])
+if test $gmp_cv_c_stdarg = yes; then
+ AC_DEFINE(HAVE_STDARG, 1, [Define if <stdarg.h> exists and works])
+fi
+])
+
+
dnl GMP_FUNC_ALLOCA
dnl ---------------
dnl Determine whether "alloca" is available. This is AC_FUNC_ALLOCA from