-[ --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_COMPILE([ /* AF_INET6 avalable check */
-#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
-))
+ AC_HELP_STRING([--enable-ipv6], [try to support IPv6]))
+AC_MSG_CHECKING([whether IPv6 is requested])
+if test "$xenable_ipv6" = xyes
+then
+ AC_MSG_RESULT(yes)
+ ipv6=yes
+else
+ AC_MSG_RESULT(no)
+ ipv6=no
+fi