Blob Blame History Raw
--- kdenetwork-3.4.1.o/kopete/protocols/configure.in.in.tn	2005-07-21 19:08:18.000000000 +0200
+++ kdenetwork-3.4.1.o/kopete/protocols/configure.in.in	2005-07-21 19:18:41.000000000 +0200
@@ -113,10 +113,46 @@
 	], [
 		 AC_MSG_RESULT([no])
 	])
-	AC_CHECK_FUNCS([va_copy],
-		       [AC_LIBGADU_DEFINE([HAVE_VA_COPY])],[])
-	AC_CHECK_FUNCS([_va_copy],
-		       [AC_LIBGADU_DEFINE([HAVE__VA_COPY])],[])
+	AC_MSG_CHECKING([for an implementation of va_copy()])
+   AC_TRY_RUN([
+   #include <stdarg.h>
+   void f (int i, ...) {
+   va_list args1, args2;
+   va_start (args1, i);
+   va_copy (args2, args1);
+   if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
+     exit (1);
+   va_end (args1); va_end (args2);
+   }
+   int main() {
+     f (0, 42);
+     return 0;
+   }],[
+      AC_MSG_RESULT([yes])
+      AC_LIBGADU_DEFINE([HAVE_VA_COPY])
+   ], [
+       AC_MSG_RESULT([no])
+   ])
+	AC_MSG_CHECKING([for an implementation of __va_copy()])
+   AC_TRY_RUN([
+   #include <stdarg.h>
+   void f (int i, ...) {
+   va_list args1, args2;
+   va_start (args1, i);
+   __va_copy (args2, args1);
+   if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
+     exit (1);
+   va_end (args1); va_end (args2);
+   }
+   int main() {
+     f (0, 42);
+     return 0;
+   }],[
+		AC_MSG_RESULT([yes])
+      AC_LIBGADU_DEFINE([HAVE___VA_COPY])
+   ], [
+       AC_MSG_RESULT([no])
+   ])
 fi