1 dnl Check whether limits.h has needed features.
3 dnl Copyright 2016-2020 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.
10 AC_DEFUN_ONCE([gl_LIMITS_H],
12 gl_CHECK_NEXT_HEADERS([limits.h])
14 AC_CACHE_CHECK([whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.],
15 [gl_cv_header_limits_width],
18 [[#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
19 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
22 long long llm = LLONG_MAX;
24 int ullw = ULLONG_WIDTH;
26 [gl_cv_header_limits_width=yes],
27 [gl_cv_header_limits_width=no])])
28 if test "$gl_cv_header_limits_width" = yes; then
34 AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"])
37 dnl Unconditionally enables the replacement of <limits.h>.
38 AC_DEFUN([gl_REPLACE_LIMITS_H],
40 AC_REQUIRE([gl_LIMITS_H])
42 AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"])