Temp save for Monty.
[awesomized/libmemcached] / m4 / byteorder.m4
1 AC_DEFUN([DETECT_BYTEORDER],
2 [
3 AC_REQUIRE([AC_C_BIGENDIAN])
4 AC_CACHE_CHECK([for htonll],[av_cv_have_htonll],[
5
6 AC_RUN_IFELSE([
7 AC_LANG_PROGRAM([[
8 #include <sys/types.h>
9 #include <netinet/in.h>
10 #include <inttypes.h>
11 ]],[[
12 return htonll(0);
13 ]])
14 ], [
15 ac_cv_have_htonll=yes
16 ],[
17 ac_cv_have_htonll=no
18 ])])
19
20 AS_IF([test "x$ac_cv_have_htonll" = "xyes"],[
21 AC_DEFINE([HAVE_HTONLL], [1], [Have ntohll])])
22
23 AM_CONDITIONAL([BUILD_BYTEORDER],[test "x$ac_cv_have_htonll" = "xno"])
24 ])
25