Socket6-0.25/000755 003721 003721 00000000000 12251125611 012527 5ustar00umenoah000000 000000 Socket6-0.25/Makefile.PL000644 003721 003721 00000007534 12251125264 014516 0ustar00umenoah000000 000000 # Copyright (C) 2000-2013 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,v 1.12 2013/12/08 17:21:56 ume Exp $ use Config; use ExtUtils::MakeMaker; if ($^O eq 'MSWin32') { configure_mswin32(); } else { my $path_perl = ($^X =~ m!^/!o) ? $^X : `which $^X`; my $cmd = "CC='$Config{cc}' CFLAGS='$Config{ccflags}' ./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.25/META.yml000644 003721 003721 00000000651 12251125611 014002 0ustar00umenoah000000 000000 --- abstract: unknown author: - unknown build_requires: ExtUtils::MakeMaker: 0 configure_requires: ExtUtils::MakeMaker: 0 dynamic_config: 1 generated_by: 'ExtUtils::MakeMaker version 6.6302, CPAN::Meta::Converter version 2.120630' 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 requires: {} version: 0.25 Socket6-0.25/configure000755 003721 003721 00000572473 10304112551 014454 0ustar00umenoah000000 000000 #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59. # # Copyright (C) 2003 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 Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; 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 # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # 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 # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. 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 ;; 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 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # 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 sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # 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'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="Socket6.pm" ac_unique_file="Socket6.pm" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT perl CPP EGREP DEFINES INET6LIBS PERLPATH LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # 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. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= 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 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -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 | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$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 ;; -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 ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) 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 ;; -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_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=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 ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && 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'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac 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 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 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 # 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 its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | 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 if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP # # 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 \`..'] _ACEOF cat <<_ACEOF 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] --datadir=DIR read-only architecture-independent data [PREFIX/share] --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] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _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 CPPFLAGS 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. _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style 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 elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF Copyright (C) 2003 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 0 fi exec 5>config.log cat >&5 <<_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.59. Invocation command line was $ $0 $@ _ACEOF { 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` hostinfo = `(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=. echo "PATH: $as_dir" done } >&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_sep= 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=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$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 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export 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: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >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 # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" 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. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 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 `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; 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,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 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 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`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. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } 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 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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_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" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done 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 echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl 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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out 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. echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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 | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$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 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* 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 -std1 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 -std1. */ int osf4_cc_array ['\x00' == 0 ? 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 # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 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 or --without-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 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_perl+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_perl="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi perl=$ac_cv_path_perl if test -n "$perl"; then echo "$as_me:$LINENO: result: $perl" >&5 echo "${ECHO_T}$perl" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$perl" && break done fi; if test x"$ac_cv_path_perl" = x""; then { { echo "$as_me:$LINENO: error: Cannot find perl; please use --with-perl=/path/to/perl option." >&5 echo "$as_me: error: Cannot find perl; please use --with-perl=/path/to/perl option." >&2;} { (exit 1); exit 1; }; } fi PERLPATH=$ac_cv_path_perl echo "$as_me:$LINENO: checking whether your Perl5 have PL_sv_undef" >&5 echo $ECHO_N "checking whether your Perl5 have PL_sv_undef... $ECHO_C" >&6 if test "${socket6_cv_pl_sv_undef+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_PL_SV_UNDEF 1 _ACEOF else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f 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 echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } 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 echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep echo "$as_me:$LINENO: checking for getaddrinfo" >&5 echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6 if test "${ac_cv_func_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define getaddrinfo to an innocuous variant, in case declares getaddrinfo. For example, HP-UX 11i declares gettimeofday. */ #define getaddrinfo innocuous_getaddrinfo /* System header to define __stub macros and hopefully few prototypes, which can conflict with char getaddrinfo (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef getaddrinfo /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getaddrinfo (); /* 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_getaddrinfo) || defined (__stub___getaddrinfo) choke me #else char (*f) () = getaddrinfo; #endif #ifdef __cplusplus } #endif int main () { return f != getaddrinfo; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_getaddrinfo=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6 if test $ac_cv_func_getaddrinfo = yes; then ac_cv_lib_socket_getaddrinfo=no ac_cv_lib_inet6_getaddrinfo=no else echo "$as_me:$LINENO: checking for getaddrinfo in -lsocket" >&5 echo $ECHO_N "checking for getaddrinfo in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getaddrinfo (); int main () { getaddrinfo (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_getaddrinfo=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getaddrinfo" >&5 echo "${ECHO_T}$ac_cv_lib_socket_getaddrinfo" >&6 if test $ac_cv_lib_socket_getaddrinfo = yes; then LIBS="$LIBS -lsocket -lnsl" ac_cv_lib_inet6_getaddrinfo=no else echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5 echo $ECHO_N "checking whether your system has IPv6 directory... $ECHO_C" >&6 if test "${ipv6_cv_dir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5 echo "${ECHO_T}$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 echo "$as_me:$LINENO: checking for getaddrinfo in -linet6" >&5 echo $ECHO_N "checking for getaddrinfo in -linet6... $ECHO_C" >&6 if test "${ac_cv_lib_inet6_getaddrinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-linet6 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getaddrinfo (); int main () { getaddrinfo (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_inet6_getaddrinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_inet6_getaddrinfo=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_getaddrinfo" >&5 echo "${ECHO_T}$ac_cv_lib_inet6_getaddrinfo" >&6 if test $ac_cv_lib_inet6_getaddrinfo = yes; 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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=`echo "ac_cv_func_${ipv6_cv_pfx}getaddrinfo" | $as_tr_sh` echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}getaddrinfo" >&5 echo $ECHO_N "checking for ${ipv6_cv_pfx}getaddrinfo... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define ${ipv6_cv_pfx}getaddrinfo to an innocuous variant, in case declares ${ipv6_cv_pfx}getaddrinfo. For example, HP-UX 11i declares gettimeofday. */ #define ${ipv6_cv_pfx}getaddrinfo innocuous_${ipv6_cv_pfx}getaddrinfo /* System header to define __stub macros and hopefully few prototypes, which can conflict with char ${ipv6_cv_pfx}getaddrinfo (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef ${ipv6_cv_pfx}getaddrinfo /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char ${ipv6_cv_pfx}getaddrinfo (); /* 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_${ipv6_cv_pfx}getaddrinfo) || defined (__stub___${ipv6_cv_pfx}getaddrinfo) choke me #else char (*f) () = ${ipv6_cv_pfx}getaddrinfo; #endif #ifdef __cplusplus } #endif int main () { return f != ${ipv6_cv_pfx}getaddrinfo; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 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 echo "$as_me:$LINENO: checking for getnameinfo" >&5 echo $ECHO_N "checking for getnameinfo... $ECHO_C" >&6 if test "${ac_cv_func_getnameinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define getnameinfo to an innocuous variant, in case declares getnameinfo. For example, HP-UX 11i declares gettimeofday. */ #define getnameinfo innocuous_getnameinfo /* System header to define __stub macros and hopefully few prototypes, which can conflict with char getnameinfo (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef getnameinfo /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getnameinfo (); /* 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_getnameinfo) || defined (__stub___getnameinfo) choke me #else char (*f) () = getnameinfo; #endif #ifdef __cplusplus } #endif int main () { return f != getnameinfo; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_getnameinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_getnameinfo=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_getnameinfo" >&5 echo "${ECHO_T}$ac_cv_func_getnameinfo" >&6 if test $ac_cv_func_getnameinfo = yes; then ac_cv_lib_socket_getnameinfo=no ac_cv_lib_inet6_getnameinfo=no else echo "$as_me:$LINENO: checking for getnameinfo in -lsocket" >&5 echo $ECHO_N "checking for getnameinfo in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_getnameinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getnameinfo (); int main () { getnameinfo (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_getnameinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_getnameinfo=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getnameinfo" >&5 echo "${ECHO_T}$ac_cv_lib_socket_getnameinfo" >&6 if test $ac_cv_lib_socket_getnameinfo = yes; then LIBS="$LIBS -lsocket -lnsl" ac_cv_lib_inet6_getnameinfo=no else echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5 echo $ECHO_N "checking whether your system has IPv6 directory... $ECHO_C" >&6 if test "${ipv6_cv_dir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5 echo "${ECHO_T}$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 echo "$as_me:$LINENO: checking for getnameinfo in -linet6" >&5 echo $ECHO_N "checking for getnameinfo in -linet6... $ECHO_C" >&6 if test "${ac_cv_lib_inet6_getnameinfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-linet6 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getnameinfo (); int main () { getnameinfo (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_inet6_getnameinfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_inet6_getnameinfo=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_getnameinfo" >&5 echo "${ECHO_T}$ac_cv_lib_inet6_getnameinfo" >&6 if test $ac_cv_lib_inet6_getnameinfo = yes; 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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=`echo "ac_cv_func_${ipv6_cv_pfx}getnameinfo" | $as_tr_sh` echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}getnameinfo" >&5 echo $ECHO_N "checking for ${ipv6_cv_pfx}getnameinfo... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define ${ipv6_cv_pfx}getnameinfo to an innocuous variant, in case declares ${ipv6_cv_pfx}getnameinfo. For example, HP-UX 11i declares gettimeofday. */ #define ${ipv6_cv_pfx}getnameinfo innocuous_${ipv6_cv_pfx}getnameinfo /* System header to define __stub macros and hopefully few prototypes, which can conflict with char ${ipv6_cv_pfx}getnameinfo (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef ${ipv6_cv_pfx}getnameinfo /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char ${ipv6_cv_pfx}getnameinfo (); /* 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_${ipv6_cv_pfx}getnameinfo) || defined (__stub___${ipv6_cv_pfx}getnameinfo) choke me #else char (*f) () = ${ipv6_cv_pfx}getnameinfo; #endif #ifdef __cplusplus } #endif int main () { return f != ${ipv6_cv_pfx}getnameinfo; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 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 echo "$as_me:$LINENO: checking for gethostbyname2" >&5 echo $ECHO_N "checking for gethostbyname2... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname2+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define gethostbyname2 to an innocuous variant, in case declares gethostbyname2. For example, HP-UX 11i declares gettimeofday. */ #define gethostbyname2 innocuous_gethostbyname2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gethostbyname2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef gethostbyname2 /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname2 (); /* 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_gethostbyname2) || defined (__stub___gethostbyname2) choke me #else char (*f) () = gethostbyname2; #endif #ifdef __cplusplus } #endif int main () { return f != gethostbyname2; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_gethostbyname2=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_gethostbyname2=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname2" >&5 echo "${ECHO_T}$ac_cv_func_gethostbyname2" >&6 if test $ac_cv_func_gethostbyname2 = yes; then ac_cv_lib_socket_gethostbyname2=no ac_cv_lib_inet6_gethostbyname2=no else echo "$as_me:$LINENO: checking for gethostbyname2 in -lsocket" >&5 echo $ECHO_N "checking for gethostbyname2 in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_gethostbyname2+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname2 (); int main () { gethostbyname2 (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_gethostbyname2=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_gethostbyname2=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_gethostbyname2" >&5 echo "${ECHO_T}$ac_cv_lib_socket_gethostbyname2" >&6 if test $ac_cv_lib_socket_gethostbyname2 = yes; then LIBS="$LIBS -lsocket -lnsl" ac_cv_lib_inet6_gethostbyname2=no else echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5 echo $ECHO_N "checking whether your system has IPv6 directory... $ECHO_C" >&6 if test "${ipv6_cv_dir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5 echo "${ECHO_T}$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 echo "$as_me:$LINENO: checking for gethostbyname2 in -linet6" >&5 echo $ECHO_N "checking for gethostbyname2 in -linet6... $ECHO_C" >&6 if test "${ac_cv_lib_inet6_gethostbyname2+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-linet6 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname2 (); int main () { gethostbyname2 (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_inet6_gethostbyname2=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_inet6_gethostbyname2=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_gethostbyname2" >&5 echo "${ECHO_T}$ac_cv_lib_inet6_gethostbyname2" >&6 if test $ac_cv_lib_inet6_gethostbyname2 = yes; 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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=`echo "ac_cv_func_${ipv6_cv_pfx}gethostbyname2" | $as_tr_sh` echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}gethostbyname2" >&5 echo $ECHO_N "checking for ${ipv6_cv_pfx}gethostbyname2... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define ${ipv6_cv_pfx}gethostbyname2 to an innocuous variant, in case declares ${ipv6_cv_pfx}gethostbyname2. For example, HP-UX 11i declares gettimeofday. */ #define ${ipv6_cv_pfx}gethostbyname2 innocuous_${ipv6_cv_pfx}gethostbyname2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char ${ipv6_cv_pfx}gethostbyname2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef ${ipv6_cv_pfx}gethostbyname2 /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char ${ipv6_cv_pfx}gethostbyname2 (); /* 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_${ipv6_cv_pfx}gethostbyname2) || defined (__stub___${ipv6_cv_pfx}gethostbyname2) choke me #else char (*f) () = ${ipv6_cv_pfx}gethostbyname2; #endif #ifdef __cplusplus } #endif int main () { return f != ${ipv6_cv_pfx}gethostbyname2; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 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 echo "$as_me:$LINENO: checking for getipnodebyname" >&5 echo $ECHO_N "checking for getipnodebyname... $ECHO_C" >&6 if test "${ac_cv_func_getipnodebyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define getipnodebyname to an innocuous variant, in case declares getipnodebyname. For example, HP-UX 11i declares gettimeofday. */ #define getipnodebyname innocuous_getipnodebyname /* System header to define __stub macros and hopefully few prototypes, which can conflict with char getipnodebyname (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef getipnodebyname /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getipnodebyname (); /* 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_getipnodebyname) || defined (__stub___getipnodebyname) choke me #else char (*f) () = getipnodebyname; #endif #ifdef __cplusplus } #endif int main () { return f != getipnodebyname; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_getipnodebyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_getipnodebyname=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_getipnodebyname" >&5 echo "${ECHO_T}$ac_cv_func_getipnodebyname" >&6 if test $ac_cv_func_getipnodebyname = yes; then ac_cv_lib_socket_getipnodebyname=no ac_cv_lib_inet6_getipnodebyname=no else echo "$as_me:$LINENO: checking for getipnodebyname in -lsocket" >&5 echo $ECHO_N "checking for getipnodebyname in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_getipnodebyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getipnodebyname (); int main () { getipnodebyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_getipnodebyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_getipnodebyname=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getipnodebyname" >&5 echo "${ECHO_T}$ac_cv_lib_socket_getipnodebyname" >&6 if test $ac_cv_lib_socket_getipnodebyname = yes; then LIBS="$LIBS -lsocket -lnsl" ac_cv_lib_inet6_getipnodebyname=no else echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5 echo $ECHO_N "checking whether your system has IPv6 directory... $ECHO_C" >&6 if test "${ipv6_cv_dir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5 echo "${ECHO_T}$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 echo "$as_me:$LINENO: checking for getipnodebyname in -linet6" >&5 echo $ECHO_N "checking for getipnodebyname in -linet6... $ECHO_C" >&6 if test "${ac_cv_lib_inet6_getipnodebyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-linet6 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getipnodebyname (); int main () { getipnodebyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_inet6_getipnodebyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_inet6_getipnodebyname=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_getipnodebyname" >&5 echo "${ECHO_T}$ac_cv_lib_inet6_getipnodebyname" >&6 if test $ac_cv_lib_inet6_getipnodebyname = yes; 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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=`echo "ac_cv_func_${ipv6_cv_pfx}getipnodebyname" | $as_tr_sh` echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}getipnodebyname" >&5 echo $ECHO_N "checking for ${ipv6_cv_pfx}getipnodebyname... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define ${ipv6_cv_pfx}getipnodebyname to an innocuous variant, in case declares ${ipv6_cv_pfx}getipnodebyname. For example, HP-UX 11i declares gettimeofday. */ #define ${ipv6_cv_pfx}getipnodebyname innocuous_${ipv6_cv_pfx}getipnodebyname /* System header to define __stub macros and hopefully few prototypes, which can conflict with char ${ipv6_cv_pfx}getipnodebyname (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef ${ipv6_cv_pfx}getipnodebyname /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char ${ipv6_cv_pfx}getipnodebyname (); /* 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_${ipv6_cv_pfx}getipnodebyname) || defined (__stub___${ipv6_cv_pfx}getipnodebyname) choke me #else char (*f) () = ${ipv6_cv_pfx}getipnodebyname; #endif #ifdef __cplusplus } #endif int main () { return f != ${ipv6_cv_pfx}getipnodebyname; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 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 echo "$as_me:$LINENO: checking for getipnodebyaddr" >&5 echo $ECHO_N "checking for getipnodebyaddr... $ECHO_C" >&6 if test "${ac_cv_func_getipnodebyaddr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define getipnodebyaddr to an innocuous variant, in case declares getipnodebyaddr. For example, HP-UX 11i declares gettimeofday. */ #define getipnodebyaddr innocuous_getipnodebyaddr /* System header to define __stub macros and hopefully few prototypes, which can conflict with char getipnodebyaddr (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef getipnodebyaddr /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getipnodebyaddr (); /* 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_getipnodebyaddr) || defined (__stub___getipnodebyaddr) choke me #else char (*f) () = getipnodebyaddr; #endif #ifdef __cplusplus } #endif int main () { return f != getipnodebyaddr; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_getipnodebyaddr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_getipnodebyaddr=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_getipnodebyaddr" >&5 echo "${ECHO_T}$ac_cv_func_getipnodebyaddr" >&6 if test $ac_cv_func_getipnodebyaddr = yes; then ac_cv_lib_socket_getipnodebyaddr=no ac_cv_lib_inet6_getipnodebyaddr=no else echo "$as_me:$LINENO: checking for getipnodebyaddr in -lsocket" >&5 echo $ECHO_N "checking for getipnodebyaddr in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_getipnodebyaddr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getipnodebyaddr (); int main () { getipnodebyaddr (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_getipnodebyaddr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_getipnodebyaddr=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getipnodebyaddr" >&5 echo "${ECHO_T}$ac_cv_lib_socket_getipnodebyaddr" >&6 if test $ac_cv_lib_socket_getipnodebyaddr = yes; then LIBS="$LIBS -lsocket -lnsl" ac_cv_lib_inet6_getipnodebyaddr=no else echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5 echo $ECHO_N "checking whether your system has IPv6 directory... $ECHO_C" >&6 if test "${ipv6_cv_dir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5 echo "${ECHO_T}$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 echo "$as_me:$LINENO: checking for getipnodebyaddr in -linet6" >&5 echo $ECHO_N "checking for getipnodebyaddr in -linet6... $ECHO_C" >&6 if test "${ac_cv_lib_inet6_getipnodebyaddr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-linet6 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getipnodebyaddr (); int main () { getipnodebyaddr (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_inet6_getipnodebyaddr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_inet6_getipnodebyaddr=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_getipnodebyaddr" >&5 echo "${ECHO_T}$ac_cv_lib_inet6_getipnodebyaddr" >&6 if test $ac_cv_lib_inet6_getipnodebyaddr = yes; 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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=`echo "ac_cv_func_${ipv6_cv_pfx}getipnodebyaddr" | $as_tr_sh` echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}getipnodebyaddr" >&5 echo $ECHO_N "checking for ${ipv6_cv_pfx}getipnodebyaddr... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define ${ipv6_cv_pfx}getipnodebyaddr to an innocuous variant, in case declares ${ipv6_cv_pfx}getipnodebyaddr. For example, HP-UX 11i declares gettimeofday. */ #define ${ipv6_cv_pfx}getipnodebyaddr innocuous_${ipv6_cv_pfx}getipnodebyaddr /* System header to define __stub macros and hopefully few prototypes, which can conflict with char ${ipv6_cv_pfx}getipnodebyaddr (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef ${ipv6_cv_pfx}getipnodebyaddr /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char ${ipv6_cv_pfx}getipnodebyaddr (); /* 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_${ipv6_cv_pfx}getipnodebyaddr) || defined (__stub___${ipv6_cv_pfx}getipnodebyaddr) choke me #else char (*f) () = ${ipv6_cv_pfx}getipnodebyaddr; #endif #ifdef __cplusplus } #endif int main () { return f != ${ipv6_cv_pfx}getipnodebyaddr; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 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 echo "$as_me:$LINENO: checking for inet_pton" >&5 echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6 if test "${ac_cv_func_inet_pton+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define inet_pton to an innocuous variant, in case declares inet_pton. For example, HP-UX 11i declares gettimeofday. */ #define inet_pton innocuous_inet_pton /* System header to define __stub macros and hopefully few prototypes, which can conflict with char inet_pton (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef inet_pton /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char inet_pton (); /* 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_inet_pton) || defined (__stub___inet_pton) choke me #else char (*f) () = inet_pton; #endif #ifdef __cplusplus } #endif int main () { return f != inet_pton; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_inet_pton=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_inet_pton=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_inet_pton" >&5 echo "${ECHO_T}$ac_cv_func_inet_pton" >&6 if test $ac_cv_func_inet_pton = yes; then ac_cv_lib_socket_inet_pton=no ac_cv_lib_inet6_inet_pton=no else echo "$as_me:$LINENO: checking for inet_pton in -lsocket" >&5 echo $ECHO_N "checking for inet_pton in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_inet_pton+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char inet_pton (); int main () { inet_pton (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_inet_pton=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_inet_pton=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_inet_pton" >&5 echo "${ECHO_T}$ac_cv_lib_socket_inet_pton" >&6 if test $ac_cv_lib_socket_inet_pton = yes; then LIBS="$LIBS -lsocket -lnsl" ac_cv_lib_inet6_inet_pton=no else echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5 echo $ECHO_N "checking whether your system has IPv6 directory... $ECHO_C" >&6 if test "${ipv6_cv_dir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5 echo "${ECHO_T}$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 echo "$as_me:$LINENO: checking for inet_pton in -linet6" >&5 echo $ECHO_N "checking for inet_pton in -linet6... $ECHO_C" >&6 if test "${ac_cv_lib_inet6_inet_pton+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-linet6 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char inet_pton (); int main () { inet_pton (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_inet6_inet_pton=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_inet6_inet_pton=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_inet_pton" >&5 echo "${ECHO_T}$ac_cv_lib_inet6_inet_pton" >&6 if test $ac_cv_lib_inet6_inet_pton = yes; 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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=`echo "ac_cv_func_${ipv6_cv_pfx}inet_pton" | $as_tr_sh` echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}inet_pton" >&5 echo $ECHO_N "checking for ${ipv6_cv_pfx}inet_pton... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define ${ipv6_cv_pfx}inet_pton to an innocuous variant, in case declares ${ipv6_cv_pfx}inet_pton. For example, HP-UX 11i declares gettimeofday. */ #define ${ipv6_cv_pfx}inet_pton innocuous_${ipv6_cv_pfx}inet_pton /* System header to define __stub macros and hopefully few prototypes, which can conflict with char ${ipv6_cv_pfx}inet_pton (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef ${ipv6_cv_pfx}inet_pton /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char ${ipv6_cv_pfx}inet_pton (); /* 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_${ipv6_cv_pfx}inet_pton) || defined (__stub___${ipv6_cv_pfx}inet_pton) choke me #else char (*f) () = ${ipv6_cv_pfx}inet_pton; #endif #ifdef __cplusplus } #endif int main () { return f != ${ipv6_cv_pfx}inet_pton; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 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 echo "$as_me:$LINENO: checking for inet_ntop" >&5 echo $ECHO_N "checking for inet_ntop... $ECHO_C" >&6 if test "${ac_cv_func_inet_ntop+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define inet_ntop to an innocuous variant, in case declares inet_ntop. For example, HP-UX 11i declares gettimeofday. */ #define inet_ntop innocuous_inet_ntop /* System header to define __stub macros and hopefully few prototypes, which can conflict with char inet_ntop (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef inet_ntop /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char inet_ntop (); /* 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_inet_ntop) || defined (__stub___inet_ntop) choke me #else char (*f) () = inet_ntop; #endif #ifdef __cplusplus } #endif int main () { return f != inet_ntop; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_inet_ntop=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_inet_ntop=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_inet_ntop" >&5 echo "${ECHO_T}$ac_cv_func_inet_ntop" >&6 if test $ac_cv_func_inet_ntop = yes; then ac_cv_lib_socket_inet_ntop=no ac_cv_lib_inet6_inet_ntop=no else echo "$as_me:$LINENO: checking for inet_ntop in -lsocket" >&5 echo $ECHO_N "checking for inet_ntop in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_inet_ntop+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char inet_ntop (); int main () { inet_ntop (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_inet_ntop=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_inet_ntop=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_inet_ntop" >&5 echo "${ECHO_T}$ac_cv_lib_socket_inet_ntop" >&6 if test $ac_cv_lib_socket_inet_ntop = yes; then LIBS="$LIBS -lsocket -lnsl" ac_cv_lib_inet6_inet_ntop=no else echo "$as_me:$LINENO: checking whether your system has IPv6 directory" >&5 echo $ECHO_N "checking whether your system has IPv6 directory... $ECHO_C" >&6 if test "${ipv6_cv_dir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 echo "$as_me:$LINENO: result: $ipv6_cv_dir" >&5 echo "${ECHO_T}$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 echo "$as_me:$LINENO: checking for inet_ntop in -linet6" >&5 echo $ECHO_N "checking for inet_ntop in -linet6... $ECHO_C" >&6 if test "${ac_cv_lib_inet6_inet_ntop+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-linet6 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char inet_ntop (); int main () { inet_ntop (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_inet6_inet_ntop=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_inet6_inet_ntop=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_inet6_inet_ntop" >&5 echo "${ECHO_T}$ac_cv_lib_inet6_inet_ntop" >&6 if test $ac_cv_lib_inet6_inet_ntop = yes; 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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=`echo "ac_cv_func_${ipv6_cv_pfx}inet_ntop" | $as_tr_sh` echo "$as_me:$LINENO: checking for ${ipv6_cv_pfx}inet_ntop" >&5 echo $ECHO_N "checking for ${ipv6_cv_pfx}inet_ntop... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define ${ipv6_cv_pfx}inet_ntop to an innocuous variant, in case declares ${ipv6_cv_pfx}inet_ntop. For example, HP-UX 11i declares gettimeofday. */ #define ${ipv6_cv_pfx}inet_ntop innocuous_${ipv6_cv_pfx}inet_ntop /* System header to define __stub macros and hopefully few prototypes, which can conflict with char ${ipv6_cv_pfx}inet_ntop (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef ${ipv6_cv_pfx}inet_ntop /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char ${ipv6_cv_pfx}inet_ntop (); /* 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_${ipv6_cv_pfx}inet_ntop) || defined (__stub___${ipv6_cv_pfx}inet_ntop) choke me #else char (*f) () = ${ipv6_cv_pfx}inet_ntop; #endif #ifdef __cplusplus } #endif int main () { return f != ${ipv6_cv_pfx}inet_ntop; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 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 echo "$as_me:$LINENO: checking whether you have sa_len in struct sockaddr" >&5 echo $ECHO_N "checking whether you have sa_len in struct sockaddr... $ECHO_C" >&6 if test "${ipv6_cv_sa_len+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { struct sockaddr sa; int i = sa.sa_len; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ipv6_cv_sa_len=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ipv6_cv_sa_len=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ipv6_cv_sa_len = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SOCKADDR_SA_LEN 1 _ACEOF else : fi echo "$as_me:$LINENO: result: $ipv6_cv_sa_len" >&5 echo "${ECHO_T}$ipv6_cv_sa_len" >&6 echo "$as_me:$LINENO: checking whether you have sin6_scope_id in struct sockaddr_in6" >&5 echo $ECHO_N "checking whether you have sin6_scope_id in struct sockaddr_in6... $ECHO_C" >&6 if test "${ipv6_cv_sin6_scope_id+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { struct sockaddr_in6 sin6; int i = sin6.sin6_scope_id; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ipv6_cv_sin6_scope_id=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ipv6_cv_sin6_scope_id=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ipv6_cv_sin6_scope_id = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1 _ACEOF else : fi echo "$as_me:$LINENO: result: $ipv6_cv_sin6_scope_id" >&5 echo "${ECHO_T}$ipv6_cv_sin6_scope_id" >&6 echo "$as_me:$LINENO: checking for socklen_t" >&5 echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 if test "${ipv6_cv_socklen_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { socklen_t len = 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ipv6_cv_socklen_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ipv6_cv_socklen_t=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test $ipv6_cv_socklen_t = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SOCKLEN_T 1 _ACEOF else : fi echo "$as_me:$LINENO: result: $ipv6_cv_socklen_t" >&5 echo "${ECHO_T}$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, don't put newlines in cache variables' values. # 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. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *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 \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" 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}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ 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[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $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} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; 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 # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # 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 # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. 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 ;; 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 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # 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 sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # 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'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by $as_me, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet 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 ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. 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=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; 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 if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "config.pl" ) CONFIG_FILES="$CONFIG_FILES config.pl" ;; "gailookup.pl" ) CONFIG_FILES="$CONFIG_FILES gailookup.pl" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; 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 to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@perl@,$perl,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t s,@DEFINES@,$DEFINES,;t t s,@INET6LIBS@,$INET6LIBS,;t t s,@PERLPATH@,$PERLPATH,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # 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. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;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,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } # Do quote $f, to prevent DOS paths from being IFS'd. echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #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. cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # 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. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # 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 || { (exit 1); exit 1; } fi Socket6-0.25/ChangeLog000644 003721 003721 00000026266 12251125372 014321 0ustar00umenoah000000 000000 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.25/Socket6.pm000644 003721 003721 00000023075 12251125454 014417 0ustar00umenoah000000 000000 # Copyright (C) 2000-2013 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,v 1.51 2013/12/08 17:23:56 ume Exp $ package Socket6; use strict; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $AUTOLOAD); $VERSION = "0.25"; =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.25/Socket6.xs000644 003721 003721 00000050352 11051602204 014421 0ustar00umenoah000000 000000 /* * Socket6.xs * $Id: Socket6.xs,v 1.29 2008/08/16 16:47:00 ume Exp $ * * Copyright (C) 2000-2008 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 # include # elif !defined(__OpenBSD__) # 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" #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, sizeof addr, 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.25/im-140.diff000644 003721 003721 00000010326 07351404125 014277 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.25/inet_pton.c000644 003721 003721 00000015406 10015150054 014673 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. */ #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.25/META.json000644 003721 003721 00000001423 12251125611 014150 0ustar00umenoah000000 000000 { "abstract" : "unknown", "author" : [ "unknown" ], "dynamic_config" : 1, "generated_by" : "ExtUtils::MakeMaker version 6.6302, CPAN::Meta::Converter version 2.120630", "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" } }, "runtime" : { "requires" : {} } }, "release_status" : "stable", "version" : "0.25" } Socket6-0.25/README000644 003721 003721 00000005021 12250672745 013423 0ustar00umenoah000000 000000 Socket6 $Id: README,v 1.12 2013/12/07 19:24:21 ume Exp $ 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-2013 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.25/gai.h000644 003721 003721 00000002376 10304112706 013446 0ustar00umenoah000000 000000 /* * Mar 8, 2000 by Hajimu UMEMOTO * $Id: gai.h,v 1.10 2005/08/27 16:33:10 ume Exp $ * * 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.25/getnameinfo.c000644 003721 003721 00000003630 07775763530 015220 0ustar00umenoah000000 000000 /* * Mar 8, 2000 by Hajimu UMEMOTO * $Id: getnameinfo.c,v 1.8 2004/01/04 10:13:44 ume Exp $ * * 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.25/config.h.in000644 003721 003721 00000002472 10304112551 014553 0ustar00umenoah000000 000000 /* config.h.in. Generated from configure.in by autoheader. */ /* 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 version of this package. */ #undef PACKAGE_VERSION Socket6-0.25/gailookup.pl.in000644 003721 003721 00000007300 10322661121 015461 0ustar00umenoah000000 000000 #! @PERLPATH@ ;# Copyright (C) 2000-2005 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,v 1.12 2005/10/11 06:57:21 ume Exp $ use Getopt::Std; use Socket; use Socket6; use strict; my $inet6 = defined(eval 'PF_INET6'); my %opt; getopts(($inet6 ? 'achpsnNqS46' : 'chpsnNqS4'), \%opt); if ($opt{'h'}){ print STDERR ("Usage: $0 [-h | [-a] [-c] [-n] [-N] [-p] [-q] [-s] [-S] [-4" . ($inet6 && "|-6") . "] [host [serv]]]\n" . "-h : help\n" . "-a : AI_ADDRCONFIG flag\n" . "-c : AI_CANONNAME flag\n" . "-n : AI_NUMERICHOST flag\n" . "-N : AI_NUMERICSERV flag\n" . "-p : AI_PASSIVE flag\n" . "-q : only show IP address\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'}); 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'}); $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'}); } print("\n"); } Socket6-0.25/MANIFEST000644 003721 003721 00000000621 12251125611 013657 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.25/config.pl.in000644 003721 003721 00000003152 07065211742 014747 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,v 1.4 2000/03/19 17:52:34 ume Exp $ $cc = '@CC@'; $libs = '@INET6LIBS@'; 1; Socket6-0.25/t/000755 003721 003721 00000000000 12251125611 012772 5ustar00umenoah000000 000000 Socket6-0.25/inet_ntop.c000644 003721 003721 00000014005 10015150107 014664 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. */ #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. */ 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, size_t size) { switch (af) { case AF_INET: return (inet_ntop4(src, dst, size)); #ifdef AF_INET6 case AF_INET6: return (inet_ntop6(src, dst, 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.25/aclocal.m4000644 003721 003721 00000013672 10304113314 014372 0ustar00umenoah000000 000000 dnl Copyright (C) 2000-2005 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,v 1.11 2005/08/27 16:37:32 ume Exp $ 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)]) Socket6-0.25/getaddrinfo.c000644 003721 003721 00000010501 10304112706 015154 0ustar00umenoah000000 000000 /* * Mar 8, 2000 by Hajimu UMEMOTO * $Id: getaddrinfo.c,v 1.13 2005/08/27 16:33:10 ume Exp $ * * 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.25/ftpmirror-1.96.diff000644 003721 003721 00000016371 07351404125 016015 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.25/configure.in000644 003721 003721 00000005236 10304113350 015040 0ustar00umenoah000000 000000 # Copyright (C) 2000-2005 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,v 1.19 2005/08/27 16:38:00 ume Exp $ 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_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.25/t/use.t000644 003721 003721 00000003765 12250664422 013775 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,v 1.3 2013/12/07 18:29:38 ume Exp $ use strict; use Test; use Socket qw(AF_INET SOCK_STREAM); BEGIN { plan tests => 3 } 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); } exit; __END__