summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in26
1 files changed, 18 insertions, 8 deletions
diff --git a/configure.in b/configure.in
index ee928d4..5153b1c 100644
--- a/configure.in
+++ b/configure.in
@@ -275,9 +275,15 @@ else
275 AC_SUBST(MYSQLCFLAGS) 275 AC_SUBST(MYSQLCFLAGS)
276fi 276fi
277 277
278AC_ARG_WITH([ipv6],
279 [AS_HELP_STRING([--with-ipv6], [support IPv6 @<:@default=check@:>@])],
280 [], [with_ipv6=check])
281
278dnl Check for AF_INET6 support - unistd.h required for Darwin 282dnl Check for AF_INET6 support - unistd.h required for Darwin
279AC_CACHE_CHECK([for IPv6 support], with_ipv6, [ 283if test "$with_ipv6" != "no"; then
280 AC_TRY_COMPILE([#ifdef HAVE_UNISTD_H 284 AC_CACHE_CHECK([for IPv6 support], np_cv_sys_ipv6, [
285 AC_TRY_COMPILE(
286 [#ifdef HAVE_UNISTD_H
281 #include <unistd.h> 287 #include <unistd.h>
282 #endif 288 #endif
283 #include <netinet/in.h> 289 #include <netinet/in.h>
@@ -288,12 +294,16 @@ AC_CACHE_CHECK([for IPv6 support], with_ipv6, [
288 sin6.sin6_family = AF_INET6; 294 sin6.sin6_family = AF_INET6;
289 sin6.sin6_port = 587; 295 sin6.sin6_port = 587;
290 p = &sin6.sin6_addr;], 296 p = &sin6.sin6_addr;],
291 [with_ipv6=yes], 297 [np_cv_sys_ipv6=yes],
292 [with_ipv6=no]) 298 [np_cv_sys_ipv6=no])
293 ]) 299 ])
294 300 if test "$np_cv_sys_ipv6" = "no" -a "$with_ipv6" != "check"; then
295if test x"$with_ipv6" != xno ; then 301 AC_MSG_FAILURE([--with-ipv6 was given, but test for IPv6 support failed])
296 AC_DEFINE(USE_IPV6,1,[Enable IPv6 support]) 302 fi
303 if test "$np_cv_sys_ipv6" = "yes"; then
304 AC_DEFINE(USE_IPV6,1,[Enable IPv6 support])
305 fi
306 with_ipv6="$np_cv_sys_ipv6"
297fi 307fi
298 308
299 309