Index: autoconf/config.h.in
===================================================================
--- autoconf/config.h.in	(revision 5412)
+++ autoconf/config.h.in	(working copy)
@@ -202,6 +202,8 @@
 
 #undef HAVE_LIBSM
 
+#undef HAVE_VA_COPY
+
 /* Check for thread safe routines */
 #undef HAVE_LOCALTIME_R
 #undef HAVE_READDIR_R
Index: autoconf/configure.in
===================================================================
--- autoconf/configure.in	(revision 5412)
+++ autoconf/configure.in	(working copy)
@@ -1720,6 +1720,17 @@
 
 AC_CHECK_FUNCS(snprintf vsnprintf gethostid fseeko)
 
+AC_CACHE_CHECK(for va_copy, ba_cv_va_copy,
+  [AC_TRY_LINK([
+#include <stdarg.h>
+void use_va_copy(va_list args){va_list args2; va_copy(args2,args); va_end(args2);}
+void call_use_va_copy(int junk,...){va_list args; va_start(args,junk); use_va_copy(args); va_end(args);}
+],
+  [call_use_va_copy(1,2,3)],
+  ba_cv_va_copy=yes, ba_cv_va_copy=no)])
+test $ba_cv_va_copy = yes && AC_DEFINE(HAVE_VA_COPY)
+
+
 dnl# --------------------------------------------------------------------------
 dnl# CHECKING FOR THREAD SAFE FUNCTIONS
 dnl# --------------------------------------------------------------------------
Index: src/baconfig.h
===================================================================
--- src/baconfig.h	(revision 5412)
+++ src/baconfig.h	(working copy)
@@ -38,8 +38,6 @@
 
 /* Bacula common configuration defines */
 
-#define HAVE_VA_COPY
-
 #undef  TRUE
 #undef  FALSE
 #define TRUE  1
@@ -629,7 +627,6 @@
 #endif
 
 #if defined(HAVE_DARWIN_OS) || defined(HAVE_OSF1_OS)
-#undef HAVE_VA_COPY
 /* Apparently someone forgot to wrap getdomainname as a C function */
 extern "C" int getdomainname(char *name, int len);
 #endif
@@ -661,7 +658,6 @@
 
 #ifdef HAVE_HPUX_OS
 # undef h_errno
-#undef HAVE_VA_COPY
 extern int h_errno;
 /* the {get,set}domainname() functions exist in HPUX's libc.
  * the configure script detects that correctly.
@@ -674,7 +670,6 @@
 
 
 #ifdef HAVE_OSF1_OS
-#undef HAVE_VA_COPY
 extern "C" int fchdir(int filedes);
 extern "C" long gethostid(void);
 extern "C" int mknod ( const char *path, int mode, dev_t device );
