Fixed IPv6 detection (ITS#669,ITS#770)

This commit is contained in:
Kurt Zeilenga 2000-09-29 19:10:28 +00:00
parent c155c66fe4
commit 893e83f296
4 changed files with 771 additions and 713 deletions

View File

@ -9,6 +9,7 @@ OpenLDAP 2.0.X Engineering
Fixed -lldap SASL ctx close bug (ITS#790)
Updated -llber bprint routine
Build Environment
Fixed IPv6 detection (ITS#669,ITS#770)
Fixed VPATH schema install
OpenLDAP 2.0.4 Release

1416
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -538,28 +538,6 @@ AC_CHECK_LIB(s, afopen, [
])
dnl ----------------------------------------------------------------
dnl PF_INET6 support requires getaddrinfo
dnl PF_LOCAL may use getaddrinfo in available
AC_CHECK_FUNCS( getaddrinfo )
if test $ac_cv_func_getaddrinfo = no ; then
if test $ol_enable_ipv6 = yes ; then
AC_MSG_ERROR([IPv6 support requires getaddrinfo()])
fi
ol_enable_ipv6=no
fi
if test $ol_enable_local != no ; then
AC_CHECK_HEADERS( sys/un.h )
if test $ol_enable_local = auto ; then
ol_enable_local=$ac_cv_header_sys_un_h
elif test $ac_cv_header_sys_un_h = no ; then
AC_MSG_ERROR([AF_LOCAL domain support requires sys/un.h])
fi
fi
dnl ----------------------------------------------------------------
dnl Check for module support
ol_link_modules=no
@ -749,6 +727,42 @@ if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
AC_MSG_ERROR([DNSSRV requires res_query()])
fi
dnl ----------------------------------------------------------------
dnl PF_INET6 support requires getaddrinfo and INET6_ADDRSTRLEN
dnl PF_LOCAL may use getaddrinfo in available
AC_CHECK_FUNCS( getaddrinfo )
ol_link_ipv6=no
if test $ac_cv_func_getaddrinfo = no ; then
if test $ol_enable_ipv6 = yes ; then
AC_MSG_ERROR([IPv6 support requires getaddrinfo()])
fi
else
AC_CACHE_CHECK([INET6_ADDRSTRLEN],[ol_cv_inet6_addrstrlen],[
AC_EGREP_CPP(__has_inet6_addrstrlen__,[
# include <netinet/in.h>
# ifdef INET6_ADDRSTRLEN
__has_inet6_addrstrlen__;
# endif
], [ol_cv_inet6_addrstrlen=yes], [ol_cv_inet6_addrstrlen=no])])
if test $ol_cv_inet6_addrstrlen = yes ; then
ol_link_ipv6=yes
elif test $ol_enable_ipv6 = yes ; then
AC_MSG_ERROR([IPv6 support requires INET6_ADDRSTRLEN])
fi
fi
if test $ol_enable_local != no ; then
AC_CHECK_HEADERS( sys/un.h )
if test $ol_enable_local = auto ; then
ol_enable_local=$ac_cv_header_sys_un_h
elif test $ac_cv_header_sys_un_h = no ; then
AC_MSG_ERROR([AF_LOCAL domain support requires sys/un.h])
fi
fi
dnl ----------------------------------------------------------------
dnl Kerberos
ol_link_kbind=no
@ -2087,7 +2101,7 @@ fi
if test "$ol_enable_local" != no; then
AC_DEFINE(LDAP_PF_LOCAL,1,[define to support PF_LOCAL])
fi
if test "$ol_enable_ipv6" != no; then
if test "$ol_link_ipv6" != no; then
AC_DEFINE(LDAP_PF_INET6,1,[define to support PF_INET6])
fi
if test "$ol_enable_cleartext" != no ; then

View File

@ -186,4 +186,11 @@ LDAP_F (int) ldap_pvt_inet_aton LDAP_P(( const char *, struct in_addr * ));
# endif
#endif
#ifndef INET_ADDRSTRLEN
# define INET_ADDRSTRLEN 16
#endif
#ifndef INET6_ADDRSTRLEN
# define INET6_ADDRSTRLEN 46
#endif
#endif /* _AC_SOCKET_H_ */