diff options
author | Jeff Trawick <trawick@apache.org> | 2002-11-14 14:17:11 +0000 |
---|---|---|
committer | Jeff Trawick <trawick@apache.org> | 2002-11-14 14:17:11 +0000 |
commit | 8ca3d031ce0af26556af37ca339bc28b92a1ab3d (patch) | |
tree | bd1edff4c1f9176f00b1f9564aa05d9a8b1dcf59 /configure.in | |
parent | af48450aa6a324a83058d2618674fac19d8e1cd5 (diff) | |
download | httpd-8ca3d031ce0af26556af37ca339bc28b92a1ab3d.tar.gz |
Add --[enable|disable]-v4-mapped configure option to control
whether or not Apache expects to handle IPv4 connections
on IPv6 listening sockets. Either setting will work on
systems with the IPV6_V6ONLY socket option. --enable-v4-mapped
must be used on systems that always allow IPv4 connections on
IPv6 listening sockets.
Note: As the ssl config file is not automatically generated and
it is expected to require editing anyway to work, the only
change there was to suggest the required Listen statements
in a comment.
PR: PR 14037 (Bugzilla), PR 7492 (Gnats), various dups of these PRs
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97516 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/configure.in b/configure.in index 9a40f9d49f..e8e372bb74 100644 --- a/configure.in +++ b/configure.in @@ -324,6 +324,42 @@ AC_ARG_WITH(port,APACHE_HELP_STRING(--with-port=PORT,Port on which to listen (de [if test "$withval" = "yes"; then AC_MSG_ERROR('option --with-port requires a value (the TCP port number)'); else PORT="$withval"; fi], [PORT=80]) +dnl ## See if APR has IPv6 support +ap_old_cppflags=$CPPFLAGS +CPPFLAGS="$CPPFLAGS -I$APR_SOURCE_DIR/include -I$abs_builddir/srclib/apr/include" +AC_TRY_COMPILE([#include <apr.h>], [ +#if !APR_HAVE_IPV6 +#error APR does not have IPv6 support +#endif], apr_have_ipv6=yes, apr_have_ipv6=no) +CPPFLAGS=$ap_old_cppflags + +AC_ARG_ENABLE(v4-mapped,APACHE_HELP_STRING(--enable-v4-mapped,Allow IPv6 sockets to handle IPv4 connections), +[ + v4mapped=$enableval +], +[ + case $host in + *freebsd5*|*netbsd*|*openbsd*) + v4mapped=no + ;; + *) + v4mapped=yes + ;; +esac +]) + +if test $v4mapped = "yes" -o $apr_have_ipv6 = "no"; then + nonssl_listen_stmt_1="" + nonssl_listen_stmt_2="Listen @@Port@@" + if test $apr_have_ipv6 = "yes"; then + AC_DEFINE(AP_ENABLE_V4_MAPPED, 1, + [Allow IPv4 connections on IPv6 listening sockets]) + fi +else + nonssl_listen_stmt_1="Listen 0.0.0.0:@@Port@@" + nonssl_listen_stmt_2="Listen [[::]]:@@Port@@" +fi + AC_ARG_ENABLE(maintainer-mode,APACHE_HELP_STRING(--enable-maintainer-mode,Turn on debugging and compile time warnings), [ APR_ADDTO(CPPFLAGS, -DAP_DEBUG) |