~ubuntu-branches/ubuntu/saucy/libgphoto2/saucy-proposed

« back to all changes in this revision

Viewing changes to m4m/gp-va-copy.m4

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2013-07-31 07:00:09 UTC
  • mfrom: (1.4.4)
  • Revision ID: package-import@ubuntu.com-20130731070009-enrbvg3hry64cxl1
Tags: 2.5.2-0ubuntu1
* New upstream release.
* Drop 01-increase_max_entries.patch, 02-libusbx_no_debug.patch,
  03-libusbx-fixes.patch: fixed upstream.
* Add libxml2-dev build dependency for new optional features.
* ABI changes: libgphoto2-2 → libgphoto2-6,
  libgphoto2-port0 → libgphoto2-port10
* debian/libgphoto2-dev-doc.install: Adjust to changed HTML API doc folder
  name.
* debian/libgphoto2-port10.install: Adjust for changed libgphoto-port ABI.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl @synopsis GP_VA_COPY
 
2
dnl
 
3
dnl Checks whether one of these compiles and links:
 
4
dnl 1. va_copy()
 
5
dnl 2. __va_copy()
 
6
dnl 3. fallback
 
7
dnl
 
8
dnl In case of 1 or 2, AC_DEFINE(HAVE_VA_COPY).
 
9
dnl In case of 2, AC_DEFINE(va_copy,__va_copy)
 
10
dnl
 
11
dnl In code, use it like this
 
12
dnl #ifdef HAVE_VA_COPY
 
13
dnl    ... code with va_copy ...
 
14
dnl #else
 
15
dnl    ... code without va_copy or with error ...
 
16
dnl #endif
 
17
dnl
 
18
AC_DEFUN([GP_VA_COPY],[dnl
 
19
dnl
 
20
AC_CHECK_HEADER([stdarg.h],[],[
 
21
        AC_MSG_ERROR([
 
22
Building $PACKAGE_NAME requires <stdarg.h>.
 
23
])
 
24
])
 
25
dnl
 
26
have_va_copy=no
 
27
AC_TRY_LINK([
 
28
        #include <stdarg.h>
 
29
],[
 
30
        va_list a,b;
 
31
        va_copy(a,b);
 
32
],[
 
33
        have_va_copy="va_copy"
 
34
],[
 
35
        AC_TRY_LINK([
 
36
                #include <stdarg.h>
 
37
        ],[
 
38
                va_list a,b;
 
39
                __va_copy(a,b);
 
40
        ],[
 
41
                have_va_copy="__va_copy"
 
42
                AC_DEFINE([va_copy],[__va_copy],[__va_copy() was the originally proposed name])
 
43
        ])
 
44
])
 
45
dnl
 
46
AC_MSG_CHECKING([for va_copy() or replacement])
 
47
AC_MSG_RESULT([$have_va_copy])
 
48
dnl
 
49
if test "x$have_va_copy" != "xno"; then
 
50
        AC_DEFINE([HAVE_VA_COPY],1,[Whether we have the va_copy() function])
 
51
fi
 
52
])dnl
 
53
dnl
 
54
dnl
 
55
dnl Local Variables:
 
56
dnl mode: autoconf
 
57
dnl End: