autofs-5.0.6 - fix ipv6 configure check From: Ian Kent Since the functions clntudp6_bufcreate() and clnttcp6_create() of libtirpc were never actually included in the library our reference to clntudp6_bufcreate() in configure needs to be removed. Having redone the libtirpc interface (after realizing these functions were defined but not actually included in the library) checking for IPv6 support can't be done now and we need to rely on the transport independent nature of libtirpc to take care of this. So the INET6 checks have been replaced with WITH_LIBTIRPC checks instead. --- CHANGELOG | 1 + aclocal.m4 | 36 ------------------------------------ configure | 46 ---------------------------------------------- include/config.h.in | 3 --- modules/replicated.c | 10 +++++++--- 5 files changed, 8 insertions(+), 88 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 0394c74..076830f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -16,6 +16,7 @@ - add disable move mount configure option. - fix ipv6 name lookup check. - fix ipv6 rpc calls. +- fix ipv6 configure check. 28/06/2011 autofs-5.0.6 ----------------------- diff --git a/aclocal.m4 b/aclocal.m4 index 9f1e144..e1e12f7 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -324,41 +324,6 @@ LIBS="$af_check_ldap_parse_page_control_save_libs" ]) dnl -------------------------------------------------------------------------- -dnl AF_CHECK_LIBTIRPC_IPV6 -dnl -dnl Use libtirpc for rpc transport -dnl -------------------------------------------------------------------------- -AC_DEFUN([AF_CHECK_LIBTIRPC_IPV6], -[AC_MSG_CHECKING(if libtirpc has IPv6 support) - -# save current flags -af_check_libtirpc_ipv6_save_cflags="$CFLAGS" -af_check_libtirpc_ipv6_save_ldflags="$LDFLAGS" -CFLAGS="$CFLAGS -I/usr/include/tirpc" -LDFLAGS="$LDFLAGS -ltirpc" - -AC_TRY_LINK( - [ #define INET6 - #include ], - [ CLIENT *cl; - struct sockaddr_in6 addr; - int fd; - unsigned long ul; struct timeval t; unsigned int ui; - cl = clntudp6_bufcreate(&addr,ul,ul,t,&fd,ui,ui); ], - [ af_have_libtirpc_ipv6=yes - AC_MSG_RESULT(yes) ], - [ AC_MSG_RESULT(no) ]) - -if test "$af_have_libtirpc_ipv6" = "yes"; then - AC_DEFINE(INET6,1, [Use IPv6 with libtirpc]) -fi - -# restore flags -CFLAGS="$af_check_libtirpc_ipv6_save_cflags" -LDFLAGS="$af_check_libtirpc_ipv6_save_ldflags" -]) - -dnl -------------------------------------------------------------------------- dnl AF_CHECK_LIBTIRPC dnl dnl Use libtirpc for rpc transport @@ -399,7 +364,6 @@ AC_ARG_WITH(libtirpc, [ --with-libtirpc use libtirpc if available], [if test "$withval" = yes; then AF_CHECK_LIBTIRPC() - AF_CHECK_LIBTIRPC_IPV6() else AC_MSG_RESULT(no) fi], [AC_MSG_RESULT(no)]) diff --git a/configure b/configure index 76b6d86..62599a9 100755 --- a/configure +++ b/configure @@ -3087,52 +3087,6 @@ fi CFLAGS="$af_check_libtirpc_save_cflags" LDFLAGS="$af_check_libtirpc_save_ldflags" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtirpc has IPv6 support" >&5 -$as_echo_n "checking if libtirpc has IPv6 support... " >&6; } - -# save current flags -af_check_libtirpc_ipv6_save_cflags="$CFLAGS" -af_check_libtirpc_ipv6_save_ldflags="$LDFLAGS" -CFLAGS="$CFLAGS -I/usr/include/tirpc" -LDFLAGS="$LDFLAGS -ltirpc" - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - #define INET6 - #include -int -main () -{ - CLIENT *cl; - struct sockaddr_in6 addr; - int fd; - unsigned long ul; struct timeval t; unsigned int ui; - cl = clntudp6_bufcreate(&addr,ul,ul,t,&fd,ui,ui); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - af_have_libtirpc_ipv6=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -if test "$af_have_libtirpc_ipv6" = "yes"; then - -$as_echo "#define INET6 1" >>confdefs.h - -fi - -# restore flags -CFLAGS="$af_check_libtirpc_ipv6_save_cflags" -LDFLAGS="$af_check_libtirpc_ipv6_save_ldflags" - else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } diff --git a/include/config.h.in b/include/config.h.in index 97a8d2d..fb4aadb 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -72,9 +72,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H -/* Use IPv6 with libtirpc */ -#undef INET6 - /* Use libxml2 tsd usage workaround */ #undef LIBXML2_WORKAROUND diff --git a/modules/replicated.c b/modules/replicated.c index b4f6da2..65634bd 100644 --- a/modules/replicated.c +++ b/modules/replicated.c @@ -180,7 +180,7 @@ static unsigned int get_proximity(struct sockaddr *host_addr) break; case AF_INET6: -#ifndef INET6 +#ifndef WITH_LIBTIRPC return PROXIMITY_UNSUPPORTED; #else addr6 = (struct sockaddr_in6 *) host_addr; @@ -229,7 +229,9 @@ static unsigned int get_proximity(struct sockaddr *host_addr) break; case AF_INET6: -#ifdef INET6 +#ifndef WITH_LIBTIRPC + return PROXIMITY_UNSUPPORTED; +#else if (host_addr->sa_family == AF_INET) break; @@ -309,7 +311,9 @@ static unsigned int get_proximity(struct sockaddr *host_addr) break; case AF_INET6: -#ifdef INET6 +#ifndef WITH_LIBTIRPC + return PROXIMITY_UNSUPPORTED; +#else if (host_addr->sa_family == AF_INET) break;