From e5033dfd1c3c30313cf7a428c7bed21c7fae9e5f Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Wed, 29 Nov 2017 16:04:05 -0800 Subject: configure.ac: add endian headers to configure test - Add endian headers to the standard tests if present - Check for __builtin_constant_p() Signed-off-by: H. Peter Anvin --- configure.ac | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 8fb98ef8..3c344abd 100644 --- a/configure.ac +++ b/configure.ac @@ -99,7 +99,6 @@ AC_CHECK_HEADERS(stdnoreturn.h) AC_CHECK_HEADERS(io.h) AC_CHECK_HEADERS(fcntl.h) AC_CHECK_HEADERS(unistd.h) -AC_CHECK_HEADERS(endian.h sys/endian.h machine/endian.h) AC_CHECK_HEADERS(sys/mman.h) AC_CHECK_HEADERS(sys/types.h) AC_CHECK_HEADERS(sys/stat.h) @@ -176,6 +175,7 @@ AC_SUBST([PDFOPT]) dnl dnl Look for byte-swapping support... dnl +PA_ADD_HEADERS(endian.h sys/endian.h machine/endian.h) PA_HAVE_FUNC(cpu_to_le16, (0)) PA_HAVE_FUNC(cpu_to_le32, (0)) PA_HAVE_FUNC(cpu_to_le64, (0)) @@ -195,6 +195,11 @@ PA_HAVE_FUNC(_byteswap_ushort, (0)) PA_HAVE_FUNC(_byteswap_ulong, (0)) PA_HAVE_FUNC(_byteswap_uint64, (0)) +dnl +dnl Check for __builtin_constant_p() +dnl +PA_HAVE_FUNC(__builtin_constant_p, (0)) + dnl dnl Check for supported gcc attributes; some compilers (e.g. Sun CC) dnl support these, but don't define __GNUC__ as they don't support -- cgit v1.2.1