1 AC_DEFUN([DETECT_BYTEORDER],
3 AC_REQUIRE([AC_C_BIGENDIAN])
5 AC_CACHE_CHECK([for htonll], [ac_cv_have_htonll],
6 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
7 [#include <sys/types.h>
8 #include <netinet/in.h>
10 ], [ return htonll(0) ])],
11 [ ac_cv_have_htonll=yes ],
12 [ ac_cv_have_htonll=no ])
15 AS_IF([test "x$ac_cv_have_htonll" = "xyes"],[
16 AC_DEFINE([HAVE_HTONLL], [1], [Have ntohll])])
18 AM_CONDITIONAL([BUILD_BYTEORDER],[test "x$ac_cv_have_htonll" = "xno"])