Commit 0adde9f4 authored by David Lawrence's avatar David Lawrence
Browse files

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.
parent 7c74a774
This diff is collapsed.
......@@ -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 SOFTWARE.
AC_REVISION($Revision: 1.133 $)
AC_REVISION($Revision: 1.134 $)
AC_PREREQ(2.13)
......@@ -244,31 +244,11 @@ AC_PROG_CC
AC_PROG_YACC
AC_HEADER_STDC
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.
# See the IPv6 section for additional special handling of netinet6/in6.h.
#
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_CHECK_HEADERS(fcntl.h sys/time.h unistd.h sys/sockio.h netinet6/in6.h)
AC_C_CONST
AC_C_INLINE
......@@ -618,6 +598,71 @@ case "$enable_ipv6" in
;;
esac
#
# 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_ARG_WITH(kame,
[ --with-kame[=PATH] use Kame IPv6 [default path /usr/local/v6]],
use_kame="$withval", use_kame="no")
case "$use_kame" in
no)
;;
yes)
kame_path=/usr/local/v6
;;
*)
kame_path="$use_kame"
;;
esac
case "$use_kame" in
no)
AC_MSG_RESULT(no)
;;
*)
if test -f $kame_path/lib/libinet6.a; then
AC_MSG_RESULT($kame_path/lib/libinet6.a)
LIBS="-L$kame_path/lib -linet6 $LIBS"
else
AC_MSG_ERROR([$kame_path/lib/libinet6.a not found.
Please choose the proper path with the following command:
configure --with-kame=PATH
])
fi
;;
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"
......@@ -633,7 +678,7 @@ case "$found_ipv6" in
[AC_MSG_RESULT(no)
ISC_PLATFORM_NEEDIN6ADDRANY="#define ISC_PLATFORM_NEEDIN6ADDRANY 1"])
AC_MSG_CHECKING(for in6_pktinfo)
AC_TRY_LINK([
AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
......@@ -659,6 +704,8 @@ 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)
......@@ -666,45 +713,6 @@ AC_SUBST(ISC_IPV6_O)
AC_SUBST(ISC_ISCIPV6_O)
AC_SUBST(ISC_IPV6_C)
#
# IPv6 support provided via Kame
#
AC_MSG_CHECKING(for Kame IPv6 support)
AC_ARG_WITH(kame,
[ --with-kame[=PATH] use Kame IPv6 [default path /usr/local/v6]],
use_kame="$withval", use_kame="no")
case "$use_kame" in
no)
;;
yes)
kame_path=/usr/local/v6
;;
*)
kame_path="$use_kame"
;;
esac
case "$use_kame" in
no)
AC_MSG_RESULT(no)
;;
*)
if test -f $kame_path/lib/libinet6.a; then
AC_MSG_RESULT($kame_path/lib/libinet6.a)
LIBS="-L$kame_path/lib -linet6 $LIBS"
else
AC_MSG_ERROR([$kame_path/lib/libinet6.a not found.
Please choose the proper path with the following command:
configure --with-kame=PATH
])
fi
;;
esac
#
# Check for network functions that are often missing. We do this
# after the libtool checking, so we can put the right suffix on
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment