Mercurial > hg > octave-shane > gnulib-hg
comparison m4/nanosleep.m4 @ 2160:72cc32066c5d
(jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
Use AC_HEADER_TIME. Volker Borchert reported that OpenBSD-2.3/sparc
defines `struct timespec' in <sys/time.h>
author | Jim Meyering <jim@meyering.net> |
---|---|
date | Wed, 19 Jan 2000 20:40:51 +0000 |
parents | 8e707880be9b |
children | 0428e8e0e9d4 |
comparison
equal
deleted
inserted
replaced
2159:27039521fde0 | 2160:72cc32066c5d |
---|---|
11 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. | 11 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. |
12 AC_SEARCH_LIBS(nanosleep, [rt posix4]) | 12 AC_SEARCH_LIBS(nanosleep, [rt posix4]) |
13 | 13 |
14 AC_CACHE_CHECK([whether nanosleep works], | 14 AC_CACHE_CHECK([whether nanosleep works], |
15 jm_cv_func_nanosleep_works, | 15 jm_cv_func_nanosleep_works, |
16 [AC_TRY_RUN([ | 16 [ |
17 # include <time.h> | 17 AC_HEADER_TIME |
18 AC_TRY_RUN([ | |
19 # if TIME_WITH_SYS_TIME | |
20 # include <sys/time.h> | |
21 # include <time.h> | |
22 # else | |
23 # if HAVE_SYS_TIME_H | |
24 # include <sys/time.h> | |
25 # else | |
26 # include <time.h> | |
27 # endif | |
28 # endif | |
18 | 29 |
19 int | 30 int |
20 main () | 31 main () |
21 { | 32 { |
22 struct timespec ts_sleep, ts_remaining; | 33 struct timespec ts_sleep, ts_remaining; |