configure.in.in
来自「将konqueror浏览器移植到ARM9 2410中」· IN 代码 · 共 179 行
IN
179 行
dnl --------dnl KSocketAddress/KExtendedSocket extra configurationdnl --------dnldnl This is to be merged with toplevel configure.in.in soonAC_CHECK_FUNCS(inet_ntop inet_pton getpeername getsockname getsockopt gethostbyname2_r gethostbyname_r gethostbyname2)AC_SUBST(HAVE_GETADDRINFO)AC_SUBST(GETADDRINFO_RETURNS_UNIX)AC_SUBST(HAVE_BROKEN_GETADDRINFO)AC_SUBST(HAVE_STRUCT_ADDRINFO)AC_MSG_CHECKING([for struct addrinfo])AC_TRY_COMPILE(dnl [ #include <netdb.h> ], [ struct addrinfo ai; ], [ AC_DEFINE(HAVE_STRUCT_ADDRINFO, 1, [Define if netdb.h defines struct addrinfo]) AC_MSG_RESULT(yes) ], AC_MSG_RESULT(no))my_LIBS="$LIBS"LIBS="$LIBS $LIBSOCKET"AC_CHECK_FUNC(getaddrinfo, [ AC_DEFINE(HAVE_GETADDRINFO, 1, [Define if getaddrinfo is present]) dnl Even though we now know that getaddrinfo is there, make sure getnameinfo is there too kde_gai_ok=true AC_CHECK_FUNCS(freeaddrinfo getnameinfo gai_strerror, : , [ kde_gai_ok=false AC_DEFINE(HAVE_BROKEN_GETADDRINFO, 1, [Define if getaddrinfo is broken and should be replaced]) AC_DEFINE(GETADDRINFO_RETURNS_UNIX, 1, [Define if getaddrinfo returns AF_UNIX sockets]) break ]) if $kde_gai_ok ; then AC_MSG_CHECKING([if getaddrinfo returns AF_UNIX]) dnl At least one system has a bad implementation of getaddrinfo dnl FreeBSD's libc getaddrinfo code has AF_UNIX disabled dnl This is rather stupid, but since it's there... AC_TRY_RUN(dnl [ #include <sys/types.h> #include <sys/socket.h> #include <netdb.h> int main() { struct addrinfo hint, *res; int err; hint.ai_family = AF_UNSPEC; hint.ai_protocol = 0; hint.ai_socktype = SOCK_STREAM; hint.ai_flags = 0; err = getaddrinfo(0, "/tmp/conftest-sock", &hint, &res); if (err != 0 || res == 0 || res->ai_family != AF_UNIX) return 1; return 0; } ], [ AC_MSG_RESULT(yes) AC_DEFINE(GETADDRINFO_RETURNS_UNIX, 1, [Define if getaddrinfo returns AF_UNIX sockets]) ], [ AC_MSG_RESULT(no) ], [ case "$target" in *-*-freebsd*) AC_MSG_RESULT(assuming it doesn't) ;; *) AC_MSG_RESULT(assuming it does) AC_DEFINE(GETADDRINFO_RETURNS_UNIX, 1, [Define if getaddrinfo returns AF_UNIX sockets]) ;; esac ] ) fi # test $kde_gai_broken ], [ dnl Our getaddrinfo returns AF_UNIX sockets AC_DEFINE(GETADDRINFO_RETURNS_UNIX, 1, [Define if getaddrinfo returns AF_UNIX sockets]) ])LIBS="$my_LIBS"AC_SUBST(HAVE_SOCKADDR_SA_LEN)AC_MSG_CHECKING([if struct sockaddr has member sa_len])AC_TRY_COMPILE( [ #include <sys/types.h> #include <sys/socket.h> ], [ struct sockaddr sa; sa.sa_len = sizeof(sa); ], [ AC_DEFINE(HAVE_SOCKADDR_SA_LEN,1,[Define if struct sockaddr has member sa_len]) AC_MSG_RESULT(yes) ], AC_MSG_RESULT(no))AC_SUBST(HAVE_SOCKADDR_IN6)AC_SUBST(HAVE_SOCKADDR_IN6_SCOPE_ID)AC_CHECK_HEADERS(netinet/in.h, [ dnl Check for sockaddr_in6. We don't have to check for in6_addr dnl if sockaddr_in6 is there, so is in6_addr AC_MSG_CHECKING([for struct sockaddr_in6]) AC_TRY_COMPILE( [ #include <sys/types.h> #include <stdlib.h> #include <netinet/in.h> ], [ struct sockaddr_in6 sin6; ], [ AC_DEFINE(HAVE_SOCKADDR_IN6,1,[Define if we have struct sockaddr_in6 in netinet/in.h]) AC_MSG_RESULT(yes) dnl Check if this system's sockaddr_in6 already supports sin6_scope_id dnl All systems should support it, but some still don't AC_MSG_CHECKING([if struct sockaddr_in6 has member sin6_scope_id]) AC_TRY_COMPILE( [ #include <sys/types.h> #include <stdlib.h> #include <netinet/in.h> ], [ struct sockaddr_in6 sin6; sin6.sin6_scope_id = 0; ], [ AC_DEFINE(HAVE_SOCKADDR_IN6_SCOPE_ID,1,[Define if this system already has sin6_scope_id in sockaddr_in6]) AC_MSG_RESULT(yes) ], AC_MSG_RESULT(no) ) ], AC_MSG_RESULT(no) ) ])AC_SUBST(KDE_IPV6_LOOKUP_MODE)AC_ARG_WITH(ipv6-lookup, [ --with-ipv6-lookup=mode Set the mode for IPv6 lookups: yes, auto and no],[ AC_MSG_CHECKING([how we should treat IPv6 lookups]) if test "$withval" = yes -o "$withval" = always; then AC_DEFINE(KDE_IPV6_LOOKUP_MODE, 0, [Lookup mode for IPv6 addresses: 0 for always, 1 for check and 2 for disabled]) AC_MSG_RESULT([always do the lookup]) elif test "$withval" = auto; then AC_DEFINE(KDE_IPV6_LOOKUP_MODE, 1, [Lookup mode for IPv6 addresses: 0 for always, 1 for check and 2 for disabled]) AC_MSG_RESULT([check for IPv6 stack]) else AC_DEFINE(KDE_IPV6_LOOKUP_MODE, 2, [Lookup mode for IPv6 addresses: 0 for always, 1 for check and 2 for disabled]) AC_MSG_RESULT([never do the lookup]) fi], [ AC_DEFINE(KDE_IPV6_LOOKUP_MODE, 0, [Lookup mode for IPv6 addresses: 0 for always, 1 for check and 2 for disabled])])
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?