Merge branch '4627_help_segfault'
[midnight-commander.git] / m4.include / mc-stdckdint.m4
blob7ce4cc6c2662df6ca270b703048ce1d0d682ff42
1 dnl
2 dnl Check <stdckdint.h> that is like C23.
3 dnl
5 AC_DEFUN([mc_CHECK_HEADER_STDCKDINT],
7     AC_CHECK_HEADERS_ONCE([stdckdint.h])
8     if test $ac_cv_header_stdckdint_h = yes; then
9         GL_GENERATE_STDCKDINT_H=false
10     else
11         GL_GENERATE_STDCKDINT_H=true
12     fi
13     gl_CONDITIONAL_HEADER([stdckdint.h])
15     dnl We need the following in order to create <stdckdint.h> when the system
16     dnl doesn't have one that works with the given compiler.
17     if test "$GL_GENERATE_STDCKDINT_H" = "true"; then
18         sed -e 1h -e '1s,.*,/* DO NOT EDIT! GENERATED AUTOMATICALLY! */,' -e s,bool,gboolean, -e 1G \
19             $ac_abs_confdir/lib/stdckdint.in.h > $ac_abs_confdir/lib/stdckdint.h
20     else
21         rm -f "$ac_abs_confdir/lib/stdckdint.h"
22     fi