summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac39
1 files changed, 3 insertions, 36 deletions
diff --git a/configure.ac b/configure.ac
index 1c88b37c..64a655b1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -617,42 +617,9 @@ else if test "x$dbus_cv___va_copy" = "xyes"; then
fi
fi
-if test -n "$dbus_va_copy_func"; then
- AC_DEFINE_UNQUOTED(DBUS_VA_COPY,$dbus_va_copy_func,[A 'va_copy' style function])
-fi
-
-AC_LANG_PUSH(C)
-AC_CACHE_CHECK([whether va_lists can be copied by value],
- dbus_cv_va_val_copy,
- [AC_RUN_IFELSE([AC_LANG_PROGRAM(
-[[
- #include <stdarg.h>
- #include <stdlib.h>
-]],
-[[
- static void f (int i, ...) {
- va_list args1, args2;
- va_start (args1, i);
- 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;
- }
-]])],
- [dbus_cv_va_val_copy=yes],
- [dbus_cv_va_val_copy=no],
- [dbus_cv_va_val_copy=yes])
-])
-AC_LANG_POP(C)
-
-if test "x$dbus_cv_va_val_copy" = "xno"; then
- AC_DEFINE(DBUS_VA_COPY_AS_ARRAY,1, ['va_lists' cannot be copies as values])
-fi
-
+AS_IF([test -n "$dbus_va_copy_func"],
+ [AC_DEFINE_UNQUOTED([DBUS_VA_COPY], [$dbus_va_copy_func], [A 'va_copy' style function])],
+ [AC_MSG_ERROR([dbus requires an ISO C99-compatible va_copy() macro, or a compatible __va_copy(), or MSVC >= 2010 and CMake])])
#### Atomic integers