~ubuntu-branches/ubuntu/karmic/libvirt/karmic-proposed

« back to all changes in this revision

Viewing changes to gnulib/m4/sockets.m4

  • Committer: Bazaar Package Importer
  • Author(s): Soren Hansen
  • Date: 2009-02-11 01:01:42 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20090211010142-8zrm7z1u6ryfhkiq
Tags: 0.6.0-1ubuntu1
* Merge with Debian experimental. Remaining changes:
  - 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
    main yet).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# sockets.m4 serial 2
2
 
dnl Copyright (C) 2008 Free Software Foundation, Inc.
 
1
# sockets.m4 serial 4
 
2
dnl Copyright (C) 2008, 2009 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,
5
5
dnl with or without modifications, as long as this notice is preserved.
26
26
      LIBS="$gl_save_LIBS"
27
27
    ])
28
28
    if test "$gl_cv_func_wsastartup" = "yes"; then
29
 
      AC_DEFINE([WINDOWS_SOCKETS], 1, [Define if WSAStartup is needed.])
 
29
      AC_DEFINE([WINDOWS_SOCKETS], [1], [Define if WSAStartup is needed.])
30
30
      LIBSOCKET='-lws2_32'
31
31
    fi
32
32
  else
33
33
    dnl Unix API.
34
34
    dnl Solaris has most socket functions in libsocket.
35
 
    AC_CACHE_CHECK([whether setsockopt requires -lsocket], [gl_cv_lib_socket], [
36
 
      gl_cv_lib_socket=no
 
35
    dnl Haiku has most socket functions in libnetwork.
 
36
    dnl BeOS has most socket functions in libnet.
 
37
    AC_CACHE_CHECK([for library containing setsockopt], [gl_cv_lib_socket], [
 
38
      gl_cv_lib_socket=
37
39
      AC_TRY_LINK([extern
38
40
#ifdef __cplusplus
39
41
"C"
41
43
char setsockopt();], [setsockopt();],
42
44
        [],
43
45
        [gl_save_LIBS="$LIBS"
44
 
         LIBS="$LIBS -lsocket"
 
46
         LIBS="$gl_save_LIBS -lsocket"
45
47
         AC_TRY_LINK([extern
46
48
#ifdef __cplusplus
47
49
"C"
48
50
#endif
49
51
char setsockopt();], [setsockopt();],
50
 
           [gl_cv_lib_socket=yes])
 
52
           [gl_cv_lib_socket="-lsocket"])
 
53
         if test -z "$gl_cv_lib_socket"; then
 
54
           LIBS="$gl_save_LIBS -lnetwork"
 
55
           AC_TRY_LINK([extern
 
56
#ifdef __cplusplus
 
57
"C"
 
58
#endif
 
59
char setsockopt();], [setsockopt();],
 
60
             [gl_cv_lib_socket="-lnetwork"])
 
61
           if test -z "$gl_cv_lib_socket"; then
 
62
             LIBS="$gl_save_LIBS -lnet"
 
63
             AC_TRY_LINK([extern
 
64
#ifdef __cplusplus
 
65
"C"
 
66
#endif
 
67
char setsockopt();], [setsockopt();],
 
68
               [gl_cv_lib_socket="-lnet"])
 
69
           fi
 
70
         fi
51
71
         LIBS="$gl_save_LIBS"
52
72
        ])
 
73
      if test -z "$gl_cv_lib_socket"; then
 
74
        gl_cv_lib_socket="none needed"
 
75
      fi
53
76
    ])
54
 
    if test $gl_cv_lib_socket = yes; then
55
 
      LIBSOCKET='-lsocket'
 
77
    if test "$gl_cv_lib_socket" != "none needed"; then
 
78
      LIBSOCKET="$gl_cv_lib_socket"
56
79
    fi
57
80
  fi
58
81
  AC_SUBST([LIBSOCKET])