Test for va_copy should be a link test, not a compile test
authorKen Raeburn <raeburn@mit.edu>
Mon, 2 Jul 2007 19:13:05 +0000 (19:13 +0000)
committerKen Raeburn <raeburn@mit.edu>
Mon, 2 Jul 2007 19:13:05 +0000 (19:13 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19659 dc483132-0cff-0310-8789-dd5450dbe970

src/configure.in

index 68a03d7d55703614064bec1568581b053b8ba167..9e41b62c31294adc4028b7587110348a80da295d 100644 (file)
@@ -15,12 +15,18 @@ dnl
 AC_REQUIRE_CPP
 dnl
 AC_CACHE_CHECK(if va_copy is available, krb5_cv_va_copy,
-[AC_COMPILE_IFELSE([
+[AC_LINK_IFELSE([
 #include <stdarg.h>
 void f(va_list ap) {
   va_list ap2;
   va_copy(ap2, ap);
   va_end(ap2);
+}
+va_list x;
+int main()
+{
+  f(x);
+  return 0;
 }], krb5_cv_va_copy=yes, krb5_cv_va_copy=no)])
 if test "$krb5_cv_va_copy" = yes; then
   AC_DEFINE(HAS_VA_COPY,1,[Define if va_copy macro or function is available.])