Skip to content

Instantly share code, notes, and snippets.

@leedm777
Created November 26, 2014 15:05
Show Gist options
  • Select an option

  • Save leedm777/393f797c80bdb192da19 to your computer and use it in GitHub Desktop.

Select an option

Save leedm777/393f797c80bdb192da19 to your computer and use it in GitHub Desktop.
Index: configure.ac
===================================================================
--- configure.ac (revision 428631)
+++ configure.ac (working copy)
@@ -657,8 +657,26 @@
AC_FUNC_STRTOD
AC_FUNC_UTIME_NULL
AC_FUNC_VPRINTF
-AC_CHECK_FUNCS([asprintf atexit closefrom dup2 eaccess endpwent euidaccess ffsll ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob htonll ioperm inet_ntoa isascii memchr memmove memset mkdir mkdtemp munmap ntohll newlocale ppoll putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtod strtol strtold strtoq unsetenv utime vasprintf getpeereid sysctl swapctl])
+AC_CHECK_FUNCS([asprintf atexit closefrom dup2 eaccess endpwent euidaccess ffsll ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob ioperm inet_ntoa isascii memchr memmove memset mkdir mkdtemp munmap newlocale ppoll putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtod strtol strtold strtoq unsetenv utime vasprintf getpeereid sysctl swapctl])
+AC_MSG_CHECKING(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 arpa/inet.h includes a htonll definition.]),
+ AC_MSG_RESULT(no)
+)
+
+AC_MSG_CHECKING(for ntohll)
+AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([#include <arpa/inet.h>],
+ [return ntohll(0);])],
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_NTOHLL, 1, [Define to 1 if arpa/inet.h includes a ntohll definition.]),
+ AC_MSG_RESULT(no)
+)
+
# NOTE: we use AC_CHECK_LIB to get -lm into the arguments for later checks,
# so that AC_CHECK_FUNCS can detect functions in that library.
AC_CHECK_LIB([m], [sqrt])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment