Socket6-0.29/000755 003721 003721 00000000000 13354066374 012552 5ustar00umenoah000000 000000 Socket6-0.29/getnameinfo.c000644 003721 003721 00000003622 12702614646 015212 0ustar00umenoah000000 000000 /* * Mar 8, 2000 by Hajimu UMEMOTO * $Id: getnameinfo.c 99 2004-01-04 10:13:44Z ume $ * * This module is besed on ssh-1.2.27-IPv6-1.5 written by * KIKUCHI Takahiro */ /* * fake library for ssh * * This file includes getnameinfo(). * These funtions are defined in rfc2133. * * But these functions are not implemented correctly. The minimum subset * is implemented for ssh use only. For exapmle, this routine assumes * that ai_family is AF_INET. Don't use it for another purpose. * * In the case not using 'configure --enable-ipv6', this getnameinfo.c * will be used if you have broken getnameinfo or no getnameinfo. */ #include #include "gai.h" #ifndef HAVE_SOCKLEN_T typedef unsigned int socklen_t; #endif /* HAVE_SOCKLEN_T */ int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, size_t hostlen, char *serv, size_t servlen, int flags) { struct sockaddr_in *sin = (struct sockaddr_in *)sa; struct hostent *hp; char tmpserv[16]; if (serv) { snprintf(tmpserv, sizeof(tmpserv), "%d", ntohs(sin->sin_port)); if (strlen(tmpserv) > servlen) return EAI_MEMORY; else strcpy(serv, tmpserv); } if (host) { if (flags & NI_NUMERICHOST) { if (flags & NI_NAMEREQD) return EAI_NONAME; if (strlen(inet_ntoa(sin->sin_addr)) >= hostlen) return EAI_MEMORY; else { strcpy(host, inet_ntoa(sin->sin_addr)); return 0; } } else { hp = gethostbyaddr((char *)&sin->sin_addr, sizeof(struct in_addr), AF_INET); if (hp) if (strlen(hp->h_name) >= hostlen) return EAI_MEMORY; else { strcpy(host, hp->h_name); return 0; } else if (flags & NI_NAMEREQD) return EAI_NONAME; else if (strlen(inet_ntoa(sin->sin_addr)) >= hostlen) return EAI_MEMORY; else { strcpy(host, inet_ntoa(sin->sin_addr)); return 0; } } } return 0; } Socket6-0.29/im-140.diff000644 003721 003721 00000010326 12702614646 014312 0ustar00umenoah000000 000000 --- im-140/IM/TcpTransaction.pm.orig Mon Mar 6 19:39:35 2000 +++ im-140/IM/TcpTransaction.pm Wed Mar 8 22:16:24 2000 @@ -15,6 +15,9 @@ require Exporter; use IM::Config qw(dns_timeout connect_timeout command_timeout rcv_buf_siz); use Socket; +BEGIN { + eval 'use Socket6' unless (eval '&AF_INET6'); # IPv6 patched Perl +} use IM::Util; use IM::Ssh; use integer; @@ -120,8 +123,8 @@ $remoteport = $serv; $Cur_server = $s; } - $0 = progname() . ": im_getaddrinfo($s)"; - @he_infos = im_getaddrinfo($s, $remoteport, AF_UNSPEC, SOCK_STREAM); + $0 = progname() . ": getaddrinfo($s)"; + @he_infos = getaddrinfo($s, $remoteport, AF_UNSPEC, SOCK_STREAM); if ($#he_infos < 1) { im_warn("address unknown for $s\n"); @Response = ("address unknown for $s"); @@ -147,7 +150,7 @@ if ($family == AF_INET) { $port = (unpack_sockaddr_in($sin))[0]; } else { - $port = (inet6_unpack_sockaddr_in6($sin))[0]; + $port = (unpack_sockaddr_in6($sin))[0]; } *SOCK = \*{$name}; $SOCK = $port; @@ -364,7 +367,9 @@ my $count = shift; pool_priv_sock_af($count, AF_INET); - pool_priv_sock_af($count, inet6_family()) if (eval '&AF_INET6'); + if (eval 'pack_sockaddr_in6(110, pack("N4", 0, 0, 0, 0))') { + pool_priv_sock_af($count, AF_INET6); + } } sub pool_priv_sock_af ($$) { @@ -391,7 +396,7 @@ $psin = pack_sockaddr_in($privport, $ANYADDR); } else { $ANYADDR = pack('N4', 0, 0, 0, 0); - $psin = inet6_pack_sockaddr_in6($privport, $ANYADDR); + $psin = pack_sockaddr_in6($privport, $ANYADDR); } last if (bind (*{$TcpSockName}, $psin)); im_warn("privileged socket binding failed: $!.\n") @@ -432,68 +437,6 @@ im_die("connection error\n"); } -sub im_getaddrinfo ($$;$$$$) { - return getaddrinfo(@_) if (defined &getaddrinfo); - - my ($node, $serv, $family, $socktype, $proto, $flags) = @_; - - my ($pe_name, $pe_aliases, $pe_proto, $se_port); - if (unixp()) { - $proto = 'tcp' unless ($proto); - ($pe_name, $pe_aliases, $pe_proto) = getprotobyname($proto); - } - $pe_proto = 6 unless ($pe_name); - return unless ($se_port = getserv($serv, $proto)); - - my ($he_name, $he_alias, $he_type, $he_len, @he_addrs); - if ($node =~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/) { - @he_addrs = (pack('C4', $1, $2, $3, $4)); - $family = AF_INET; - } elsif ($node =~ /^[\da-f:]+$/i) { - if ($node =~ /::.*::/) { - im_err("bad server address in IPv6 format: $node\n"); - return; - } - if ($node =~ /::/) { - (my $t = $node) =~ s/[^:]//g; - my $n = 7 - length($t); - $t = ':0:'; - while ($n--) { - $t .= '0:'; - } - $node =~ s/::/$t/; - } - if ($node =~ /^([\da-f]*):([\da-f]*):([\da-f]*):([\da-f]*):([\da-f]*):([\da-f]*):([\da-f]*):([\da-f]*)$/i) { - @he_addrs = (pack('n8', - hex("0x$1"), hex("0x$2"), hex("0x$3"), hex("0x$4"), - hex("0x$5"), hex("0x$6"), hex("0x$7"), hex("0x$8"))); - $family = inet6_family(); # AF_INET6 - } else { - im_err("bad server address in IPv6 format: $node\n"); - return; - } - } else { - alarm(dns_timeout()) unless win95p(); - ($he_name, $he_alias, $he_type, $he_len, @he_addrs) - = gethostbyname($node); - alarm(0) unless win95p(); - return unless ($he_name); - $family = $he_type; - } - - my ($he_addr, @infos); - foreach $he_addr (@he_addrs) { - my $sin; - if ($family == AF_INET) { - $sin = pack_sockaddr_in($se_port, $he_addr); - } else { - $sin = inet6_pack_sockaddr_in6($se_port, $he_addr); - } - push(@infos, $family, $socktype, $pe_proto, $sin, $he_name); - } - @infos; -} - sub getserv($$) { my ($serv, $proto) = @_; @@ -522,28 +465,6 @@ } } $se_port; -} - -sub inet6_pack_sockaddr_in6 ($;$) { - return pack_sockaddr_in6(@_) if (defined &pack_sockaddr_in6); - - my ($port, $he_addr) = @_; - pack('CCnN', 1+1+2+4+16+4, inet6_family(), $port, 0) . $he_addr . - pack('N', 0); -} - -sub inet6_unpack_sockaddr_in6 ($) { - return unpack_sockaddr_in6(@_) if (defined &unpack_sockaddr_in6); - - my $sock = shift; - my ($len, $family, $port, $flow, $a1, $a2, $a3, $a4) - = unpack('CCnNN4', $sock); - my $addr = pack('N4', $a1, $a2, $a3, $a4); - ($port, $addr); -} - -sub inet6_family () { - return eval '&AF_INET6' || 24; } 1; Socket6-0.29/Makefile.PL000755 003721 003721 00000010461 12702614646 014526 0ustar00umenoah000000 000000 # Copyright (C) 2000-2016 Hajimu UMEMOTO . # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. Neither the name of the project nor the names of its contributors # may be used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # $Id: Makefile.PL 659 2016-03-17 06:20:36Z ume $ use Config; use ExtUtils::MakeMaker; if ($^O eq 'MSWin32') { configure_mswin32(); } else { local $ENV{TMPDIR} = $ENV{TMPDIR}; my $path_perl = ($^X =~ m!^/!o) ? $^X : `which $^X`; my $cmd = "CC='$Config{cc}' CFLAGS='$Config{ccflags}'"; if ($^O eq 'android') { # Work around a bug in Android's sh: # http://stackoverflow.com/questions/15283220/android-shell-eof $ENV{TMPDIR} ||= File::Spec->tmpdir(); # /bin/sh doesn't exist on Android, point it to the right # location for sh $cmd .= " CONFIG_SHELL='$Config{sh}'"; # Call './configure' as 'sh ./configure' $cmd .= " $Config{sh}"; } $cmd .= " ./configure"; $cmd .= " --with-perl=$path_perl" if ($path_perl); system($cmd); } require './config.pl'; WriteMakefile( NAME => 'Socket6', VERSION_FROM => 'Socket6.pm', XSPROTOARG => '-noprototypes', # XXX remove later? PM => {'Socket6.pm' => '$(INST_LIBDIR)/Socket6.pm'}, CONFIGURE => sub { { CC => "${cc}" } }, LIBS => ["${libs}"], realclean => {FILES => 'config.cache config.h config.log config.pl config.status gailookup.pl'}, ); sub configure_mswin32 { open(IN, 'config.pl') || die "Failed to open file 'config.pl' [$!]"; while () { if (/\$cc/) { printf(OUT "\$cc = '%s';\n", $Config::Config{cc}); } elsif (/\$libs/) { printf(OUT "\$libs = 'ws2_32.lib';\n"); } else { print OUT; } } close(OUT) || die "Failed to close file 'config.pl' [$!]"; close(IN) || die "Failed to close file 'config.pl.in' [$!]"; open(IN, 'config.h') || die "Failed to open file 'config.h' [$!]"; print(OUT "#ifndef NTDDI_LONGHORN\n"); print(OUT "# define NTDDI_LONGHORN 0x06000000\n"); print(OUT "#endif\n"); while () { if (/HAVE_PL_SV_UNDEF/) { print(OUT "#define HAVE_PL_SV_UNDEF 1\n"); } elsif (/HAVE_GETADDRINFO/) { print(OUT "#define HAVE_GETADDRINFO 1\n"); } elsif (/HAVE_GETNAMEINFO/) { print(OUT "#define HAVE_GETNAMEINFO 1\n"); } elsif (/HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID/) { print(OUT "#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1\n"); } elsif (/HAVE_INET_(PTON|NTOP)/) { print(OUT "#if (NTDDI_VERSION >= NTDDI_LONGHORN)\n"); print(OUT " #define HAVE_INET_$1 1\n"); print(OUT "#else\n"); print(OUT " #undef HAVE_INET_$1\n"); print(OUT "#endif\n"); } elsif (/HAVE_SOCKLEN_T/) { print(OUT "#define HAVE_SOCKLEN_T 1\n"); } else { print OUT; } } close(OUT) || die "Failed to close file 'config.h' [$!]"; close(IN) || die "Failed to close file 'config.h.in' [$!]"; } Socket6-0.29/t/000755 003721 003721 00000000000 13354066373 013014 5ustar00umenoah000000 000000 Socket6-0.29/getaddrinfo.c000644 003721 003721 00000010473 12702614646 015206 0ustar00umenoah000000 000000 /* * Mar 8, 2000 by Hajimu UMEMOTO * $Id: getaddrinfo.c 125 2005-08-27 16:33:10Z ume $ * * This module is besed on ssh-1.2.27-IPv6-1.5 written by * KIKUCHI Takahiro */ /* * fake library for ssh * * This file includes getaddrinfo(), freeaddrinfo() and gai_strerror(). * These funtions are defined in rfc2133. * * But these functions are not implemented correctly. The minimum subset * is implemented for ssh use only. For exapmle, this routine assumes * that ai_family is AF_INET. Don't use it for another purpose. * * In the case not using 'configure --enable-ipv6', this getaddrinfo.c * will be used if you have broken getaddrinfo or no getaddrinfo. */ #include #include "gai.h" static struct addrinfo * malloc_ai(int port, u_long addr, int socktype, int proto) { struct addrinfo *ai; ai = (struct addrinfo *)malloc(sizeof(struct addrinfo) + sizeof(struct sockaddr_in)); if (ai) { memset(ai, 0, sizeof(struct addrinfo) + sizeof(struct sockaddr_in)); ai->ai_addr = (struct sockaddr *)(ai + 1); /* XXX -- ssh doesn't use sa_len */ ai->ai_addrlen = sizeof(struct sockaddr_in); #ifdef HAVE_SOCKADDR_SA_LEN ai->ai_addr->sa_len = sizeof(struct sockaddr_in); #endif ai->ai_addr->sa_family = ai->ai_family = AF_INET; ((struct sockaddr_in *)(ai)->ai_addr)->sin_port = port; ((struct sockaddr_in *)(ai)->ai_addr)->sin_addr.s_addr = addr; ai->ai_socktype = socktype; ai->ai_protocol = proto; return ai; } else { return NULL; } } char * gai_strerror(int ecode) { switch (ecode) { case EAI_MEMORY: return "memory allocation failure."; case EAI_FAMILY: return "ai_family not supported."; case EAI_NONAME: return "hostname nor servname provided, or not known."; case EAI_SERVICE: return "servname not supported for ai_socktype."; default: return "unknown error."; } } void freeaddrinfo(struct addrinfo *ai) { struct addrinfo *next; if (ai->ai_canonname) free(ai->ai_canonname); do { next = ai->ai_next; free(ai); } while ((ai = next) != NULL); } int getaddrinfo(const char *hostname, const char *servname, const struct addrinfo *hints, struct addrinfo **res) { struct addrinfo *cur, *prev = NULL; struct hostent *hp; struct in_addr in; int i, port = 0, socktype, proto; if (hints && hints->ai_family != PF_INET && hints->ai_family != PF_UNSPEC) return EAI_FAMILY; socktype = (hints && hints->ai_socktype) ? hints->ai_socktype : SOCK_STREAM; if (hints && hints->ai_protocol) proto = hints->ai_protocol; else { switch (socktype) { case SOCK_DGRAM: proto = IPPROTO_UDP; break; case SOCK_STREAM: proto = IPPROTO_TCP; break; default: proto = 0; break; } } if (servname) { if (isdigit((int)*servname)) port = htons(atoi(servname)); else { struct servent *se; char *pe_proto; if (hints && hints->ai_flags & AI_NUMERICSERV) return EAI_NONAME; switch (socktype) { case SOCK_DGRAM: pe_proto = "udp"; break; case SOCK_STREAM: pe_proto = "tcp"; break; default: pe_proto = NULL; break; } if ((se = getservbyname(servname, pe_proto)) == NULL) return EAI_SERVICE; port = se->s_port; } } if (!hostname) { if (hints && hints->ai_flags & AI_PASSIVE) *res = malloc_ai(port, htonl(0x00000000), socktype, proto); else *res = malloc_ai(port, htonl(0x7f000001), socktype, proto); if (*res) return 0; else return EAI_MEMORY; } if (inet_aton(hostname, &in)) { *res = malloc_ai(port, in.s_addr, socktype, proto); if (*res) return 0; else return EAI_MEMORY; } if (hints && hints->ai_flags & AI_NUMERICHOST) return EAI_NONAME; if ((hp = gethostbyname(hostname)) && hp->h_name && hp->h_name[0] && hp->h_addr_list[0]) { for (i = 0; hp->h_addr_list[i]; i++) { if ((cur = malloc_ai(port, ((struct in_addr *)hp->h_addr_list[i])->s_addr, socktype, proto)) == NULL) { if (*res) freeaddrinfo(*res); return EAI_MEMORY; } if (prev) prev->ai_next = cur; else *res = cur; prev = cur; } if (hints && hints->ai_flags & AI_CANONNAME && *res) { if (((*res)->ai_canonname = strdup(hp->h_name)) == NULL) { freeaddrinfo(*res); return EAI_MEMORY; } } return 0; } return EAI_NONAME; } Socket6-0.29/aclocal.m4000644 003721 003721 00000015357 12740630721 014414 0ustar00umenoah000000 000000 dnl Copyright (C) 2000-2016 Hajimu UMEMOTO . dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without dnl modification, are permitted provided that the following conditions dnl are met: dnl 1. Redistributions of source code must retain the above copyright dnl notice, this list of conditions and the following disclaimer. dnl 2. Redistributions in binary form must reproduce the above copyright dnl notice, this list of conditions and the following disclaimer in the dnl documentation and/or other materials provided with the distribution. dnl 3. Neither the name of the project nor the names of its contributors dnl may be used to endorse or promote products derived from this software dnl without specific prior written permission. dnl dnl THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND dnl ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE dnl ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE dnl FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL dnl DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS dnl OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) dnl HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT dnl LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY dnl OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF dnl SUCH DAMAGE. dnl $Id: aclocal.m4 682 2016-07-11 05:44:06Z ume $ dnl SOCKET6_CHECK_PL_SV_UNDEF(VALUE-IF-FOUND , VALUE-IF-NOT-FOUND dnl [, PERL-PATH]) AC_DEFUN([SOCKET6_CHECK_PL_SV_UNDEF], [ AC_MSG_CHECKING([whether your Perl5 have PL_sv_undef]) AC_CACHE_VAL(socket6_cv_pl_sv_undef,[ rm -rf conftest mkdir conftest cd conftest cat >Makefile.PL < 'conftest', VERSION_FROM => 'conftest.pm', XSPROTOARG => '-noprototypes', ); EOF cat > conftest.pm < conftest.xs <&5 >/dev/null; (eval make) 2>&5 >/dev/null; }; then socket6_cv_pl_sv_undef='yes' else socket6_cv_pl_sv_undef='no' fi cd .. rm -rf conftest ]) if test $socket6_cv_pl_sv_undef = 'yes'; then AC_MSG_RESULT(yes) ifelse([$1], , :, [$1]) else AC_MSG_RESULT(no) ifelse([$2], , :, [$2]) fi ]) dnl IPv6_CHECK_SIN6_SCOPE_ID(VALUE-IF-FOUND , VALUE-IF-NOT-FOUND) AC_DEFUN([IPv6_CHECK_SIN6_SCOPE_ID], [ AC_MSG_CHECKING([whether you have sin6_scope_id in struct sockaddr_in6]) AC_CACHE_VAL(ipv6_cv_sin6_scope_id, [dnl AC_TRY_COMPILE([#include #include #include ], [struct sockaddr_in6 sin6; int i = sin6.sin6_scope_id;], [ipv6_cv_sin6_scope_id=yes], [ipv6_cv_sin6_scope_id=no])])dnl if test $ipv6_cv_sin6_scope_id = yes; then ifelse([$1], , AC_DEFINE(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID,[1],[Do we have a sin6_scope_id in struct sockaddr_in6?]), [$1]) else ifelse([$2], , :, [$2]) fi AC_MSG_RESULT($ipv6_cv_sin6_scope_id)]) dnl dnl whether you have sa_len in struct sockaddr AC_DEFUN([IPv6_CHECK_SA_LEN], [ AC_MSG_CHECKING([whether you have sa_len in struct sockaddr]) AC_CACHE_VAL(ipv6_cv_sa_len, [dnl AC_TRY_COMPILE([#include #include ], [struct sockaddr sa; int i = sa.sa_len;], [ipv6_cv_sa_len=yes], [ipv6_cv_sa_len=no])])dnl if test $ipv6_cv_sa_len = yes; then ifelse([$1], , AC_DEFINE(HAVE_SOCKADDR_SA_LEN,[1],[Does sockaddr have an sa_len?]), [$1]) else ifelse([$2], , :, [$2]) fi AC_MSG_RESULT($ipv6_cv_sa_len)]) dnl dnl See whether we can use IPv6 related functions AC_DEFUN([IPv6_CHECK_FUNC], [ AH_TEMPLATE(AS_TR_CPP(HAVE_$1), [Define to 1 if you have the `]$1[' function.]) AC_CHECK_FUNC($1, [dnl ac_cv_lib_socket_$1=no ac_cv_lib_inet6_$1=no ], [dnl AC_CHECK_LIB(socket, $1, [dnl LIBS="$LIBS -lsocket -lnsl" ac_cv_lib_inet6_$1=no ], [dnl AC_MSG_CHECKING([whether your system has IPv6 directory]) AC_CACHE_VAL(ipv6_cv_dir, [dnl for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then break fi done])dnl AC_MSG_RESULT($ipv6_cv_dir) if test $ipv6_cv_dir = no; then ac_cv_lib_inet6_$1=no else if test x$ipv6_libinet6 = x; then ipv6_libinet6=no SAVELDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib" fi AC_CHECK_LIB(inet6, $1, [dnl if test $ipv6_libinet6 = no; then ipv6_libinet6=yes LIBS="$LIBS -linet6" fi],)dnl if test $ipv6_libinet6 = no; then LDFLAGS="$SAVELDFLAGS" fi fi])dnl ])dnl ipv6_cv_$1=no if test $ac_cv_func_$1 = yes -o $ac_cv_lib_socket_$1 = yes \ -o $ac_cv_lib_inet6_$1 = yes then ipv6_cv_$1=yes fi if test $ipv6_cv_$1 = no; then if test $1 = getaddrinfo; then for ipv6_cv_pfx in o n; do AC_EGREP_HEADER(${ipv6_cv_pfx}$1, netdb.h, [AC_CHECK_FUNC(${ipv6_cv_pfx}$1)]) if eval test X\$ac_cv_func_${ipv6_cv_pfx}$1 = Xyes; then ipv6_cv_$1=yes break fi done fi fi if test $ipv6_cv_$1 = yes; then AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_$1)) ifelse([$2], , :, [$2]) else ifelse([$3], , :, [$3]) fi]) dnl dnl See whether sys/socket.h has socklen_t AC_DEFUN([IPv6_CHECK_SOCKLEN_T], [ AC_MSG_CHECKING(for socklen_t) AC_CACHE_VAL(ipv6_cv_socklen_t, [dnl AC_TRY_LINK([#include #include ], [socklen_t len = 0;], [ipv6_cv_socklen_t=yes], [ipv6_cv_socklen_t=no])])dnl if test $ipv6_cv_socklen_t = yes; then ifelse([$1], , AC_DEFINE(HAVE_SOCKLEN_T,[1],[Do we have a socklen_t?]), [$1]) else ifelse([$2], , :, [$2]) fi AC_MSG_RESULT($ipv6_cv_socklen_t)]) dnl dnl Check if darwin inet_ntop is broken AC_DEFUN([IPv6_CHECK_INET_NTOP], [ AC_MSG_CHECKING(for working inet_ntop) AC_CACHE_VAL(ipv6_cv_can_inet_ntop, [dnl AC_RUN_IFELSE([AC_LANG_SOURCE[ #include #include #include #include #include #include int main() { static struct in6_addr addr; static char str[INET6_ADDRSTRLEN]; addr.s6_addr[15] = 0x21; inet_ntop(AF_INET6, &addr, str, sizeof(str)); if (strcmp(str, "::21") && strcmp(str, "::0.0.0.33")) exit(1); } ]], [ipv6_cv_can_inet_ntop=yes], [ipv6_cv_can_inet_ntop=no])])dnl dnl if test $ipv6_cv_can_inet_ntop = yes; then ifelse([$1], , AC_DEFINE(CAN_INET_NTOP,[1],[Do we have a working inet_ntop?]), [$1]) else ifelse([$2], , :, [$2]) fi AC_MSG_RESULT($ipv6_cv_can_inet_ntop)]) Socket6-0.29/inet_pton.c000644 003721 003721 00000015474 12702614646 014725 0ustar00umenoah000000 000000 /* * Copyright (C) 1996-2001 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: inet_pton.c 663 2016-03-22 16:08:54Z ume $ */ #define NS_INT16SZ 2 #define NS_INADDRSZ 4 #define NS_IN6ADDRSZ 16 /* * WARNING: Don't even consider trying to compile this on a system where * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX. */ static int inet_pton4(const char *src, unsigned char *dst); static int inet_pton6(const char *src, unsigned char *dst); /* int * isc_net_pton(af, src, dst) * convert from presentation format (which usually means ASCII printable) * to network format (which is usually some kind of binary format). * return: * 1 if the address was valid for the specified address family * 0 if the address wasn't valid (`dst' is untouched in this case) * -1 if some other error occurred (`dst' is untouched in this case, too) * author: * Paul Vixie, 1996. */ int inet_pton(int af, const char *src, void *dst) { switch (af) { case AF_INET: return (inet_pton4(src, dst)); #ifdef AF_INET6 case AF_INET6: return (inet_pton6(src, dst)); #endif default: errno = EAFNOSUPPORT; return (-1); } /* NOTREACHED */ } /* int * inet_pton4(src, dst) * like inet_aton() but without all the hexadecimal and shorthand. * return: * 1 if `src' is a valid dotted quad, else 0. * notice: * does not touch `dst' unless it's returning 1. * author: * Paul Vixie, 1996. */ static int inet_pton4(src, dst) const char *src; unsigned char *dst; { static const char digits[] = "0123456789"; int saw_digit, octets, ch; unsigned char tmp[NS_INADDRSZ], *tp; saw_digit = 0; octets = 0; *(tp = tmp) = 0; while ((ch = *src++) != '\0') { const char *pch; if ((pch = strchr(digits, ch)) != NULL) { unsigned int new = *tp * 10 + (pch - digits); if (new > 255) return (0); *tp = new; if (! saw_digit) { if (++octets > 4) return (0); saw_digit = 1; } } else if (ch == '.' && saw_digit) { if (octets == 4) return (0); *++tp = 0; saw_digit = 0; } else return (0); } if (octets < 4) return (0); memcpy(dst, tmp, NS_INADDRSZ); return (1); } /* int * inet_pton6(src, dst) * convert presentation level address to network order binary form. * return: * 1 if `src' is a valid [RFC1884 2.2] address, else 0. * notice: * (1) does not touch `dst' unless it's returning 1. * (2) :: in a full address is silently ignored. * credit: * inspired by Mark Andrews. * author: * Paul Vixie, 1996. */ #ifdef AF_INET6 static int inet_pton6(src, dst) const char *src; unsigned char *dst; { static const char xdigits_l[] = "0123456789abcdef", xdigits_u[] = "0123456789ABCDEF"; unsigned char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp; const char *xdigits, *curtok; int ch, saw_xdigit; unsigned int val; memset((tp = tmp), '\0', NS_IN6ADDRSZ); endp = tp + NS_IN6ADDRSZ; colonp = NULL; /* Leading :: requires some special handling. */ if (*src == ':') if (*++src != ':') return (0); curtok = src; saw_xdigit = 0; val = 0; while ((ch = *src++) != '\0') { const char *pch; if ((pch = strchr((xdigits = xdigits_l), ch)) == NULL) pch = strchr((xdigits = xdigits_u), ch); if (pch != NULL) { val <<= 4; val |= (pch - xdigits); if (val > 0xffff) return (0); saw_xdigit = 1; continue; } if (ch == ':') { curtok = src; if (!saw_xdigit) { if (colonp) return (0); colonp = tp; continue; } if (tp + NS_INT16SZ > endp) return (0); *tp++ = (unsigned char) (val >> 8) & 0xff; *tp++ = (unsigned char) val & 0xff; saw_xdigit = 0; val = 0; continue; } if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) && inet_pton4(curtok, tp) > 0) { tp += NS_INADDRSZ; saw_xdigit = 0; break; /* '\0' was seen by inet_pton4(). */ } return (0); } if (saw_xdigit) { if (tp + NS_INT16SZ > endp) return (0); *tp++ = (unsigned char) (val >> 8) & 0xff; *tp++ = (unsigned char) val & 0xff; } if (colonp != NULL) { /* * Since some memmove()'s erroneously fail to handle * overlapping regions, we'll do the shift by hand. */ const int n = tp - colonp; int i; for (i = 1; i <= n; i++) { endp[- i] = colonp[n - i]; colonp[n - i] = 0; } tp = endp; } if (tp != endp) return (0); memcpy(dst, tmp, NS_IN6ADDRSZ); return (1); } #endif Socket6-0.29/MANIFEST000644 003721 003721 00000000621 13354066374 013702 0ustar00umenoah000000 000000 ChangeLog MANIFEST Makefile.PL README Socket6.pm Socket6.xs aclocal.m4 config.h.in config.pl.in configure configure.in gai.h gailookup.pl.in getaddrinfo.c getnameinfo.c ftpmirror-1.96.diff inet_ntop.c inet_pton.c im-140.diff t/use.t META.yml Module YAML meta-data (added by MakeMaker) META.json Module JSON meta-data (added by MakeMaker) Socket6-0.29/README000644 003721 003721 00000005013 13354047635 013430 0ustar00umenoah000000 000000 Socket6 $Id: README 688 2018-09-30 04:22:53Z ume $ 1. Abstract This module supports getaddrinfo() and getnameinfo() to intend to enable protocol independent programing. If your environment supports IPv6, IPv6 related defines such as AF_INET6 are included. 2. Install Extract archive file. Change current directory to Socket6-x.xx ("x.xx" is version number). Type "perl Makefile.PL" to create Makefile. Type "make" to build. Type "make install" to install. 3. How to use See "perldoc Socket6". 4. Acknowledgments This package is mainly depend on perl5.005_55-v6-19990721 and ssh-1.2.27-IPv6-1.5. perl5.005_55-v6-19990721 was written by KAME Project and ssh-1.2.27-IPv6-1.5 was written by KIKUCHI Takahiro . Thank you very much. 5. Copyright Copyright (C) 2000-2018 Hajimu UMEMOTO . All rights reserved. Socket6.pm and Socket6.xs are based on perl5.005_55-v6-19990721 written by KAME Project. gai.h, getaddrinfo.c and getnameinfo.c are based on ssh-1.2.27-IPv6-1.5 written by KIKUCHI Takahiro . Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Socket6-0.29/META.json000644 003721 003721 00000001431 13354066374 014172 0ustar00umenoah000000 000000 { "abstract" : "unknown", "author" : [ "unknown" ], "dynamic_config" : 1, "generated_by" : "ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150010", "license" : [ "unknown" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Socket6", "no_index" : { "directory" : [ "t", "inc" ] }, "prereqs" : { "build" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } } }, "release_status" : "stable", "version" : "0.29", "x_serialization_backend" : "JSON::PP version 2.27400_02" } Socket6-0.29/config.pl.in000644 003721 003721 00000003144 12702614646 014760 0ustar00umenoah000000 000000 # Copyright (C) 2000 Hajimu UMEMOTO . # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. Neither the name of the project nor the names of its contributors # may be used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # $Id: config.pl.in 48 2000-03-19 17:52:34Z ume $ $cc = '@CC@'; $libs = '@INET6LIBS@'; 1; Socket6-0.29/Socket6.pm000644 003721 003721 00000023067 13354047635 014435 0ustar00umenoah000000 000000 # Copyright (C) 2000-2018 Hajimu UMEMOTO . # All rights reserved. # # This module is based on perl5.005_55-v6-19990721 written by KAME # Project. # # Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. Neither the name of the project nor the names of its contributors # may be used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # $Id: Socket6.pm 688 2018-09-30 04:22:53Z ume $ package Socket6; use strict; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $AUTOLOAD); $VERSION = "0.29"; =head1 NAME Socket6 - IPv6 related part of the C socket.h defines and structure manipulators =head1 SYNOPSIS use Socket; use Socket6; @res = getaddrinfo('hishost.com', 'daytime', AF_UNSPEC, SOCK_STREAM); $family = -1; while (scalar(@res) >= 5) { ($family, $socktype, $proto, $saddr, $canonname, @res) = @res; ($host, $port) = getnameinfo($saddr, NI_NUMERICHOST | NI_NUMERICSERV); print STDERR "Trying to connect to $host port $port...\n"; socket(Socket_Handle, $family, $socktype, $proto) || next; connect(Socket_Handle, $saddr) && last; close(Socket_Handle); $family = -1; } if ($family != -1) { print STDERR "connected to $host port $port\n"; } else { die "connect attempt failed\n"; } =head1 DESCRIPTION This module provides glue routines to the various IPv6 functions. If you use the Socket6 module, be sure to specify "use Socket" as well as "use Socket6". Functions supplied are: =over =item inet_pton FAMILY, TEXT_ADDRESS This function takes an IP address in presentation (or string) format and converts it into numeric (or binary) format. The type of IP address conversion (IPv4 versus IPv6) is controlled by the FAMILY argument. =item inet_ntop FAMILY, BINARY_ADDRESS This function takes an IP address in numeric (or binary) format and converts it into presentation (or string) format The type of IP address conversion (IPv4 versus IPv6) is controlled by the FAMILY argument. =item pack_sockaddr_in6 PORT, ADDR This function takes two arguments: a port number, and a 16-octet IPv6 address structure (as returned by inet_pton()). It returns the sockaddr_in6 structure with these arguments packed into their correct fields, as well as the AF_INET6 family. The other fields are not set and their values should not be relied upon. =item pack_sockaddr_in6_all PORT, FLOWINFO, ADDR, SCOPEID This function takes four arguments: a port number, a 16-octet IPv6 address structure (as returned by inet_pton), any special flow information, and any specific scope information. It returns a complete sockaddr_in6 structure with these arguments packed into their correct fields, as well as the AF_INET6 family. =item unpack_sockaddr_in6 NAME This function takes a sockaddr_in6 structure (as returned by pack_sockaddr_in6()) and returns a list of two elements: the port number and the 16-octet IP address. This function will croak if it determines it has not been passed an IPv6 structure. =item unpack_sockaddr_in6_all NAME This function takes a sockaddr_in6 structure (as returned by pack_sockaddr_in6()) and returns a list of four elements: the port number, the flow information, the 16-octet IP address, and the scope information. This function will croak if it determines it has not been passed an IPv6 structure. =item gethostbyname2 HOSTNAME, FAMILY =item getaddrinfo NODENAME, SERVICENAME, [FAMILY, SOCKTYPE, PROTOCOL, FLAGS] This function converts node names to addresses and service names to port numbers. If the NODENAME argument is not a false value, then a nodename to address lookup is performed; otherwise a service name to port number lookup is performed. At least one of NODENAME and SERVICENAME must have a true value. If the lookup is successful, a list consisting of multiples of five elements is returned. Each group of five elements consists of the address family, socket type, protocol, 16-octet IP address, and the canonical name (undef if the node name passed is already the canonical name). The arguments FAMILY, SOCKTYPE, PROTOCOL, and FLAGS are all optional. This function will croak if it determines it has not been passed an IPv6 structure. If the lookup is unsuccessful, the function returns a single scalar. This will contain the string version of that error in string context, and the numeric value in numeric context. =item getnameinfo NAME, [FLAGS] This function takes a socket address structure. If successful, it returns two strings containing the node name and service name. The optional FLAGS argument controls what kind of lookup is performed. If the lookup is unsuccessful, the function returns a single scalar. This will contain the string version of that error in string context, and the numeric value in numeric context. =item getipnodebyname HOST, [FAMILY, FLAGS] This function takes either a node name or an IP address string and performs a lookup on that name (or conversion of the string). It returns a list of five elements: the canonical host name, the address family, the length in octets of the IP addresses returned, a reference to a list of IP address structures, and a reference to a list of aliases for the host name. The arguments FAMILY and FLAGS are optional. Note: This function does not handle IPv6 scope identifiers, and should be used with care. And, this function was deprecated in RFC3493. The getnameinfo function should be used instead. =item getipnodebyaddr FAMILY, ADDRESS This function takes an IP address family and an IP address structure and performs a reverse lookup on that address. It returns a list of five elements: the canonical host name, the address family, the length in octets of the IP addresses returned, a reference to a list of IP address structures, and a reference to a list of aliases for the host name. Note: This function does not handle IPv6 scope identifiers, and should be used with care. And, this function was deprecated in RFC3493. The getaddrinfo function should be used instead. =item gai_strerror ERROR_NUMBER This function returns a string corresponding to the error number passed in as an argument. =item in6addr_any This function returns the 16-octet wildcard address. =item in6addr_loopback This function returns the 16-octet loopback address. =back =cut use Carp; use base qw(Exporter DynaLoader); @EXPORT = qw( inet_pton inet_ntop pack_sockaddr_in6 pack_sockaddr_in6_all unpack_sockaddr_in6 unpack_sockaddr_in6_all sockaddr_in6 gethostbyname2 getaddrinfo getnameinfo in6addr_any in6addr_loopback gai_strerror getipnodebyname getipnodebyaddr AI_ADDRCONFIG AI_ALL AI_CANONNAME AI_NUMERICHOST AI_NUMERICSERV AI_DEFAULT AI_MASK AI_PASSIVE AI_V4MAPPED AI_V4MAPPED_CFG EAI_ADDRFAMILY EAI_AGAIN EAI_BADFLAGS EAI_FAIL EAI_FAMILY EAI_MEMORY EAI_NODATA EAI_NONAME EAI_SERVICE EAI_SOCKTYPE EAI_SYSTEM EAI_BADHINTS EAI_PROTOCOL IP_AUTH_TRANS_LEVEL IP_AUTH_NETWORK_LEVEL IP_ESP_TRANS_LEVEL IP_ESP_NETWORK_LEVEL IPPROTO_IP IPPROTO_IPV6 IPSEC_LEVEL_AVAIL IPSEC_LEVEL_BYPASS IPSEC_LEVEL_DEFAULT IPSEC_LEVEL_NONE IPSEC_LEVEL_REQUIRE IPSEC_LEVEL_UNIQUE IPSEC_LEVEL_USE IPV6_AUTH_TRANS_LEVEL IPV6_AUTH_NETWORK_LEVEL IPV6_ESP_NETWORK_LEVEL IPV6_ESP_TRANS_LEVEL NI_NOFQDN NI_NUMERICHOST NI_NAMEREQD NI_NUMERICSERV NI_DGRAM NI_WITHSCOPEID ); push @EXPORT, qw(AF_INET6) unless defined eval {Socket::AF_INET6()}; push @EXPORT, qw(PF_INET6) unless defined eval {Socket::PF_INET6()}; @EXPORT_OK = qw(AF_INET6 PF_INET6); %EXPORT_TAGS = ( all => [@EXPORT], ); sub sockaddr_in6 { if (wantarray) { croak "usage: (port,iaddr) = sockaddr_in6(sin_sv)" unless @_ == 1; unpack_sockaddr_in6(@_); } else { croak "usage: sin_sv = sockaddr_in6(port,iaddr))" unless @_ == 2; pack_sockaddr_in6(@_); } } sub AUTOLOAD { my($constname); ($constname = $AUTOLOAD) =~ s/.*:://o; $! = 0; my $val = constant($constname, @_ ? $_[0] : 0); if ($! != 0) { croak "Your vendor has not defined Socket macro $constname, used"; } eval "sub $AUTOLOAD { $val }"; goto &$AUTOLOAD; } bootstrap Socket6 $VERSION; 1; Socket6-0.29/Socket6.xs000644 003721 003721 00000050622 13354047635 014450 0ustar00umenoah000000 000000 /* * Socket6.xs * $Id: Socket6.xs 688 2018-09-30 04:22:53Z ume $ * * Copyright (C) 2000-2018 Hajimu UMEMOTO . * All rights reserved. * * This moduled is besed on perl5.005_55-v6-19990721 written by KAME * Project. * * Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the project nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifdef WIN32 #define WINVER 0x0501 #include #include #ifndef NI_NUMERICSERV #error Microsoft Platform SDK (Aug. 2001) or later required. #endif const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT; const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT; #define WSA_DECLARE \ WSADATA wsaData; \ int wsa = 0 #define WSA_STARTUP() \ wsa = WSAStartup(MAKEWORD(2,2), &wsaData) #define WSA_CLEANUP() \ if (!wsa) WSACleanup() #else /* WIN32 */ #include #include #include #ifdef __KAME__ # include # include # if (defined(__FreeBSD__) && __FreeBSD_version >= 700048) || \ (defined(__NetBSD__) && __NetBSD_Version__ >= 899002500) # include # elif !defined(__OpenBSD__) && !defined(__DragonFly__) # include # endif #endif #include #define WSA_DECLARE #define WSA_STARTUP() #define WSA_CLEANUP() #endif /* WIN32 */ #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #include "config.h" #if defined(HAVE_INET_NTOP) && !defined(CAN_INET_NTOP) #undef HAVE_INET_NTOP #endif #ifndef HAVE_GETADDRINFO #include "getaddrinfo.c" #define NI_MAXHOST 1025 #define NI_MAXSERV 32 #define HAVE_GETADDRINFO 1 #endif #ifndef HAVE_GETNAMEINFO #include "getnameinfo.c" #define HAVE_GETNAMEINFO 1 #endif #ifndef HAVE_INET_NTOP #include "inet_ntop.c" #define HAVE_INET_NTOP 1 #endif #ifndef HAVE_INET_PTON #include "inet_pton.c" #define HAVE_INET_PTON 1 #endif #ifndef HAVE_PL_SV_UNDEF #define PL_sv_undef sv_undef #endif static int not_here(char *s) { croak("Socket6::%s not implemented on this architecture", s); return -1; } static double constant(char *name, int arg) { errno = 0; switch (*name) { case 'A': if (strEQ(name, "AF_INET6")) #ifdef AF_INET6 return AF_INET6; #else goto not_there; #endif if (strEQ(name, "AI_ADDRCONFIG")) #ifdef AI_ADDRCONFIG return AI_ADDRCONFIG; #else goto not_there; #endif if (strEQ(name, "AI_ALL")) #ifdef AI_ALL return AI_ALL; #else goto not_there; #endif if (strEQ(name, "AI_CANONNAME")) #ifdef AI_CANONNAME return AI_CANONNAME; #else goto not_there; #endif if (strEQ(name, "AI_NUMERICHOST")) #ifdef AI_NUMERICHOST return AI_NUMERICHOST; #else goto not_there; #endif if (strEQ(name, "AI_NUMERICSERV")) #ifdef AI_NUMERICSERV return AI_NUMERICSERV; #else goto not_there; #endif if (strEQ(name, "AI_DEFAULT")) #ifdef AI_DEFAULT return AI_DEFAULT; #else goto not_there; #endif if (strEQ(name, "AI_MASK")) #ifdef AI_MASK return AI_MASK; #else goto not_there; #endif if (strEQ(name, "AI_PASSIVE")) #ifdef AI_PASSIVE return AI_PASSIVE; #else goto not_there; #endif if (strEQ(name, "AI_V4MAPPED")) #ifdef AI_V4MAPPED return AI_V4MAPPED; #else goto not_there; #endif if (strEQ(name, "AI_V4MAPPED_CFG")) #ifdef AI_V4MAPPED_CFG return AI_V4MAPPED_CFG; #else goto not_there; #endif break; case 'E': if (strEQ(name, "EAI_ADDRFAMILY")) #ifdef EAI_ADDRFAMILY return EAI_ADDRFAMILY; #else goto not_there; #endif if (strEQ(name, "EAI_AGAIN")) #ifdef EAI_AGAIN return EAI_AGAIN; #else goto not_there; #endif if (strEQ(name, "EAI_BADFLAGS")) #ifdef EAI_BADFLAGS return EAI_BADFLAGS; #else goto not_there; #endif if (strEQ(name, "EAI_FAIL")) #ifdef EAI_FAIL return EAI_FAIL; #else goto not_there; #endif if (strEQ(name, "EAI_FAMILY")) #ifdef EAI_FAMILY return EAI_FAMILY; #else goto not_there; #endif if (strEQ(name, "EAI_MEMORY")) #ifdef EAI_MEMORY return EAI_MEMORY; #else goto not_there; #endif if (strEQ(name, "EAI_NODATA")) #ifdef EAI_NODATA return EAI_NODATA; #else goto not_there; #endif if (strEQ(name, "EAI_NONAME")) #ifdef EAI_NONAME return EAI_NONAME; #else goto not_there; #endif if (strEQ(name, "EAI_SERVICE")) #ifdef EAI_SERVICE return EAI_SERVICE; #else goto not_there; #endif if (strEQ(name, "EAI_SOCKTYPE")) #ifdef EAI_SOCKTYPE return EAI_SOCKTYPE; #else goto not_there; #endif if (strEQ(name, "EAI_SYSTEM")) #ifdef EAI_SYSTEM return EAI_SYSTEM; #else goto not_there; #endif if (strEQ(name, "EAI_BADHINTS")) #ifdef EAI_BADHINTS return EAI_BADHINTS; #else goto not_there; #endif if (strEQ(name, "EAI_PROTOCOL")) #ifdef EAI_PROTOCOL return EAI_PROTOCOL; #else goto not_there; #endif break; case 'I': if (strEQ(name, "IP_AUTH_TRANS_LEVEL")) #ifdef IP_AUTH_TRANS_LEVEL return IP_AUTH_TRANS_LEVEL; #else goto not_there; #endif if (strEQ(name, "IP_AUTH_NETWORK_LEVEL")) #ifdef IP_AUTH_NETWORK_LEVEL return IP_AUTH_NETWORK_LEVEL; #else goto not_there; #endif if (strEQ(name, "IP_ESP_TRANS_LEVEL")) #ifdef IP_ESP_TRANS_LEVEL return IP_ESP_TRANS_LEVEL; #else goto not_there; #endif if (strEQ(name, "IP_EPS_NETWORK_LEVEL")) #ifdef IP_EPS_NETWORK_LEVEL return IP_EPS_NETWORK_LEVEL; #else goto not_there; #endif if (strEQ(name, "IPPROTO_IP")) #ifdef IPPROTO_IP return IPPROTO_IP; #else goto not_there; #endif if (strEQ(name, "IPPROTO_IPV6")) #ifdef IPPROTO_IPV6 return IPPROTO_IPV6; #else goto not_there; #endif if (strEQ(name, "IPSEC_LEVEL_AVAIL")) #ifdef IPSEC_LEVEL_AVAIL return IPSEC_LEVEL_AVAIL; #else goto not_there; #endif if (strEQ(name, "IPSEC_LEVEL_BYPASS")) #ifdef IPSEC_LEVEL_BYPASS return IPSEC_LEVEL_BYPASS; #else goto not_there; #endif if (strEQ(name, "IPSEC_LEVEL_DEFAULT")) #ifdef IPSEC_LEVEL_DEFAULT return IPSEC_LEVEL_DEFAULT; #else goto not_there; #endif if (strEQ(name, "IPSEC_LEVEL_NONE")) #ifdef IPSEC_LEVEL_NONE return IPSEC_LEVEL_NONE; #else goto not_there; #endif if (strEQ(name, "IPSEC_LEVEL_REQUIRE")) #ifdef IPSEC_LEVEL_REQUIRE return IPSEC_LEVEL_REQUIRE; #else goto not_there; #endif if (strEQ(name, "IPSEC_LEVEL_UNIQUE")) #ifdef IPSEC_LEVEL_UNIQUE return IPSEC_LEVEL_UNIQUE; #else goto not_there; #endif if (strEQ(name, "IPSEC_LEVEL_USE")) #ifdef IPSEC_LEVEL_USE return IPSEC_LEVEL_USE; #else goto not_there; #endif if (strEQ(name, "IPV6_AUTH_TRANS_LEVEL")) #ifdef IPV6_AUTH_TRANS_LEVEL return IPV6_AUTH_TRANS_LEVEL; #else goto not_there; #endif if (strEQ(name, "IPV6_AUTH_NETWORK_LEVEL")) #ifdef IPV6_AUTH_NETWORK_LEVEL return IPV6_AUTH_NETWORK_LEVEL; #else goto not_there; #endif if (strEQ(name, "IPV6_ESP_TRANS_LEVEL")) #ifdef IPV6_ESP_TRANS_LEVEL return IPV6_ESP_TRANS_LEVEL; #else goto not_there; #endif if (strEQ(name, "IPV6_EPS_NETWORK_LEVEL")) #ifdef IPV6_EPS_NETWORK_LEVEL return IPV6_EPS_NETWORK_LEVEL; #else goto not_there; #endif break; case 'N': if (strEQ(name, "NI_NOFQDN")) #ifdef NI_NOFQDN return NI_NOFQDN; #else goto not_there; #endif if (strEQ(name, "NI_NUMERICHOST")) #ifdef NI_NUMERICHOST return NI_NUMERICHOST; #else goto not_there; #endif if (strEQ(name, "NI_NAMEREQD")) #ifdef NI_NAMEREQD return NI_NAMEREQD; #else goto not_there; #endif if (strEQ(name, "NI_NUMERICSERV")) #ifdef NI_NUMERICSERV return NI_NUMERICSERV; #else goto not_there; #endif if (strEQ(name, "NI_DGRAM")) #ifdef NI_DGRAM return NI_DGRAM; #else goto not_there; #endif if (strEQ(name, "NI_WITHSCOPEID")) #ifdef NI_WITHSCOPEID return NI_WITHSCOPEID; #else goto not_there; #endif break; case 'P': if (strEQ(name, "PF_INET6")) #ifdef PF_INET6 return PF_INET6; #else goto not_there; #endif break; } errno = EINVAL; return 0; not_there: errno = ENOENT; return 0; } MODULE = Socket6 PACKAGE = Socket6 double constant(name,arg) char * name int arg void gethostbyname2(host, af) char * host; int af; PPCODE: { #ifdef HAVE_GETHOSTBYNAME2 struct hostent *phe; int count, i; if ((phe = gethostbyname2(host, af)) != NULL) { for (count = 0; phe->h_addr_list[count]; ++count); EXTEND(sp, 4 + count); PUSHs(sv_2mortal(newSVpv((char *) phe->h_name, strlen(phe->h_name)))); PUSHs(sv_2mortal(newSVpv((char *) phe->h_aliases, sizeof(char *)))); PUSHs(sv_2mortal(newSViv((IV) phe->h_addrtype))); PUSHs(sv_2mortal(newSViv((IV) phe->h_length))); for (i = 0; i < count; ++i) { PUSHs(sv_2mortal(newSVpv((char *)phe->h_addr_list[i], phe->h_length))); } } #else ST(0) = (SV *) not_here("gethostbyname2"); #endif } void inet_pton(af, host) int af char * host CODE: { #ifdef HAVE_INET_PTON union { #ifdef INET6_ADDRSTRLEN struct in6_addr addr6; #endif struct in_addr addr4; } ip_address; int len; int ok; switch (af) { #ifdef INET6_ADDRSTRLEN case AF_INET6: len = sizeof(struct in6_addr); break; #endif case AF_INET: len = sizeof(struct in_addr); break; default: croak("Bad address family for %s, got %d", "Socket6::inet_pton", af); break; } ok = inet_pton(af, host, &ip_address); ST(0) = sv_newmortal(); if (ok == 1) { sv_setpvn( ST(0), (char *)&ip_address, len ); } #else ST(0) = (SV *) not_here("inet_pton"); #endif } void inet_ntop(af, address_sv) int af SV * address_sv CODE: { #ifdef HAVE_INET_NTOP STRLEN addrlen, alen; #ifdef INET6_ADDRSTRLEN struct in6_addr addr; char addr_str[INET6_ADDRSTRLEN]; #else struct in_addr addr; char addr_str[16]; #endif char * address = SvPV(address_sv,addrlen); switch (af) { case AF_INET: alen = sizeof(struct in_addr); break; #ifdef INET6_ADDRSTRLEN case AF_INET6: alen = sizeof(struct in6_addr); break; #endif default: croak("Unsupported address family for %s, af is %d", "Socket6::inet_ntop", af); } /* with sanity check, just in case */ if (alen > sizeof(addr) || alen != addrlen) { croak("Bad arg length for %s, length is %d, should be %d", "Socket6::inet_ntop", addrlen, alen); } Copy( address, &addr, alen, char ); addr_str[0] = 0; inet_ntop(af, &addr, addr_str, sizeof addr_str); ST(0) = sv_2mortal(newSVpv(addr_str, strlen(addr_str))); #else ST(0) = (SV *) not_here("inet_ntop"); #endif } void pack_sockaddr_in6(port,ip6_address) unsigned short port char * ip6_address CODE: { #ifdef INET6_ADDRSTRLEN struct sockaddr_in6 sin; Zero( &sin, sizeof sin, char ); #ifdef SIN6_LEN sin.sin6_len = sizeof sin; #endif sin.sin6_family = AF_INET6; sin.sin6_port = htons(port); Copy( ip6_address, &sin.sin6_addr, sizeof sin.sin6_addr, char ); ST(0) = sv_2mortal(newSVpv((char *)&sin, sizeof sin)); #else ST(0) = (SV *) not_here("pack_sockaddr_in6"); #endif } void pack_sockaddr_in6_all(port,flowinfo,ip6_address,scope_id) unsigned short port unsigned long flowinfo char * ip6_address unsigned long scope_id CODE: { #ifdef INET6_ADDRSTRLEN struct sockaddr_in6 sin; Zero( &sin, sizeof sin, char ); #ifdef SIN6_LEN sin.sin6_len = sizeof sin; #endif sin.sin6_family = AF_INET6; sin.sin6_port = htons(port); sin.sin6_flowinfo = htonl(flowinfo); Copy( ip6_address, &sin.sin6_addr, sizeof sin.sin6_addr, char ); #ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID sin.sin6_scope_id = scope_id; #endif ST(0) = sv_2mortal(newSVpv((char *)&sin, sizeof sin)); #else ST(0) = (SV *) not_here("pack_sockaddr_in6_all"); #endif } void unpack_sockaddr_in6(sin_sv) SV * sin_sv PPCODE: { #ifdef INET6_ADDRSTRLEN STRLEN sockaddrlen; struct sockaddr_in6 addr; unsigned short port; struct in6_addr ip6_address; char * sin = SvPV(sin_sv,sockaddrlen); if (sockaddrlen != sizeof(addr)) { croak("Bad arg length for %s, length is %d, should be %d", "Socket6::unpack_sockaddr_in6", sockaddrlen, sizeof(addr)); } Copy( sin, &addr,sizeof addr, char ); if ( addr.sin6_family != AF_INET6 ) { croak("Bad address family for %s, got %d, should be %d", "Socket6::unpack_sockaddr_in6", addr.sin6_family, AF_INET6); } port = ntohs(addr.sin6_port); ip6_address = addr.sin6_addr; EXTEND(sp, 2); PUSHs(sv_2mortal(newSViv((IV) port))); PUSHs(sv_2mortal(newSVpv((char *)&ip6_address,sizeof ip6_address))); #else ST(0) = (SV *) not_here("unpack_sockaddr_in6"); #endif } void unpack_sockaddr_in6_all(sin_sv) SV * sin_sv PPCODE: { #ifdef INET6_ADDRSTRLEN STRLEN sockaddrlen; struct sockaddr_in6 addr; unsigned short port; unsigned long flowinfo; struct in6_addr ip6_address; unsigned long scope_id; char * sin = SvPV(sin_sv,sockaddrlen); if (sockaddrlen != sizeof(addr)) { croak("Bad arg length for %s, length is %d, should be %d", "Socket6::unpack_sockaddr_in6", sockaddrlen, sizeof(addr)); } Copy( sin, &addr,sizeof addr, char ); if ( addr.sin6_family != AF_INET6 ) { croak("Bad address family for %s, got %d, should be %d", "Socket6::unpack_sockaddr_in6", addr.sin6_family, AF_INET6); } port = ntohs(addr.sin6_port); flowinfo = ntohl(addr.sin6_flowinfo); ip6_address = addr.sin6_addr; #ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID scope_id = addr.sin6_scope_id; #else scope_id = 0; #endif EXTEND(sp, 5); PUSHs(sv_2mortal(newSViv((IV) port))); PUSHs(sv_2mortal(newSViv((IV) flowinfo))); PUSHs(sv_2mortal(newSVpv((char *)&ip6_address,sizeof ip6_address))); PUSHs(sv_2mortal(newSViv((IV) scope_id))); #else ST(0) = (SV *) not_here("unpack_sockaddr_in6_all"); #endif } void in6addr_any() CODE: { #ifdef INET6_ADDRSTRLEN ST(0) = sv_2mortal(newSVpv((char *)&in6addr_any, sizeof in6addr_any)); #else ST(0) = (SV *) not_here("in6addr_any"); #endif } void in6addr_loopback() CODE: { #ifdef INET6_ADDRSTRLEN ST(0) = sv_2mortal(newSVpv((char *)&in6addr_loopback, sizeof in6addr_loopback)); #else ST(0) = (SV *) not_here("in6addr_loopback"); #endif } void getaddrinfo(host,port,family=0,socktype=0,protocol=0,flags=0) char * host char * port int family int socktype int protocol int flags PPCODE: { #ifdef HAVE_GETADDRINFO struct addrinfo hints, * res; int err; int count; const char *error; WSA_DECLARE; Zero( &hints, sizeof hints, char ); hints.ai_flags = flags; hints.ai_family = family; hints.ai_socktype = socktype; hints.ai_protocol = protocol; WSA_STARTUP(); err = getaddrinfo(*host ? host : 0, *port ? port : 0, &hints, &res); WSA_CLEANUP(); if (err == 0) { struct addrinfo * p; count = 0; for (p = res; p; p = p->ai_next) ++count; EXTEND(sp, 5 * count); for (p = res; p; p = p->ai_next) { PUSHs(sv_2mortal(newSViv((IV) p->ai_family))); PUSHs(sv_2mortal(newSViv((IV) p->ai_socktype))); PUSHs(sv_2mortal(newSViv((IV) p->ai_protocol))); PUSHs(sv_2mortal(newSVpv((char *)p->ai_addr, p->ai_addrlen))); if (p->ai_canonname) PUSHs(sv_2mortal(newSVpv((char *)p->ai_canonname, strlen(p->ai_canonname)))); else PUSHs(&PL_sv_undef); } freeaddrinfo(res); } else { SV *error_sv = sv_newmortal(); SvUPGRADE(error_sv, SVt_PVNV); error = gai_strerror(err); sv_setpv(error_sv, error); SvIV_set(error_sv, err); SvIOK_on(error_sv); PUSHs(error_sv); } #else ST(0) = (SV *) not_here("getaddrinfo"); #endif } void getnameinfo(sin_sv, flags = 0) SV * sin_sv int flags; PPCODE: { #ifdef HAVE_GETNAMEINFO STRLEN sockaddrlen; struct sockaddr * sin = (struct sockaddr *)SvPV(sin_sv,sockaddrlen); char host[NI_MAXHOST]; char port[NI_MAXSERV]; int err; const char *error; WSA_DECLARE; WSA_STARTUP(); if (items < 2) { err = getnameinfo(sin, sockaddrlen, host, sizeof host, port, sizeof port, 0); if (err) err = getnameinfo(sin, sockaddrlen, host, sizeof host, port, sizeof port, NI_NUMERICSERV); if (err) err = getnameinfo(sin, sockaddrlen, host, sizeof host, port, sizeof port, NI_NUMERICHOST); if (err) err = getnameinfo(sin, sockaddrlen, host, sizeof host, port, sizeof port, NI_NUMERICHOST|NI_NUMERICSERV); } else { err = getnameinfo(sin, sockaddrlen, host, sizeof host, port, sizeof port, flags); } WSA_CLEANUP(); if (err == 0) { EXTEND(sp, 2); PUSHs(sv_2mortal(newSVpv(host, strlen(host)))); PUSHs(sv_2mortal(newSVpv(port, strlen(port)))); } else { SV *error_sv = sv_newmortal(); SvUPGRADE(error_sv, SVt_PVNV); error = gai_strerror(err); sv_setpv(error_sv, error); SvIV_set(error_sv, err); SvIOK_on(error_sv); PUSHs(error_sv); } #else ST(0) = (SV *) not_here("getnameinfo"); #endif } char * gai_strerror(errcode = 0) int errcode; CODE: RETVAL = (char *)gai_strerror(errcode); OUTPUT: RETVAL void getipnodebyname(hostname, family=0, flags=0) char * hostname int family int flags PREINIT: #ifdef HAVE_GETIPNODEBYNAME struct hostent *he; int err; char **p; SV *temp, *address_ref, *alias_ref; AV *address_list, *alias_list; #endif PPCODE: { #ifdef HAVE_GETIPNODEBYNAME he = getipnodebyname(hostname, family, flags, &err); if (err == 0) { XPUSHs(sv_2mortal(newSVpv(he->h_name, strlen(he->h_name)))); XPUSHs(sv_2mortal(newSViv(he->h_addrtype))); XPUSHs(sv_2mortal(newSViv(he->h_length))); address_list = newAV(); for(p = he->h_addr_list; *p != NULL; p++) { temp = newSVpv(*p, he->h_length); av_push(address_list, temp); } address_ref = newRV_noinc((SV*) address_list); XPUSHs(address_ref); alias_list = newAV(); for(p = he->h_aliases; *p != NULL; p++) { temp = newSVpv(*p, strlen(*p)); av_push(alias_list, temp); } alias_ref = newRV_noinc((SV*) alias_list); XPUSHs(alias_ref); freehostent(he); } else { XPUSHs(sv_2mortal(newSViv(err))); } #else ST(0) = (SV *) not_here("getipnodebyname"); #endif } void getipnodebyaddr(family, address_sv) int family SV * address_sv PREINIT: #ifdef HAVE_GETIPNODEBYADDR STRLEN addrlen; struct hostent *he; int err, alen; char **p; SV *temp, *address_ref, *alias_ref; AV *address_list, *alias_list; struct in6_addr addr; char *addr_buffer; #endif PPCODE: { #ifdef HAVE_GETIPNODEBYADDR addr_buffer = SvPV(address_sv, addrlen); switch(family) { case AF_INET: alen = sizeof(struct in_addr); break; case AF_INET6: alen = sizeof(struct in6_addr); break; default: croak("Unsupported address family for %s, af is %d", "Socket6::getipnodebyaddr", family); } if (alen > sizeof(addr) || alen != addrlen) { croak("Arg length mismatch in %s, length is %d, should be %d\n", "Socket6::getipnodebyaddr", addrlen, alen); } Copy(addr_buffer, &addr, sizeof(addr), char); he = getipnodebyaddr(addr_buffer, alen, family, &err); if (err == 0) { XPUSHs(sv_2mortal(newSVpv(he->h_name, strlen(he->h_name)))); XPUSHs(sv_2mortal(newSViv(he->h_addrtype))); XPUSHs(sv_2mortal(newSViv(he->h_length))); address_list = newAV(); for(p = he->h_addr_list; *p != NULL; p++) { temp = newSVpv(*p, he->h_length); av_push(address_list, temp); } address_ref = newRV_noinc((SV*) address_list); XPUSHs(address_ref); alias_list = newAV(); for(p = he->h_aliases; *p != NULL; p++) { temp = newSVpv(*p, strlen(*p)); av_push(alias_list, temp); } alias_ref = newRV_noinc((SV*) alias_list); XPUSHs(alias_ref); freehostent(he); } else { XPUSHs(sv_2mortal(newSViv(err))); } #else ST(0) = (SV *) not_here("getipnodebyaddr"); #endif } Socket6-0.29/config.h.in000644 003721 003721 00000002672 12702614646 014601 0ustar00umenoah000000 000000 /* config.h.in. Generated from configure.in by autoheader. */ /* Do we have a working inet_ntop? */ #undef CAN_INET_NTOP /* Define to 1 if you have the `getaddrinfo' function. */ #undef HAVE_GETADDRINFO /* Define to 1 if you have the `gethostbyname2' function. */ #undef HAVE_GETHOSTBYNAME2 /* Define to 1 if you have the `getipnodebyaddr' function. */ #undef HAVE_GETIPNODEBYADDR /* Define to 1 if you have the `getipnodebyname' function. */ #undef HAVE_GETIPNODEBYNAME /* Define to 1 if you have the `getnameinfo' function. */ #undef HAVE_GETNAMEINFO /* Define to 1 if you have the `inet_ntop' function. */ #undef HAVE_INET_NTOP /* Define to 1 if you have the `inet_pton' function. */ #undef HAVE_INET_PTON /* Do we have a pl_sv_undef? */ #undef HAVE_PL_SV_UNDEF /* Do we have a sin6_scope_id in struct sockaddr_in6? */ #undef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID /* Does sockaddr have an sa_len? */ #undef HAVE_SOCKADDR_SA_LEN /* Do we have a socklen_t? */ #undef HAVE_SOCKLEN_T /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION Socket6-0.29/gailookup.pl.in000644 003721 003721 00000010024 12702614646 015500 0ustar00umenoah000000 000000 #! @PERLPATH@ ;# Copyright (C) 2000-2015 Hajimu UMEMOTO . ;# All rights reserved. ;# ;# Copyright (C)2000 Hideaki YOSHIFUJI ;# All rights reserved. ;# ;# Redistribution and use in source and binary forms, with or without ;# modification, are permitted provided that the following conditions ;# are met: ;# 1. Redistributions of source code must retain the above copyright ;# notice, this list of conditions and the following disclaimer. ;# 2. Redistributions in binary form must reproduce the above copyright ;# notice, this list of conditions and the following disclaimer in the ;# documentation and/or other materials provided with the distribution. ;# 3. Neither the name of the project nor the names of its contributors ;# may be used to endorse or promote products derived from this software ;# without specific prior written permission. ;# ;# THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND ;# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ;# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ;# ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE ;# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ;# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ;# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ;# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ;# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ;# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ;# SUCH DAMAGE. ;# $Id: gailookup.pl.in 652 2015-12-05 04:40:07Z ume $ use Getopt::Std; use Socket; use Socket6; use strict; my $inet6 = defined(eval 'PF_INET6'); my %opt; getopts(($inet6 ? 'aAchpsmnNP:qrS46' : 'AchpsmnNP:qrS4'), \%opt); if ($opt{'h'}){ print STDERR ("Usage: $0 [-h | [-a] [-A] [-c] [-m] [-n] [-N] [-p] [-P serv] [-q] [-r] [-s] [-S] [-4" . ($inet6 && "|-6") . "] [host [serv]]]\n" . "-h : help\n" . "-a : AI_ADDRCONFIG flag\n" . "-A : AI_ALL flag\n" . "-c : AI_CANONNAME flag\n" . "-m : AI_V4MAPPED flag\n" . "-n : AI_NUMERICHOST flag\n" . "-N : AI_NUMERICSERV flag\n" . "-p : AI_PASSIVE flag\n" . "-q : only show IP address\n" . "-r : do reverse lookup\n" . "-s : NI_WITHSCOPEID flag\n" . "-S : suppress scopeid\n" . ($inet6 ? "-4|-6: PF_INET | PF_INET6" : "-4 : PF_INET") . "\n"); exit(4); } my $host = shift(@ARGV) if (@ARGV); my $serv = shift(@ARGV) if (@ARGV); die("Too many arguments\n") if (@ARGV); die("Either -4 or -6, not both should be specified\n") if ($opt{'4'} && $opt{'6'}); $serv = $opt{'P'} if ($opt{'P'}); my $af = PF_UNSPEC; $af = PF_INET if ($opt{'4'}); $af = PF_INET6 if ($inet6 && $opt{'6'}); my $flags = 0; eval('$flags |= AI_ADDRCONFIG') if ($opt{'a'}); eval('$flags |= AI_ALL') if ($opt{'A'}); eval('$flags |= AI_V4MAPPED') if ($opt{'m'}); $flags |= AI_PASSIVE if ($opt{'p'}); $flags |= AI_NUMERICHOST if ($opt{'n'}); $flags |= AI_NUMERICSERV if ($opt{'N'}); $flags |= AI_CANONNAME if ($opt{'c'}); my $nflags = NI_NUMERICHOST | NI_NUMERICSERV; eval('$nflags |= NI_WITHSCOPEID') if ($opt{'s'}); my $socktype = SOCK_STREAM; my $protocol = 0; my @tmp = getaddrinfo($host, $serv, $af, $socktype, $protocol, $flags); if ($#tmp < 1) { print(STDERR "${host}: @tmp[0]\n"); exit 1; } while (my($family,$socktype,$protocol,$sin,$canonname) = splice(@tmp, $[, 5)){ if ($opt{'S'} && $family == AF_INET6) { my($port, $flowinfo, $addr, $scopeid) = unpack_sockaddr_in6_all($sin); $sin = pack_sockaddr_in6_all($port, $flowinfo, $addr, 0); } my($addr, $port) = getnameinfo($sin, $nflags); if ($opt{'q'}) { print("$addr"); } else { print("family=$family, socktype=$socktype, protocol=$protocol, addr=$addr, port=$port"); print(", canonname=$canonname") if ($opt{'c'}); if ($opt{'r'}) { my($addr, $port) = getnameinfo($sin); print(", rev=$addr"); } } print("\n"); } Socket6-0.29/ftpmirror-1.96.diff000644 003721 003721 00000016371 12702614646 016030 0ustar00umenoah000000 000000 Index: Fan/FTP/FTP.pm =================================================================== RCS file: /usr/home/ume/ncvs/src/ftpmirror/Fan/FTP/FTP.pm,v retrieving revision 1.1.1.2 retrieving revision 1.6 diff -u -r1.1.1.2 -r1.6 --- Fan/FTP/FTP.pm 2000/03/03 07:35:58 1.1.1.2 +++ Fan/FTP/FTP.pm 2000/03/09 13:32:04 1.6 @@ -60,6 +60,9 @@ use Carp; use Socket; +BEGIN { + eval 'use Socket6' unless (eval '&AF_INET6'); # IPv6 patched Perl +} use Fan::TCP; use AutoLoader 'AUTOLOAD'; @@ -390,7 +393,7 @@ $self->clearerror || return undef; $self->cleardataconn; # always success - my($port, $addr) = $self->sockname; + my ($port, $addr, $family) = $self->sockname; my $acpt = Fan::TCP->new(); unless (defined($acpt)) { @@ -398,20 +401,28 @@ return undef; } - unless ($acpt->do_server(tcp_bindaddr => $addr)) { + unless ($acpt->do_server(tcp_family => $family, + tcp_bindaddr => $addr)) { warn("Fan::TCP->do_server failed"); return undef; } - ($port, $addr) = $acpt->sockname; - unless ($addr =~ tr/./,/ == 3) { - warn("ADDRESS=$addr must have just 3 dots"); - return undef; + ($port, $addr, $family) = $acpt->sockname; + my $command; + if ($family == AF_INET) { + unless ($addr =~ tr/./,/ == 3) { + warn("ADDRESS=$addr must have just 3 dots"); + return undef; + } + $addr .= sprintf(",%d,%d", ($port >> 8) & 0xff, $port & 0xff); + $command = 'PORT'; + } else { + $addr = "|2|$addr|$port|"; + $command = 'EPRT'; } - $addr .= sprintf(",%d,%d", ($port >> 8) & 0xff, $port & 0xff); - unless ($self->putreq("PORT $addr") =~ /^2/) { - warn("PORT command failed\n") if $LOG > 5; + unless ($self->putreq("$command $addr") =~ /^2/) { + warn("$command command failed\n") if $LOG > 5; $self->error($self->{lastmesg}); return undef; } @@ -437,12 +448,20 @@ ;# sub pasv ($) { my $self = shift; - my $a_regexp = '\((\d+),(\d+),(\d+),(\d+),(\d+),(\d+)\)'; $self->clearerror && $self->cleardataconn || return undef; - if ($self->putreq("PASV") !~ /^2/) { + my $family = ($self->sockname)[2]; + my ($a_regexp, $command); + if ($family == AF_INET) { + $a_regexp = '\((\d+),(\d+),(\d+),(\d+),(\d+),(\d+)\)'; + $command = 'PASV'; + } else { + $a_regexp = '\([^\d\s]{3}(\d+)[^\d\s]\)'; + $command = 'EPSV'; + } + if ($self->putreq($command) !~ /^2/) { $self->error($self->{lastmesg}); return undef; } @@ -452,11 +471,18 @@ } my $bindaddr = $self->{ftp_bindaddr}; - my $port = $5 * 256 + $6; - my $addr = join('.', $1, $2, $3, $4); + my ($port, $addr); + if ($family == AF_INET) { + $port = $5 * 256 + $6; + $addr = join('.', $1, $2, $3, $4); + } else { + $port = $1; + $addr = ($self->peername)[1]; + } my $data = Fan::TCP->new(); $data && $data->do_client( + tcp_family => $family, tcp_bindaddr => $bindaddr, tcp_host => $addr, tcp_port => $port Index: Fan/TCP/TCP.pm =================================================================== RCS file: /usr/home/ume/ncvs/src/ftpmirror/Fan/TCP/TCP.pm,v retrieving revision 1.1.1.1 retrieving revision 1.12 diff -u -r1.1.1.1 -r1.12 --- Fan/TCP/TCP.pm 1999/10/24 10:28:15 1.1.1.1 +++ Fan/TCP/TCP.pm 2000/03/09 13:32:06 1.12 @@ -35,15 +35,16 @@ package Fan::TCP; use strict; -use vars qw($VERSION $LOG - $tcp_proto $seq_id $sent_octets $recv_octets); +use vars qw($VERSION $LOG $seq_id $sent_octets $recv_octets); use Carp; use Socket; +BEGIN { + eval 'use Socket6' unless (eval '&AF_INET6'); # IPv6 patched Perl +} use AutoLoader 'AUTOLOAD'; $VERSION = '0.03'; -$tcp_proto = (getprotobyname('tcp'))[2]; ;# BEGIN { @@ -463,27 +464,21 @@ # check local side port #. my $port = $params{tcp_bindport} || $self->{tcp_bindport} || 0; - if ($port !~ /^\d+$/) { - if (!defined($port = getservbyname($port, 'tcp'))) { - my $e = $!.''; - $self->error($e, &FATAL); - carp("$self: getservbyname($port) - $e"); - return undef; - } - } # define local side address if bindaddr is not null string. - my $addr = inet_aton( - $params{tcp_bindaddr} || $self->{tcp_bindaddr} || '0.0.0.0'); - - # parameter for bind. - my $me = sockaddr_in($port, $addr); + my $family = $params{tcp_family} ? $params{tcp_family} : AF_INET; + my $tcp_bindaddr = $params{tcp_bindaddr} || $self->{tcp_bindaddr} || + (($family == AF_INET) ? '0.0.0.0' : '::'); + + my ($socktype, $proto, $me, $canonname); + ($family, $socktype, $proto, $me, $canonname) + = getaddrinfo($tcp_bindaddr, $port, $family, SOCK_STREAM); # local file handle... local *SOCKET; # creating a stream socket. - unless (socket(SOCKET, PF_INET, SOCK_STREAM, $tcp_proto)) { + unless (socket(SOCKET, $family, $socktype, $proto)) { my $e = $!.''; $self->error($e, &FATAL); carp("$self: socket - $e") if $LOG >= 5; @@ -539,41 +534,27 @@ return undef; } - # try to parse port number - if ($port !~ /^\d+$/) { - if (!defined($port = getservbyname($port, 'tcp'))) { - my $e = $!.''; - $self->error($e, &FATAL); - carp("$self: getservbyname($port) - $e"); - return undef; - } - } - - # check server name - my @addr; - if ($host =~ /^(\d+)\.(\d+)\.(\d+).(\d+)$/) { - @addr = (pack('C4', $1, $2, $3, $4)); - } else { - if ((@addr = gethostbyname($host)) < 5) { - carp("$self: gethostbyname - $?"); - my $e = $?.''; - $self->error($e, &FATAL); - carp("$self: gethostbyname - $e"); - return undef; - } - splice(@addr, 0, 4); + # check server name and try to parse port number + my @infos = getaddrinfo($host, $port, AF_UNSPEC, SOCK_STREAM); + if ($#infos < 1) { + carp("$self: getaddrinfo($host, $port) - $?"); + my $e = $?.''; + $self->error($e, &FATAL); + carp("$self: getaddrinfo($host, $port) - $e"); + return undef; } # Perl's bug? once connect fails, we could not any more # connect (connect returns "Invalid Argument"). So we # create/close a socket in each iteration. - for my $i (@addr) { + while ($#infos >= 1) { + my ($family, $socktype, $proto, $peer, $canonname) + = splice(@infos, 0, 5); # open socket stores any error + $params{tcp_family} = $family; $self->open_socket(%params) || return undef; - # target address. - my $peer = sockaddr_in($port, $i); my $result = undef; # do real work. @@ -758,10 +739,13 @@ my $sock = $self->handle; if (defined($sock)) { - my($port, $a) = sockaddr_in(getsockname($sock)); - my $addr = join('.', unpack('C4', $a)); -carp("$self sockname=$addr:$port") if $LOG > 7; - return wantarray ? ($port, $addr) : "$addr:$port"; + my $sa = getsockname($sock); + my $family = (unpack('CC', $sa))[1]; + my ($addr, $port) = getnameinfo($sa, NI_NUMERICHOST | + NI_NUMERICSERV); + carp("$self sockname=$addr|$port|$family") if $LOG > 7; + return wantarray ? ($port, $addr, $family) + : "$addr|$port|$family"; } return wantarray ? () : undef; } @@ -772,10 +756,13 @@ my $sock = $self->handle; if (defined($sock)) { - my($port, $a) = sockaddr_in(getpeername($sock)); - my $addr = join('.', unpack('C4', $a)); -carp("$self sockpeer=$addr:$port") if $LOG > 7; - return wantarray ? ($port, $addr) : "$addr:$port"; + my $sa = getpeername($sock); + my $family = (unpack('CC', $sa))[1]; + my ($addr, $port) = getnameinfo($sa, NI_NUMERICHOST | + NI_NUMERICSERV); + carp("$self sockpeer=$addr|$port|$family") if $LOG > 7; + return wantarray ? ($port, $addr, $family) + : "$addr|$port|$family"; } return wantarray ? () : undef; } Socket6-0.29/META.yml000644 003721 003721 00000000734 13354066373 014026 0ustar00umenoah000000 000000 --- abstract: unknown author: - unknown build_requires: ExtUtils::MakeMaker: '0' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 1 generated_by: 'ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150010' license: unknown meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Socket6 no_index: directory: - t - inc version: '0.29' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' Socket6-0.29/configure000755 003721 003721 00000474563 12740626645 014505 0ustar00umenoah000000 000000 #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= ac_unique_file="Socket6.pm" ac_unique_file="Socket6.pm" ac_subst_vars='LTLIBOBJS LIBOBJS PERLPATH INET6LIBS DEFINES EGREP GREP CPP perl OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking with_perl ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-perl=path-to-perl Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers config.h" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu default_perl_path=`which perl | sed -e 's/\/\/*[^\/]*$//'` # Check whether --with-perl was given. if test "${with_perl+set}" = set; then : withval=$with_perl; ac_cv_path_perl=$withval else for ac_prog in perl5 jperl5 perl jperl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_perl+:} false; then : $as_echo_n "(cached) " >&6 else case $perl in [\\/]* | ?:[\\/]*) ac_cv_path_perl="$perl" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="/usr/local/bin:/opt/local/bin:/usr/bin:$default_perl_path:." for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_perl="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi perl=$ac_cv_path_perl if test -n "$perl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl" >&5 $as_echo "$perl" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$perl" && break done fi if test x"$ac_cv_path_perl" = x""; then as_fn_error $? "Cannot find perl; please use --with-perl=/path/to/perl option." "$LINENO" 5 fi PERLPATH=$ac_cv_path_perl { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether your Perl5 have PL_sv_undef" >&5 $as_echo_n "checking whether your Perl5 have PL_sv_undef... " >&6; } if ${socket6_cv_pl_sv_undef+:} false; then : $as_echo_n "(cached) " >&6 else rm -rf conftest mkdir conftest cd conftest cat >Makefile.PL < 'conftest', VERSION_FROM => 'conftest.pm', XSPROTOARG => '-noprototypes', ); EOF cat > conftest.pm < conftest.xs <&5 >/dev/null; (eval make) 2>&5 >/dev/null; }; then socket6_cv_pl_sv_undef='yes' else socket6_cv_pl_sv_undef='no' fi cd .. rm -rf conftest fi if test $socket6_cv_pl_sv_undef = 'yes'; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_PL_SV_UNDEF 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" if test "x$ac_cv_func_getaddrinfo" = xyes; then : ac_cv_lib_socket_getaddrinfo=no ac_cv_lib_inet6_getaddrinfo=no else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -lsocket" >&5 $as_echo_n "checking for getaddrinfo in -lsocket... " >&6; } if ${ac_cv_lib_socket_getaddrinfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char getaddrinfo (); int main () { return getaddrinfo (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_getaddrinfo=yes else ac_cv_lib_socket_getaddrinfo=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getaddrinfo" >&5 $as_echo "$ac_cv_lib_socket_getaddrinfo" >&6; } if test "x$ac_cv_lib_socket_getaddrinfo" = xyes; then : LIBS="$LIBS -lsocket -lnsl" ac_cv_lib_inet6_getaddrinfo=no else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether your system has IPv6 directory" >&5 $as_echo_n "checking whether your system has IPv6 directory... " >&6; } if ${ipv6_cv_dir+:} false; then : $as_echo_n "(cached) " >&6 else for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6_cv_dir" >&5 $as_echo "$ipv6_cv_dir" >&6; } if test $ipv6_cv_dir = no; then ac_cv_lib_inet6_getaddrinfo=no else if test x$ipv6_libinet6 = x; then ipv6_libinet6=no SAVELDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -linet6" >&5 $as_echo_n "checking for getaddrinfo in -linet6... " >&6; } if ${ac_cv_lib_inet6_getaddrinfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-linet6 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char getaddrinfo (); int main () { return getaddrinfo (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_inet6_getaddrinfo=yes else ac_cv_lib_inet6_getaddrinfo=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet6_getaddrinfo" >&5 $as_echo "$ac_cv_lib_inet6_getaddrinfo" >&6; } if test "x$ac_cv_lib_inet6_getaddrinfo" = xyes; then : if test $ipv6_libinet6 = no; then ipv6_libinet6=yes LIBS="$LIBS -linet6" fi fi if test $ipv6_libinet6 = no; then LDFLAGS="$SAVELDFLAGS" fi fi fi fi ipv6_cv_getaddrinfo=no if test $ac_cv_func_getaddrinfo = yes -o $ac_cv_lib_socket_getaddrinfo = yes \ -o $ac_cv_lib_inet6_getaddrinfo = yes then ipv6_cv_getaddrinfo=yes fi if test $ipv6_cv_getaddrinfo = no; then if test getaddrinfo = getaddrinfo; then for ipv6_cv_pfx in o n; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "${ipv6_cv_pfx}getaddrinfo" >/dev/null 2>&1; then : as_ac_var=`$as_echo "ac_cv_func_${ipv6_cv_pfx}getaddrinfo" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "${ipv6_cv_pfx}getaddrinfo" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : fi fi rm -f conftest* if eval test X\$ac_cv_func_${ipv6_cv_pfx}getaddrinfo = Xyes; then ipv6_cv_getaddrinfo=yes break fi done fi fi if test $ipv6_cv_getaddrinfo = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_GETADDRINFO 1 _ACEOF : else : fi ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo" if test "x$ac_cv_func_getnameinfo" = xyes; then : ac_cv_lib_socket_getnameinfo=no ac_cv_lib_inet6_getnameinfo=no else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getnameinfo in -lsocket" >&5 $as_echo_n "checking for getnameinfo in -lsocket... " >&6; } if ${ac_cv_lib_socket_getnameinfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char getnameinfo (); int main () { return getnameinfo (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_getnameinfo=yes else ac_cv_lib_socket_getnameinfo=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getnameinfo" >&5 $as_echo "$ac_cv_lib_socket_getnameinfo" >&6; } if test "x$ac_cv_lib_socket_getnameinfo" = xyes; then : LIBS="$LIBS -lsocket -lnsl" ac_cv_lib_inet6_getnameinfo=no else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether your system has IPv6 directory" >&5 $as_echo_n "checking whether your system has IPv6 directory... " >&6; } if ${ipv6_cv_dir+:} false; then : $as_echo_n "(cached) " >&6 else for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6_cv_dir" >&5 $as_echo "$ipv6_cv_dir" >&6; } if test $ipv6_cv_dir = no; then ac_cv_lib_inet6_getnameinfo=no else if test x$ipv6_libinet6 = x; then ipv6_libinet6=no SAVELDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getnameinfo in -linet6" >&5 $as_echo_n "checking for getnameinfo in -linet6... " >&6; } if ${ac_cv_lib_inet6_getnameinfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-linet6 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char getnameinfo (); int main () { return getnameinfo (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_inet6_getnameinfo=yes else ac_cv_lib_inet6_getnameinfo=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet6_getnameinfo" >&5 $as_echo "$ac_cv_lib_inet6_getnameinfo" >&6; } if test "x$ac_cv_lib_inet6_getnameinfo" = xyes; then : if test $ipv6_libinet6 = no; then ipv6_libinet6=yes LIBS="$LIBS -linet6" fi fi if test $ipv6_libinet6 = no; then LDFLAGS="$SAVELDFLAGS" fi fi fi fi ipv6_cv_getnameinfo=no if test $ac_cv_func_getnameinfo = yes -o $ac_cv_lib_socket_getnameinfo = yes \ -o $ac_cv_lib_inet6_getnameinfo = yes then ipv6_cv_getnameinfo=yes fi if test $ipv6_cv_getnameinfo = no; then if test getnameinfo = getaddrinfo; then for ipv6_cv_pfx in o n; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "${ipv6_cv_pfx}getnameinfo" >/dev/null 2>&1; then : as_ac_var=`$as_echo "ac_cv_func_${ipv6_cv_pfx}getnameinfo" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "${ipv6_cv_pfx}getnameinfo" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : fi fi rm -f conftest* if eval test X\$ac_cv_func_${ipv6_cv_pfx}getnameinfo = Xyes; then ipv6_cv_getnameinfo=yes break fi done fi fi if test $ipv6_cv_getnameinfo = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_GETNAMEINFO 1 _ACEOF : else : fi ac_fn_c_check_func "$LINENO" "gethostbyname2" "ac_cv_func_gethostbyname2" if test "x$ac_cv_func_gethostbyname2" = xyes; then : ac_cv_lib_socket_gethostbyname2=no ac_cv_lib_inet6_gethostbyname2=no else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname2 in -lsocket" >&5 $as_echo_n "checking for gethostbyname2 in -lsocket... " >&6; } if ${ac_cv_lib_socket_gethostbyname2+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname2 (); int main () { return gethostbyname2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_gethostbyname2=yes else ac_cv_lib_socket_gethostbyname2=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_gethostbyname2" >&5 $as_echo "$ac_cv_lib_socket_gethostbyname2" >&6; } if test "x$ac_cv_lib_socket_gethostbyname2" = xyes; then : LIBS="$LIBS -lsocket -lnsl" ac_cv_lib_inet6_gethostbyname2=no else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether your system has IPv6 directory" >&5 $as_echo_n "checking whether your system has IPv6 directory... " >&6; } if ${ipv6_cv_dir+:} false; then : $as_echo_n "(cached) " >&6 else for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6_cv_dir" >&5 $as_echo "$ipv6_cv_dir" >&6; } if test $ipv6_cv_dir = no; then ac_cv_lib_inet6_gethostbyname2=no else if test x$ipv6_libinet6 = x; then ipv6_libinet6=no SAVELDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname2 in -linet6" >&5 $as_echo_n "checking for gethostbyname2 in -linet6... " >&6; } if ${ac_cv_lib_inet6_gethostbyname2+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-linet6 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname2 (); int main () { return gethostbyname2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_inet6_gethostbyname2=yes else ac_cv_lib_inet6_gethostbyname2=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet6_gethostbyname2" >&5 $as_echo "$ac_cv_lib_inet6_gethostbyname2" >&6; } if test "x$ac_cv_lib_inet6_gethostbyname2" = xyes; then : if test $ipv6_libinet6 = no; then ipv6_libinet6=yes LIBS="$LIBS -linet6" fi fi if test $ipv6_libinet6 = no; then LDFLAGS="$SAVELDFLAGS" fi fi fi fi ipv6_cv_gethostbyname2=no if test $ac_cv_func_gethostbyname2 = yes -o $ac_cv_lib_socket_gethostbyname2 = yes \ -o $ac_cv_lib_inet6_gethostbyname2 = yes then ipv6_cv_gethostbyname2=yes fi if test $ipv6_cv_gethostbyname2 = no; then if test gethostbyname2 = getaddrinfo; then for ipv6_cv_pfx in o n; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "${ipv6_cv_pfx}gethostbyname2" >/dev/null 2>&1; then : as_ac_var=`$as_echo "ac_cv_func_${ipv6_cv_pfx}gethostbyname2" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "${ipv6_cv_pfx}gethostbyname2" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : fi fi rm -f conftest* if eval test X\$ac_cv_func_${ipv6_cv_pfx}gethostbyname2 = Xyes; then ipv6_cv_gethostbyname2=yes break fi done fi fi if test $ipv6_cv_gethostbyname2 = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_GETHOSTBYNAME2 1 _ACEOF : else : fi ac_fn_c_check_func "$LINENO" "getipnodebyname" "ac_cv_func_getipnodebyname" if test "x$ac_cv_func_getipnodebyname" = xyes; then : ac_cv_lib_socket_getipnodebyname=no ac_cv_lib_inet6_getipnodebyname=no else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getipnodebyname in -lsocket" >&5 $as_echo_n "checking for getipnodebyname in -lsocket... " >&6; } if ${ac_cv_lib_socket_getipnodebyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char getipnodebyname (); int main () { return getipnodebyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_getipnodebyname=yes else ac_cv_lib_socket_getipnodebyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getipnodebyname" >&5 $as_echo "$ac_cv_lib_socket_getipnodebyname" >&6; } if test "x$ac_cv_lib_socket_getipnodebyname" = xyes; then : LIBS="$LIBS -lsocket -lnsl" ac_cv_lib_inet6_getipnodebyname=no else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether your system has IPv6 directory" >&5 $as_echo_n "checking whether your system has IPv6 directory... " >&6; } if ${ipv6_cv_dir+:} false; then : $as_echo_n "(cached) " >&6 else for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6_cv_dir" >&5 $as_echo "$ipv6_cv_dir" >&6; } if test $ipv6_cv_dir = no; then ac_cv_lib_inet6_getipnodebyname=no else if test x$ipv6_libinet6 = x; then ipv6_libinet6=no SAVELDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getipnodebyname in -linet6" >&5 $as_echo_n "checking for getipnodebyname in -linet6... " >&6; } if ${ac_cv_lib_inet6_getipnodebyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-linet6 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char getipnodebyname (); int main () { return getipnodebyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_inet6_getipnodebyname=yes else ac_cv_lib_inet6_getipnodebyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet6_getipnodebyname" >&5 $as_echo "$ac_cv_lib_inet6_getipnodebyname" >&6; } if test "x$ac_cv_lib_inet6_getipnodebyname" = xyes; then : if test $ipv6_libinet6 = no; then ipv6_libinet6=yes LIBS="$LIBS -linet6" fi fi if test $ipv6_libinet6 = no; then LDFLAGS="$SAVELDFLAGS" fi fi fi fi ipv6_cv_getipnodebyname=no if test $ac_cv_func_getipnodebyname = yes -o $ac_cv_lib_socket_getipnodebyname = yes \ -o $ac_cv_lib_inet6_getipnodebyname = yes then ipv6_cv_getipnodebyname=yes fi if test $ipv6_cv_getipnodebyname = no; then if test getipnodebyname = getaddrinfo; then for ipv6_cv_pfx in o n; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "${ipv6_cv_pfx}getipnodebyname" >/dev/null 2>&1; then : as_ac_var=`$as_echo "ac_cv_func_${ipv6_cv_pfx}getipnodebyname" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "${ipv6_cv_pfx}getipnodebyname" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : fi fi rm -f conftest* if eval test X\$ac_cv_func_${ipv6_cv_pfx}getipnodebyname = Xyes; then ipv6_cv_getipnodebyname=yes break fi done fi fi if test $ipv6_cv_getipnodebyname = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_GETIPNODEBYNAME 1 _ACEOF : else : fi ac_fn_c_check_func "$LINENO" "getipnodebyaddr" "ac_cv_func_getipnodebyaddr" if test "x$ac_cv_func_getipnodebyaddr" = xyes; then : ac_cv_lib_socket_getipnodebyaddr=no ac_cv_lib_inet6_getipnodebyaddr=no else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getipnodebyaddr in -lsocket" >&5 $as_echo_n "checking for getipnodebyaddr in -lsocket... " >&6; } if ${ac_cv_lib_socket_getipnodebyaddr+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char getipnodebyaddr (); int main () { return getipnodebyaddr (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_getipnodebyaddr=yes else ac_cv_lib_socket_getipnodebyaddr=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getipnodebyaddr" >&5 $as_echo "$ac_cv_lib_socket_getipnodebyaddr" >&6; } if test "x$ac_cv_lib_socket_getipnodebyaddr" = xyes; then : LIBS="$LIBS -lsocket -lnsl" ac_cv_lib_inet6_getipnodebyaddr=no else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether your system has IPv6 directory" >&5 $as_echo_n "checking whether your system has IPv6 directory... " >&6; } if ${ipv6_cv_dir+:} false; then : $as_echo_n "(cached) " >&6 else for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6_cv_dir" >&5 $as_echo "$ipv6_cv_dir" >&6; } if test $ipv6_cv_dir = no; then ac_cv_lib_inet6_getipnodebyaddr=no else if test x$ipv6_libinet6 = x; then ipv6_libinet6=no SAVELDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getipnodebyaddr in -linet6" >&5 $as_echo_n "checking for getipnodebyaddr in -linet6... " >&6; } if ${ac_cv_lib_inet6_getipnodebyaddr+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-linet6 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char getipnodebyaddr (); int main () { return getipnodebyaddr (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_inet6_getipnodebyaddr=yes else ac_cv_lib_inet6_getipnodebyaddr=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet6_getipnodebyaddr" >&5 $as_echo "$ac_cv_lib_inet6_getipnodebyaddr" >&6; } if test "x$ac_cv_lib_inet6_getipnodebyaddr" = xyes; then : if test $ipv6_libinet6 = no; then ipv6_libinet6=yes LIBS="$LIBS -linet6" fi fi if test $ipv6_libinet6 = no; then LDFLAGS="$SAVELDFLAGS" fi fi fi fi ipv6_cv_getipnodebyaddr=no if test $ac_cv_func_getipnodebyaddr = yes -o $ac_cv_lib_socket_getipnodebyaddr = yes \ -o $ac_cv_lib_inet6_getipnodebyaddr = yes then ipv6_cv_getipnodebyaddr=yes fi if test $ipv6_cv_getipnodebyaddr = no; then if test getipnodebyaddr = getaddrinfo; then for ipv6_cv_pfx in o n; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "${ipv6_cv_pfx}getipnodebyaddr" >/dev/null 2>&1; then : as_ac_var=`$as_echo "ac_cv_func_${ipv6_cv_pfx}getipnodebyaddr" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "${ipv6_cv_pfx}getipnodebyaddr" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : fi fi rm -f conftest* if eval test X\$ac_cv_func_${ipv6_cv_pfx}getipnodebyaddr = Xyes; then ipv6_cv_getipnodebyaddr=yes break fi done fi fi if test $ipv6_cv_getipnodebyaddr = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_GETIPNODEBYADDR 1 _ACEOF : else : fi ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton" if test "x$ac_cv_func_inet_pton" = xyes; then : ac_cv_lib_socket_inet_pton=no ac_cv_lib_inet6_inet_pton=no else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton in -lsocket" >&5 $as_echo_n "checking for inet_pton in -lsocket... " >&6; } if ${ac_cv_lib_socket_inet_pton+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char inet_pton (); int main () { return inet_pton (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_inet_pton=yes else ac_cv_lib_socket_inet_pton=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_inet_pton" >&5 $as_echo "$ac_cv_lib_socket_inet_pton" >&6; } if test "x$ac_cv_lib_socket_inet_pton" = xyes; then : LIBS="$LIBS -lsocket -lnsl" ac_cv_lib_inet6_inet_pton=no else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether your system has IPv6 directory" >&5 $as_echo_n "checking whether your system has IPv6 directory... " >&6; } if ${ipv6_cv_dir+:} false; then : $as_echo_n "(cached) " >&6 else for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6_cv_dir" >&5 $as_echo "$ipv6_cv_dir" >&6; } if test $ipv6_cv_dir = no; then ac_cv_lib_inet6_inet_pton=no else if test x$ipv6_libinet6 = x; then ipv6_libinet6=no SAVELDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton in -linet6" >&5 $as_echo_n "checking for inet_pton in -linet6... " >&6; } if ${ac_cv_lib_inet6_inet_pton+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-linet6 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char inet_pton (); int main () { return inet_pton (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_inet6_inet_pton=yes else ac_cv_lib_inet6_inet_pton=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet6_inet_pton" >&5 $as_echo "$ac_cv_lib_inet6_inet_pton" >&6; } if test "x$ac_cv_lib_inet6_inet_pton" = xyes; then : if test $ipv6_libinet6 = no; then ipv6_libinet6=yes LIBS="$LIBS -linet6" fi fi if test $ipv6_libinet6 = no; then LDFLAGS="$SAVELDFLAGS" fi fi fi fi ipv6_cv_inet_pton=no if test $ac_cv_func_inet_pton = yes -o $ac_cv_lib_socket_inet_pton = yes \ -o $ac_cv_lib_inet6_inet_pton = yes then ipv6_cv_inet_pton=yes fi if test $ipv6_cv_inet_pton = no; then if test inet_pton = getaddrinfo; then for ipv6_cv_pfx in o n; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "${ipv6_cv_pfx}inet_pton" >/dev/null 2>&1; then : as_ac_var=`$as_echo "ac_cv_func_${ipv6_cv_pfx}inet_pton" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "${ipv6_cv_pfx}inet_pton" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : fi fi rm -f conftest* if eval test X\$ac_cv_func_${ipv6_cv_pfx}inet_pton = Xyes; then ipv6_cv_inet_pton=yes break fi done fi fi if test $ipv6_cv_inet_pton = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_INET_PTON 1 _ACEOF : else : fi ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop" if test "x$ac_cv_func_inet_ntop" = xyes; then : ac_cv_lib_socket_inet_ntop=no ac_cv_lib_inet6_inet_ntop=no else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntop in -lsocket" >&5 $as_echo_n "checking for inet_ntop in -lsocket... " >&6; } if ${ac_cv_lib_socket_inet_ntop+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char inet_ntop (); int main () { return inet_ntop (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_inet_ntop=yes else ac_cv_lib_socket_inet_ntop=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_inet_ntop" >&5 $as_echo "$ac_cv_lib_socket_inet_ntop" >&6; } if test "x$ac_cv_lib_socket_inet_ntop" = xyes; then : LIBS="$LIBS -lsocket -lnsl" ac_cv_lib_inet6_inet_ntop=no else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether your system has IPv6 directory" >&5 $as_echo_n "checking whether your system has IPv6 directory... " >&6; } if ${ipv6_cv_dir+:} false; then : $as_echo_n "(cached) " >&6 else for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6_cv_dir" >&5 $as_echo "$ipv6_cv_dir" >&6; } if test $ipv6_cv_dir = no; then ac_cv_lib_inet6_inet_ntop=no else if test x$ipv6_libinet6 = x; then ipv6_libinet6=no SAVELDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntop in -linet6" >&5 $as_echo_n "checking for inet_ntop in -linet6... " >&6; } if ${ac_cv_lib_inet6_inet_ntop+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-linet6 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char inet_ntop (); int main () { return inet_ntop (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_inet6_inet_ntop=yes else ac_cv_lib_inet6_inet_ntop=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet6_inet_ntop" >&5 $as_echo "$ac_cv_lib_inet6_inet_ntop" >&6; } if test "x$ac_cv_lib_inet6_inet_ntop" = xyes; then : if test $ipv6_libinet6 = no; then ipv6_libinet6=yes LIBS="$LIBS -linet6" fi fi if test $ipv6_libinet6 = no; then LDFLAGS="$SAVELDFLAGS" fi fi fi fi ipv6_cv_inet_ntop=no if test $ac_cv_func_inet_ntop = yes -o $ac_cv_lib_socket_inet_ntop = yes \ -o $ac_cv_lib_inet6_inet_ntop = yes then ipv6_cv_inet_ntop=yes fi if test $ipv6_cv_inet_ntop = no; then if test inet_ntop = getaddrinfo; then for ipv6_cv_pfx in o n; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "${ipv6_cv_pfx}inet_ntop" >/dev/null 2>&1; then : as_ac_var=`$as_echo "ac_cv_func_${ipv6_cv_pfx}inet_ntop" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "${ipv6_cv_pfx}inet_ntop" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : fi fi rm -f conftest* if eval test X\$ac_cv_func_${ipv6_cv_pfx}inet_ntop = Xyes; then ipv6_cv_inet_ntop=yes break fi done fi fi if test $ipv6_cv_inet_ntop = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_INET_NTOP 1 _ACEOF : else : fi if test $ac_cv_lib_inet6_getaddrinfo = yes; then INET6LIBS="-L$ipv6_cv_dir/lib -linet6" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working inet_ntop" >&5 $as_echo_n "checking for working inet_ntop... " >&6; } if ${ipv6_cv_can_inet_ntop+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #include #include int main() { static struct in6_addr addr; static char str[INET6_ADDRSTRLEN]; addr.s6_addr[15] = 0x21; inet_ntop(AF_INET6, &addr, str, sizeof(str)); if (strcmp(str, "::21") && strcmp(str, "::0.0.0.33")) exit(1); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ipv6_cv_can_inet_ntop=yes else ipv6_cv_can_inet_ntop=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi if test $ipv6_cv_can_inet_ntop = yes; then $as_echo "#define CAN_INET_NTOP 1" >>confdefs.h else : fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6_cv_can_inet_ntop" >&5 $as_echo "$ipv6_cv_can_inet_ntop" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether you have sa_len in struct sockaddr" >&5 $as_echo_n "checking whether you have sa_len in struct sockaddr... " >&6; } if ${ipv6_cv_sa_len+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct sockaddr sa; int i = sa.sa_len; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ipv6_cv_sa_len=yes else ipv6_cv_sa_len=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ipv6_cv_sa_len = yes; then $as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h else : fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6_cv_sa_len" >&5 $as_echo "$ipv6_cv_sa_len" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether you have sin6_scope_id in struct sockaddr_in6" >&5 $as_echo_n "checking whether you have sin6_scope_id in struct sockaddr_in6... " >&6; } if ${ipv6_cv_sin6_scope_id+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { struct sockaddr_in6 sin6; int i = sin6.sin6_scope_id; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ipv6_cv_sin6_scope_id=yes else ipv6_cv_sin6_scope_id=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ipv6_cv_sin6_scope_id = yes; then $as_echo "#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1" >>confdefs.h else : fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6_cv_sin6_scope_id" >&5 $as_echo "$ipv6_cv_sin6_scope_id" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5 $as_echo_n "checking for socklen_t... " >&6; } if ${ipv6_cv_socklen_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { socklen_t len = 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ipv6_cv_socklen_t=yes else ipv6_cv_socklen_t=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test $ipv6_cv_socklen_t = yes; then $as_echo "#define HAVE_SOCKLEN_T 1" >>confdefs.h else : fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6_cv_socklen_t" >&5 $as_echo "$ipv6_cv_socklen_t" >&6; } ac_config_files="$ac_config_files config.pl gailookup.pl" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "config.pl") CONFIG_FILES="$CONFIG_FILES config.pl" ;; "gailookup.pl") CONFIG_FILES="$CONFIG_FILES gailookup.pl" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi Socket6-0.29/configure.in000644 003721 003721 00000005257 12702614646 015071 0ustar00umenoah000000 000000 # Copyright (C) 2000-2016 Hajimu UMEMOTO . # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. Neither the name of the project nor the names of its contributors # may be used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # $Id: configure.in 659 2016-03-17 06:20:36Z ume $ AC_PREREQ(2.57) AC_INIT(Socket6.pm) AC_CONFIG_SRCDIR(Socket6.pm) AC_CONFIG_HEADER(config.h) AC_PROG_CC changequote(<<, >>) default_perl_path=`which perl | sed -e 's/\/\/*[^\/]*$//'` changequote([,]) AC_ARG_WITH(perl,[ --with-perl=path-to-perl], [ ac_cv_path_perl=$withval ],[ AC_PATH_PROGS(perl,perl5 jperl5 perl jperl,,/usr/local/bin:/opt/local/bin:/usr/bin:$default_perl_path:.) ]) if test x"$ac_cv_path_perl" = x""; then AC_MSG_ERROR([Cannot find perl; please use --with-perl=/path/to/perl option.]) fi PERLPATH=$ac_cv_path_perl SOCKET6_CHECK_PL_SV_UNDEF(AC_DEFINE(HAVE_PL_SV_UNDEF,[1],[Do we have a pl_sv_undef?]), , $ac_cv_path_perl) IPv6_CHECK_FUNC(getaddrinfo) IPv6_CHECK_FUNC(getnameinfo) IPv6_CHECK_FUNC(gethostbyname2) IPv6_CHECK_FUNC(getipnodebyname) IPv6_CHECK_FUNC(getipnodebyaddr) IPv6_CHECK_FUNC(inet_pton) IPv6_CHECK_FUNC(inet_ntop) if test $ac_cv_lib_inet6_getaddrinfo = yes; then INET6LIBS="-L$ipv6_cv_dir/lib -linet6" fi IPv6_CHECK_INET_NTOP() IPv6_CHECK_SA_LEN() IPv6_CHECK_SIN6_SCOPE_ID() IPv6_CHECK_SOCKLEN_T() AC_SUBST(DEFINES) AC_SUBST(INET6LIBS) AC_SUBST(PERLPATH) AC_OUTPUT(config.pl gailookup.pl) Socket6-0.29/ChangeLog000644 003721 003721 00000030720 13354043600 014311 0ustar00umenoah000000 000000 2018-09-30 Hajimu UMEMOTO * Socket6.pm: Bump version number to 0.29. * Socket6.xs: Updates the tests for handling the correct headers on NetBSD and DragonFly BSD. Submitted by: Sevan Janiyan 2016-07-11 Hajimu UMEMOTO * Socket6.pm: Bump version number to 0.28. * aclocal.m4 (IPv6_CHECK_INET_NTOP): inet_ntop(3) may returns IPv4-compatible IPv6 address. [cpan #113950] Submitted by: Andrew Galante 2016-03-23 Hajimu UMEMOTO * Socket6.pm: Bump version number to 0.27. 2016-03-22 Hajimu UMEMOTO * t/use.t: We still supports an environment where AF_INET6 is not defined. 2016-03-17 Hajimu UMEMOTO * Socket6.pm: Bump version number to 0.26. * Makefile.PL: Make Socket6 buildable on Android. [cpan #98181] Submitted by: fraserbn [...] gmail.com * system inet_ntop broken in darwin. [cpan #113005] Submitted by: RURBAN [...] cpan.org 2015-12-05 Hajimu UMEMOTO * gailookup.pl.in: Add -r option to do reverse lookup. 2015-11-25 Hajimu UMEMOTO * gailookup.pl.in: Add awareness of AI_ALL and AI_V4MAPPED. * gailookup.pl.in: Add -P option to ease to specify port number. 2013-12-09 Hajimu UMEMOTO * Socket6.pm: Bump version number to 0.25. * Makefile.PL: Install manpage. [cpan #66811] Submitted by: gavin@openfusion.com.au * Socket6.pm: Fix typo. [cpan #86346] Submitted by: dsteinbrunner@pobox.com * Socket6.pm: Fix typo. [cpan #71617] 2013-12-08 Hajimu UMEMOTO * Socket6.pm: Bump version number to 0.24. * Makefile.PL: Fixed [cpan #77665] pass perl cc and ccflags to configure Submitted by: rurban@cpan.org * Makefile.PL (configure_mswin32): Fixed [cpan #65710] undefined ref to inet_ntop,inet_pton on Windows XP. Submitted by: APOCAL@cpan.org * t/use.t: Fixed [cpan #75211] test redefinition warnings Submitted by: Manoj Kumar 2008-11-02 Hajimu UMEMOTO * Socket6.pm: Bump version number to 0.23. * Makefile.PL (configure_mswin32): Added a conditional #define for HAVE_INET_(PTON|NTOP) to make the module. Change was necessary because the SDK for Vista now includes inet_(pton|ntop) in ws2tcpip.h Submitted by: "David M. Town" * Makefile.PL (configure_mswin32): Added a line to #define HAVE_SOCKLEN_T since it is defined for MSWin32 Submitted by: "David M. Town" * Socket6.pm: Added @EXPORT_OK to export AF_INET6 and PF_INET6 if requested. This allows the use of the Socke6 module without having to perform the same conditional check that was added to avoid conflicts with the Socket module default exports (i.e. use Socket6 qw(AF_INET6 inet_pton inet_ntop); ) Submitted by: "David M. Town" * Socket6.pm (AUTOLOAD): Explicitly set $! = 0 before calling constant(). This should not be required since errno was being set to 0 in the C function, but Perl 5.10.0 Win32 Vista needed this to be done or all constants reported unsupported. Submitted by: "David M. Town" 2008-08-18 Hajimu UMEMOTO * Socket6.pm: Use strict environment. * Socket6.pm: Bump version number to 0.22. * Socket6.pm: Make AF_INET6 check actually work. Submitted by: Tatsuya Noda * Makefile.PL: Make sure to include config.pl in current directory. 2008-08-17 Hajimu UMEMOTO * Socket6.pm: Bump version number to 0.21. * Socket6.xs: Make it buildable on the following environment by defining WINVER as 0x0501: - Windows XP SP3 - ActivePerl-5.10.0.1003-MSWin32-x86-285500 - MinGW-5.1.4 - nmake 9.00.21022.08 (shipped with VisualStudio 2008 Express) Submitted by: "IWAMURO Motonori" 2008-02-16 Hajimu UMEMOTO * Socket6.pm: Bump version number to 0.20. * Socket6.pm: Make the AF_INET6 and PF_INET6 exports optional. They are exported from Socket on 5.10.0, and it contlicts with Socket6. PR: http://rt.cpan.org/Public/Bug/Display.html?id=32362 Reported by: "Shlomi Fish via RT" Submitted by: "KONDOU, Kazuhiro" 2008-01-27 Hajimu UMEMOTO * Socket6.xs, Socket6.pm: Make getaddrinfo() return the string error or the numeric value according to the context. Make getnameinfo() return error value. Export the EAI_* error constants. Submitted by: Paul LeoNerd Evans * Socket6.xs: FreeBSD 7 and later don't have KAME IPsec anymore. * Socket6.xs: gai_strerror() returns `const char *'. 2005-08-28 Hajimu UMEMOTO * Socket6.pm: Bump version number to 0.19. * Socket6.xs: the "sin6_scope_id" field of the "sockaddr_in6" structure is expected to passed and is returned in host byte order. Submitted by: "Town, David" 2005-03-28 Hajimu UMEMOTO * Socket6.pm: Bump version number to 0.18. * getaddrinfo.c (getaddrinfo): Support for AI_NUMERICSERV. * aclocal.m4: use Autoconf 2.59. 2004-07-14 Hajimu UMEMOTO * Socket6.pm: Fix documentation of the gethostbyname2. The gethostbyname2 function takes a FAMILY, not a SERVNAME. Reported by: Bernard Massot 2004-03-24 Hajimu UMEMOTO * Socket6.pm: Bump version number to 0.17. * Socket6.xs: Shut up signed/unsigned mismatch warning from Microsoft C++. Reported by: "David Town" * Makefile.PL: CC is not a valid parameter for WriteMakefile(). Use CONFIGURE instead. Submitted by: "David Town" * Socket6.pm: Correct typos (inaddr6_* -> in6addr_*). Submitted by: "David Town" 2004-03-23 Hajimu UMEMOTO * Provide substitutes for systems the lack support for inet_ntop() and inet_pton(). Submitted by: "David Town" * Add support for MSWin32. It was tested with the following configuration: - ActivePerl 5.8.0 (805) - Windows 2000 - Microsoft IPv6 Technology Preview for Windows 2000 (not needed for XP) (http://msdn.microsoft.com/downloads/sdks/platform/tpipv6.asp) - Microsoft Visual C++ v6.0 - Microsoft Platform SDK February 2003 (must have at least August 2001) (http://www.microsoft.com/msdownload/platformsdk/sdkupdate/downlevel.htm) Submitted by: "David Town" * t/use.t: Pass an empty string as the SERVICENAME to getaddrinfo(). MSWin32's getaddrinfo() doesn't like "0" as a numeric servname. Submitted by: "David Town" 2004-02-21 Hajimu UMEMOTO * Socket6.pm: Bump version number to 0.16. * aclocal.m4: inet_ntop and inet_pton are in libnsl on Solaris. Submitted by: Mike McCauley 2004-01-05 Hajimu UMEMOTO * Socket6.pm: Bump version number to 0.14. * gailookup.pl.in: Though some systems has NI_WITHSCOPEID, RFC 2553 doesn't mention it, and RFC 3493 deprecated it. So, make use of NI_WITHSCOPEID optional. * gailookup.pl.in: Add -S option which suppress scopeid. RFC 3493 system always adds scopeid in a result of getnameinfo(). * Socket6.xs: Make pack_sockaddr_in6() and pack_sockaddr_in6_all() actual work on systems which have sin6_len in struct sockaddr_in6. 2004-01-04 Hajimu UMEMOTO * aclocal.m4: getaddrinfo() is a macro on some systems. * Socket6.pm: Bump version number to 0.13. * getaddrinfo.c (getaddrinfo): EAI_NODATA was deprecated in RFC 3493. return EAI_NONAME instead. * getnameinfo.c (getnameinfo): add support for NI_NAMEREQD. 2003-12-29 Hajimu UMEMOTO * add simple test. 2003-10-28 Hajimu UMEMOTO * Bump version number to 0.12. * Socket6.pm: Mention that getipnodeby*() was deprecated in RFC3493. 2001-09-20 Hajimu UMEMOTO * getaddrinfo.c (getaddrinfo): Correct AI_PASSIVE parsing bug. Reported by: Rob Siemborski 2001-09-18 Hajimu UMEMOTO * Socket6.pm: Bump version number to 0.11. * getaddrinfo.c (getaddrinfo), gai.h: Add support of AI_NUMERICHOST. * getnameinfo.c (getnameinfo): Use socklen_t rather than size_t. * getnameinfo.c (getnameinfo): Fix buffer overflow problem. 2001-09-17 Hajimu UMEMOTO * Socket6.pm, Socket6.xs, config.h.in, configure.in: Add glue functions for getipnodeby*() and gai_strerror(). * Socket6.xs: inet_pton() should work as it is. * Socket6.xs: Better documentation of inet_pton() and inet_ntop(). * Socket6.pm: Description was filled. * Socket6.pm, Socket6.xs: Return an error message string if getaddrinfo() fails. Submitted by: Jeff Okamoto 2001-03-27 Hajimu UMEMOTO * Socket6.pm: Bump version number to 0.10. * Socket6.xs: Make compilable under OpenBSD. Though OpenBSD has KAME, OpenBSD doesn't have netinet6/ipsec.h. Reported by: Tim Ayers 2001-03-21 Hajimu UMEMOTO * Socket6.pm: Bump version number to 0.09. * aclocal.m4 (IPv6_CHECK_FUNC): There is getaddrinfo(3) in libsocket under Solaris8. Reported by: Tomohide Nagashima , TAKANO Yuji 2001-01-26 Hajimu UMEMOTO * Socket6.pm: - Fix typo in sample code. Reported by: Matsumura Naoki - Bump version number to 0.08. 2000-05-28 Hajimu UMEMOTO * Socket6.pm: Bump version number to 0.07. * getaddrinfo.c (getaddrinfo): - Add support for AI_CANONNAME. - Our fake version of getaddrinfo() only support IPv4. 2000-05-27 Hajimu UMEMOTO * Socket6.pm: More description. Submitted by: Jun-ichiro itojun Hagino * Socket6.xs (inet_ntop): Make inet_ntop() work with AF_INET. Submitted by: Jun-ichiro itojun Hagino 2000-05-01 Hajimu UMEMOTO * gailookup.pl.in: Add -c and -s option. 2000-04-15 Hajimu UMEMOTO * Makefile.PL: Cosmetic. 2000-04-12 Hajimu UMEMOTO * aclocal.m4: IPv6 related macros were improved. * configure.in: Use new macros. 2000-03-23 Hajimu UMEMOTO * getaddrinfo.c (gai_strerror): Add message for EAI_SERVICE. 2000-03-20 Hajimu UMEMOTO * Socket6.pm: Bump version number to 0.06. * config.pl.in: config.pl did not return a true value at Makefile.PL line 41. Reported by: Paul Schinder * config.pl.in: Don't use @PERLPATH@ and @CFLAGS@ values returns from configure. 2000-03-18 Hajimu UMEMOTO * Socket6.pm: Bump version number to 0.05. * Makefile.in: Provide a Makefile.PL that runs configure, so that things can be done in the usual Perl way. Pointed out by: Paul Schinder 2000-03-17 Hajimu UMEMOTO * Socket6.pm: Bump version number to 0.04. I changed convention of version number to n.nn. 2000-03-16 Hajimu UMEMOTO * acconfig.h: Define HAVE_PL_SV_UNDEF rather than use of CFLAGS. * Makefile.in: Added. Now, ExtUtils::MakeMaker generates Makefile.go. 2000-03-14 Hajimu UMEMOTO * configure.in: Use gcc if available. Cannot compile with traditional cc on some Linuxes due to illegal `const' definition: Debian GNU/Linux 2.1 (slink) : glibc-2.0.7 Debian GNU/Linux 2.2 (potato) : glibc-2.1.3 Submitted by: Hideaki YOSHIFUJI * gailookup.pl.in: Added. Rule for finding Perl and --with-perl option was also added to configure.in. Submitted by: Hideaki YOSHIFUJI * Socket6.xs: Add missing AI_NUMERICHOST. * Makefile.PL.in: Pass CFLAGS to C compiler. * configure.in: Separate functional blocks into aclocal.m4. 2000-03-10 Hajimu UMEMOTO * Socket6-0.3 is out. * getaddrinfo.c (getaddrinfo): Avoid core dump when protocol is not found in /etc/protocols or service is not found in /etc/services. * configure.in: Add check rule for PL_sv_undef. Somewhat old version of Perl5 uses sv_undef. * configure.in: Add check rules for sa_len and sin6_scope_id. Submitted by: Hideaki YOSHIFUJI * acconfig.h: Added to be able to use autoheader. Submitted by: Hideaki YOSHIFUJI 2000-03-09 Hajimu UMEMOTO * Socket6-0.2 was released for evaluate. Socket6-0.29/gai.h000644 003721 003721 00000002370 12702614646 013462 0ustar00umenoah000000 000000 /* * Mar 8, 2000 by Hajimu UMEMOTO * $Id: gai.h 125 2005-08-27 16:33:10Z ume $ * * This module is besed on ssh-1.2.27-IPv6-1.5 written by * KIKUCHI Takahiro */ /* * fake library for ssh * * This file is included in getaddrinfo.c and getnameinfo.c. * See getaddrinfo.c and getnameinfo.c. */ #ifndef _GAI_H_ #define _GAI_H_ /* for old netdb.h */ #ifndef EAI_SERVICE #define EAI_MEMORY 2 #define EAI_FAMILY 5 /* ai_family not supported */ #define EAI_NONAME 8 /* hostname nor servname provided, or not known */ #define EAI_SERVICE 9 /* servname not supported for ai_socktype */ #endif /* dummy value for old netdb.h */ #ifndef AI_PASSIVE #define AI_PASSIVE 1 #define AI_CANONNAME 2 #define AI_NUMERICHOST 4 #define AI_NUMERICSERV 8 #define NI_NUMERICHOST 2 #define NI_NAMEREQD 4 #define NI_NUMERICSERV 8 struct addrinfo { int ai_flags; /* AI_PASSIVE, AI_CANONNAME */ int ai_family; /* PF_xxx */ int ai_socktype; /* SOCK_xxx */ int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */ size_t ai_addrlen; /* length of ai_addr */ char *ai_canonname; /* canonical name for hostname */ struct sockaddr *ai_addr; /* binary address */ struct addrinfo *ai_next; /* next structure in linked list */ }; #endif #endif Socket6-0.29/inet_ntop.c000644 003721 003721 00000014247 12702614646 014722 0ustar00umenoah000000 000000 /* * Copyright (C) 1996-2001 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: inet_ntop.c 663 2016-03-22 16:08:54Z ume $ */ #define NS_INT16SZ 2 #define NS_IN6ADDRSZ 16 /* * WARNING: Don't even consider trying to compile this on a system where * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX. */ #ifdef HAVE_SOCKLEN_T #define SOCKLEN_T socklen_t #else #define SOCKLEN_T size_t #endif static const char *inet_ntop4(const unsigned char *src, char *dst, size_t size); #ifdef AF_INET6 static const char *inet_ntop6(const unsigned char *src, char *dst, size_t size); #endif /* char * * isc_net_ntop(af, src, dst, size) * convert a network format address to presentation format. * return: * pointer to presentation format address (`dst'), or NULL (see errno). * author: * Paul Vixie, 1996. */ const char * inet_ntop(int af, const void *src, char *dst, SOCKLEN_T size) { switch (af) { case AF_INET: return (inet_ntop4(src, dst, (size_t)size)); #ifdef AF_INET6 case AF_INET6: return (inet_ntop6(src, dst, (size_t)size)); #endif default: errno = EAFNOSUPPORT; return (NULL); } /* NOTREACHED */ } /* const char * * inet_ntop4(src, dst, size) * format an IPv4 address * return: * `dst' (as a const) * notes: * (1) uses no statics * (2) takes a unsigned char* not an in_addr as input * author: * Paul Vixie, 1996. */ static const char * inet_ntop4(const unsigned char *src, char *dst, size_t size) { static const char *fmt = "%u.%u.%u.%u"; char tmp[sizeof "255.255.255.255"]; if ((size_t)sprintf(tmp, fmt, src[0], src[1], src[2], src[3]) >= size) { errno = ENOSPC; return (NULL); } strcpy(dst, tmp); return (dst); } /* const char * * isc_inet_ntop6(src, dst, size) * convert IPv6 binary address into presentation (printable) format * author: * Paul Vixie, 1996. */ #ifdef AF_INET6 static const char * inet_ntop6(const unsigned char *src, char *dst, size_t size) { /* * Note that int32_t and int16_t need only be "at least" large enough * to contain a value of the specified size. On some systems, like * Crays, there is no such thing as an integer variable with 16 bits. * Keep this in mind if you think this function should have been coded * to use pointer overlays. All the world's not a VAX. */ char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"], *tp; struct { int base, len; } best, cur; unsigned int words[NS_IN6ADDRSZ / NS_INT16SZ]; int i; /* * Preprocess: * Copy the input (bytewise) array into a wordwise array. * Find the longest run of 0x00's in src[] for :: shorthanding. */ memset(words, '\0', sizeof words); for (i = 0; i < NS_IN6ADDRSZ; i++) words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3)); best.base = -1; cur.base = -1; for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) { if (words[i] == 0) { if (cur.base == -1) cur.base = i, cur.len = 1; else cur.len++; } else { if (cur.base != -1) { if (best.base == -1 || cur.len > best.len) best = cur; cur.base = -1; } } } if (cur.base != -1) { if (best.base == -1 || cur.len > best.len) best = cur; } if (best.base != -1 && best.len < 2) best.base = -1; /* * Format the result. */ tp = tmp; for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) { /* Are we inside the best run of 0x00's? */ if (best.base != -1 && i >= best.base && i < (best.base + best.len)) { if (i == best.base) *tp++ = ':'; continue; } /* Are we following an initial run of 0x00s or any real hex? */ if (i != 0) *tp++ = ':'; /* Is this address an encapsulated IPv4? */ if (i == 6 && best.base == 0 && (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) { if (!inet_ntop4(src+12, tp, sizeof tmp - (tp - tmp))) return (NULL); tp += strlen(tp); break; } tp += sprintf(tp, "%x", words[i]); } /* Was it a trailing run of 0x00's? */ if (best.base != -1 && (best.base + best.len) == (NS_IN6ADDRSZ / NS_INT16SZ)) *tp++ = ':'; *tp++ = '\0'; /* * Check for overflow, copy, and we're done. */ if ((size_t)(tp - tmp) > size) { errno = ENOSPC; return (NULL); } strcpy(dst, tmp); return (dst); } #endif /* AF_INET6 */ Socket6-0.29/t/use.t000644 003721 003721 00000005521 12702614646 013776 0ustar00umenoah000000 000000 #!/usr/bin/env perl -w # Copyright (C) 2003 Hajimu UMEMOTO . # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. Neither the name of the project nor the names of its contributors # may be used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # $Id: use.t 662 2016-03-22 16:03:49Z ume $ use strict; use Test; eval 'use Socket qw(AF_INET AF_INET6 SOCK_STREAM)'; if ($@) { use Socket qw(AF_INET SOCK_STREAM); } BEGIN { plan tests => 9 } use Socket6; ok(1); my @tmp = getaddrinfo("localhost", "", AF_INET, SOCK_STREAM, 0, 0); if ($#tmp >= 1) { ok(2); } my($family, $socktype, $protocol, $sin, $canonname) = splice(@tmp, $[, 5); my($addr, $port) = getnameinfo($sin, NI_NUMERICHOST | NI_NUMERICSERV); if ($addr eq "127.0.0.1" && $port eq "0") { ok(3); } my $af_inet6 = eval('AF_INET6'); my $unless_inet6 = !defined($af_inet6) ? 'Skip if not defined AF_INET6' : ''; skip($unless_inet6, sub { inet_ntop($af_inet6, inet_pton($af_inet6, "::")), "::" }); # this fails under darwin skip($unless_inet6, sub { inet_ntop($af_inet6, inet_pton($af_inet6, "::21")), "::21" }) or print "# ", unpack("H*", inet_pton($af_inet6, "::21")), "\n"; skip($unless_inet6, sub { inet_ntop($af_inet6, inet_pton($af_inet6, "43::")), "43::" }); skip($unless_inet6, sub { inet_ntop($af_inet6, inet_pton($af_inet6, "1:2:3:4:5:6:7::")), "1:2:3:4:5:6:7:0" }); skip($unless_inet6, sub { inet_ntop($af_inet6, inet_pton($af_inet6, "1::8")), "1::8" }); skip($unless_inet6, sub { inet_ntop($af_inet6, inet_pton($af_inet6, "FF00::FFFF")), "ff00::ffff" });