Add gnu.m4 which has a copy of the libiberty calls from binutils.m4
authorHolger Freyther <zecke@selfish.org>
Mon, 11 Dec 2006 21:37:47 +0000 (21:37 +0000)
committerHolger Freyther <zecke@selfish.org>
Mon, 11 Dec 2006 21:37:47 +0000 (21:37 +0000)
    Make sure we can regenerate the values for binutils which
    koen just added to OpenEmbedded.

contrib/site-conf/aclocal.m4
contrib/site-conf/configure.ac
contrib/site-conf/m4/gnu.m4 [new file with mode: 0644]

index c869c19..f415403 100644 (file)
@@ -12,3 +12,4 @@
 # PARTICULAR PURPOSE.
 
 m4_include([m4/builtin.m4])
+m4_include([m4/gnu.m4])
index 0f08732..283008a 100644 (file)
@@ -6,6 +6,6 @@ AC_PREREQ([2.60])
 AC_GNU_SOURCE
 
 OE_CHECK_BUILTIN
-
+OE_CHECK_GNU
 
 AC_OUTPUT([])
diff --git a/contrib/site-conf/m4/gnu.m4 b/contrib/site-conf/m4/gnu.m4
new file mode 100644 (file)
index 0000000..1f9331e
--- /dev/null
@@ -0,0 +1,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
+])