Only save .newsrc file if the native method is NNTP
[emacs.git] / m4 / limits-h.m4
blob443f91b4dc9796bf4c75811e17b1b7ecd523f1dd
1 dnl Check whether limits.h has needed features.
3 dnl Copyright 2016-2017 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.
8 dnl From Paul Eggert.
10 AC_DEFUN_ONCE([gl_LIMITS_H],
12   gl_CHECK_NEXT_HEADERS([limits.h])
14   AC_CACHE_CHECK([whether limits.h has ULLONG_WIDTH etc.],
15     [gl_cv_header_limits_width],
16     [AC_COMPILE_IFELSE(
17        [AC_LANG_PROGRAM([[#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
18                            #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
19                           #endif
20                           #include <limits.h>
21                           int ullw = ULLONG_WIDTH;]])],
22        [gl_cv_header_limits_width=yes],
23        [gl_cv_header_limits_width=no])])
24   if test "$gl_cv_header_limits_width" = yes; then
25     LIMITS_H=
26   else
27     LIMITS_H=limits.h
28   fi
29   AC_SUBST([LIMITS_H])
30   AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"])