Post-release fixup.
[gpgme.git] / acinclude.m4
index 3042240fea2bd49862c087117a07b9201fe10f41..96766561cc76ff5677cb4aaf3f1c60860e105f86 100644 (file)
@@ -24,7 +24,7 @@ dnl   for one substitution.
 dnl   We must use a temp file in the current directory because make
 dnl   distcheck installs all sourcefiles RO.
 dnl   (wk 2001-12-18)
-AC_DEFUN(GNUPG_FIX_HDR_VERSION,
+AC_DEFUN([GNUPG_FIX_HDR_VERSION],
   [ sed "s/^#define $2 \".*/#define $2 \"$VERSION\"/" $srcdir/$1 > fixhdr.tmp
     if cmp -s $srcdir/$1 fixhdr.tmp 2>/dev/null; then
         rm -f fixhdr.tmp
@@ -47,11 +47,14 @@ dnl GNUPG_CHECK_VA_COPY()
 dnl   Do some check on how to implement va_copy.
 dnl   May define MUST_COPY_VA_BY_VAL.
 dnl   Actual test code taken from glib-1.1.
-AC_DEFUN(GNUPG_CHECK_VA_COPY,
+AC_DEFUN([GNUPG_CHECK_VA_COPY],
 [ AC_MSG_CHECKING(whether va_lists must be copied by value)
   AC_CACHE_VAL(gnupg_cv_must_copy_va_byval,[
-    gnupg_cv_must_copy_va_byval=no
-    AC_TRY_RUN([
+    if test "$cross_compiling" = yes; then
+      gnupg_cv_must_copy_va_byval=no
+    else
+      gnupg_cv_must_copy_va_byval=no
+      AC_TRY_RUN([
        #include <stdarg.h>
        void f (int i, ...)
        {
@@ -69,10 +72,15 @@ AC_DEFUN(GNUPG_CHECK_VA_COPY,
           f (0, 42);
             return 0;
        }
-    ],gnupg_cv_must_copy_va_byval=yes)
+      ],gnupg_cv_must_copy_va_byval=yes)
+    fi
   ])
   if test "$gnupg_cv_must_copy_va_byval" = yes; then
      AC_DEFINE(MUST_COPY_VA_BYVAL,1,[used to implement the va_copy macro])
   fi
-  AC_MSG_RESULT($gnupg_cv_must_copy_va_byval)
+  if test "$cross_compiling" = yes; then
+    AC_MSG_RESULT(assuming $gnupg_cv_must_copy_va_byval)
+  else
+    AC_MSG_RESULT($gnupg_cv_must_copy_va_byval)
+  fi
 ])