Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / gnulib-m4 / sched_h.m4
index 931358f..0cbf2d2 100644 (file)
@@ -1,5 +1,5 @@
-# sched_h.m4 serial 6
-dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
+# sched_h.m4 serial 7
+dnl Copyright (C) 2008-2015 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -27,9 +27,16 @@ AC_DEFUN([gl_SCHED_H],
      fi
      AC_SUBST([HAVE_SCHED_H])
 
-     AC_CHECK_TYPE([struct sched_param],
-       [HAVE_STRUCT_SCHED_PARAM=1], [HAVE_STRUCT_SCHED_PARAM=0],
-       [#include <sched.h>])
+     if test "$HAVE_SCHED_H" = 1; then
+       AC_CHECK_TYPE([struct sched_param],
+         [HAVE_STRUCT_SCHED_PARAM=1], [HAVE_STRUCT_SCHED_PARAM=0],
+         [#include <sched.h>])
+     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 <spawn.h>])
+     fi
      AC_SUBST([HAVE_STRUCT_SCHED_PARAM])
 
      dnl Ensure the type pid_t gets defined.