annotate m4/sched_h.m4 @ 17040:2b2ed538a898

update from texinfo
author Karl Berry <karl@freefriends.org>
date Mon, 13 Aug 2012 15:48:24 -0700
parents 8250f2777afc
children e542fd46ad6f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15666
bbe6ab59b982 sched: Ensure pid_t is defined.
Bruno Haible <bruno@clisp.org>
parents: 15594
diff changeset
1 # sched_h.m4 serial 6
16201
8250f2777afc maint: update all copyright year number ranges
Jim Meyering <meyering@redhat.com>
parents: 15666
diff changeset
2 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
10502
5a1ec3c6fb97 New module 'sched'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 dnl This file is free software; the Free Software Foundation
5a1ec3c6fb97 New module 'sched'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 dnl gives unlimited permission to copy and/or distribute it,
5a1ec3c6fb97 New module 'sched'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 dnl with or without modifications, as long as this notice is preserved.
5a1ec3c6fb97 New module 'sched'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6
5a1ec3c6fb97 New module 'sched'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 dnl Written by Bruno Haible.
5a1ec3c6fb97 New module 'sched'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8
5a1ec3c6fb97 New module 'sched'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 AC_DEFUN([gl_SCHED_H],
5a1ec3c6fb97 New module 'sched'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 [
10806
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
11 AC_COMPILE_IFELSE(
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
12 [AC_LANG_PROGRAM([[
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
13 #include <sched.h>
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
14 struct sched_param a;
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
15 int b[] = { SCHED_FIFO, SCHED_RR, SCHED_OTHER };
15666
bbe6ab59b982 sched: Ensure pid_t is defined.
Bruno Haible <bruno@clisp.org>
parents: 15594
diff changeset
16 pid_t t1;
10806
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
17 ]])],
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
18 [SCHED_H=''],
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
19 [SCHED_H='sched.h'
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
20
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
21 gl_CHECK_NEXT_HEADERS([sched.h])
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
22
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
23 if test $ac_cv_header_sched_h = yes; then
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
24 HAVE_SCHED_H=1
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
25 else
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
26 HAVE_SCHED_H=0
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
27 fi
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
28 AC_SUBST([HAVE_SCHED_H])
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
29
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
30 AC_CHECK_TYPE([struct sched_param],
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
31 [HAVE_STRUCT_SCHED_PARAM=1], [HAVE_STRUCT_SCHED_PARAM=0],
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
32 [#include <sched.h>])
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
33 AC_SUBST([HAVE_STRUCT_SCHED_PARAM])
15594
f4cfbb6036d8 Ensure pid_t gets defined.
Bruno Haible <bruno@clisp.org>
parents: 14528
diff changeset
34
f4cfbb6036d8 Ensure pid_t gets defined.
Bruno Haible <bruno@clisp.org>
parents: 14528
diff changeset
35 dnl Ensure the type pid_t gets defined.
f4cfbb6036d8 Ensure pid_t gets defined.
Bruno Haible <bruno@clisp.org>
parents: 14528
diff changeset
36 AC_REQUIRE([AC_TYPE_PID_T])
10806
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
37 ])
10502
5a1ec3c6fb97 New module 'sched'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
38 AC_SUBST([SCHED_H])
14528
662ae53d8d37 Remove leftover generated .h files after config.status changed.
Bruno Haible <bruno@clisp.org>
parents: 14211
diff changeset
39 AM_CONDITIONAL([GL_GENERATE_SCHED_H], [test -n "$SCHED_H"])
10502
5a1ec3c6fb97 New module 'sched'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
40 ])