~ubuntu-branches/ubuntu/vivid/curl/vivid

« back to all changes in this revision

Viewing changes to acinclude.m4

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2013-05-07 12:16:37 UTC
  • mfrom: (3.4.37 sid)
  • Revision ID: package-import@ubuntu.com-20130507121637-9t3i98qgsyr9dw5d
Tags: 7.30.0-1ubuntu1
* Resynchronize on Debian. Remaining changes:
  - Drop dependencies not in main:
    + Build-Depends: Drop stunnel4 and libssh2-1-dev.
    + Drop libssh2-1-dev from binary package Depends.
  - Add new libcurl3-udeb package.
  - Add new curl-udeb package.
* Add warning to debian/patches/series.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
#                            | (__| |_| |  _ <| |___
6
6
#                             \___|\___/|_| \_\_____|
7
7
#
8
 
# Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
 
8
# Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
9
9
#
10
10
# This software is licensed as described in the file COPYING, which
11
11
# you should have received as part of this distribution. The terms
1597
1597
  fi
1598
1598
])
1599
1599
 
1600
 
 
1601
 
dnl CURL_CHECK_FUNC_RECVFROM
1602
 
dnl -------------------------------------------------
1603
 
dnl Test if the socket recvfrom() function is available,
1604
 
dnl and check its return type and the types of its
1605
 
dnl arguments. If the function succeeds HAVE_RECVFROM
1606
 
dnl will be defined, defining the types of the arguments
1607
 
dnl in RECVFROM_TYPE_ARG1, RECVFROM_TYPE_ARG2, and so on
1608
 
dnl to RECVFROM_TYPE_ARG6, defining also the type of the
1609
 
dnl function return value in RECVFROM_TYPE_RETV.
1610
 
dnl Notice that the types returned for pointer arguments
1611
 
dnl will actually be the type pointed by the pointer.
1612
 
 
1613
 
AC_DEFUN([CURL_CHECK_FUNC_RECVFROM], [
1614
 
  AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK])dnl
1615
 
  AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK2])dnl
1616
 
  AC_CHECK_HEADERS(sys/types.h sys/socket.h)
1617
 
  #
1618
 
  AC_MSG_CHECKING([for recvfrom])
1619
 
  AC_LINK_IFELSE([
1620
 
    AC_LANG_PROGRAM([[
1621
 
#undef inline
1622
 
#ifdef HAVE_WINDOWS_H
1623
 
#ifndef WIN32_LEAN_AND_MEAN
1624
 
#define WIN32_LEAN_AND_MEAN
1625
 
#endif
1626
 
#include <windows.h>
1627
 
#ifdef HAVE_WINSOCK2_H
1628
 
#include <winsock2.h>
1629
 
#else
1630
 
#ifdef HAVE_WINSOCK_H
1631
 
#include <winsock.h>
1632
 
#endif
1633
 
#endif
1634
 
#else
1635
 
#ifdef HAVE_SYS_TYPES_H
1636
 
#include <sys/types.h>
1637
 
#endif
1638
 
#ifdef HAVE_SYS_SOCKET_H
1639
 
#include <sys/socket.h>
1640
 
#endif
1641
 
#endif
1642
 
    ]],[[
1643
 
      recvfrom(0, 0, 0, 0, 0, 0);
1644
 
    ]])
1645
 
  ],[
1646
 
    AC_MSG_RESULT([yes])
1647
 
    curl_cv_recvfrom="yes"
1648
 
  ],[
1649
 
    AC_MSG_RESULT([no])
1650
 
    curl_cv_recvfrom="no"
1651
 
  ])
1652
 
  #
1653
 
  if test "$curl_cv_recvfrom" = "yes"; then
