Author: mturk
Date: Tue Jun 26 12:02:26 2012
New Revision: 1353976

URL: http://svn.apache.org/viewvc?rev=1353976&view=rev
Log:
First step in IPv6 support -- add configure bits

Modified:
    tomcat/jk/trunk/native/configure.in

Modified: tomcat/jk/trunk/native/configure.in
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/configure.in?rev=1353976&r1=1353975&r2=1353976&view=diff
==============================================================================
--- tomcat/jk/trunk/native/configure.in (original)
+++ tomcat/jk/trunk/native/configure.in Tue Jun 26 12:02:26 2012
@@ -373,6 +373,50 @@ dnl check for poll.h header
 AC_CHECK_HEADERS(poll.h)
 dnl check for poll function
 AC_CHECK_FUNC(poll, AC_DEFINE(HAVE_POLL,1,[Have poll()]))
+dnl check for netinet/in.h header
+AC_CHECK_HEADERS(netinet/in.h)
+
+AC_DEFUN([JK_HAVE_IPV6], [
+AC_MSG_CHECKING(for IPv6 with socket())
+AC_TRY_RUN([
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/time.h>
+
+int main(void)
+{
+    int s;
+
+    if ((s = socket(AF_INET6, SOCK_STREAM, 0)) == -1)
+        exit(2);
+    exit(0);
+}
+]
+, [ AC_MSG_RESULT([yes]) AC_DEFINE(HAVE_AF_INET6, 1, [Define to 1 if you have 
IPv6 support]) ]
+, [ AC_MSG_RESULT([no]) ]
+)
+])dnl
+
+AC_DEFUN([JK_CHECK_SASTORAGE], [
+AC_MSG_CHECKING(for struct sockaddr_storage)
+AC_TRY_RUN([
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+
+int main(void)
+{
+    struct sockaddr_storage sa;
+    exit(sizeof(sa) == 0);
+}
+]
+, [ AC_MSG_RESULT([yes]) AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1, [Define to 1 if 
you have struct sockaddr_storage]) ]
+, [ AC_MSG_RESULT([no]) ]
+)
+])dnl
+
+JK_HAVE_IPV6
+JK_CHECK_SASTORAGE
 
 dnl Apache-2.0 needs the os subdirectory to include os.h
 dnl this include is copy from os/config.m4



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to