summaryrefslogtreecommitdiff
path: root/aconfigure.ac
diff options
context:
space:
mode:
authorLiong Sauw Ming <ming@teluu.com>2016-08-02 08:35:28 +0000
committerLiong Sauw Ming <ming@teluu.com>2016-08-02 08:35:28 +0000
commit0d94951e856b6f963b75f888eb7aa7428075a6d0 (patch)
tree100520779dd0790fd5d91b08be4723f4f70447e2 /aconfigure.ac
parent7e0cba1c76f7086cd636c16f8ff324cb77ebfdef (diff)
Re #1945 (misc): Set IPv6 sockets to be IPv6 only
Auto-detect in configure script if this option is supported, and if yes, Set IPv6 sockets to be IPv6 only. Thanks to Alexander Traud for the patch. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5403 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'aconfigure.ac')
-rw-r--r--aconfigure.ac9
1 files changed, 9 insertions, 0 deletions
diff --git a/aconfigure.ac b/aconfigure.ac
index 3c80efac..4ea4d498 100644
--- a/aconfigure.ac
+++ b/aconfigure.ac
@@ -343,6 +343,15 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
AC_MSG_RESULT(yes)],
AC_MSG_RESULT(no))
+dnl # Determine if IPV6_V6ONLY is available
+AC_MSG_CHECKING([if IPV6_V6ONLY is available])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>
+ #include <netinet/in.h>]],
+ [int opt = IPV6_V6ONLY;])],
+ [AC_DEFINE(PJ_SOCK_HAS_IPV6_V6ONLY,1)
+ AC_MSG_RESULT(yes)],
+ AC_MSG_RESULT(no))
+
dnl # Determine if SO_ERROR is available
AC_MSG_CHECKING([if SO_ERROR is available])
case $target in