summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Antonuk <alan.antonuk@gmail.com>2014-08-13 21:25:29 -0700
committerAlan Antonuk <alan.antonuk@gmail.com>2014-08-13 21:25:29 -0700
commitfcdf0f809b44cc42f628a42793a3dbb55020f16f (patch)
tree2f9895f49ff7b00f9821d0ae7cfed8b47aeeb462
parenta2ee005e3d781055437513e4318ad414a59969bd (diff)
downloadrabbitmq-c-github-ask-fcdf0f809b44cc42f628a42793a3dbb55020f16f.tar.gz
autoconf: look for htonll in arpa/inet.h
htonll maybe defined as a macro, look for it in the arpa/inet.h. CMake build system already does the right thing. Fixes #206
-rw-r--r--configure.ac21
1 files changed, 20 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 8d6416d..7692c54 100644
--- a/configure.ac
+++ b/configure.ac
@@ -99,7 +99,26 @@ AC_SEARCH_LIBS([socket], [socket], [],
[AC_MSG_ERROR([cannot find socket library (library with socket symbol)])],
[-lnsl])])
AC_SEARCH_LIBS([clock_gettime], [rt])
-AC_CHECK_FUNCS([htonll])
+AC_MSG_CHECKING([if htonll is defined])
+
+dnl # Check for htonll
+AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #include <arpa/inet.h>
+ ]],
+ [[
+ return htonll(0);
+ ]]
+ )],
+ [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_HTONLL, 1, [Define to 1 if the function (or macro) htonll exists.])
+ ],
+ [
+ AC_MSG_RESULT(no)
+ ]
+)
# Configure SSL/TLS
AC_ARG_WITH([ssl],