summaryrefslogtreecommitdiff
path: root/contrib/site-conf/m4/gnu.m4
blob: 1f9331e2efff104e98831249ae0877ce3dccfd9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Collection of binutils, gcc, glibc


AC_DEFUN([BINUTILS_CHECK_UINT64],
[AC_TRY_COMPILE(
[#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif],
[extern uint64_t foo;],
liberty_cv_uint64=uint64_t,
[AC_TRY_COMPILE(
[#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
#ifndef CHAR_BIT
#define CHAR_BIT 8
#endif],
[extern char foo[sizeof(long) * CHAR_BIT >= 64 ? 1 : -1];],
liberty_cv_uint64="unsigned long",
[AC_TRY_COMPILE(
[#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
#ifndef CHAR_BIT
#define CHAR_BIT 8
#endif],
[extern char foo[sizeof(long long) * CHAR_BIT >= 64 ? 1 : -1];],
liberty_cv_uint64="unsigned long long", liberty_cv_uint64=none)])])])

AC_DEFUN([OE_CHECK_GNU],
[
AC_CHECK_SIZEOF([int])
AC_CHECK_TYPE(uintptr_t, unsigned long)
BINUTILS_CHECK_UINT64
])