|
Packit |
33f14e |
dnl Check whether limits.h has needed features.
|
|
Packit |
33f14e |
|
|
Packit |
33f14e |
dnl Copyright 2016-2017 Free Software Foundation, Inc.
|
|
Packit |
33f14e |
dnl This file is free software; the Free Software Foundation
|
|
Packit |
33f14e |
dnl gives unlimited permission to copy and/or distribute it,
|
|
Packit |
33f14e |
dnl with or without modifications, as long as this notice is preserved.
|
|
Packit |
33f14e |
|
|
Packit |
33f14e |
dnl From Paul Eggert.
|
|
Packit |
33f14e |
|
|
Packit |
33f14e |
AC_DEFUN_ONCE([gl_LIMITS_H],
|
|
Packit |
33f14e |
[
|
|
Packit |
33f14e |
gl_CHECK_NEXT_HEADERS([limits.h])
|
|
Packit |
33f14e |
|
|
Packit |
33f14e |
AC_CACHE_CHECK([whether limits.h has ULLONG_WIDTH etc.],
|
|
Packit |
33f14e |
[gl_cv_header_limits_width],
|
|
Packit |
33f14e |
[AC_COMPILE_IFELSE(
|
|
Packit |
33f14e |
[AC_LANG_PROGRAM([[#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
|
|
Packit |
33f14e |
#define __STDC_WANT_IEC_60559_BFP_EXT__ 1
|
|
Packit |
33f14e |
#endif
|
|
Packit |
33f14e |
#include <limits.h>
|
|
Packit |
33f14e |
int ullw = ULLONG_WIDTH;]])],
|
|
Packit |
33f14e |
[gl_cv_header_limits_width=yes],
|
|
Packit |
33f14e |
[gl_cv_header_limits_width=no])])
|
|
Packit |
33f14e |
if test "$gl_cv_header_limits_width" = yes; then
|
|
Packit |
33f14e |
LIMITS_H=
|
|
Packit |
33f14e |
else
|
|
Packit |
33f14e |
LIMITS_H=limits.h
|
|
Packit |
33f14e |
fi
|
|
Packit |
33f14e |
AC_SUBST([LIMITS_H])
|
|
Packit |
33f14e |
AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"])
|
|
Packit |
33f14e |
])
|