1 AC_DEFUN([DETECT_BYTEORDER],
3 AC_MSG_CHECKING([for htonll])
8 #include <netinet/in.h>
15 AC_DEFINE([HAVE_HTONLL], [1], [Have ntohll])
18 AC_MSG_RESULT([$have_htoll])
19 AM_CONDITIONAL([BUILD_BYTEORDER],[test "x$have_htoll" == "xno"])
20 if test "x$have_htoll" == "xno"
22 AC_MSG_CHECKING([byteorder])
26 #include <sys/types.h>
27 #include <netinet/in.h>
35 AC_MSG_RESULT([big endian])
36 AC_DEFINE([BYTEORDER_BIG_ENDIAN], [1], [Enable big endian byteorder])
37 ], AC_MSG_RESULT([little endian]))