diff --git a/m4/sched_h.m4 b/m4/sched_h.m4 index fd60a40..4ac0268 100644 --- a/m4/sched_h.m4 +++ b/m4/sched_h.m4 @@ -1,4 +1,4 @@ -# sched_h.m4 serial 9 +# sched_h.m4 serial 10 dnl Copyright (C) 2008-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -8,6 +8,7 @@ dnl Written by Bruno Haible. AC_DEFUN([gl_SCHED_H], [ + AC_REQUIRE([AC_CANONICAL_HOST]) AC_CHECK_HEADERS_ONCE([sys/cdefs.h]) AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[ @@ -41,10 +42,20 @@ AC_DEFUN([gl_SCHED_H], #include ]]) else - dnl On OS/2 kLIBC, struct sched_param is in spawn.h. - AC_CHECK_TYPE([struct sched_param], - [HAVE_STRUCT_SCHED_PARAM=1], [HAVE_STRUCT_SCHED_PARAM=0], - [#include ]) + case "$host_os" in + os2*) + dnl On OS/2 kLIBC, struct sched_param is in spawn.h. + AC_CHECK_TYPE([struct sched_param], + [HAVE_STRUCT_SCHED_PARAM=1], [HAVE_STRUCT_SCHED_PARAM=0], + [#include ]) + ;; + vms) + dnl On VMS x.y, struct sched_param is in pthread.h. + AC_CHECK_TYPE([struct sched_param], + [HAVE_STRUCT_SCHED_PARAM=1], [HAVE_STRUCT_SCHED_PARAM=0], + [#include ]) + ;; + esac fi AC_SUBST([HAVE_STRUCT_SCHED_PARAM])