1654
 
    AC_CACHE_CHECK([types of args and return type for recvfrom],
1655
 
      [curl_cv_func_recvfrom_args], [
1656
 
      curl_cv_func_recvfrom_args="unknown"
1657
 
      for recvfrom_retv in 'int' 'ssize_t'; do
1658
 
        for recvfrom_arg1 in 'int' 'ssize_t' 'SOCKET'; do
1659
 
          for recvfrom_arg2 in 'char *' 'void *'; do
1660
 
            for recvfrom_arg3 in 'size_t' 'int' 'socklen_t' 'unsigned int'; do
1661
 
              for recvfrom_arg4 in 'int' 'unsigned int'; do
1662
 
                for recvfrom_arg5 in 'struct sockaddr *' 'void *' 'const struct sockaddr *'; do
1663
 
                  for recvfrom_arg6 in 'socklen_t *' 'int *' 'unsigned int *' 'size_t *' 'void *'; do
1664
 
                    if test "$curl_cv_func_recvfrom_args" = "unknown"; then
1665
 
                      AC_COMPILE_IFELSE([
1666
 
                        AC_LANG_PROGRAM([[
1667
 
#undef inline
1668
 
#ifdef HAVE_WINDOWS_H
1669
 
#ifndef WIN32_LEAN_AND_MEAN
1670
 
#define WIN32_LEAN_AND_MEAN
1671
 
#endif
1672
 
#include <windows.h>
1673
 
#ifdef HAVE_WINSOCK2_H
1674
 
#include <winsock2.h>
1675
 
#else
1676
 
#ifdef HAVE_WINSOCK_H
1677
 
#include <winsock.h>
1678
 
#endif
1679
 
#endif
1680
 
#define RECVFROMCALLCONV PASCAL
1681
 
#else
1682
 
#ifdef HAVE_SYS_TYPES_H
1683
 
#include <sys/types.h>
1684
 
#endif
1685
 
#ifdef HAVE_SYS_SOCKET_H
1686
 
#include <sys/socket.h>
1687
 
#endif
1688
 
#define RECVFROMCALLCONV
1689
 
#endif
1690
 
                          extern $recvfrom_retv RECVFROMCALLCONV
1691
 
                          recvfrom($recvfrom_arg1, $recvfrom_arg2,
1692
 
                                   $recvfrom_arg3, $recvfrom_arg4,
1693
 
                                   $recvfrom_arg5, $recvfrom_arg6);
1694
 
                        ]],[[
1695
 
                          $recvfrom_arg1 s=0;
1696
 
                          $recvfrom_arg2 buf=0;
1697
 
                          $recvfrom_arg3 len=0;
1698
 
                          $recvfrom_arg4 flags=0;
1699
 
                          $recvfrom_arg5 addr=0;
1700
 
                          $recvfrom_arg6 addrlen=0;
1701
 
                          $recvfrom_retv res=0;
1702
 
                          res = recvfrom(s, buf, len, flags, addr, addrlen);
1703
 
                        ]])
1704
 
                      ],[
1705
 
                        curl_cv_func_recvfrom_args="$recvfrom_arg1,$recvfrom_arg2,$recvfrom_arg3,$recvfrom_arg4,$recvfrom_arg5,$recvfrom_arg6,$recvfrom_retv"
1706
 
                      ])
1707
 
                    fi
1708
 
                  done
1709
 
                done
1710
 
              done
1711
 
            done
1712
 
          done
1713
 
        done
1714
 
      done
1715
 
    ]) # AC-CACHE-CHECK
1716
 
    # Nearly last minute change for this release starts here
1717
 
    AC_DEFINE_UNQUOTED(HAVE_RECVFROM, 1,
1718
 
      [Define to 1 if you have the recvfrom function.])
1719
 
    ac_cv_func_recvfrom="yes"
1720
 
    # Nearly last minute change for this release ends here
1721
 
    if test "$curl_cv_func_recvfrom_args" = "unknown"; then
1722
 
      AC_MSG_WARN([Cannot find proper types to use for recvfrom args])
1723
 
    else
1724
 
      recvfrom_prev_IFS=$IFS; IFS=','
1725
 
      set dummy `echo "$curl_cv_func_recvfrom_args" | sed 's/\*/\*/g'`
1726
 
      IFS=$recvfrom_prev_IFS
1727
 
      shift
1728
 
      #
1729
 
      recvfrom_ptrt_arg2=$[2]
1730
 
      recvfrom_qual_ptrt_arg5=$[5]
