[dovecot-cvs] dovecot configure.in,1.78,1.79

cras at procontrol.fi cras at procontrol.fi
Fri Dec 27 18:02:27 EET 2002


Update of /home/cvs/dovecot
In directory danu:/tmp/cvs-serv476

Modified Files:
	configure.in 
Log Message:
We weren't using va_list properly, especially gcc/PowerPC didn't like it.



Index: configure.in
===================================================================
RCS file: /home/cvs/dovecot/configure.in,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -d -r1.78 -r1.79
--- configure.in	22 Dec 2002 08:49:26 -0000	1.78
+++ configure.in	27 Dec 2002 16:02:25 -0000	1.79
@@ -1,7 +1,7 @@
 AC_INIT(src)
 
 AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(dovecot, 0.99.4)
+AM_INIT_AUTOMAKE(dovecot, 0.99.5rc1)
 
 AM_MAINTAINER_MODE
 
@@ -514,6 +514,84 @@
 ], [
   AC_MSG_RESULT(no)
 ])
+
+dnl ***
+dnl *** va_copy checks (from GLIB)
+dnl ***
+
+AC_CACHE_CHECK([for an implementation of va_copy()],lib_cv_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;
+	}],
+	[lib_cv_va_copy=yes],
+	[lib_cv_va_copy=no],
+	[])
+])
+AC_CACHE_CHECK([for an implementation of __va_copy()],lib_cv___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;
+	}],
+	[lib_cv___va_copy=yes],
+	[lib_cv___va_copy=no],
+	[])
+])
+
+if test "x$lib_cv_va_copy" = "xyes"; then
+  va_copy_func=va_copy
+else if test "x$lib_cv___va_copy" = "xyes"; then
+  va_copy_func=__va_copy
+fi
+fi
+
+if test -n "$va_copy_func"; then
+  AC_DEFINE_UNQUOTED(VA_COPY,$va_copy_func,[A 'va_copy' style function])
+fi
+
+AC_CACHE_CHECK([whether va_lists can be copied by value],lib_cv_va_val_copy,[
+	AC_TRY_RUN([
+	#include <stdarg.h>
+	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;
+	}],
+	[lib_cv_va_val_copy=yes],
+	[lib_cv_va_val_copy=no],
+	[])
+])
+
+if test "x$lib_cv_va_val_copy" = "xno"; then
+  AC_DEFINE(VA_COPY_AS_ARRAY,1, ['va_lists' cannot be copies as values])
+fi
 
 dnl **
 dnl ** SSL




More information about the dovecot-cvs mailing list