~ubuntu-branches/ubuntu/precise/wget/precise-proposed

« back to all changes in this revision

Viewing changes to m4/select.m4

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2011-10-19 00:00:09 UTC
  • mfrom: (2.1.13 sid)
  • Revision ID: james.westby@ubuntu.com-20111019000009-8p33w3wz4b1rdri0
Tags: 1.13-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add wget-udeb to ship wget.gnu as alternative to busybox wget
    implementation.
  - Depend on libssl-dev 0.9.8k-7ubuntu4 (LP: #503339)
* Dropped changes, superseded in Debian:
  - Keep build dependencies in main:
    + debian/control: remove info2man build-dep
    + debian/patches/series: disable wget-infopod_generated_manpage
  - Mark wget Multi-Arch: foreign, so packages that aren't of the same arch
    can depend on it.
* Pass --with-ssl=openssl; we don't want to use gnutls, there's no udeb for
  it.
* Add a second build pass for the udeb, so we can build without libidn.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# select.m4 serial 5
 
2
dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
 
3
dnl This file is free software; the Free Software Foundation
 
4
dnl gives unlimited permission to copy and/or distribute it,
 
5
dnl with or without modifications, as long as this notice is preserved.
 
6
 
 
7
AC_DEFUN([gl_FUNC_SELECT],
 
8
[
 
9
  AC_REQUIRE([gl_HEADER_SYS_SELECT])
 
10
  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
 
11
  AC_REQUIRE([gl_SOCKETS])
 
12
  if test "$ac_cv_header_winsock2_h" = yes; then
 
13
    REPLACE_SELECT=1
 
14
  else
 
15
    dnl On Interix 3.5, select(0, NULL, NULL, NULL, timeout) fails with error
 
16
    dnl EFAULT.
 
17
    AC_CHECK_HEADERS_ONCE([sys/select.h])
 
18
    AC_CACHE_CHECK([whether select supports a 0 argument],
 
19
      [gl_cv_func_select_supports0],
 
20
      [
 
21
        AC_RUN_IFELSE([AC_LANG_SOURCE([[
 
22
#include <sys/types.h>
 
23
#include <sys/time.h>
 
24
#if HAVE_SYS_SELECT_H
 
25
#include <sys/select.h>
 
26
#endif
 
27
int main ()
 
28
{
 
29
  struct timeval timeout;
 
30
  timeout.tv_sec = 0;
 
31
  timeout.tv_usec = 5;
 
32
  return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
 
33
}]])], [gl_cv_func_select_supports0=yes], [gl_cv_func_select_supports0=no],
 
34
          [
 
35
changequote(,)dnl
 
36
           case "$host_os" in
 
37
                       # Guess no on Interix.
 
38
             interix*) gl_cv_func_select_supports0="guessing no";;
 
39
                       # Guess yes otherwise.
 
40
             *)        gl_cv_func_select_supports0="guessing yes";;
 
41
           esac
 
42
changequote([,])dnl
 
43
          ])
 
44
      ])
 
45
    case "$gl_cv_func_select_supports0" in
 
46
      *yes) ;;
 
47
      *) REPLACE_SELECT=1 ;;
 
48
    esac
 
49
  fi
 
50
])