~ubuntu-branches/ubuntu/jaunty/libvirt/jaunty-updates

« back to all changes in this revision

Viewing changes to gnulib/m4/sys_socket_h.m4

  • Committer: Bazaar Package Importer
  • Author(s): Soren Hansen
  • Date: 2009-01-08 23:01:16 UTC
  • mfrom: (1.1.8 upstream) (3.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20090108230116-niu4xzgypapywhmx
Tags: 0.5.1-4ubuntu1
* Merge with Debian experimental.
  - debian/control:
    + Don't build-depend on QEmu.
    + Add "XS-Debian-" prefix to Debian's Vcs headers.
    + Bump bridge-utils, dnsmasq-base, netcat-openbsd, and iptables
      to Depends of libvirt-bin.
    + s/interract/interact/g
    + Add versioned Conflicts/Replaces to libvirt0 for libvirt0-dbg,
      since we used to ship them as such.
  - Rename libvirt group to libvirtd.
  - 0005-delayed_iff_up_bridge.patch: Don't try to bring up the bridge
    before at least one interface has been added to it.
  - dont_clobber_existing_bridges.patch: Assign the name of the virtual
    bridge dynamically to avoid interfering with existing bridges.
  - better_default_uri_virsh.patch: Default to qemu:///system if the
    user has write access to the libvirt socket, otherwise
    qemu:///session.
  - We call libxen-dev libxen3-dev, so change all references.
* Included (but did not enable) opennebula patch (since it's not in
  the archive yet).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# sys_socket_h.m4 serial 6
 
1
# sys_socket_h.m4 serial 12
2
2
dnl Copyright (C) 2005-2008 Free Software Foundation, Inc.
3
3
dnl This file is free software; the Free Software Foundation
4
4
dnl gives unlimited permission to copy and/or distribute it,
8
8
 
9
9
AC_DEFUN([gl_HEADER_SYS_SOCKET],
10
10
[
 
11
  AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS])
11
12
  AC_REQUIRE([AC_C_INLINE])
12
13
 
13
14
  AC_CACHE_CHECK([whether <sys/socket.h> is self-contained],
44
45
    gl_CHECK_NEXT_HEADERS([sys/socket.h])
45
46
    if test $ac_cv_header_sys_socket_h = yes; then
46
47
      HAVE_SYS_SOCKET_H=1
47
 
      HAVE_WINSOCK2_H=0
48
48
      HAVE_WS2TCPIP_H=0
49
49
    else
50
50
      HAVE_SYS_SOCKET_H=0
52
52
      dnl the check for those headers unconditional; yet cygwin reports
53
53
      dnl that the headers are present but cannot be compiled (since on
54
54
      dnl cygwin, all socket information should come from sys/socket.h).
55
 
      AC_CHECK_HEADERS([winsock2.h ws2tcpip.h])
56
 
      if test $ac_cv_header_winsock2_h = yes; then
57
 
        HAVE_WINSOCK2_H=1
58
 
      else
59
 
        HAVE_WINSOCK2_H=0
60
 
      fi
 
55
      AC_CHECK_HEADERS([ws2tcpip.h])
61
56
      if test $ac_cv_header_ws2tcpip_h = yes; then
62
57
        HAVE_WS2TCPIP_H=1
63
58
      else
64
59
        HAVE_WS2TCPIP_H=0
65
60
      fi
66
61
    fi
 
62
    gl_PREREQ_SYS_H_WINSOCK2
67
63
    AC_SUBST([HAVE_SYS_SOCKET_H])
68
 
    AC_SUBST([HAVE_WINSOCK2_H])
69
64
    AC_SUBST([HAVE_WS2TCPIP_H])
70
65
  fi
71
66
  AC_SUBST([SYS_SOCKET_H])
72
67
])
 
68
 
 
69
# Common prerequisites of of the <sys/socket.h> replacement and of the
 
70
# <sys/select.h> replacement.
 
71
# Sets and substitutes HAVE_WINSOCK2_H.
 
72
AC_DEFUN([gl_PREREQ_SYS_H_WINSOCK2],
 
73
[
 
74
  m4_ifdef([gl_UNISTD_H_DEFAULTS], [AC_REQUIRE([gl_UNISTD_H_DEFAULTS])])
 
75
  m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])])
 
76
  AC_CHECK_HEADERS_ONCE([sys/socket.h])
 
77
  if test $ac_cv_header_sys_socket_h != yes; then
 
78
    dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make
 
79
    dnl the check for those headers unconditional; yet cygwin reports
 
80
    dnl that the headers are present but cannot be compiled (since on
 
81
    dnl cygwin, all socket information should come from sys/socket.h).
 
82
    AC_CHECK_HEADERS([winsock2.h])
 
83
  fi
 
84
  if test "$ac_cv_header_winsock2_h" = yes; then
 
85
    HAVE_WINSOCK2_H=1
 
86
    UNISTD_H_HAVE_WINSOCK2_H=1
 
87
    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
 
88
  else
 
89
    HAVE_WINSOCK2_H=0
 
90
  fi
 
91
  AC_SUBST([HAVE_WINSOCK2_H])
 
92
])
 
93
 
 
94
AC_DEFUN([gl_SYS_SOCKET_MODULE_INDICATOR],
 
95
[
 
96
  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
 
97
  AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS])
 
98
  GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
 
99
])
 
100
 
 
101
AC_DEFUN([gl_SYS_SOCKET_H_DEFAULTS],
 
102
[
 
103
  GNULIB_SOCKET=0;      AC_SUBST([GNULIB_SOCKET])
 
104
  GNULIB_CONNECT=0;     AC_SUBST([GNULIB_CONNECT])
 
105
  GNULIB_ACCEPT=0;      AC_SUBST([GNULIB_ACCEPT])
 
106
  GNULIB_BIND=0;        AC_SUBST([GNULIB_BIND])
 
107
  GNULIB_GETPEERNAME=0; AC_SUBST([GNULIB_GETPEERNAME])
 
108
  GNULIB_GETSOCKNAME=0; AC_SUBST([GNULIB_GETSOCKNAME])
 
109
  GNULIB_GETSOCKOPT=0;  AC_SUBST([GNULIB_GETSOCKOPT])
 
110
  GNULIB_LISTEN=0;      AC_SUBST([GNULIB_LISTEN])
 
111
  GNULIB_RECV=0;        AC_SUBST([GNULIB_RECV])
 
112
  GNULIB_SEND=0;        AC_SUBST([GNULIB_SEND])
 
113
  GNULIB_RECVFROM=0;    AC_SUBST([GNULIB_RECVFROM])
 
114
  GNULIB_SENDTO=0;      AC_SUBST([GNULIB_SENDTO])
 
115
  GNULIB_SETSOCKOPT=0;  AC_SUBST([GNULIB_SETSOCKOPT])
 
116
  GNULIB_SHUTDOWN=0;    AC_SUBST([GNULIB_SHUTDOWN])
 
117
])