1731
 
      recvfrom_ptrt_arg6=$[6]
1732
 
      #
1733
 
      AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG1, $[1],
1734
 
        [Define to the type of arg 1 for recvfrom.])
1735
 
      AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG3, $[3],
1736
 
        [Define to the type of arg 3 for recvfrom.])
1737
 
      AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG4, $[4],
1738
 
        [Define to the type of arg 4 for recvfrom.])
1739
 
      AC_DEFINE_UNQUOTED(RECVFROM_TYPE_RETV, $[7],
1740
 
        [Define to the function return type for recvfrom.])
1741
 
      #
1742
 
      prev_sh_opts=$-
1743
 
      #
1744
 
      case $prev_sh_opts in
1745
 
        *f*)
1746
 
          ;;
1747
 
        *)
1748
 
          set -f
1749
 
          ;;
1750
 
      esac
1751
 
      #
1752
 
      case "$recvfrom_qual_ptrt_arg5" in
1753
 
        const*)
1754
 
          recvfrom_qual_arg5=const
1755
 
          recvfrom_ptrt_arg5=`echo $recvfrom_qual_ptrt_arg5 | sed 's/^const //'`
1756
 
        ;;
1757
 
        *)
1758
 
          recvfrom_qual_arg5=
1759
 
          recvfrom_ptrt_arg5=$recvfrom_qual_ptrt_arg5
1760
 
        ;;
1761
 
      esac
1762
 
      #
1763
 
      recvfrom_type_arg2=`echo $recvfrom_ptrt_arg2 | sed 's/ \*//'`
1764
 
      recvfrom_type_arg5=`echo $recvfrom_ptrt_arg5 | sed 's/ \*//'`
1765
 
      recvfrom_type_arg6=`echo $recvfrom_ptrt_arg6 | sed 's/ \*//'`
1766
 
      #
1767
 
      AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG2, $recvfrom_type_arg2,
1768
 
        [Define to the type pointed by arg 2 for recvfrom.])
1769
 
      AC_DEFINE_UNQUOTED(RECVFROM_QUAL_ARG5, $recvfrom_qual_arg5,
1770
 
        [Define to the type qualifier pointed by arg 5 for recvfrom.])
1771
 
      AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG5, $recvfrom_type_arg5,
1772
 
        [Define to the type pointed by arg 5 for recvfrom.])
1773
 
      AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG6, $recvfrom_type_arg6,
1774
 
        [Define to the type pointed by arg 6 for recvfrom.])
1775
 
      #
1776
 
      if test "$recvfrom_type_arg2" = "void"; then
1777
 
        AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG2_IS_VOID, 1,
1778
 
          [Define to 1 if the type pointed by arg 2 for recvfrom is void.])
1779
 
      fi
1780
 
      if test "$recvfrom_type_arg5" = "void"; then
1781
 
        AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG5_IS_VOID, 1,
1782
 
          [Define to 1 if the type pointed by arg 5 for recvfrom is void.])
1783
 
      fi
1784
 
      if test "$recvfrom_type_arg6" = "void"; then
1785
 
        AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG6_IS_VOID, 1,
1786
 
          [Define to 1 if the type pointed by arg 6 for recvfrom is void.])
1787
 
      fi
1788
 
      #
1789
 
      case $prev_sh_opts in
1790
 
        *f*)
1791
 
          ;;
1792
 
        *)
1793
 
          set +f
1794
 
          ;;
1795
 
      esac
1796
 
      #
1797
 
      AC_DEFINE_UNQUOTED(HAVE_RECVFROM, 1,
1798
 
        [Define to 1 if you have the recvfrom function.])
1799
 
      ac_cv_func_recvfrom="yes"
1800
 
    fi
1801
 
  else
1802
 
    AC_MSG_WARN([Unable to link function recvfrom])
1803
 
  fi
1804
 
])
1805
 
 
1806
 
 
1807
1600
dnl CURL_CHECK_MSG_NOSIGNAL
1808
1601
dnl -------------------------------------------------
1809
1602
dnl Check for MSG_NOSIGNAL