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

« back to all changes in this revision

Viewing changes to m4/utimens.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
dnl Copyright (C) 2003-2011 Free Software Foundation, Inc.
 
2
dnl This file is free software; the Free Software Foundation
 
3
dnl gives unlimited permission to copy and/or distribute it,
 
4
dnl with or without modifications, as long as this notice is preserved.
 
5
 
 
6
dnl serial 6
 
7
 
 
8
AC_DEFUN([gl_UTIMENS],
 
9
[
 
10
  dnl Prerequisites of lib/utimens.c.
 
11
  AC_REQUIRE([gl_FUNC_UTIMES])
 
12
  AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
 
13
  AC_REQUIRE([gl_CHECK_TYPE_STRUCT_UTIMBUF])
 
14
  AC_CHECK_FUNCS_ONCE([futimes futimesat futimens utimensat lutimes])
 
15
 
 
16
  if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
 
17
    dnl FreeBSD 8.0-rc2 mishandles futimesat(fd,NULL,time).  It is not
 
18
    dnl standardized, but Solaris implemented it first and uses it as
 
19
    dnl its only means to set fd time.
 
20
    AC_CACHE_CHECK([whether futimesat handles NULL file],
 
21
      [gl_cv_func_futimesat_works],
 
22
      [touch conftest.file
 
23
       AC_RUN_IFELSE([AC_LANG_PROGRAM([[
 
24
#include <stddef.h>
 
25
#include <sys/times.h>
 
26
#include <fcntl.h>
 
27
]], [[    int fd = open ("conftest.file", O_RDWR);
 
28
          if (fd < 0) return 1;
 
29
          if (futimesat (fd, NULL, NULL)) return 2;
 
30
        ]])],
 
31
        [gl_cv_func_futimesat_works=yes],
 
32
        [gl_cv_func_futimesat_works=no],
 
33
        [gl_cv_func_futimesat_works="guessing no"])
 
34
      rm -f conftest.file])
 
35
    if test "$gl_cv_func_futimesat_works" != yes; then
 
36
      AC_DEFINE([FUTIMESAT_NULL_BUG], [1],
 
37
        [Define to 1 if futimesat mishandles a NULL file name.])
 
38
    fi
 
39
  fi
 
40
])