Debian Codegraph @

tools/gnulib/m4/sys_cdefs_h.m4

raw
1 # sys_cdefs_h.m4 - Is <sys/cdefs.h> compatible enough with glibc?
2 # serial 2
3 dnl Copyright 2024 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
7
8 dnl Written by Paul Eggert.
9
10 AC_DEFUN_ONCE([gl_CHECK_HEADER_SYS_CDEFS_H],
11 [AC_CACHE_CHECK([for glibc-compatible sys/cdefs.h],
12 [gl_cv_header_sys_cdefs_h],
13 [AC_COMPILE_IFELSE(
14 [AC_LANG_DEFINES_PROVIDED
15 [#include <sys/cdefs.h>
16 enum { foo = __GNUC_PREREQ (14, 1) } bar;
17 ]],
18 [gl_cv_header_sys_cdefs_h=yes],
19 [gl_cv_header_sys_cdefs_h=no])])
20 if test "$gl_cv_header_sys_cdefs_h" = yes; then
21 HAVE_SYS_CDEFS_H=1
22 else
23 HAVE_SYS_CDEFS_H=0
24 fi
25 AC_SUBST([HAVE_SYS_CDEFS_H])])