~ubuntu-branches/ubuntu/precise/gzip/precise

« back to all changes in this revision

Viewing changes to m4/sys_time_h.m4

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-10-19 11:42:42 UTC
  • mfrom: (4.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20111019114242-d8wiiu8kbvdtgmgj
Tags: 1.4-1ubuntu1
* Merge with Debian testing.  Remaining Ubuntu changes:
  - debian/{control,rules}: Remove the Win32 build and mingw64
    build-dependency, since mingw is in universe, and will remain so for
    the forseeable future.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Configure a replacement for <sys/time.h>.
 
2
# serial 2
2
3
 
3
 
# Copyright (C) 2007 Free Software Foundation, Inc.
 
4
# Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
4
5
# This file is free software; the Free Software Foundation
5
6
# gives unlimited permission to copy and/or distribute it,
6
7
# with or without modifications, as long as this notice is preserved.
19
20
[
20
21
  AC_REQUIRE([AC_C_RESTRICT])
21
22
  AC_CHECK_HEADERS_ONCE([sys/time.h])
 
23
  gl_CHECK_NEXT_HEADERS([sys/time.h])
22
24
 
23
25
  if test $ac_cv_header_sys_time_h = yes; then
24
 
    gl_ABSOLUTE_HEADER([sys/time.h])
25
 
    ABSOLUTE_SYS_TIME_H=\"$gl_cv_absolute_sys_time_h\"
26
26
    HAVE_SYS_TIME_H=1
27
27
  else
28
 
    ABSOLUTE_SYS_TIME_H=\"no/such/file/sys/time.h\"
29
28
    HAVE_SYS_TIME_H=0
30
29
  fi
31
 
  AC_SUBST([ABSOLUTE_SYS_TIME_H])
32
30
  AC_SUBST([HAVE_SYS_TIME_H])
33
31
 
34
32
  AC_CACHE_CHECK([for struct timeval], [gl_cv_sys_struct_timeval],
35
33
    [AC_COMPILE_IFELSE(
36
34
       [AC_LANG_PROGRAM(
37
 
          [[#if HAVE_SYS_TIME_H
38
 
             #include <sys/time.h>
39
 
            #endif
40
 
            #include <time.h>
41
 
          ]],
42
 
          [[static struct timeval x; x.tv_sec = x.tv_usec;]])],
 
35
          [[#if HAVE_SYS_TIME_H
 
36
             #include <sys/time.h>
 
37
            #endif
 
38
            #include <time.h>
 
39
          ]],
 
40
          [[static struct timeval x; x.tv_sec = x.tv_usec;]])],
43
41
       [gl_cv_sys_struct_timeval=yes],
44
42
       [gl_cv_sys_struct_timeval=no])])
45
43
  if test $gl_cv_sys_struct_timeval = yes; then