summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-01-22 23:54:54 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-01-22 23:54:54 +0000
commit65840f1fd1856ccd403c4d10ef4ed30b3df0217b (patch)
tree42dc7259cfde38a3abf7651fc9d1c3b4cd51c485
parent5fc492e5c65a40988fada33fa1c04cdd61c4f2b6 (diff)
downloadgnurl-65840f1fd1856ccd403c4d10ef4ed30b3df0217b.tar.gz
gnurl-65840f1fd1856ccd403c4d10ef4ed30b3df0217b.tar.bz2
gnurl-65840f1fd1856ccd403c4d10ef4ed30b3df0217b.zip
Added simple IPv6 recognition support
-rw-r--r--acconfig.h3
-rw-r--r--configure.in38
2 files changed, 41 insertions, 0 deletions
diff --git a/acconfig.h b/acconfig.h
index b9087794e..817ecc7b5 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -36,3 +36,6 @@
/* Define if you have the Kerberos4 libraries (including -ldes) */
#undef KRB4
+
+/* Define if you want to enable IPv6 support */
+#undef ENABLE_IPV6
diff --git a/configure.in b/configure.in
index c6de40711..a1af285ab 100644
--- a/configure.in
+++ b/configure.in
@@ -237,6 +237,44 @@ exit (rc != 0 ? 1 : 0); }],[
])
+dnl **********************************************************************
+dnl Checks for IPv6
+dnl **********************************************************************
+
+AC_MSG_CHECKING([whether to enable ipv6])
+AC_ARG_ENABLE(ipv6,
+[ --enable-ipv6 Enable ipv6 (with ipv4) support
+ --disable-ipv6 Disable ipv6 support],
+[ case "$enableval" in
+ no)
+ AC_MSG_RESULT(no)
+ ipv6=no
+ ;;
+ *) AC_MSG_RESULT(yes)
+ AC_DEFINE(ENABLE_IPV6)
+ ipv6=yes
+ ;;
+ esac ],
+
+ AC_TRY_RUN([ /* is AF_INET6 available? */
+#include <sys/types.h>
+#include <sys/socket.h>
+main()
+{
+ if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
+ exit(1);
+ else
+ exit(0);
+}
+],
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(ENABLE_IPV6)
+ ipv6=yes,
+ AC_MSG_RESULT(no)
+ ipv6=no,
+ AC_MSG_RESULT(no)
+ ipv6=no
+))
dnl **********************************************************************
dnl Checks for libraries.