xref: /openbsd-src/gnu/usr.bin/binutils-2.17/config/stdint_h.m4 (revision 3d8817e467ea46cf4772788d6804dd293abfb01a)
1*3d8817e4Smiod# stdint_h.m4 serial 3 (gettext-0.12)
2*3d8817e4Smioddnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
3*3d8817e4Smioddnl This file is free software, distributed under the terms of the GNU
4*3d8817e4Smioddnl General Public License.  As a special exception to the GNU General
5*3d8817e4Smioddnl Public License, this file may be distributed as part of a program
6*3d8817e4Smioddnl that contains a configuration script generated by Autoconf, under
7*3d8817e4Smioddnl the same distribution terms as the rest of that program.
8*3d8817e4Smiod
9*3d8817e4Smioddnl From Paul Eggert.
10*3d8817e4Smiod
11*3d8817e4Smiod# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
12*3d8817e4Smiod# doesn't clash with <sys/types.h>, and declares uintmax_t.
13*3d8817e4Smiod
14*3d8817e4SmiodAC_DEFUN([jm_AC_HEADER_STDINT_H],
15*3d8817e4Smiod[
16*3d8817e4Smiod  AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
17*3d8817e4Smiod  [AC_TRY_COMPILE(
18*3d8817e4Smiod    [#include <sys/types.h>
19*3d8817e4Smiod#include <stdint.h>],
20*3d8817e4Smiod    [uintmax_t i = (uintmax_t) -1;],
21*3d8817e4Smiod    jm_ac_cv_header_stdint_h=yes,
22*3d8817e4Smiod    jm_ac_cv_header_stdint_h=no)])
23*3d8817e4Smiod  if test $jm_ac_cv_header_stdint_h = yes; then
24*3d8817e4Smiod    AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
25*3d8817e4Smiod      [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
26*3d8817e4Smiod       and declares uintmax_t. ])
27*3d8817e4Smiod  fi
28*3d8817e4Smiod])
29