diff --git a/configure b/configure index c0df047bbd..b616dc88f1 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh -# From configure.in Revision: 1.42 +# From configure.in Revision: 1.43 @@ -2111,12 +2111,37 @@ else fi rm -f conftest* -echo $ac_n "checking for IPv6 structures""... $ac_c" 1>&6 -echo "configure:2116: checking for IPv6 structures" >&5 +echo $ac_n "checking for PF_INET6""... $ac_c" 1>&6 +echo "configure:2116: checking for PF_INET6" >&5 cat > conftest.$ac_ext < +#include +int main() { +return (PF_INET6); +; return 0; } +EOF +if { (eval echo configure:2127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + ISC_NET_NEEDPFINET6="#undef ISC_NET_NEEDPFINET6" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6 + ISC_NET_NEEDPFINET6="#define ISC_NET_NEEDPFINET6 1" +fi +rm -f conftest* + +echo $ac_n "checking for IPv6 structures""... $ac_c" 1>&6 +echo "configure:2141: checking for IPv6 structures" >&5 +cat > conftest.$ac_ext < #include #include @@ -2124,7 +2149,7 @@ int main() { struct sockaddr_in6 sin6; return (0); ; return 0; } EOF -if { (eval echo configure:2128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 ISC_NET_HAVEIPV6="#define ISC_NET_HAVEIPV6 1" @@ -2227,7 +2252,7 @@ else fi echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:2231: checking build system type" >&5 +echo "configure:2256: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -2256,7 +2281,7 @@ ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:2260: checking for ld used by GCC" >&5 +echo "configure:2285: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. @@ -2280,10 +2305,10 @@ echo "configure:2260: checking for ld used by GCC" >&5 esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:2284: checking for GNU ld" >&5 +echo "configure:2309: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:2287: checking for non-GNU ld" >&5 +echo "configure:2312: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2319,7 +2344,7 @@ fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:2323: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:2348: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2335,7 +2360,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:2339: checking for BSD-compatible nm" >&5 +echo "configure:2364: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2372,7 +2397,7 @@ echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:2376: checking whether ln -s works" >&5 +echo "configure:2401: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2416,8 +2441,8 @@ test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" case "$host" in *-*-irix6*) # Find out which ABI we are using. - echo '#line 2420 "configure"' > conftest.$ac_ext - if { (eval echo configure:2421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 2445 "configure"' > conftest.$ac_ext + if { (eval echo configure:2446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" @@ -2438,19 +2463,19 @@ case "$host" in SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:2442: checking whether the C compiler needs -belf" >&5 +echo "configure:2467: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -2565,12 +2590,12 @@ esac echo $ac_n "checking for inet_ntop""... $ac_c" 1>&6 -echo "configure:2569: checking for inet_ntop" >&5 +echo "configure:2594: checking for inet_ntop" >&5 if eval "test \"`echo '$''{'ac_cv_func_inet_ntop'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_inet_ntop=yes" else @@ -2617,12 +2642,12 @@ ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O" fi echo $ac_n "checking for inet_pton""... $ac_c" 1>&6 -echo "configure:2621: checking for inet_pton" >&5 +echo "configure:2646: checking for inet_pton" >&5 if eval "test \"`echo '$''{'ac_cv_func_inet_pton'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_inet_pton=yes" else @@ -2669,12 +2694,12 @@ ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O" fi echo $ac_n "checking for inet_aton""... $ac_c" 1>&6 -echo "configure:2673: checking for inet_aton" >&5 +echo "configure:2698: checking for inet_aton" >&5 if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_inet_aton=yes" else @@ -2932,6 +2957,7 @@ s%@MKDEPCFLAGS@%$MKDEPCFLAGS%g s%@MKDEPPROG@%$MKDEPPROG%g s%@ISC_NET_HAVESALEN@%$ISC_NET_HAVESALEN%g s%@ISC_NET_NEEDAFINET6@%$ISC_NET_NEEDAFINET6%g +s%@ISC_NET_NEEDPFINET6@%$ISC_NET_NEEDPFINET6%g s%@ISC_NET_HAVEIPV6@%$ISC_NET_HAVEIPV6%g s%@ISC_IPV6_H@%$ISC_IPV6_H%g s%@ISC_IPV6_O@%$ISC_IPV6_O%g diff --git a/configure.in b/configure.in index f3ed683113..9d02b085c5 100644 --- a/configure.in +++ b/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 SOFTWARE. -AC_REVISION($Revision: 1.42 $) +AC_REVISION($Revision: 1.43 $) AC_PREREQ(2.13) @@ -273,6 +273,16 @@ AC_TRY_COMPILE([ [AC_MSG_RESULT(no) ISC_NET_NEEDAFINET6="#define ISC_NET_NEEDAFINET6 1"]) AC_SUBST(ISC_NET_NEEDAFINET6) +AC_MSG_CHECKING(for PF_INET6) +AC_TRY_COMPILE([ +#include +#include ], +[return (PF_INET6);], + [AC_MSG_RESULT(yes) + ISC_NET_NEEDPFINET6="#undef ISC_NET_NEEDPFINET6"], + [AC_MSG_RESULT(no) + ISC_NET_NEEDPFINET6="#define ISC_NET_NEEDPFINET6 1"]) +AC_SUBST(ISC_NET_NEEDPFINET6) AC_MSG_CHECKING(for IPv6 structures) AC_TRY_COMPILE([ #include diff --git a/lib/isc/unix/include/isc/net.h.in b/lib/isc/unix/include/isc/net.h.in index 636f1963e5..b489d8f257 100644 --- a/lib/isc/unix/include/isc/net.h.in +++ b/lib/isc/unix/include/isc/net.h.in @@ -75,6 +75,11 @@ */ @ISC_NET_NEEDAFINET6@ +/* + * If this system needs PF_INET6, ISC_NET_NEEDPFINET6 will be defined. + */ +@ISC_NET_NEEDPFINET6@ + /* * If this system has the IPv6 structure definitions, ISC_NET_HAVEIPV6 * will be defined. @@ -110,6 +115,9 @@ #ifdef ISC_NET_NEEDAFINET6 #define AF_INET6 99 +#endif + +#ifdef ISC_NET_NEEDPFINET6 #define PF_INET6 AF_INET6 #endif