mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
Moved <netinet6/in6.h> special processing to IPv6 section. Changed
the CPP symbol it uses from *_HAVENETINET6* to *_NEEDNETINET6* to better clarify what's going on with regard to the symbol. Moved processing of --with-kame to before the in6addr_any check, since it needs to set LIBS for the check to work. [related to RT #105, and previous configure.in revision 1.108.] in6_pkinfo check only needs AC_TRY_COMPILE, not AC_TRY_LINK.
This commit is contained in:
156
configure.in
156
configure.in
@@ -13,7 +13,7 @@ dnl PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
|||||||
dnl ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
dnl ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||||
dnl SOFTWARE.
|
dnl SOFTWARE.
|
||||||
|
|
||||||
AC_REVISION($Revision: 1.133 $)
|
AC_REVISION($Revision: 1.134 $)
|
||||||
|
|
||||||
AC_PREREQ(2.13)
|
AC_PREREQ(2.13)
|
||||||
|
|
||||||
@@ -244,32 +244,12 @@ AC_PROG_CC
|
|||||||
AC_PROG_YACC
|
AC_PROG_YACC
|
||||||
|
|
||||||
AC_HEADER_STDC
|
AC_HEADER_STDC
|
||||||
|
|
||||||
|
#
|
||||||
|
# See the IPv6 section for additional special handling of netinet6/in6.h.
|
||||||
|
#
|
||||||
AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h sys/sockio.h netinet6/in6.h)
|
AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h sys/sockio.h netinet6/in6.h)
|
||||||
|
|
||||||
#
|
|
||||||
# HAVE_NETINET6_IN6_H needs to go in platform.h.
|
|
||||||
# Including it on Kame-using platforms is very bad, though, because
|
|
||||||
# Kame has an #error against direct inclusion. So include it on only
|
|
||||||
# the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
|
|
||||||
#
|
|
||||||
isc_netinet6_hack=""
|
|
||||||
changequote({, })
|
|
||||||
case "$ac_cv_header_netinet6_in6_h+$host" in
|
|
||||||
yes+*-bsdi4.[01]*)
|
|
||||||
ISC_PLATFORM_HAVENETINET6IN6H="#define ISC_PLATFORM_HAVENETINET6IN6H 1"
|
|
||||||
LWRES_PLATFORM_HAVENETINET6IN6H="#define LWRES_PLATFORM_HAVENETINET6IN6H 1"
|
|
||||||
isc_netinet6_hack="#include <netinet6/in6.h>"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
ISC_PLATFORM_HAVENETINET6IN6H="#undef ISC_PLATFORM_HAVENETINET6IN6H"
|
|
||||||
LWRES_PLATFORM_HAVENETINET6IN6H="#undef LWRES_PLATFORM_HAVENETINET6IN6H"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
changequote([, ])
|
|
||||||
|
|
||||||
AC_SUBST(ISC_PLATFORM_HAVENETINET6IN6H)
|
|
||||||
AC_SUBST(LWRES_PLATFORM_HAVENETINET6IN6H)
|
|
||||||
|
|
||||||
AC_C_CONST
|
AC_C_CONST
|
||||||
AC_C_INLINE
|
AC_C_INLINE
|
||||||
AC_TYPE_SIZE_T
|
AC_TYPE_SIZE_T
|
||||||
@@ -618,56 +598,9 @@ case "$enable_ipv6" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "$found_ipv6" in
|
|
||||||
yes)
|
|
||||||
ISC_PLATFORM_HAVEIPV6="#define ISC_PLATFORM_HAVEIPV6 1"
|
|
||||||
LWRES_PLATFORM_HAVEIPV6="#define LWRES_PLATFORM_HAVEIPV6 1"
|
|
||||||
AC_MSG_CHECKING(for in6addr_any)
|
|
||||||
AC_TRY_LINK([
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <netinet/in.h>],
|
|
||||||
[struct in6_addr in6; in6 = in6addr_any; return (0);],
|
|
||||||
[AC_MSG_RESULT(yes)
|
|
||||||
ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"],
|
|
||||||
[AC_MSG_RESULT(no)
|
|
||||||
ISC_PLATFORM_NEEDIN6ADDRANY="#define ISC_PLATFORM_NEEDIN6ADDRANY 1"])
|
|
||||||
AC_MSG_CHECKING(for in6_pktinfo)
|
|
||||||
AC_TRY_LINK([
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
$isc_netinet6_hack
|
|
||||||
],
|
|
||||||
[struct in6_pktinfo xyzzy; return (0);],
|
|
||||||
[AC_MSG_RESULT(yes)
|
|
||||||
ISC_PLATFORM_HAVEIN6PKTINFO="#define ISC_PLATFORM_HAVEIN6PKTINFO 1"],
|
|
||||||
[AC_MSG_RESULT(no -- disabling runtime ipv6 support)
|
|
||||||
ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"])
|
|
||||||
;;
|
|
||||||
no)
|
|
||||||
ISC_PLATFORM_HAVEIPV6="#undef ISC_PLATFORM_HAVEIPV6"
|
|
||||||
LWRES_PLATFORM_HAVEIPV6="#undef LWRES_PLATFORM_HAVEIPV6"
|
|
||||||
ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"
|
|
||||||
ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"
|
|
||||||
ISC_IPV6_H="ipv6.h"
|
|
||||||
ISC_IPV6_O="ipv6.$O"
|
|
||||||
ISC_ISCIPV6_O="unix/ipv6.$O"
|
|
||||||
ISC_IPV6_C="ipv6.c"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
AC_SUBST(ISC_PLATFORM_HAVEIPV6)
|
|
||||||
AC_SUBST(LWRES_PLATFORM_HAVEIPV6)
|
|
||||||
AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRANY)
|
|
||||||
AC_SUBST(ISC_PLATFORM_HAVEIN6PKTINFO)
|
|
||||||
AC_SUBST(ISC_IPV6_H)
|
|
||||||
AC_SUBST(ISC_IPV6_O)
|
|
||||||
AC_SUBST(ISC_ISCIPV6_O)
|
|
||||||
AC_SUBST(ISC_IPV6_C)
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# IPv6 support provided via Kame
|
# See whether IPv6 support is provided via a Kame add-on.
|
||||||
|
# This is done before other IPv6 linking tests to LIBS is properly set.
|
||||||
#
|
#
|
||||||
AC_MSG_CHECKING(for Kame IPv6 support)
|
AC_MSG_CHECKING(for Kame IPv6 support)
|
||||||
AC_ARG_WITH(kame,
|
AC_ARG_WITH(kame,
|
||||||
@@ -704,6 +637,81 @@ Please choose the proper path with the following command:
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
#
|
||||||
|
# Whether netinet6/in6.h is needed has to be defined in isc/platform.h.
|
||||||
|
# Including it on Kame-using platforms is very bad, though, because
|
||||||
|
# Kame uses #error against direct inclusion. So include it on only
|
||||||
|
# the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
|
||||||
|
# This is done before the in6_pktinfo check because that's what
|
||||||
|
# netinet6/in6.h is needed for.
|
||||||
|
#
|
||||||
|
isc_netinet6_hack=""
|
||||||
|
changequote({, })
|
||||||
|
case "$ac_cv_header_netinet6_in6_h+$host" in
|
||||||
|
yes+*-bsdi4.[01]*)
|
||||||
|
ISC_PLATFORM_NEEDNETINET6IN6H="#define ISC_PLATFORM_NEEDNETINET6IN6H 1"
|
||||||
|
LWRES_PLATFORM_NEEDNETINET6IN6H="#define LWRES_PLATFORM_NEEDNETINET6IN6H 1"
|
||||||
|
isc_netinet6_hack="#include <netinet6/in6.h>"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
ISC_PLATFORM_NEEDNETINET6IN6H="#undef ISC_PLATFORM_NEEDNETINET6IN6H"
|
||||||
|
LWRES_PLATFORM_NEEDNETINET6IN6H="#undef LWRES_PLATFORM_NEEDNETINET6IN6H"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
changequote([, ])
|
||||||
|
|
||||||
|
#
|
||||||
|
# Now delve deeper into the suitability of the IPv6 support.
|
||||||
|
#
|
||||||
|
case "$found_ipv6" in
|
||||||
|
yes)
|
||||||
|
ISC_PLATFORM_HAVEIPV6="#define ISC_PLATFORM_HAVEIPV6 1"
|
||||||
|
LWRES_PLATFORM_HAVEIPV6="#define LWRES_PLATFORM_HAVEIPV6 1"
|
||||||
|
AC_MSG_CHECKING(for in6addr_any)
|
||||||
|
AC_TRY_LINK([
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <netinet/in.h>],
|
||||||
|
[struct in6_addr in6; in6 = in6addr_any; return (0);],
|
||||||
|
[AC_MSG_RESULT(yes)
|
||||||
|
ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"],
|
||||||
|
[AC_MSG_RESULT(no)
|
||||||
|
ISC_PLATFORM_NEEDIN6ADDRANY="#define ISC_PLATFORM_NEEDIN6ADDRANY 1"])
|
||||||
|
AC_MSG_CHECKING(for in6_pktinfo)
|
||||||
|
AC_TRY_COMPILE([
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
$isc_netinet6_hack
|
||||||
|
],
|
||||||
|
[struct in6_pktinfo xyzzy; return (0);],
|
||||||
|
[AC_MSG_RESULT(yes)
|
||||||
|
ISC_PLATFORM_HAVEIN6PKTINFO="#define ISC_PLATFORM_HAVEIN6PKTINFO 1"],
|
||||||
|
[AC_MSG_RESULT(no -- disabling runtime ipv6 support)
|
||||||
|
ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"])
|
||||||
|
;;
|
||||||
|
no)
|
||||||
|
ISC_PLATFORM_HAVEIPV6="#undef ISC_PLATFORM_HAVEIPV6"
|
||||||
|
LWRES_PLATFORM_HAVEIPV6="#undef LWRES_PLATFORM_HAVEIPV6"
|
||||||
|
ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"
|
||||||
|
ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"
|
||||||
|
ISC_IPV6_H="ipv6.h"
|
||||||
|
ISC_IPV6_O="ipv6.$O"
|
||||||
|
ISC_ISCIPV6_O="unix/ipv6.$O"
|
||||||
|
ISC_IPV6_C="ipv6.c"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
AC_SUBST(ISC_PLATFORM_HAVEIPV6)
|
||||||
|
AC_SUBST(LWRES_PLATFORM_HAVEIPV6)
|
||||||
|
AC_SUBST(ISC_PLATFORM_NEEDNETINET6IN6H)
|
||||||
|
AC_SUBST(LWRES_PLATFORM_NEEDNETINET6IN6H)
|
||||||
|
AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRANY)
|
||||||
|
AC_SUBST(ISC_PLATFORM_HAVEIN6PKTINFO)
|
||||||
|
AC_SUBST(ISC_IPV6_H)
|
||||||
|
AC_SUBST(ISC_IPV6_O)
|
||||||
|
AC_SUBST(ISC_ISCIPV6_O)
|
||||||
|
AC_SUBST(ISC_IPV6_C)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Check for network functions that are often missing. We do this
|
# Check for network functions that are often missing. We do this
|
||||||
|
Reference in New Issue
Block a user