xref: /netbsd-src/external/gpl3/gdb/dist/gnulib/import/m4/sys_uio_h.m4 (revision 4b169a6ba595ae283ca507b26b15fdff40495b1c)
1# sys_uio_h.m4 serial 3
2dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7AC_DEFUN_ONCE([gl_SYS_UIO_H],
8[
9  AC_REQUIRE([gl_SYS_UIO_H_DEFAULTS])
10  dnl <sys/uio.h> is always overridden, because of GNULIB_POSIXCHECK.
11  gl_CHECK_NEXT_HEADERS([sys/uio.h])
12  if test $ac_cv_header_sys_uio_h = yes; then
13    HAVE_SYS_UIO_H=1
14  else
15    HAVE_SYS_UIO_H=0
16  fi
17  AC_SUBST([HAVE_SYS_UIO_H])
18])
19
20# gl_SYS_UIO_MODULE_INDICATOR([modulename])
21# sets the shell variable that indicates the presence of the given module
22# to a C preprocessor expression that will evaluate to 1.
23# This macro invocation must not occur in macros that are AC_REQUIREd.
24AC_DEFUN([gl_SYS_UIO_MODULE_INDICATOR],
25[
26  dnl Ensure to expand the default settings once only.
27  gl_SYS_UIO_H_REQUIRE_DEFAULTS
28  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
29  dnl Define it also as a C macro, for the benefit of the unit tests.
30  gl_MODULE_INDICATOR_FOR_TESTS([$1])
31])
32
33# Initializes the default values for AC_SUBSTed shell variables.
34# This macro must not be AC_REQUIREd.  It must only be invoked, and only
35# outside of macros or in macros that are not AC_REQUIREd.
36AC_DEFUN([gl_SYS_UIO_H_REQUIRE_DEFAULTS],
37[
38  m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_UIO_H_MODULE_INDICATOR_DEFAULTS], [
39  ])
40  m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_UIO_H_MODULE_INDICATOR_DEFAULTS])
41  AC_REQUIRE([gl_SYS_UIO_H_DEFAULTS])
42])
43
44AC_DEFUN([gl_SYS_UIO_H_DEFAULTS],
45[
46])
47