diff --git a/configure.ac b/configure.ac index 4cb56bc..5e23c50 100644 --- a/configure.ac +++ b/configure.ac @@ -69,12 +69,17 @@ AC_FUNC_MALLOC AC_FUNC_REALLOC AC_FUNC_STRTOD AC_CHECK_FUNCS([memchr memmove memset strerror strtol]) -AC_CHECK_DECLS([htole64, le64toh], - [], +AC_CHECK_HEADER([sys/endian.h], [ - AC_CHECK_DECLS([htole64, le64toh], [], [], [#include ]) + AC_CHECK_DECLS([htole64, le64toh], [], [], [#define _GNU_SOURCE 1 #include ]) ], - [#include ]) + [], []) + +AC_CHECK_HEADER([endian.h], + [ + AC_CHECK_DECLS([htole64, le64toh], [], [], [#define _GNU_SOURCE 1 #include ]) + ], + [], []) AC_CONFIG_FILES([Makefile src/Makefile