1 dnl Macros to configure GPGME
2 dnl Copyright (C) 2004 g10 Code GmbH
4 dnl This file is part of GPGME.
6 dnl GPGME is free software; you can redistribute it and/or modify it
7 dnl under the terms of the GNU Lesser General Public License as
8 dnl published by the Free Software Foundation; either version 2.1 of the
9 dnl License, or (at your option) any later version.
11 dnl GPGME is distributed in the hope that it will be useful, but WITHOUT
12 dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
14 dnl Public License for more details.
16 dnl You should have received a copy of the GNU Lesser General Public
17 dnl License along with this program; if not, write to the Free Software
18 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
20 dnl GNUPG_CHECK_VA_COPY()
21 dnl Do some check on how to implement va_copy.
22 dnl May define MUST_COPY_VA_BY_VAL.
23 dnl Actual test code taken from glib-1.1.
24 AC_DEFUN([GNUPG_CHECK_VA_COPY],
25 [ AC_MSG_CHECKING(whether va_lists must be copied by value)
26 AC_CACHE_VAL(gnupg_cv_must_copy_va_byval,[
27 if test "$cross_compiling" = yes; then
28 gnupg_cv_must_copy_va_byval=no
30 gnupg_cv_must_copy_va_byval=no
38 if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
49 ],gnupg_cv_must_copy_va_byval=yes)
52 if test "$gnupg_cv_must_copy_va_byval" = yes; then
53 AC_DEFINE(MUST_COPY_VA_BYVAL,1,[used to implement the va_copy macro])
55 if test "$cross_compiling" = yes; then
56 AC_MSG_RESULT(assuming $gnupg_cv_must_copy_va_byval)
58 AC_MSG_RESULT($gnupg_cv_must_copy_va_byval)