tcpdump/configure

5497 lines
147 KiB
Plaintext
Raw Normal View History

1999-10-08 07:47:09 +08:00
#! /bin/sh
2000-01-08 14:00:59 +08:00
2003-03-03 07:20:37 +08:00
# From configure.in Revision: 1.161
2000-04-01 20:26:12 +08:00
2000-01-21 12:06:39 +08:00
#
# Try compiling a sample of the type of code that appears in
# gencode.c with "inline", "__inline__", and "__inline".
#
# Autoconf's AC_C_INLINE, at least in autoconf 2.13, isn't good enough,
# as it just tests whether a function returning "int" can be inlined;
# at least some versions of HP's C compiler can inline that, but can't
# inline a function that returns a struct pointer.
#
2000-01-21 12:06:39 +08:00
2000-01-17 14:07:44 +08:00
2000-01-08 14:00:59 +08:00
1999-10-08 07:47:09 +08:00
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.13
1999-10-08 07:47:09 +08:00
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
# Defaults:
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
--without-gcc don't use gcc"
2001-10-09 05:25:50 +08:00
ac_help="$ac_help
--enable-smb enable possibly-buggy SMB printer [default=yes]
--disable-smb disable possibly-buggy SMB printer"
1999-12-15 00:39:39 +08:00
ac_help="$ac_help
--enable-ipv6 enable ipv6 (with ipv4) support
--disable-ipv6 disable ipv6 support"
ac_help="$ac_help
2000-04-27 18:50:27 +08:00
--without-crypto disable crypto support"
1999-10-08 07:47:09 +08:00
# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
build=NONE
cache_file=./config.cache
exec_prefix=NONE
host=NONE
no_create=
nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
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'
# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
1999-10-08 07:47:09 +08:00
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12
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
case "$ac_option" in
-*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) ac_optarg= ;;
esac
# 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 ;;
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
build="$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" ;;
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
ac_prev=datadir ;;
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
| --da=*)
datadir="$ac_optarg" ;;
-disable-* | --disable-*)
ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
{ echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
fi
ac_feature=`echo $ac_feature| sed 's/-/_/g'`
eval "enable_${ac_feature}=no" ;;
-enable-* | --enable-*)
ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
{ echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
fi
ac_feature=`echo $ac_feature| sed 's/-/_/g'`
case "$ac_option" in
*=*) ;;
*) 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)
# 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 << EOF
Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
Configuration:
--cache-file=FILE cache test results in FILE
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
[$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[same as prefix]
--bindir=DIR user executables in DIR [EPREFIX/bin]
--sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
--libexecdir=DIR program executables in DIR [EPREFIX/libexec]
--datadir=DIR read-only architecture-independent data in DIR
[PREFIX/share]
--sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data in DIR
[PREFIX/com]
--localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
--libdir=DIR object code libraries in DIR [EPREFIX/lib]
--includedir=DIR C header files in DIR [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
--infodir=DIR info documentation in DIR [PREFIX/info]
--mandir=DIR man documentation in DIR [PREFIX/man]
--srcdir=DIR find the sources in DIR [configure dir or ..]
--program-prefix=PREFIX prepend PREFIX to installed program names
--program-suffix=SUFFIX append SUFFIX to installed program names
--program-transform-name=PROGRAM
run sed PROGRAM on installed program names
EOF
cat << EOF
Host type:
--build=BUILD configure for building on BUILD [BUILD=HOST]
--host=HOST configure for HOST [guessed]
--target=TARGET configure for TARGET [TARGET=HOST]
Features and packages:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--x-includes=DIR X include files are in DIR
--x-libraries=DIR X library files are in DIR
EOF
if test -n "$ac_help"; then
echo "--enable and --with options recognized:$ac_help"
fi
exit 0 ;;
-host | --host | --hos | --ho)
ac_prev=host ;;
-host=* | --host=* | --hos=* | --ho=*)
host="$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)
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 ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
target="$ac_optarg" ;;
-v | -verbose | --verbose | --verbos | --verbo | --verb)
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
echo "configure generated by autoconf version 2.13"
1999-10-08 07:47:09 +08:00
exit 0 ;;
-with-* | --with-*)
ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
{ echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
fi
ac_package=`echo $ac_package| sed 's/-/_/g'`
case "$ac_option" in
*=*) ;;
*) ac_optarg=yes ;;
esac
eval "with_${ac_package}='$ac_optarg'" ;;
-without-* | --without-*)
ac_package=`echo $ac_option|sed -e 's/-*without-//'`
# Reject names that are not valid shell variable names.
if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
{ echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
fi
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 "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
;;
*)
if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
echo "configure: warning: $ac_option: invalid host type" 1>&2
fi
if test "x$nonopt" != xNONE; then
{ echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
fi
nonopt="$ac_option"
;;
esac
done
if test -n "$ac_prev"; then
{ echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
fi
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
# File descriptor usage:
# 0 standard input
# 1 file creation
# 2 errors and warnings
# 3 some systems may open it to /dev/tty
# 4 used on the Kubota Titan
# 6 checking for... messages and results
# 5 compiler messages saved in config.log
if test "$silent" = yes; then
exec 6>/dev/null
else
exec 6>&1
fi
exec 5>./config.log
echo "\
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
" 1>&5
# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell metacharacters.
ac_configure_args=
for ac_arg
do
case "$ac_arg" in
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
| --no-cr | --no-c) ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
*" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
ac_configure_args="$ac_configure_args '$ac_arg'" ;;
*) ac_configure_args="$ac_configure_args $ac_arg" ;;
esac
done
# NLS nuisances.
# Only set these to C if already set. These must not be set unconditionally
# because not all systems understand e.g. LANG=C (notably SCO).
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
# Non-C LC_CTYPE values break the ctype check.
if test "${LANG+set}" = set; then LANG=C; export LANG; fi
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
# 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
# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
ac_unique_file=tcpdump.c
# 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_prog=$0
ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
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 "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
else
{ echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
fi
fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# 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 "loading site script $ac_site_file"
. "$ac_site_file"
fi
done
if test -r "$cache_file"; then
echo "loading cache $cache_file"
. $cache_file
else
echo "creating cache $cache_file"
> $cache_file
fi
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1999-10-08 07:47:09 +08:00
cross_compiling=$ac_cv_prog_cc_cross
ac_exeext=
ac_objext=o
1999-10-08 07:47:09 +08:00
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
ac_n= ac_c='
' ac_t=' '
else
ac_n=-n ac_c= ac_t=
fi
else
ac_n= ac_c='\c' ac_t=
fi
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
if test -f $ac_dir/install-sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
break
elif test -f $ac_dir/install.sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
fi
done
if test -z "$ac_aux_dir"; then
{ echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
fi
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# Make sure we can run config.sub.
if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1999-10-08 07:47:09 +08:00
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:635: checking host system type" >&5
1999-10-08 07:47:09 +08:00
host_alias=$host
case "$host_alias" in
NONE)
case $nonopt in
NONE)
if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1999-10-08 07:47:09 +08:00
else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
fi ;;
*) host_alias=$nonopt ;;
esac ;;
esac
host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1999-10-08 07:47:09 +08:00
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
# Check whether --with-gcc or --without-gcc was given.
if test "${with_gcc+set}" = set; then
withval="$with_gcc"
:
fi
V_CCOPT="-O"
V_INCLS=""
if test "${srcdir}" != "." ; then
1999-10-30 15:33:45 +08:00
V_INCLS="-I\$(srcdir)"
1999-10-08 07:47:09 +08:00
fi
if test "${CFLAGS+set}" = set; then
LBL_CFLAGS="$CFLAGS"
fi
if test -z "$CC" ; then
case "$host_os" in
1999-10-08 07:47:09 +08:00
bsdi*)
# Extract the first word of "shlicc2", so it can be a program name with args.
set dummy shlicc2; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:681: checking for $ac_word" >&5
1999-10-08 07:47:09 +08:00
if eval "test \"`echo '$''{'ac_cv_prog_SHLICC2'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$SHLICC2"; then
ac_cv_prog_SHLICC2="$SHLICC2" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
1999-10-08 07:47:09 +08:00
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_SHLICC2="yes"
break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_prog_SHLICC2" && ac_cv_prog_SHLICC2="no"
fi
fi
SHLICC2="$ac_cv_prog_SHLICC2"
if test -n "$SHLICC2"; then
echo "$ac_t""$SHLICC2" 1>&6
else
echo "$ac_t""no" 1>&6
fi
if test $SHLICC2 = yes ; then
CC=shlicc2
export CC
fi
;;
esac
fi
if test -z "$CC" -a "$with_gcc" = no ; then
CC=cc
export CC
fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:722: checking for $ac_word" >&5
1999-10-08 07:47:09 +08:00
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
1999-10-08 07:47:09 +08:00
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CC="gcc"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
echo "$ac_t""$CC" 1>&6
else
echo "$ac_t""no" 1>&6
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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:752: checking for $ac_word" >&5
1999-10-08 07:47:09 +08:00
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1999-10-08 07:47:09 +08:00
ac_prog_rejected=no
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
1999-10-08 07:47:09 +08:00
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
fi
ac_cv_prog_CC="cc"
break
fi
done
IFS="$ac_save_ifs"
if test $ac_prog_rejected = yes; then
# We found a bogon in the path, so make sure we never use it.
set dummy $ac_cv_prog_CC
shift
if test $# -gt 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
set dummy "$ac_dir/$ac_word" "$@"
shift
ac_cv_prog_CC="$@"
fi
fi
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
echo "$ac_t""$CC" 1>&6
else
echo "$ac_t""no" 1>&6
fi
if test -z "$CC"; then
case "`uname -s`" in
*win32* | *WIN32*)
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:803: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CC="cl"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
echo "$ac_t""$CC" 1>&6
else
echo "$ac_t""no" 1>&6
fi
;;
esac
fi
1999-10-08 07:47:09 +08:00
test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:835: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1999-10-08 07:47:09 +08:00
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1999-10-08 07:47:09 +08:00
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
#line 846 "configure"
1999-10-08 07:47:09 +08:00
#include "confdefs.h"
1999-10-08 07:47:09 +08:00
main(){return(0);}
EOF
if { (eval echo configure:851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1999-10-08 07:47:09 +08:00
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
ac_cv_prog_cc_cross=no
else
ac_cv_prog_cc_cross=yes
fi
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_prog_cc_works=no
fi
rm -fr conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
1999-10-08 07:47:09 +08:00
echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:877: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1999-10-08 07:47:09 +08:00
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:882: checking whether we are using GNU C" >&5
1999-10-08 07:47:09 +08:00
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.c <<EOF
#ifdef __GNUC__
yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1999-10-08 07:47:09 +08:00
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
fi
fi
echo "$ac_t""$ac_cv_prog_gcc" 1>&6
if test $ac_cv_prog_gcc = yes; then
GCC=yes
else
GCC=
fi
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:910: checking whether ${CC-cc} accepts -g" >&5
1999-10-08 07:47:09 +08:00
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
ac_cv_prog_cc_g=yes
else
ac_cv_prog_cc_g=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_prog_cc_g" 1>&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
1999-10-08 07:47:09 +08:00
CFLAGS="-g -O2"
else
CFLAGS="-g"
1999-10-08 07:47:09 +08:00
fi
else
if test "$GCC" = yes; then
CFLAGS="-O2"
else
CFLAGS=
fi
1999-10-08 07:47:09 +08:00
fi
if test "$GCC" = yes ; then
if test "$SHLICC2" = yes ; then
ac_cv_lbl_gcc_vers=2
V_CCOPT="-O2"
else
echo $ac_n "checking gcc version""... $ac_c" 1>&6
echo "configure:947: checking gcc version" >&5
1999-10-08 07:47:09 +08:00
if eval "test \"`echo '$''{'ac_cv_lbl_gcc_vers'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_lbl_gcc_vers=`$CC -v 2>&1 | \
sed -e '/^gcc version /!d' \
-e 's/^gcc version //' \
-e 's/ .*//' -e 's/^[^0-9]*//' \
-e 's/\..*//'`
fi
echo "$ac_t""$ac_cv_lbl_gcc_vers" 1>&6
if test $ac_cv_lbl_gcc_vers -gt 1 ; then
V_CCOPT="-O2"
fi
fi
else
echo $ac_n "checking that $CC handles ansi prototypes""... $ac_c" 1>&6
echo "configure:965: checking that $CC handles ansi prototypes" >&5
1999-10-08 07:47:09 +08:00
if eval "test \"`echo '$''{'ac_cv_lbl_cc_ansi_prototypes'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 970 "configure"
1999-10-08 07:47:09 +08:00
#include "confdefs.h"
#include <sys/types.h>
int main() {
int frob(int, char *)
; return 0; }
EOF
if { (eval echo configure:977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1999-10-08 07:47:09 +08:00
rm -rf conftest*
ac_cv_lbl_cc_ansi_prototypes=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_lbl_cc_ansi_prototypes=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_lbl_cc_ansi_prototypes" 1>&6
if test $ac_cv_lbl_cc_ansi_prototypes = no ; then
case "$host_os" in
1999-10-08 07:47:09 +08:00
hpux*)
echo $ac_n "checking for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE)""... $ac_c" 1>&6
echo "configure:995: checking for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE)" >&5
1999-10-08 07:47:09 +08:00
savedcflags="$CFLAGS"
CFLAGS="-Aa -D_HPUX_SOURCE $CFLAGS"
if eval "test \"`echo '$''{'ac_cv_lbl_cc_hpux_cc_aa'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1002 "configure"
1999-10-08 07:47:09 +08:00
#include "confdefs.h"
#include <sys/types.h>
int main() {
int frob(int, char *)
; return 0; }
EOF
if { (eval echo configure:1009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1999-10-08 07:47:09 +08:00
rm -rf conftest*
ac_cv_lbl_cc_hpux_cc_aa=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_lbl_cc_hpux_cc_aa=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_lbl_cc_hpux_cc_aa" 1>&6
if test $ac_cv_lbl_cc_hpux_cc_aa = no ; then
{ echo "configure: error: see the INSTALL doc for more info" 1>&2; exit 1; }
fi
CFLAGS="$savedcflags"
V_CCOPT="-Aa $V_CCOPT"
cat >> confdefs.h <<\EOF
#define _HPUX_SOURCE 1
EOF
;;
*)
{ echo "configure: error: see the INSTALL doc for more info" 1>&2; exit 1; }
;;
esac
fi
V_INCLS="$V_INCLS -I/usr/local/include"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
case "$host_os" in
1999-10-08 07:47:09 +08:00
irix*)
2001-10-09 00:44:41 +08:00
V_CCOPT="$V_CCOPT -xansi -signed -O"
1999-10-08 07:47:09 +08:00
;;
osf*)
2001-10-09 00:44:41 +08:00
V_CCOPT="$V_CCOPT -std1 -O"
1999-10-08 07:47:09 +08:00
;;
ultrix*)
echo $ac_n "checking that Ultrix $CC hacks const in prototypes""... $ac_c" 1>&6
echo "configure:1053: checking that Ultrix $CC hacks const in prototypes" >&5
1999-10-08 07:47:09 +08:00
if eval "test \"`echo '$''{'ac_cv_lbl_cc_const_proto'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1058 "configure"
1999-10-08 07:47:09 +08:00
#include "confdefs.h"
#include <sys/types.h>
int main() {
struct a { int b; };
void c(const struct a *)
; return 0; }
EOF
if { (eval echo configure:1066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1999-10-08 07:47:09 +08:00
rm -rf conftest*
ac_cv_lbl_cc_const_proto=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_lbl_cc_const_proto=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_lbl_cc_const_proto" 1>&6
if test $ac_cv_lbl_cc_const_proto = no ; then
cat >> confdefs.h <<\EOF
#define const
EOF
fi
;;
esac
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
echo "configure:1090: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_lbl_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_lbl_inline=""
ac_lbl_cc_inline=no
for ac_lbl_inline in inline __inline__ __inline
do
cat > conftest.$ac_ext <<EOF
#line 1100 "configure"
#include "confdefs.h"
#define inline $ac_lbl_inline
static inline struct iltest *foo(void);
struct iltest {
int iltest1;
int iltest2;
};
static inline struct iltest *
foo()
{
static struct iltest xxx;
return &xxx;
}
int main() {
; return 0; }
EOF
if { (eval echo configure:1120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_lbl_cc_inline=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
if test "$ac_lbl_cc_inline" = yes ; then
break;
fi
done
if test "$ac_lbl_cc_inline" = yes ; then
ac_cv_lbl_inline=$ac_lbl_inline
fi
fi
if test ! -z "$ac_cv_lbl_inline" ; then
echo "$ac_t""$ac_cv_lbl_inline" 1>&6
else
echo "$ac_t""no" 1>&6
fi
cat >> confdefs.h <<EOF
#define inline $ac_cv_lbl_inline
EOF
1999-10-08 07:47:09 +08:00
2000-04-01 20:26:12 +08:00
echo $ac_n "checking for __attribute__""... $ac_c" 1>&6
echo "configure:1148: checking for __attribute__" >&5
2000-04-01 20:26:12 +08:00
if eval "test \"`echo '$''{'ac_cv___attribute__'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1154 "configure"
2000-04-01 20:26:12 +08:00
#include "confdefs.h"
#include <stdlib.h>
int main() {
static void foo(void) __attribute__ ((noreturn));
static void
foo(void)
{
exit(1);
}
; return 0; }
EOF
if { (eval echo configure:1171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2000-04-01 20:26:12 +08:00
rm -rf conftest*
ac_cv___attribute__=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv___attribute__=no
fi
rm -f conftest*
fi
if test "$ac_cv___attribute__" = "yes"; then
cat >> confdefs.h <<\EOF
#define HAVE___ATTRIBUTE__ 1
EOF
fi
echo "$ac_t""$ac_cv___attribute__" 1>&6
1999-10-08 07:47:09 +08:00
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:1193: checking how to run the C preprocessor" >&5
1999-10-08 07:47:09 +08:00
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# This must be in double quotes, not single quotes, because CPP may get
# substituted into the Makefile and "${CC-cc}" will confuse make.
CPP="${CC-cc} -E"
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
#line 1208 "configure"
1999-10-08 07:47:09 +08:00
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1999-10-08 07:47:09 +08:00
if test -z "$ac_err"; then
:
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 1225 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
#line 1242 "configure"
1999-10-08 07:47:09 +08:00
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1999-10-08 07:47:09 +08:00
if test -z "$ac_err"; then
:
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
CPP=/lib/cpp
fi
rm -f conftest*
fi
rm -f conftest*
fi
1999-10-08 07:47:09 +08:00
rm -f conftest*
ac_cv_prog_CPP="$CPP"
fi
CPP="$ac_cv_prog_CPP"
else
ac_cv_prog_CPP="$CPP"
fi
echo "$ac_t""$CPP" 1>&6
Add a few more GCC warnings on GCC >= 2 for ".devel" builds. From Neil T. Spring: fixes for many of those warnings: addrtoname.c, configure.in: Linux needs netinet/ether.h for ether_ntohost print-*.c: change char *foo = "bar" to const char *foo = "bar" to appease -Wwrite-strings; should affect no run-time behavior. print-*.c: make some variables unsigned. print-bgp.c: plen ('prefix len') is unsigned, no reason to validate by comparing to zero. print-cnfp.c, print-rx.c: use intoa, provided by addrtoname, instead of inet_ntoa. print-domain.c: unsigned int l; (l=foo()) < 0 is guaranteed to be false, so check for (u_int)-1, which represents failure, explicitly. print-isakmp.c: complete initialization of attrmap objects. print-lwres.c: "if(x); print foo;" seemed much more likely to be intended to be "if(x) { print foo; }". print-smb.c: complete initialization of some structures. In addition, add some fixes for the signed vs. unsigned comparison warnings: extract.h: cast the result of the byte-extraction-and-combining, as, at least for the 16-bit version, C's integral promotions will turn "u_int16_t" into "int" if there are other "int"s nearby. print-*.c: make some more variables unsigned, or add casts to an unsigned type of signed values known not to be negative, or add casts to "int" of unsigned values known to fit in an "int", and make other changes needed to handle the aforementioned variables now being unsigned. print-isakmp.c: clean up the handling of error/status indicators in notify messages. print-ppp.c: get rid of a check that an unsigned quantity is >= 0. print-radius.c: clean up some of the bounds checking. print-smb.c: extract the word count into a "u_int" to avoid the aforementioned problems with C's integral promotions. print-snmp.c: change a check that an unsigned variable is >= 0 to a check that it's != 0. Also, fix some formats to use "%u" rather than "%d" for unsigned quantities.
2002-09-05 08:00:07 +08:00
for ac_hdr in fcntl.h rpc/rpcent.h netinet/if_ether.h netdnet/dnetdb.h netinet/ether.h
1999-10-08 07:47:09 +08:00
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1276: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1281 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
echo "configure:1313: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1318 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
int main() {
struct tm *tp;
; return 0; }
EOF
if { (eval echo configure:1327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_header_time=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_header_time" 1>&6
if test $ac_cv_header_time = yes; then
cat >> confdefs.h <<\EOF
#define TIME_WITH_SYS_TIME 1
EOF
fi
case "$host_os" in
linux*)
echo $ac_n "checking Linux kernel version""... $ac_c" 1>&6
echo "configure:1352: checking Linux kernel version" >&5
2000-06-10 22:21:14 +08:00
if test "$cross_compiling" = yes; then
if eval "test \"`echo '$''{'ac_cv_linux_vers'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_linux_vers=unknown
fi
else
if eval "test \"`echo '$''{'ac_cv_linux_vers'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_linux_vers=`uname -r 2>&1 | \
2000-06-10 22:21:14 +08:00
sed -n -e '$s/.* //' -e '$s/\..*//p'`
fi
2000-06-10 22:21:14 +08:00
fi
echo "$ac_t""$ac_cv_linux_vers" 1>&6
2000-06-10 22:21:14 +08:00
if test $ac_cv_linux_vers = unknown ; then
{ echo "configure: error: cannot determine linux version when cross-compiling" 1>&2; exit 1; }
fi
if test $ac_cv_linux_vers -lt 2 ; then
{ echo "configure: error: version 2 or higher required; see the INSTALL doc for more info" 1>&2; exit 1; }
fi
;;
*)
;;
esac
1999-12-15 00:39:39 +08:00
2000-01-08 00:36:57 +08:00
for ac_hdr in smi.h
1999-12-15 00:39:39 +08:00
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1387: checking for $ac_hdr" >&5
1999-12-15 00:39:39 +08:00
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1392 "configure"
1999-12-15 00:39:39 +08:00
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1999-12-15 00:39:39 +08:00
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
2000-07-01 11:40:34 +08:00
echo $ac_n "checking for smiInit in -lsmi""... $ac_c" 1>&6
echo "configure:1424: checking for smiInit in -lsmi" >&5
2000-07-01 11:40:34 +08:00
ac_lib_var=`echo smi'_'smiInit | sed 'y%./+-%__p_%'`
1999-12-15 00:39:39 +08:00
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lsmi $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1432 "configure"
1999-12-15 00:39:39 +08:00
#include "confdefs.h"
2000-07-01 11:40:34 +08:00
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char smiInit();
1999-12-15 00:39:39 +08:00
int main() {
2000-07-01 11:40:34 +08:00
smiInit()
1999-12-15 00:39:39 +08:00
; return 0; }
EOF
if { (eval echo configure:1443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1999-12-15 00:39:39 +08:00
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_lib=HAVE_LIB`echo smi | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF
LIBS="-lsmi $LIBS"
else
echo "$ac_t""no" 1>&6
fi
2001-04-27 10:36:16 +08:00
if test "$ac_cv_header_smi_h" = yes -a "$ac_cv_lib_smi_smiInit" = yes
then
2000-01-08 00:36:57 +08:00
echo $ac_n "checking whether to enable libsmi""... $ac_c" 1>&6
echo "configure:1473: checking whether to enable libsmi" >&5
2000-01-08 00:36:57 +08:00
if test "$cross_compiling" = yes; then
echo "$ac_t""not when cross-compiling" 1>&6
libsmi=no
2000-01-08 00:36:57 +08:00
else
cat > conftest.$ac_ext <<EOF
#line 1480 "configure"
2000-01-08 00:36:57 +08:00
#include "confdefs.h"
/* libsmi available check */
#include <smi.h>
main()
{
2000-07-01 11:40:34 +08:00
int current, revision, age, n;
const int required = 2;
2000-01-08 00:36:57 +08:00
if (smiInit(""))
exit(1);
2000-07-01 11:40:34 +08:00
if (strcmp(SMI_LIBRARY_VERSION, smi_library_version))
exit(2);
n = sscanf(smi_library_version, "%d:%d:%d", &current, &revision, &age);
if (n != 3)
exit(3);
if (required < current - age || required > current)
exit(4);
exit(0);
2000-01-08 00:36:57 +08:00
}
EOF
if { (eval echo configure:1501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2000-01-08 00:36:57 +08:00
then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
1999-12-15 00:39:39 +08:00
#define LIBSMI 1
EOF
2000-01-08 00:36:57 +08:00
libsmi=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
2001-04-27 10:36:16 +08:00
case $? in
1) echo "$ac_t""no - smiInit failed" 1>&6 ;;
2) echo "$ac_t""no - header/library version mismatch" 1>&6 ;;
3) echo "$ac_t""no - can't determine library version" 1>&6 ;;
4) echo "$ac_t""no - too old" 1>&6 ;;
*) echo "$ac_t""no" 1>&6 ;;
esac
2000-01-08 00:36:57 +08:00
libsmi=no
fi
rm -fr conftest*
1999-12-15 00:39:39 +08:00
fi
2001-04-27 10:36:16 +08:00
fi
2000-01-08 00:36:57 +08:00
2001-10-09 05:25:50 +08:00
echo $ac_n "checking whether to enable the possibly-buggy SMB printer""... $ac_c" 1>&6
echo "configure:1528: checking whether to enable the possibly-buggy SMB printer" >&5
2001-10-09 05:25:50 +08:00
# Check whether --enable-smb or --disable-smb was given.
if test "${enable_smb+set}" = set; then
enableval="$enable_smb"
:
else
enableval=yes
fi
case "$enableval" in
2001-10-09 05:25:50 +08:00
yes) echo "$ac_t""yes" 1>&6
echo "configure: warning: The SMB printer may have exploitable buffer overflows!!!" 1>&2
cat >> confdefs.h <<\EOF
#define TCPDUMP_DO_SMB 1
EOF
LOCALSRC="print-smb.c smbutil.c $LOCALSRC"
;;
*) echo "$ac_t""no" 1>&6
;;
esac
2001-10-09 05:25:50 +08:00
echo $ac_n "checking whether to enable ipv6""... $ac_c" 1>&6
echo "configure:1551: checking whether to enable ipv6" >&5
# Check whether --enable-ipv6 or --disable-ipv6 was given.
if test "${enable_ipv6+set}" = set; then
enableval="$enable_ipv6"
case "$enableval" in
1999-10-30 13:26:21 +08:00
yes) echo "$ac_t""yes" 1>&6
LOCALSRC="print-ip6.c print-ip6opts.c print-mobility.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c $LOCALSRC"
cat >> confdefs.h <<\EOF
#define INET6 1
EOF
ipv6=yes
;;
1999-10-30 13:26:21 +08:00
*)
echo "$ac_t""no" 1>&6
ipv6=no
;;
esac
else
if test "$cross_compiling" = yes; then
1999-10-30 13:26:21 +08:00
echo "$ac_t""no" 1>&6
ipv6=no
else
cat > conftest.$ac_ext <<EOF
#line 1576 "configure"
#include "confdefs.h"
1999-12-15 00:39:39 +08:00
/* AF_INET6 available check */
#include <sys/types.h>
#include <sys/socket.h>
main()
{
if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
exit(1);
else
exit(0);
}
EOF
if { (eval echo configure:1590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
1999-10-30 13:26:21 +08:00
echo "$ac_t""yes" 1>&6
LOCALSRC="print-ip6.c print-ip6opts.c print-mobility.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c $LOCALSRC"
cat >> confdefs.h <<\EOF
#define INET6 1
EOF
ipv6=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
1999-10-30 13:26:21 +08:00
echo "$ac_t""no" 1>&6
ipv6=no
fi
rm -fr conftest*
fi
fi
ipv6type=unknown
ipv6lib=none
ipv6trylibc=no
if test "$ipv6" = "yes"; then
echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6
echo "configure:1618: checking ipv6 stack type" >&5
for i in inria kame linux-glibc linux-libinet6 toshiba v6d zeta; do
case $i in
inria)
cat > conftest.$ac_ext <<EOF
#line 1623 "configure"
#include "confdefs.h"
dnl
#include <netinet/in.h>
#ifdef IPV6_INRIA_VERSION
yes
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "yes" >/dev/null 2>&1; then
rm -rf conftest*
ipv6type=$i;
CFLAGS="-DINET6 $CFLAGS"
fi
rm -f conftest*
;;
kame)
cat > conftest.$ac_ext <<EOF
#line 1642 "configure"
#include "confdefs.h"
dnl
#include <netinet/in.h>
#ifdef __KAME__
yes
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "yes" >/dev/null 2>&1; then
rm -rf conftest*
ipv6type=$i;
ipv6lib=inet6;
ipv6libdir=/usr/local/v6/lib;
ipv6trylibc=yes;
CFLAGS="-DINET6 $CFLAGS"
fi
rm -f conftest*
;;
linux-glibc)
cat > conftest.$ac_ext <<EOF
#line 1664 "configure"
#include "confdefs.h"
dnl
#include <features.h>
#if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
yes
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "yes" >/dev/null 2>&1; then
rm -rf conftest*
ipv6type=$i;
CFLAGS="-DINET6 $CFLAGS"
fi
rm -f conftest*
;;
linux-libinet6)
if test -d /usr/inet6 -o -f /usr/include/netinet/ip6.h; then
ipv6type=$i
ipv6lib=inet6
ipv6libdir=/usr/inet6/lib
ipv6trylibc=yes;
CFLAGS="-DINET6 -I/usr/inet6/include $CFLAGS"
fi
;;
toshiba)
cat > conftest.$ac_ext <<EOF
#line 1692 "configure"
#include "confdefs.h"
dnl
#include <sys/param.h>
#ifdef _TOSHIBA_INET6
yes
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "yes" >/dev/null 2>&1; then
rm -rf conftest*
ipv6type=$i;
ipv6lib=inet6;
ipv6libdir=/usr/local/v6/lib;
CFLAGS="-DINET6 $CFLAGS"
fi
rm -f conftest*
;;
v6d)
cat > conftest.$ac_ext <<EOF
#line 1713 "configure"
#include "confdefs.h"
dnl
#include </usr/local/v6/include/sys/v6config.h>
#ifdef __V6D__
yes
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "yes" >/dev/null 2>&1; then
rm -rf conftest*
ipv6type=$i;
ipv6lib=v6;
ipv6libdir=/usr/local/v6/lib;
CFLAGS="-I/usr/local/v6/include $CFLAGS"
fi
rm -f conftest*
;;
zeta)
cat > conftest.$ac_ext <<EOF
#line 1734 "configure"
#include "confdefs.h"
dnl
#include <sys/param.h>
#ifdef _ZETA_MINAMI_INET6
yes
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "yes" >/dev/null 2>&1; then
rm -rf conftest*
ipv6type=$i;
ipv6lib=inet6;
ipv6libdir=/usr/local/v6/lib;
CFLAGS="-DINET6 $CFLAGS"
fi
rm -f conftest*
;;
esac
if test "$ipv6type" != "unknown"; then
break
fi
done
echo "$ac_t""$ipv6type" 1>&6
fi
if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
echo "You have $ipv6lib library, using it"
else
if test "$ipv6trylibc" = "yes"; then
echo "You do not have $ipv6lib library, using libc"
else
echo 'Fatal: no $ipv6lib library found. cannot continue.'
echo "You need to fetch lib$ipv6lib.a from appropriate"
echo 'ipv6 kit and compile beforehand.'
exit 1
fi
fi
fi
2000-01-25 13:05:42 +08:00
if test "$ipv6" = "yes"; then
#
# XXX - on Tru64 UNIX 5.1, there is no "getaddrinfo()"
# function in libc; there are "ngetaddrinfo()" and
# "ogetaddrinfo()" functions, and <netdb.h> #defines
# "getaddrinfo" to be either "ngetaddrinfo" or
# "ogetaddrinfo", depending on whether _SOCKADDR_LEN
# or _XOPEN_SOURCE_EXTENDED are defined or not.
#
# So this test doesn't work on Tru64 5.1, and possibly
# on other 5.x releases. This causes the configure
# script to become confused, and results in libpcap
# being unbuildable.
#
2000-04-10 03:16:28 +08:00
echo $ac_n "checking for library containing getaddrinfo""... $ac_c" 1>&6
echo "configure:1794: checking for library containing getaddrinfo" >&5
2000-04-10 03:16:28 +08:00
if eval "test \"`echo '$''{'ac_cv_search_getaddrinfo'+set}'`\" = set"; then
2000-01-19 12:42:34 +08:00
echo $ac_n "(cached) $ac_c" 1>&6
else
2000-04-10 03:16:28 +08:00
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_getaddrinfo="no"
cat > conftest.$ac_ext <<EOF
#line 1801 "configure"
2000-01-19 12:42:34 +08:00
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
2000-04-10 03:16:28 +08:00
char getaddrinfo();
2000-01-19 12:42:34 +08:00
int main() {
2000-04-10 03:16:28 +08:00
getaddrinfo()
2000-01-19 12:42:34 +08:00
; return 0; }
EOF
if { (eval echo configure:1812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2000-01-19 12:42:34 +08:00
rm -rf conftest*
2000-04-10 03:16:28 +08:00
ac_cv_search_getaddrinfo="none required"
2000-01-19 12:42:34 +08:00
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
2000-04-10 03:16:28 +08:00
fi
rm -f conftest*
test "$ac_cv_search_getaddrinfo" = "no" && for i in socket; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
#line 1823 "configure"
2000-04-10 03:16:28 +08:00
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* 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; }
EOF
if { (eval echo configure:1834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2000-01-19 12:42:34 +08:00
rm -rf conftest*
2000-04-10 03:16:28 +08:00
ac_cv_search_getaddrinfo="-l$i"
break
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
2000-01-19 12:42:34 +08:00
fi
rm -f conftest*
2000-04-10 03:16:28 +08:00
done
LIBS="$ac_func_search_save_LIBS"
2000-01-19 12:42:34 +08:00
fi
2000-04-10 03:16:28 +08:00
echo "$ac_t""$ac_cv_search_getaddrinfo" 1>&6
if test "$ac_cv_search_getaddrinfo" != "no"; then
test "$ac_cv_search_getaddrinfo" = "none required" || LIBS="$ac_cv_search_getaddrinfo $LIBS"
echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6
echo "configure:1851: checking getaddrinfo bug" >&5
if eval "test \"`echo '$''{'td_cv_buggygetaddrinfo'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
td_cv_buggygetaddrinfo=yes
else
cat > conftest.$ac_ext <<EOF
#line 1859 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <netdb.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>
main()
{
int passive, gaierr, inet4 = 0, inet6 = 0;
struct addrinfo hints, *ai, *aitop;
char straddr[INET6_ADDRSTRLEN], strport[16];
for (passive = 0; passive <= 1; passive++) {
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC;
hints.ai_flags = passive ? AI_PASSIVE : 0;
hints.ai_socktype = SOCK_STREAM;
if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
(void)gai_strerror(gaierr);
goto bad;
}
for (ai = aitop; ai; ai = ai->ai_next) {
if (ai->ai_addr == NULL ||
ai->ai_addrlen == 0 ||
getnameinfo(ai->ai_addr, ai->ai_addrlen,
straddr, sizeof(straddr), strport, sizeof(strport),
NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
goto bad;
}
switch (ai->ai_family) {
case AF_INET:
if (strcmp(strport, "54321") != 0) {
goto bad;
}
if (passive) {
if (strcmp(straddr, "0.0.0.0") != 0) {
goto bad;
}
} else {
if (strcmp(straddr, "127.0.0.1") != 0) {
goto bad;
}
}
inet4++;
break;
case AF_INET6:
if (strcmp(strport, "54321") != 0) {
goto bad;
}
if (passive) {
if (strcmp(straddr, "::") != 0) {
goto bad;
}
} else {
if (strcmp(straddr, "::1") != 0) {
goto bad;
}
}
inet6++;
break;
case AF_UNSPEC:
goto bad;
break;
#ifdef AF_UNIX
case AF_UNIX:
#else
#ifdef AF_LOCAL
case AF_LOCAL:
#endif
#endif
default:
/* another family support? */
break;
}
}
}
2000-01-18 13:27:57 +08:00
/* supported family should be 2, unsupported family should be 0 */
2000-01-19 12:36:08 +08:00
if (!(inet4 == 0 || inet4 == 2))
goto bad;
if (!(inet6 == 0 || inet6 == 2))
goto bad;
if (aitop)
freeaddrinfo(aitop);
exit(0);
bad:
if (aitop)
freeaddrinfo(aitop);
exit(1);
}
EOF
if { (eval echo configure:1956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
td_cv_buggygetaddrinfo=no
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
td_cv_buggygetaddrinfo=yes
fi
rm -fr conftest*
fi
2000-01-19 12:42:34 +08:00
fi
if test "$td_cv_buggygetaddrinfo" = no; then
echo "$ac_t""good" 1>&6
else
echo "$ac_t""buggy" 1>&6
fi
if test "$td_cv_buggygetaddrinfo" = "yes"; then
#
# XXX - it doesn't appear that "ipv6type" can ever be
# set to "linux". Should this be testing for
# "linux-glibc", or for that *or* "linux-libinet6"?
# If the latter, note that "linux-libinet6" is also
# the type given to some non-Linux OSes.
#
2000-01-25 13:05:42 +08:00
if test "$ipv6type" != "linux"; then
echo 'Fatal: You must get working getaddrinfo() function.'
echo ' or you can specify "--disable-ipv6"'.
exit 1
else
echo 'Warning: getaddrinfo() implementation on your system seems be buggy.'
2002-08-02 12:01:33 +08:00
echo ' Better upgrade your system library to newest version'
2000-01-25 13:05:42 +08:00
echo ' of GNU C library (aka glibc).'
fi
fi
else :
fi
2000-01-25 13:05:42 +08:00
for ac_func in getaddrinfo getnameinfo
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2001: checking for $ac_func" >&5
2000-01-25 13:05:42 +08:00
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2006 "configure"
2000-01-25 13:05:42 +08:00
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
int main() {
/* 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_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif
; return 0; }
EOF
if { (eval echo configure:2029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2000-01-25 13:05:42 +08:00
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
else
echo "$ac_t""no" 1>&6
LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
fi
done
fi
2000-10-03 11:00:08 +08:00
echo $ac_n "checking for inet_ntop""... $ac_c" 1>&6
echo "configure:2057: checking for inet_ntop" >&5
2000-10-03 11:00:08 +08:00
cat > conftest.$ac_ext <<EOF
#line 2059 "configure"
2000-10-03 11:00:08 +08:00
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
int main() {
char src[4], dst[128];
inet_ntop(AF_INET, src, dst, sizeof(dst));
; return 0; }
EOF
if { (eval echo configure:2070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2000-10-03 11:00:08 +08:00
rm -rf conftest*
echo "$ac_t""yes" 1>&6
2000-10-03 11:00:08 +08:00
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
echo "$ac_t""no" 1>&6
for ac_func in inet_ntop
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2081: checking for $ac_func" >&5
2000-10-03 11:00:08 +08:00
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2086 "configure"
2000-10-03 11:00:08 +08:00
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
int main() {
/* 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_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif
; return 0; }
EOF
if { (eval echo configure:2109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2000-10-03 11:00:08 +08:00
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
else
echo "$ac_t""no" 1>&6
LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
fi
done
fi
rm -f conftest*
echo $ac_n "checking for inet_pton""... $ac_c" 1>&6
echo "configure:2138: checking for inet_pton" >&5
2000-10-03 11:00:08 +08:00
cat > conftest.$ac_ext <<EOF
#line 2140 "configure"
2000-10-03 11:00:08 +08:00
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
int main() {
char src[128], dst[4];
inet_pton(AF_INET, src, dst);
; return 0; }
EOF
if { (eval echo configure:2151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2000-10-03 11:00:08 +08:00
rm -rf conftest*
echo "$ac_t""yes" 1>&6
2000-10-03 11:00:08 +08:00
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
echo "$ac_t""no" 1>&6
for ac_func in inet_pton
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2162: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2167 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
int main() {
/* 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_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif
; return 0; }
EOF
if { (eval echo configure:2190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
else
echo "$ac_t""no" 1>&6
LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
fi
done
2000-10-03 11:00:08 +08:00
fi
rm -f conftest*
echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
echo "configure:2219: checking for inet_aton" >&5
2000-10-03 11:00:08 +08:00
cat > conftest.$ac_ext <<EOF
#line 2221 "configure"
2000-10-03 11:00:08 +08:00
#include "confdefs.h"
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
int main() {
char src[128];
struct in_addr dst;
inet_aton(src, &dst);
; return 0; }
EOF
if { (eval echo configure:2232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2000-10-03 11:00:08 +08:00
rm -rf conftest*
echo "$ac_t""yes" 1>&6
2000-10-03 11:00:08 +08:00
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
echo "$ac_t""no" 1>&6
for ac_func in inet_aton
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2243: checking for $ac_func" >&5
2000-10-03 11:00:08 +08:00
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2248 "configure"
2000-10-03 11:00:08 +08:00
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
int main() {
/* 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_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif
; return 0; }
EOF
if { (eval echo configure:2271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2000-10-03 11:00:08 +08:00
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
else
echo "$ac_t""no" 1>&6
LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
fi
done
fi
rm -f conftest*
echo $ac_n "checking if sockaddr struct has sa_len member""... $ac_c" 1>&6
echo "configure:2302: checking if sockaddr struct has sa_len member" >&5
if eval "test \"`echo '$''{'ac_cv_sockaddr_has_sa_len'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2307 "configure"
#include "confdefs.h"
# include <sys/types.h>
# include <sys/socket.h>
int main() {
u_int i = sizeof(((struct sockaddr *)0)->sa_len)
; return 0; }
EOF
if { (eval echo configure:2316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sockaddr_has_sa_len=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_sockaddr_has_sa_len=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_sockaddr_has_sa_len" 1>&6
if test $ac_cv_sockaddr_has_sa_len = yes ; then
cat >> confdefs.h <<\EOF
#define HAVE_SOCKADDR_SA_LEN 1
EOF
fi
if test "$ac_cv_sockaddr_has_sa_len" = no; then
missing_includes=yes
fi
echo $ac_n "checking for dnet_htoa declaration in netdnet/dnetdb.h""... $ac_c" 1>&6
echo "configure:2341: checking for dnet_htoa declaration in netdnet/dnetdb.h" >&5
if eval "test \"`echo '$''{'td_cv_decl_netdnet_dnetdb_h_dnet_htoa'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2346 "configure"
#include "confdefs.h"
#include <netdnet/dnetdb.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "dnet_htoa" >/dev/null 2>&1; then
rm -rf conftest*
td_cv_decl_netdnet_dnetdb_h_dnet_htoa=yes
else
rm -rf conftest*
td_cv_decl_netdnet_dnetdb_h_dnet_htoa=no
fi
rm -f conftest*
fi
echo "$ac_t""$td_cv_decl_netdnet_dnetdb_h_dnet_htoa" 1>&6
if test "$td_cv_decl_netdnet_dnetdb_h_dnet_htoa" = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_NETDNET_DNETDB_H_DNET_HTOA 1
EOF
fi
echo $ac_n "checking size of char""... $ac_c" 1>&6
echo "configure:2371: checking size of char" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
ac_cv_sizeof_char=1
else
cat > conftest.$ac_ext <<EOF
#line 2379 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
FILE *f=fopen("conftestval", "w");
if (!f) exit(1);
fprintf(f, "%d\n", sizeof(char));
exit(0);
}
EOF
if { (eval echo configure:2390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_char=`cat conftestval`
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
ac_cv_sizeof_char=0
fi
rm -fr conftest*
fi
fi
echo "$ac_t""$ac_cv_sizeof_char" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_CHAR $ac_cv_sizeof_char
EOF
echo $ac_n "checking size of short""... $ac_c" 1>&6
echo "configure:2410: checking size of short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
ac_cv_sizeof_short=2
else
cat > conftest.$ac_ext <<EOF
#line 2418 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
FILE *f=fopen("conftestval", "w");
if (!f) exit(1);
fprintf(f, "%d\n", sizeof(short));
exit(0);
}
EOF
if { (eval echo configure:2429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_short=`cat conftestval`
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
ac_cv_sizeof_short=0
fi
rm -fr conftest*
fi
fi
echo "$ac_t""$ac_cv_sizeof_short" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_SHORT $ac_cv_sizeof_short
EOF
echo $ac_n "checking size of int""... $ac_c" 1>&6
echo "configure:2449: checking size of int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
ac_cv_sizeof_int=4
else
cat > conftest.$ac_ext <<EOF
#line 2457 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
FILE *f=fopen("conftestval", "w");
if (!f) exit(1);
fprintf(f, "%d\n", sizeof(int));
exit(0);
}
EOF
if { (eval echo configure:2468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_int=`cat conftestval`
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
ac_cv_sizeof_int=0
fi
rm -fr conftest*
fi
fi
echo "$ac_t""$ac_cv_sizeof_int" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_INT $ac_cv_sizeof_int
EOF
echo $ac_n "checking size of long""... $ac_c" 1>&6
echo "configure:2488: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
ac_cv_sizeof_long=4
else
cat > conftest.$ac_ext <<EOF
#line 2496 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
FILE *f=fopen("conftestval", "w");
if (!f) exit(1);
fprintf(f, "%d\n", sizeof(long));
exit(0);
}
EOF
if { (eval echo configure:2507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long=`cat conftestval`
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
ac_cv_sizeof_long=0
fi
rm -fr conftest*
fi
fi
echo "$ac_t""$ac_cv_sizeof_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_LONG $ac_cv_sizeof_long
EOF
echo $ac_n "checking for addrinfo""... $ac_c" 1>&6
echo "configure:2530: checking for addrinfo" >&5
if eval "test \"`echo '$''{'ac_cv_addrinfo'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2535 "configure"
#include "confdefs.h"
# include <netdb.h>
int main() {
struct addrinfo a
; return 0; }
EOF
if { (eval echo configure:2543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_addrinfo=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_addrinfo=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_addrinfo" 1>&6
if test $ac_cv_addrinfo = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_ADDRINFO 1
2000-01-21 12:06:39 +08:00
EOF
else
cat >> confdefs.h <<\EOF
#define NEED_ADDRINFO_H 1
EOF
fi
if test "$ac_cv_addrinfo" = no; then
missing_includes=yes
fi
2000-01-21 12:06:39 +08:00
echo $ac_n "checking for NI_MAXSERV""... $ac_c" 1>&6
echo "configure:2574: checking for NI_MAXSERV" >&5
2000-01-21 12:06:39 +08:00
if eval "test \"`echo '$''{'ac_cv_maxserv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2579 "configure"
2000-01-21 12:06:39 +08:00
#include "confdefs.h"
#include <netdb.h>
#ifdef NI_MAXSERV
yes
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "yes" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_maxserv=yes
else
rm -rf conftest*
ac_cv_maxserv=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_maxserv" 1>&6
if test $ac_cv_maxserv != yes; then
cat >> confdefs.h <<\EOF
#define NEED_ADDRINFO_H 1
EOF
fi
if test "$ac_cv_maxserv" = no; then
missing_includes=yes
fi
echo $ac_n "checking for NI_NAMEREQD""... $ac_c" 1>&6
echo "configure:2612: checking for NI_NAMEREQD" >&5
2000-01-21 12:06:39 +08:00
if eval "test \"`echo '$''{'ac_cv_namereqd'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2617 "configure"
2000-01-21 12:06:39 +08:00
#include "confdefs.h"
#include <netdb.h>
#ifdef NI_NOFQDN
yes
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "yes" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_namereqd=yes
else
rm -rf conftest*
ac_cv_namereqd=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_namereqd" 1>&6
if test $ac_cv_namereqd != yes; then
cat >> confdefs.h <<\EOF
#define NEED_ADDRINFO_H 1
EOF
fi
if test "$ac_cv_namereqd" = no; then
missing_includes=yes
fi
echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6
echo "configure:2650: checking for sockaddr_storage" >&5
if eval "test \"`echo '$''{'ac_cv_sa_storage'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2655 "configure"
#include "confdefs.h"
# include <sys/types.h>
# include <sys/socket.h>
int main() {
struct sockaddr_storage s
; return 0; }
EOF
if { (eval echo configure:2664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sa_storage=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_sa_storage=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_sa_storage" 1>&6
if test $ac_cv_sa_storage = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_SOCKADDR_STORAGE 1
EOF
fi
if test "$ac_cv_sa_storage" = no; then
missing_includes=yes
fi
ac_cv_addrsz=yes
echo $ac_n "checking for INADDRSZ""... $ac_c" 1>&6
echo "configure:2691: checking for INADDRSZ" >&5
if eval "test \"`echo '$''{'ac_cv_inaddrsz'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2696 "configure"
#include "confdefs.h"
# include <arpa/nameser.h>
int main() {
int a = INADDRSZ
; return 0; }
EOF
if { (eval echo configure:2704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_inaddrsz=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_inaddrsz=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_inaddrsz" 1>&6
if test $ac_cv_inaddrsz = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_INADDRSZ 1
EOF
else
ac_cv_addrsz=no
fi
echo $ac_n "checking for IN6ADDRSZ""... $ac_c" 1>&6
echo "configure:2726: checking for IN6ADDRSZ" >&5
if eval "test \"`echo '$''{'ac_cv_in6addrsz'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2731 "configure"
#include "confdefs.h"
# include <arpa/nameser.h>
int main() {
int a = IN6ADDRSZ
; return 0; }
EOF
if { (eval echo configure:2739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_in6addrsz=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_in6addrsz=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_in6addrsz" 1>&6
if test $ac_cv_in6addrsz = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_IN6ADDRSZ 1
EOF
else
ac_cv_addrsz=no
fi
if test "$ac_cv_addrsz" = no; then
missing_includes=yes
fi
echo $ac_n "checking for RES_USE_INET6""... $ac_c" 1>&6
echo "configure:2767: checking for RES_USE_INET6" >&5
if eval "test \"`echo '$''{'ac_cv_res_inet6'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2772 "configure"
#include "confdefs.h"
# include <sys/types.h>
# include <netinet/in.h>
# include <resolv.h>
int main() {
int a = RES_USE_INET6
; return 0; }
EOF
if { (eval echo configure:2782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_res_inet6=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_res_inet6=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_res_inet6" 1>&6
if test $ac_cv_res_inet6 = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_RES_USE_INET6 1
EOF
fi
if test "$ac_cv_res_inet6" = no; then
missing_includes=yes
fi
echo $ac_n "checking for res_state_ext""... $ac_c" 1>&6
echo "configure:2808: checking for res_state_ext" >&5
if eval "test \"`echo '$''{'ac_cv_res_state_ext'+set}'`\" = set"; then
1999-10-08 07:47:09 +08:00
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2813 "configure"
1999-10-08 07:47:09 +08:00
#include "confdefs.h"
# include <sys/types.h>
# include <netinet/in.h>
# include <netinet6/in6.h>
# include <resolv.h>
1999-10-08 07:47:09 +08:00
int main() {
struct __res_state_ext e
1999-10-08 07:47:09 +08:00
; return 0; }
EOF
if { (eval echo configure:2824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1999-10-08 07:47:09 +08:00
rm -rf conftest*
ac_cv_res_state_ext=yes
1999-10-08 07:47:09 +08:00
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_res_state_ext=no
1999-10-08 07:47:09 +08:00
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_res_state_ext" 1>&6
if test $ac_cv_res_state_ext = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_RES_STATE_EXT 1
1999-10-08 07:47:09 +08:00
EOF
fi
1999-10-08 07:47:09 +08:00
if test "$ac_cv_res_state_ext" = no; then
missing_includes=yes
1999-10-08 07:47:09 +08:00
fi
echo $ac_n "checking for nsort in res_state""... $ac_c" 1>&6
echo "configure:2850: checking for nsort in res_state" >&5
if eval "test \"`echo '$''{'ac_cv_res_state'+set}'`\" = set"; then
1999-10-08 07:47:09 +08:00
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2855 "configure"
1999-10-08 07:47:09 +08:00
#include "confdefs.h"
# include <sys/types.h>
# include <netinet/in.h>
# include <netinet6/in6.h>
# include <resolv.h>
int main() {
struct __res_state e; e.nsort = 0
; return 0; }
1999-10-08 07:47:09 +08:00
EOF
if { (eval echo configure:2866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1999-10-08 07:47:09 +08:00
rm -rf conftest*
ac_cv_res_state=yes
1999-10-08 07:47:09 +08:00
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_res_state=no
1999-10-08 07:47:09 +08:00
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_res_state" 1>&6
if test $ac_cv_res_state = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_NEW_RES_STATE 1
1999-10-08 07:47:09 +08:00
EOF
fi
if test "$missing_includes" = "yes"; then
1999-10-30 15:45:37 +08:00
CPPFLAGS="$CPPFLAGS -I\$(srcdir)/missing"
V_INCLS="$V_INCLS -I\$(srcdir)/missing"
1999-10-08 07:47:09 +08:00
fi
for ac_func in vfprintf strcasecmp strlcat strlcpy strdup strsep
1999-10-08 07:47:09 +08:00
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2896: checking for $ac_func" >&5
1999-10-08 07:47:09 +08:00
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2901 "configure"
1999-10-08 07:47:09 +08:00
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
int main() {
/* 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_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif
; return 0; }
EOF
if { (eval echo configure:2924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1999-10-08 07:47:09 +08:00
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
else
echo "$ac_t""no" 1>&6
LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
1999-10-08 07:47:09 +08:00
fi
done
2001-04-27 10:36:16 +08:00
for ac_func in ether_ntohost
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2953: checking for $ac_func" >&5
2001-04-27 10:36:16 +08:00
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2958 "configure"
2001-04-27 10:36:16 +08:00
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
int main() {
/* 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_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif
; return 0; }
EOF
if { (eval echo configure:2981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2001-04-27 10:36:16 +08:00
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
echo $ac_n "checking for buggy ether_ntohost""... $ac_c" 1>&6
echo "configure:3001: checking for buggy ether_ntohost" >&5
2001-04-27 10:36:16 +08:00
if eval "test \"`echo '$''{'ac_cv_buggy_ether_ntohost'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
ac_cv_buggy_ether_ntohost="not while cross-compiling"
2001-04-27 10:36:16 +08:00
else
cat > conftest.$ac_ext <<EOF
#line 3010 "configure"
2001-04-27 10:36:16 +08:00
#include "confdefs.h"
#include <netdb.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
int
main(int argc, char **argv)
{
u_char ea[6] = { 0xff, 0xff, 0xff, 0xff, 0xff };
char name[MAXHOSTNAMELEN];
ether_ntohost(name, (struct ether_addr *)ea);
exit(0);
}
EOF
if { (eval echo configure:3029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2001-04-27 10:36:16 +08:00
then
ac_cv_buggy_ether_ntohost=no
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
ac_cv_buggy_ether_ntohost=yes
fi
rm -fr conftest*
fi
fi
echo "$ac_t""$ac_cv_buggy_ether_ntohost" 1>&6
if test "$ac_cv_buggy_ether_ntohost" = "no"; then
cat >> confdefs.h <<\EOF
#define USE_ETHER_NTOHOST 1
EOF
fi
else
echo "$ac_t""no" 1>&6
fi
done
for ac_func in setlinebuf
1999-10-08 07:47:09 +08:00
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3059: checking for $ac_func" >&5
1999-10-08 07:47:09 +08:00
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3064 "configure"
1999-10-08 07:47:09 +08:00
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
int main() {
/* 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_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif
; return 0; }
EOF
if { (eval echo configure:3087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2000-01-08 00:36:57 +08:00
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
2000-01-26 01:58:32 +08:00
needsnprintf=no
for ac_func in vsnprintf snprintf
2000-01-26 01:58:32 +08:00
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3116: checking for $ac_func" >&5
2000-01-26 01:58:32 +08:00
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3121 "configure"
2000-01-26 01:58:32 +08:00
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
int main() {
/* 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_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif
; return 0; }
EOF
if { (eval echo configure:3144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2000-01-26 01:58:32 +08:00
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
1999-10-08 07:47:09 +08:00
else
echo "$ac_t""no" 1>&6
2000-01-15 16:11:33 +08:00
needsnprintf=yes
1999-10-08 07:47:09 +08:00
fi
done
2000-01-15 16:11:33 +08:00
if test $needsnprintf = yes; then
LIBOBJS="$LIBOBJS snprintf.o"
fi
1999-10-08 07:47:09 +08:00
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
echo "configure:3175: checking return type of signal handlers" >&5
1999-10-08 07:47:09 +08:00
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3180 "configure"
1999-10-08 07:47:09 +08:00
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
#ifdef signal
#undef signal
#endif
#ifdef __cplusplus
extern "C" void (*signal (int, void (*)(int)))(int);
#else
void (*signal ()) ();
#endif
int main() {
int i;
; return 0; }
EOF
if { (eval echo configure:3197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1999-10-08 07:47:09 +08:00
rm -rf conftest*
ac_cv_type_signal=void
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_type_signal=int
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_type_signal" 1>&6
cat >> confdefs.h <<EOF
#define RETSIGTYPE $ac_cv_type_signal
EOF
if test "$ac_cv_type_signal" = void ; then
cat >> confdefs.h <<\EOF
#define RETSIGVAL
EOF
else
cat >> confdefs.h <<\EOF
#define RETSIGVAL (0)
EOF
fi
case "$host_os" in
1999-10-08 07:47:09 +08:00
irix*)
cat >> confdefs.h <<\EOF
#define _BSD_SIGNALS 1
EOF
;;
*)
2002-04-25 12:26:45 +08:00
for ac_func in sigaction
1999-10-08 07:47:09 +08:00
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3239: checking for $ac_func" >&5
1999-10-08 07:47:09 +08:00
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3244 "configure"
1999-10-08 07:47:09 +08:00
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
int main() {
/* 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_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif
; return 0; }
EOF
if { (eval echo configure:3267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1999-10-08 07:47:09 +08:00
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
2002-04-25 12:26:45 +08:00
if test $ac_cv_func_sigaction = no ; then
for ac_func in sigset
1999-10-08 07:47:09 +08:00
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3295: checking for $ac_func" >&5
1999-10-08 07:47:09 +08:00
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3300 "configure"
1999-10-08 07:47:09 +08:00
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
int main() {
/* 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_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif
; return 0; }
EOF
if { (eval echo configure:3323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1999-10-08 07:47:09 +08:00
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
fi
;;
esac
echo $ac_n "checking for library containing dnet_htoa""... $ac_c" 1>&6
echo "configure:3353: checking for library containing dnet_htoa" >&5
if eval "test \"`echo '$''{'ac_cv_search_dnet_htoa'+set}'`\" = set"; then
1999-10-08 07:47:09 +08:00
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_dnet_htoa="no"
2001-10-09 00:17:51 +08:00
cat > conftest.$ac_ext <<EOF
#line 3360 "configure"
1999-10-08 07:47:09 +08:00
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
2001-10-09 00:17:51 +08:00
char dnet_htoa();
1999-10-08 07:47:09 +08:00
int main() {
2001-10-09 00:17:51 +08:00
dnet_htoa()
1999-10-08 07:47:09 +08:00
; return 0; }
EOF
if { (eval echo configure:3371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1999-10-08 07:47:09 +08:00
rm -rf conftest*
ac_cv_search_dnet_htoa="none required"
1999-10-08 07:47:09 +08:00
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
test "$ac_cv_search_dnet_htoa" = "no" && for i in dnet; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
#line 3382 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char dnet_htoa();
1999-10-08 07:47:09 +08:00
int main() {
dnet_htoa()
; return 0; }
2001-10-09 00:17:51 +08:00
EOF
if { (eval echo configure:3393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_dnet_htoa="-l$i"
break
1999-10-08 07:47:09 +08:00
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
2001-10-09 00:17:51 +08:00
fi
rm -f conftest*
done
LIBS="$ac_func_search_save_LIBS"
fi
echo "$ac_t""$ac_cv_search_dnet_htoa" 1>&6
if test "$ac_cv_search_dnet_htoa" != "no"; then
test "$ac_cv_search_dnet_htoa" = "none required" || LIBS="$ac_cv_search_dnet_htoa $LIBS"
cat >> confdefs.h <<\EOF
#define HAVE_DNET_HTOA 1
EOF
2001-10-09 00:17:51 +08:00
else :
fi
2001-10-09 00:17:51 +08:00
echo $ac_n "checking for main in -lrpc""... $ac_c" 1>&6
echo "configure:3418: checking for main in -lrpc" >&5
2001-10-09 00:17:51 +08:00
ac_lib_var=`echo rpc'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1999-10-08 07:47:09 +08:00
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
2001-10-09 00:17:51 +08:00
LIBS="-lrpc $LIBS"
1999-10-08 07:47:09 +08:00
cat > conftest.$ac_ext <<EOF
#line 3426 "configure"
1999-10-08 07:47:09 +08:00
#include "confdefs.h"
int main() {
2001-10-09 00:17:51 +08:00
main()
1999-10-08 07:47:09 +08:00
; return 0; }
EOF
if { (eval echo configure:3433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1999-10-08 07:47:09 +08:00
rm -rf conftest*
2001-10-09 00:17:51 +08:00
eval "ac_cv_lib_$ac_lib_var=yes"
1999-10-08 07:47:09 +08:00
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
2001-10-09 00:17:51 +08:00
eval "ac_cv_lib_$ac_lib_var=no"
1999-10-08 07:47:09 +08:00
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
2001-10-09 00:17:51 +08:00
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1999-10-08 07:47:09 +08:00
echo "$ac_t""yes" 1>&6
2001-10-09 00:17:51 +08:00
ac_tr_lib=HAVE_LIB`echo rpc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1999-10-08 07:47:09 +08:00
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF
2001-10-09 00:17:51 +08:00
LIBS="-lrpc $LIBS"
1999-10-08 07:47:09 +08:00
else
echo "$ac_t""no" 1>&6
2001-10-09 00:17:51 +08:00
fi
echo $ac_n "checking for library containing getrpcbynumber""... $ac_c" 1>&6
echo "configure:3462: checking for library containing getrpcbynumber" >&5
2001-10-09 00:17:51 +08:00
if eval "test \"`echo '$''{'ac_cv_search_getrpcbynumber'+set}'`\" = set"; then
1999-10-08 07:47:09 +08:00
echo $ac_n "(cached) $ac_c" 1>&6
else
2001-10-09 00:17:51 +08:00
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_getrpcbynumber="no"
1999-10-08 07:47:09 +08:00
cat > conftest.$ac_ext <<EOF
#line 3469 "configure"
1999-10-08 07:47:09 +08:00
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
2001-10-09 00:17:51 +08:00
char getrpcbynumber();
1999-10-08 07:47:09 +08:00
int main() {
2001-10-09 00:17:51 +08:00
getrpcbynumber()
1999-10-08 07:47:09 +08:00
; return 0; }
EOF
if { (eval echo configure:3480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1999-10-08 07:47:09 +08:00
rm -rf conftest*
2001-10-09 00:17:51 +08:00
ac_cv_search_getrpcbynumber="none required"
1999-10-08 07:47:09 +08:00
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
2001-10-09 00:17:51 +08:00
fi
rm -f conftest*
test "$ac_cv_search_getrpcbynumber" = "no" && for i in nsl; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
#line 3491 "configure"
2001-10-09 00:17:51 +08:00
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char getrpcbynumber();
int main() {
getrpcbynumber()
; return 0; }
EOF
if { (eval echo configure:3502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1999-10-08 07:47:09 +08:00
rm -rf conftest*
2001-10-09 00:17:51 +08:00
ac_cv_search_getrpcbynumber="-l$i"
break
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
1999-10-08 07:47:09 +08:00
fi
rm -f conftest*
2001-10-09 00:17:51 +08:00
done
LIBS="$ac_func_search_save_LIBS"
fi
1999-10-08 07:47:09 +08:00
2001-10-09 00:17:51 +08:00
echo "$ac_t""$ac_cv_search_getrpcbynumber" 1>&6
if test "$ac_cv_search_getrpcbynumber" != "no"; then
test "$ac_cv_search_getrpcbynumber" = "none required" || LIBS="$ac_cv_search_getrpcbynumber $LIBS"
else :
1999-10-08 07:47:09 +08:00
fi
2001-10-09 00:17:51 +08:00
# Most operating systems have gethostbyname() in the default searched
# libraries (i.e. libc):
# Some OSes (eg. Solaris) place it in libnsl
# Some strange OSes (SINIX) have it in libsocket:
echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6
echo "configure:3531: checking for library containing gethostbyname" >&5
2001-10-09 00:17:51 +08:00
if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then
1999-10-08 07:47:09 +08:00
echo $ac_n "(cached) $ac_c" 1>&6
else
2001-10-09 00:17:51 +08:00
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_gethostbyname="no"
1999-10-08 07:47:09 +08:00
cat > conftest.$ac_ext <<EOF
#line 3538 "configure"
1999-10-08 07:47:09 +08:00
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char gethostbyname();
int main() {
gethostbyname()
; return 0; }
EOF
if { (eval echo configure:3549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1999-10-08 07:47:09 +08:00
rm -rf conftest*
2001-10-09 00:17:51 +08:00
ac_cv_search_gethostbyname="none required"
1999-10-08 07:47:09 +08:00
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
2001-10-09 00:17:51 +08:00
fi
rm -f conftest*
test "$ac_cv_search_gethostbyname" = "no" && for i in nsl socket resolv; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
#line 3560 "configure"
2001-10-09 00:17:51 +08:00
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char gethostbyname();
int main() {
gethostbyname()
; return 0; }
EOF
if { (eval echo configure:3571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1999-10-08 07:47:09 +08:00
rm -rf conftest*
2001-10-09 00:17:51 +08:00
ac_cv_search_gethostbyname="-l$i"
break
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
1999-10-08 07:47:09 +08:00
fi
rm -f conftest*
2001-10-09 00:17:51 +08:00
done
LIBS="$ac_func_search_save_LIBS"
fi
1999-10-08 07:47:09 +08:00
2001-10-09 00:17:51 +08:00
echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6
if test "$ac_cv_search_gethostbyname" != "no"; then
test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
else :
1999-10-08 07:47:09 +08:00
fi
2001-10-09 00:17:51 +08:00
# Unfortunately libsocket sometimes depends on libnsl and
# AC_SEARCH_LIBS isn't up to the task of handling dependencies like this.
if test "$ac_cv_search_gethostbyname" = "no"
then
echo $ac_n "checking for gethostbyname in -lsocket""... $ac_c" 1>&6
echo "configure:3596: checking for gethostbyname in -lsocket" >&5
2001-10-09 00:17:51 +08:00
ac_lib_var=`echo socket'_'gethostbyname | sed 'y%./+-%__p_%'`
1999-10-08 07:47:09 +08:00
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
2001-10-09 00:17:51 +08:00
LIBS="-lsocket -lnsl $LIBS"
1999-10-08 07:47:09 +08:00
cat > conftest.$ac_ext <<EOF
#line 3604 "configure"
1999-10-08 07:47:09 +08:00
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char gethostbyname();
int main() {
gethostbyname()
; return 0; }
EOF
if { (eval echo configure:3615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1999-10-08 07:47:09 +08:00
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
2001-10-09 00:17:51 +08:00
LIBS="-lsocket -lnsl $LIBS"
1999-10-08 07:47:09 +08:00
else
echo "$ac_t""no" 1>&6
fi
2001-10-09 00:17:51 +08:00
fi
echo $ac_n "checking for library containing socket""... $ac_c" 1>&6
echo "configure:3638: checking for library containing socket" >&5
2001-10-09 00:17:51 +08:00
if eval "test \"`echo '$''{'ac_cv_search_socket'+set}'`\" = set"; then
1999-10-08 07:47:09 +08:00
echo $ac_n "(cached) $ac_c" 1>&6
else
2001-10-09 00:17:51 +08:00
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_socket="no"
cat > conftest.$ac_ext <<EOF
#line 3645 "configure"
1999-10-08 07:47:09 +08:00
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char socket();
int main() {
2001-10-09 00:17:51 +08:00
socket()
1999-10-08 07:47:09 +08:00
; return 0; }
EOF
if { (eval echo configure:3656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1999-10-08 07:47:09 +08:00
rm -rf conftest*
2001-10-09 00:17:51 +08:00
ac_cv_search_socket="none required"
1999-10-08 07:47:09 +08:00
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
2001-10-09 00:17:51 +08:00
test "$ac_cv_search_socket" = "no" && for i in socket; do
LIBS="-l$i $ac_func_search_save_LIBS"
1999-10-08 07:47:09 +08:00
cat > conftest.$ac_ext <<EOF
#line 3667 "configure"
1999-10-08 07:47:09 +08:00
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char socket();
int main() {
socket()
; return 0; }
EOF
if { (eval echo configure:3678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1999-10-08 07:47:09 +08:00
rm -rf conftest*
2001-10-09 00:17:51 +08:00
ac_cv_search_socket="-l$i"
break
1999-10-08 07:47:09 +08:00
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
2001-10-09 00:17:51 +08:00
done
LIBS="$ac_func_search_save_LIBS"
1999-10-08 07:47:09 +08:00
fi
2001-10-09 00:17:51 +08:00
echo "$ac_t""$ac_cv_search_socket" 1>&6
if test "$ac_cv_search_socket" != "no"; then
test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
else :
echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
echo "configure:3697: checking for socket in -lsocket" >&5
2001-10-09 00:17:51 +08:00
ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1999-10-08 07:47:09 +08:00
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lsocket -lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3705 "configure"
1999-10-08 07:47:09 +08:00
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char socket();
int main() {
socket()
; return 0; }
EOF
if { (eval echo configure:3716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1999-10-08 07:47:09 +08:00
rm -rf conftest*
2001-10-09 00:17:51 +08:00
eval "ac_cv_lib_$ac_lib_var=yes"
1999-10-08 07:47:09 +08:00
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
2001-10-09 00:17:51 +08:00
eval "ac_cv_lib_$ac_lib_var=no"
1999-10-08 07:47:09 +08:00
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
2001-10-09 00:17:51 +08:00
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1999-10-08 07:47:09 +08:00
echo "$ac_t""yes" 1>&6
LIBS="-lsocket -lnsl $LIBS"
else
echo "$ac_t""no" 1>&6
fi
fi
# DLPI needs putmsg under HPUX so test for -lstr while we're at it
2001-10-09 00:17:51 +08:00
echo $ac_n "checking for library containing putmsg""... $ac_c" 1>&6
echo "configure:3740: checking for library containing putmsg" >&5
2001-10-09 00:17:51 +08:00
if eval "test \"`echo '$''{'ac_cv_search_putmsg'+set}'`\" = set"; then
1999-10-08 07:47:09 +08:00
echo $ac_n "(cached) $ac_c" 1>&6
else
2001-10-09 00:17:51 +08:00
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_putmsg="no"
1999-10-08 07:47:09 +08:00
cat > conftest.$ac_ext <<EOF
#line 3747 "configure"
1999-10-08 07:47:09 +08:00
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char putmsg();
int main() {
putmsg()
; return 0; }
EOF
if { (eval echo configure:3758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1999-10-08 07:47:09 +08:00
rm -rf conftest*
2001-10-09 00:17:51 +08:00
ac_cv_search_putmsg="none required"
1999-10-08 07:47:09 +08:00
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
2001-10-09 00:17:51 +08:00
test "$ac_cv_search_putmsg" = "no" && for i in str; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
#line 3769 "configure"
2001-10-09 00:17:51 +08:00
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char putmsg();
1999-10-08 07:47:09 +08:00
2001-10-09 00:17:51 +08:00
int main() {
putmsg()
; return 0; }
1999-10-08 07:47:09 +08:00
EOF
if { (eval echo configure:3780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2001-10-09 00:17:51 +08:00
rm -rf conftest*
ac_cv_search_putmsg="-l$i"
break
1999-10-08 07:47:09 +08:00
else
2001-10-09 00:17:51 +08:00
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
LIBS="$ac_func_search_save_LIBS"
1999-10-08 07:47:09 +08:00
fi
2001-10-09 00:17:51 +08:00
echo "$ac_t""$ac_cv_search_putmsg" 1>&6
if test "$ac_cv_search_putmsg" != "no"; then
test "$ac_cv_search_putmsg" = "none required" || LIBS="$ac_cv_search_putmsg $LIBS"
else :
fi
1999-10-08 07:47:09 +08:00
LBL_LIBS="$LIBS"
pfopen=/usr/examples/packetfilter/pfopen.c
if test -f $pfopen ; then
for ac_func in pfopen
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3808: checking for $ac_func" >&5
1999-10-08 07:47:09 +08:00
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3813 "configure"
1999-10-08 07:47:09 +08:00
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
int main() {
/* 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_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif
; return 0; }
EOF
if { (eval echo configure:3836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1999-10-08 07:47:09 +08:00
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
if test $ac_cv_func_pfopen = "no" ; then
echo "$ac_t""Using $pfopen" 1>&6
LIBS="$LIBS $pfopen"
fi
fi
echo $ac_n "checking for local pcap library""... $ac_c" 1>&6
echo "configure:3866: checking for local pcap library" >&5
1999-10-08 07:47:09 +08:00
libpcap=FAIL
lastdir=FAIL
places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
2000-07-01 11:40:34 +08:00
egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
for dir in $places $srcdir/../libpcap $srcdir/libpcap ; do
1999-10-08 07:47:09 +08:00
basedir=`echo $dir | sed -e 's/[ab][0-9]*$//'`
if test $lastdir = $basedir ; then
continue;
fi
lastdir=$dir
1999-10-30 15:33:45 +08:00
if test -r $dir/libpcap.a ; then
1999-10-08 07:47:09 +08:00
libpcap=$dir/libpcap.a
d=$dir
fi
done
if test $libpcap = FAIL ; then
echo "$ac_t""not found" 1>&6
echo $ac_n "checking for main in -lpcap""... $ac_c" 1>&6
echo "configure:3885: checking for main in -lpcap" >&5
1999-10-08 07:47:09 +08:00
ac_lib_var=`echo pcap'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lpcap $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3893 "configure"
1999-10-08 07:47:09 +08:00
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if { (eval echo configure:3900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1999-10-08 07:47:09 +08:00
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
libpcap="-lpcap"
else
echo "$ac_t""no" 1>&6
fi
if test $libpcap = FAIL ; then
{ echo "configure: error: see the INSTALL doc for more info" 1>&2; exit 1; }
fi
echo $ac_n "checking for extraneous pcap header directories""... $ac_c" 1>&6
echo "configure:3924: checking for extraneous pcap header directories" >&5
if ! test \( -r /usr/local/include/pcap.h -o \
-r /usr/include/pcap.h \); then
if test -r /usr/local/include/pcap/pcap.h; then
d="/usr/local/include/pcap"
elif test -r /usr/include/pcap/pcap.h; then
d="/usr/include/pcap"
fi
fi
if test -z $d ; then
echo "$ac_t""not found" 1>&6
else
V_INCLS="-I$d $V_INCLS"
echo "$ac_t""found -- -I$d added" 1>&6
fi
1999-10-08 07:47:09 +08:00
else
V_PCAPDEP=$libpcap
2001-10-09 01:31:44 +08:00
places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
1999-10-30 15:33:45 +08:00
if test -r $d/pcap.h; then
V_INCLS="-I$d $V_INCLS"
elif test -r $places/pcap.h; then
V_INCLS="-I$places $V_INCLS"
1999-10-30 15:33:45 +08:00
else
{ echo "configure: error: cannot find pcap.h" 1>&2; exit 1; }
fi
1999-10-08 07:47:09 +08:00
echo "$ac_t""$libpcap" 1>&6
fi
LIBS="$libpcap $LIBS"
case "$host_os" in
1999-10-08 07:47:09 +08:00
aix*)
pseexe="/lib/pse.exp"
echo $ac_n "checking for $pseexe""... $ac_c" 1>&6
echo "configure:3958: checking for $pseexe" >&5
1999-10-08 07:47:09 +08:00
if test -f $pseexe ; then
echo "$ac_t""yes" 1>&6
LIBS="$LIBS -I:$pseexe"
fi
#
# We need "-lodm" and "-lcfg", as libpcap requires them on
# AIX, and we just build a static libpcap.a and thus can't
# arrange that when you link with libpcap you automatically
# link with those libraries.
#
LIBS="$LIBS -lodm -lcfg"
1999-10-08 07:47:09 +08:00
;;
esac
echo $ac_n "checking for pcap_list_datalinks""... $ac_c" 1>&6
echo "configure:3974: checking for pcap_list_datalinks" >&5
if eval "test \"`echo '$''{'ac_cv_func_pcap_list_datalinks'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3979 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char pcap_list_datalinks(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char pcap_list_datalinks();
int main() {
/* 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_pcap_list_datalinks) || defined (__stub___pcap_list_datalinks)
choke me
#else
pcap_list_datalinks();
#endif
; return 0; }
EOF
if { (eval echo configure:4002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_pcap_list_datalinks=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_pcap_list_datalinks=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'pcap_list_datalinks`\" = yes"; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
#define HAVE_PCAP_LIST_DATALINKS 1
EOF
else
echo "$ac_t""no" 1>&6
LIBOBJS="$LIBOBJS datalinks.o"
fi
echo $ac_n "checking for pcap_set_datalink""... $ac_c" 1>&6
echo "configure:4026: checking for pcap_set_datalink" >&5
if eval "test \"`echo '$''{'ac_cv_func_pcap_set_datalink'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4031 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char pcap_set_datalink(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char pcap_set_datalink();
int main() {
/* 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_pcap_set_datalink) || defined (__stub___pcap_set_datalink)
choke me
#else
pcap_set_datalink();
#endif
; return 0; }
EOF
if { (eval echo configure:4054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_pcap_set_datalink=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_pcap_set_datalink=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'pcap_set_datalink`\" = yes"; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
#define HAVE_PCAP_SET_DATALINK 1
EOF
else
echo "$ac_t""no" 1>&6
fi
echo $ac_n "checking for pcap_datalink_name_to_val""... $ac_c" 1>&6
echo "configure:4077: checking for pcap_datalink_name_to_val" >&5
if eval "test \"`echo '$''{'ac_cv_func_pcap_datalink_name_to_val'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4082 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char pcap_datalink_name_to_val(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char pcap_datalink_name_to_val();
int main() {
/* 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_pcap_datalink_name_to_val) || defined (__stub___pcap_datalink_name_to_val)
choke me
#else
pcap_datalink_name_to_val();
#endif
; return 0; }
EOF
if { (eval echo configure:4105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_pcap_datalink_name_to_val=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_pcap_datalink_name_to_val=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'pcap_datalink_name_to_val`\" = yes"; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
#define HAVE_PCAP_DATALINK_NAME_TO_VAL 1
EOF
else
echo "$ac_t""no" 1>&6
LIBOBJS="$LIBOBJS dlnames.o"
fi
for ac_func in pcap_findalldevs pcap_dump_flush pcap_lib_version
2000-12-10 03:09:55 +08:00
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4133: checking for $ac_func" >&5
2000-12-10 03:09:55 +08:00
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4138 "configure"
2000-12-10 03:09:55 +08:00
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
int main() {
/* 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_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif
; return 0; }
EOF
if { (eval echo configure:4161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2000-12-10 03:09:55 +08:00
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
if test $ac_cv_func_pcap_lib_version = "no" ; then
echo $ac_n "checking whether pcap_version is defined by libpcap""... $ac_c" 1>&6
echo "configure:4187: checking whether pcap_version is defined by libpcap" >&5
cat > conftest.$ac_ext <<EOF
#line 4189 "configure"
#include "confdefs.h"
int main() {
char *
return_pcap_version(void)
{
extern char pcap_version[];
return pcap_version;
}
; return 0; }
EOF
if { (eval echo configure:4204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_lbl_cv_pcap_version_defined=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_lbl_cv_pcap_version_defined=no
fi
rm -f conftest*
if test "$ac_lbl_cv_pcap_version_defined" = yes ; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
#define HAVE_PCAP_VERSION 1
EOF
else
echo "$ac_t""no" 1>&6
fi
fi
echo $ac_n "checking whether pcap_debug is defined by libpcap""... $ac_c" 1>&6
echo "configure:4225: checking whether pcap_debug is defined by libpcap" >&5
cat > conftest.$ac_ext <<EOF
#line 4227 "configure"
#include "confdefs.h"
int main() {
int
return_pcap_debug(void)
{
extern int pcap_debug;
return pcap_debug;
}
; return 0; }
EOF
if { (eval echo configure:4242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_lbl_cv_pcap_debug_defined=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_lbl_cv_pcap_debug_defined=no
fi
rm -f conftest*
if test "$ac_lbl_cv_pcap_debug_defined" = yes ; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
#define HAVE_PCAP_DEBUG 1
EOF
else
echo "$ac_t""no" 1>&6
#
# OK, what about "yydebug"?
#
echo $ac_n "checking whether yydebug is defined by libpcap""... $ac_c" 1>&6
echo "configure:4264: checking whether yydebug is defined by libpcap" >&5
cat > conftest.$ac_ext <<EOF
#line 4266 "configure"
#include "confdefs.h"
int main() {
int
return_yydebug(void)
{
extern int yydebug;
return yydebug;
}
; return 0; }
EOF
if { (eval echo configure:4281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_lbl_cv_yydebug_defined=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_lbl_cv_yydebug_defined=no
fi
rm -f conftest*
if test "$ac_lbl_cv_yydebug_defined" = yes ; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
#define HAVE_YYDEBUG 1
EOF
else
echo "$ac_t""no" 1>&6
fi
fi
for ac_func in bpf_dump
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4304: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4309 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func();
int main() {
/* 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_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif
; return 0; }
EOF
if { (eval echo configure:4332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
2000-12-10 03:09:55 +08:00
else
echo "$ac_t""no" 1>&6
LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
fi
done
1999-10-08 07:47:09 +08:00
V_GROUP=0
if test -f /etc/group -a ! -z "`grep '^wheel:' /etc/group`" ; then
V_GROUP=wheel
fi
case "$host_os" in
1999-10-08 07:47:09 +08:00
aix*)
cat >> confdefs.h <<\EOF
#define _SUN 1
EOF
;;
irix*)
V_GROUP=sys
;;
osf*)
V_GROUP=system
;;
solaris*)
V_GROUP=sys
;;
esac
if test -f /dev/bpf0 ; then
V_GROUP=bpf
fi
echo $ac_n "checking for int8_t using $CC""... $ac_c" 1>&6
echo "configure:4389: checking for int8_t using $CC" >&5
if eval "test \"`echo '$''{'ac_cv_lbl_have_int8_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4394 "configure"
#include "confdefs.h"
# include "confdefs.h"
# include <sys/types.h>
# if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
# endif
int main() {
int8_t i
; return 0; }
EOF
if { (eval echo configure:4407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_lbl_have_int8_t=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_lbl_have_int8_t=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_lbl_have_int8_t" 1>&6
if test $ac_cv_lbl_have_int8_t = no ; then
cat >> confdefs.h <<\EOF
#define int8_t signed char
EOF
fi
1999-10-30 15:33:45 +08:00
echo $ac_n "checking for u_int8_t using $CC""... $ac_c" 1>&6
echo "configure:4427: checking for u_int8_t using $CC" >&5
1999-10-30 15:33:45 +08:00
if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int8_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4432 "configure"
1999-10-30 15:33:45 +08:00
#include "confdefs.h"
# include "confdefs.h"
# include <sys/types.h>
# if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
# endif
int main() {
u_int8_t i
; return 0; }
EOF
if { (eval echo configure:4445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1999-10-30 15:33:45 +08:00
rm -rf conftest*
ac_cv_lbl_have_u_int8_t=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_lbl_have_u_int8_t=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_lbl_have_u_int8_t" 1>&6
if test $ac_cv_lbl_have_u_int8_t = no ; then
cat >> confdefs.h <<\EOF
#define u_int8_t u_char
EOF
fi
echo $ac_n "checking for int16_t using $CC""... $ac_c" 1>&6
echo "configure:4465: checking for int16_t using $CC" >&5
1999-10-30 15:33:45 +08:00
if eval "test \"`echo '$''{'ac_cv_lbl_have_int16_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4470 "configure"
1999-10-30 15:33:45 +08:00
#include "confdefs.h"
# include "confdefs.h"
# include <sys/types.h>
# if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
# endif
int main() {
int16_t i
; return 0; }
EOF
if { (eval echo configure:4483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1999-10-30 15:33:45 +08:00
rm -rf conftest*
ac_cv_lbl_have_int16_t=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_lbl_have_int16_t=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_lbl_have_int16_t" 1>&6
if test $ac_cv_lbl_have_int16_t = no ; then
cat >> confdefs.h <<\EOF
#define int16_t short
1999-10-30 15:33:45 +08:00
EOF
fi
echo $ac_n "checking for u_int16_t using $CC""... $ac_c" 1>&6
echo "configure:4503: checking for u_int16_t using $CC" >&5
1999-10-30 15:33:45 +08:00
if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int16_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4508 "configure"
1999-10-30 15:33:45 +08:00
#include "confdefs.h"
# include "confdefs.h"
# include <sys/types.h>
# if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
# endif
int main() {
u_int16_t i
; return 0; }
EOF
if { (eval echo configure:4521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1999-10-30 15:33:45 +08:00
rm -rf conftest*
ac_cv_lbl_have_u_int16_t=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_lbl_have_u_int16_t=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_lbl_have_u_int16_t" 1>&6
if test $ac_cv_lbl_have_u_int16_t = no ; then
cat >> confdefs.h <<\EOF
#define u_int16_t u_short
1999-10-30 15:33:45 +08:00
EOF
fi
1999-10-08 07:47:09 +08:00
echo $ac_n "checking for int32_t using $CC""... $ac_c" 1>&6
echo "configure:4541: checking for int32_t using $CC" >&5
1999-10-08 07:47:09 +08:00
if eval "test \"`echo '$''{'ac_cv_lbl_have_int32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4546 "configure"
1999-10-08 07:47:09 +08:00
#include "confdefs.h"
# include "confdefs.h"
# include <sys/types.h>
# if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
# endif
int main() {
int32_t i
; return 0; }
EOF
if { (eval echo configure:4559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1999-10-08 07:47:09 +08:00
rm -rf conftest*
ac_cv_lbl_have_int32_t=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_lbl_have_int32_t=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_lbl_have_int32_t" 1>&6
if test $ac_cv_lbl_have_int32_t = no ; then
cat >> confdefs.h <<\EOF
#define int32_t int
EOF
fi
echo $ac_n "checking for u_int32_t using $CC""... $ac_c" 1>&6
echo "configure:4579: checking for u_int32_t using $CC" >&5
1999-10-08 07:47:09 +08:00
if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4584 "configure"
1999-10-08 07:47:09 +08:00
#include "confdefs.h"
# include "confdefs.h"
# include <sys/types.h>
# if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
# endif
int main() {
u_int32_t i
; return 0; }
EOF
if { (eval echo configure:4597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1999-10-08 07:47:09 +08:00
rm -rf conftest*
ac_cv_lbl_have_u_int32_t=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_lbl_have_u_int32_t=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_lbl_have_u_int32_t" 1>&6
if test $ac_cv_lbl_have_u_int32_t = no ; then
cat >> confdefs.h <<\EOF
#define u_int32_t u_int
EOF
fi
rm -f os-proto.h
if test "${LBL_CFLAGS+set}" = set; then
V_CCOPT="$V_CCOPT ${LBL_CFLAGS}"
fi
if test -f .devel ; then
if test "$GCC" = yes ; then
if test "${LBL_CFLAGS+set}" != set; then
if test "$ac_cv_prog_cc_g" = yes ; then
V_CCOPT="-g $V_CCOPT"
fi
V_CCOPT="$V_CCOPT -Wall"
if test $ac_cv_lbl_gcc_vers -gt 1 ; then
V_CCOPT="$V_CCOPT -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -W"
1999-10-08 07:47:09 +08:00
fi
fi
else
case "$host_os" in
1999-10-08 07:47:09 +08:00
irix6*)
V_CCOPT="$V_CCOPT -n32"
;;
*)
;;
esac
fi
os=`echo $host_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'`
1999-10-08 07:47:09 +08:00
name="lbl/os-$os.h"
if test -f $name ; then
ln -s $name os-proto.h
cat >> confdefs.h <<\EOF
#define HAVE_OS_PROTO_H 1
EOF
else
echo "configure: warning: can't find $name" 1>&2
fi
fi
echo $ac_n "checking if sockaddr struct has sa_len member""... $ac_c" 1>&6
echo "configure:4657: checking if sockaddr struct has sa_len member" >&5
1999-10-08 07:47:09 +08:00
if eval "test \"`echo '$''{'ac_cv_lbl_sockaddr_has_sa_len'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4662 "configure"
1999-10-08 07:47:09 +08:00
#include "confdefs.h"
# include <sys/types.h>
# include <sys/socket.h>
int main() {
u_int i = sizeof(((struct sockaddr *)0)->sa_len)
; return 0; }
EOF
if { (eval echo configure:4671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1999-10-08 07:47:09 +08:00
rm -rf conftest*
ac_cv_lbl_sockaddr_has_sa_len=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_lbl_sockaddr_has_sa_len=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_lbl_sockaddr_has_sa_len" 1>&6
if test $ac_cv_lbl_sockaddr_has_sa_len = yes ; then
cat >> confdefs.h <<\EOF
#define HAVE_SOCKADDR_SA_LEN 1
EOF
fi
echo $ac_n "checking if unaligned accesses fail""... $ac_c" 1>&6
echo "configure:4692: checking if unaligned accesses fail" >&5
1999-10-08 07:47:09 +08:00
if eval "test \"`echo '$''{'ac_cv_lbl_unaligned_fail'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$host_cpu" in
1999-10-08 07:47:09 +08:00
#
# These are CPU types where:
#
# the CPU faults on an unaligned access, but at least some
# OSes that support that CPU catch the fault and simulate
# the unaligned access (e.g., Alpha/{Digital,Tru64} UNIX) -
# the simulation is slow, so we don't want to use it;
#
# the CPU, I infer (from the old
#
2000-06-10 22:21:14 +08:00
# XXX: should also check that they don't do weird things (like on arm)
#
# comment) doesn't fault on unaligned accesses, but doesn't
# do a normal unaligned fetch, either (e.g., presumably, ARM);
#
# for whatever reason, the test program doesn't work
# (this has been claimed to be the case for several of those
# CPUs - I don't know what the problem is; the problem
# was reported as "the test program dumps core" for SuperH,
# but that's what the test program is *supposed* to do -
# it dumps core before it writes anything, so the test
# for an empty output file should find an empty output
# file and conclude that unaligned accesses don't work).
#
# This run-time test won't work if you're cross-compiling, so
# in order to support cross-compiling for a particular CPU,
# we have to wire in the list of CPU types anyway, as far as
# I know, so perhaps we should just have a set of CPUs on
# which we know it doesn't work, a set of CPUs on which we
# know it does work, and have the script just fail on other
# cpu types and update it when such a failure occurs.
#
alpha*|arm*|hp*|mips*|sh*|sparc*|ia64)
1999-10-08 07:47:09 +08:00
ac_cv_lbl_unaligned_fail=yes
;;
*)
cat >conftest.c <<EOF
# include <sys/types.h>
# include <sys/wait.h>
# include <stdio.h>
unsigned char a[5] = { 1, 2, 3, 4, 5 };
main() {
unsigned int i;
pid_t pid;
int status;
/* avoid "core dumped" message */
pid = fork();
if (pid < 0)
exit(2);
if (pid > 0) {
/* parent */
pid = waitpid(pid, &status, 0);
if (pid < 0)
exit(3);
exit(!WIFEXITED(status));
}
/* child */
i = *(unsigned int *)&a[1];
printf("%d\n", i);
exit(0);
}
EOF
${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS \
conftest.c $LIBS >/dev/null 2>&1
if test ! -x conftest ; then
ac_cv_lbl_unaligned_fail=yes
else
./conftest >conftest.out
if test ! -s conftest.out ; then
ac_cv_lbl_unaligned_fail=yes
else
ac_cv_lbl_unaligned_fail=no
fi
fi
rm -f conftest* core core.conftest
;;
esac
fi
echo "$ac_t""$ac_cv_lbl_unaligned_fail" 1>&6
if test $ac_cv_lbl_unaligned_fail = yes ; then
cat >> confdefs.h <<\EOF
#define LBL_ALIGN 1
EOF
fi
echo $ac_n "checking for h_errno""... $ac_c" 1>&6
echo "configure:4788: checking for h_errno" >&5
if eval "test \"`echo '$''{'ac_cv_var_h_errno'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4793 "configure"
#include "confdefs.h"
# include <sys/types.h>
# include <netdb.h>
int main() {
int foo = h_errno;
; return 0; }
EOF
if { (eval echo configure:4802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_var_h_errno=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_var_h_errno=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_var_h_errno" 1>&6
if test "$ac_cv_var_h_errno" = "yes"; then
cat >> confdefs.h <<\EOF
#define HAVE_H_ERRNO 1
EOF
fi
# Check whether --with-crypto or --without-crypto was given.
if test "${with_crypto+set}" = set; then
withval="$with_crypto"
:
else
echo $ac_n "checking for SSLeay""... $ac_c" 1>&6
echo "configure:4830: checking for SSLeay" >&5
ac_cv_ssleay_path=no
incdir=no
for dir in /usr/${host_alias} /usr /usr/local /usr/local/ssl /usr/pkg; do
if test -d $dir/lib -a -f $dir/lib/libcrypto.a; then
ac_cv_ssleay_path=$dir
fi
if test -d $dir/include/openssl -a -f $dir/include/openssl/des.h; then
incdir="-I$dir/include"
fi
if test "$ac_cv_ssleay_path" != "no" -a "$incdir" != "no"; then
break;
else
ac_cv_ssleay_path=no
incdir=no
fi
done
echo "$ac_t""$ac_cv_ssleay_path" 1>&6
if test "$ac_cv_ssleay_path" != no; then
V_INCLS="$V_INCLS $incdir"
2001-01-09 15:26:09 +08:00
LDFLAGS="-L$dir/lib $LDFLAGS"
1999-12-15 00:39:39 +08:00
if test -f $ac_cv_ssleay_path/lib/libRSAglue.a; then
LIBS="$LIBS -lRSAglue"
fi
if test -f $ac_cv_ssleay_path/lib/librsaref.a; then
LIBS="$LIBS -lrsaref"
fi
echo $ac_n "checking for des_cbc_encrypt in -lcrypto""... $ac_c" 1>&6
echo "configure:4858: checking for des_cbc_encrypt in -lcrypto" >&5
ac_lib_var=`echo crypto'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lcrypto $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4866 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char des_cbc_encrypt();
int main() {
des_cbc_encrypt()
; return 0; }
EOF
if { (eval echo configure:4877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_lib=HAVE_LIB`echo crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF
LIBS="-lcrypto $LIBS"
else
echo "$ac_t""no" 1>&6
fi
bak_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $V_INCLS"
for ac_hdr in openssl/cast.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4911: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4916 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
if test "$ac_cv_header_openssl_cast_h" = "yes"; then
echo $ac_n "checking for buggy CAST128""... $ac_c" 1>&6
echo "configure:4950: checking for buggy CAST128" >&5
if eval "test \"`echo '$''{'td_cv_buggy_cast128'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
td_cv_buggy_cast128="cross-compiling, assume yes"
else
cat > conftest.$ac_ext <<EOF
#line 4958 "configure"
#include "confdefs.h"
#include <openssl/cast.h>
main()
{
unsigned char key[] = {0x01,0x23,0x45,0x67,0x12};
unsigned char in[] = {0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF};
unsigned char out[sizeof(in)];
unsigned char ok[] = {0x7A,0xC8,0x16,0xD1,0x6E,0x9B,0x30,0x2E};
CAST_KEY ks;
CAST_set_key(&ks, sizeof(key), key);
CAST_ecb_encrypt(in, out, &ks, CAST_ENCRYPT);
if (memcmp(out, ok, sizeof(ok)) != 0)
return 0;
else
return 1;
}
EOF
if { (eval echo configure:4977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
td_cv_buggy_cast128=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
td_cv_buggy_cast128=no
fi
rm -fr conftest*
fi
fi
echo "$ac_t""$td_cv_buggy_cast128" 1>&6
if test "$td_cv_buggy_cast128" != no; then
echo "NOTE: SSLeay 0.9.0b has a bug in CAST128 en/decoding routine."
echo "disabling CAST128 support."
cat >> confdefs.h <<\EOF
#define HAVE_BUGGY_CAST128 1
EOF
fi
fi
CPPFLAGS=$bak_CPPFLAGS
fi
fi
for ac_hdr in openssl/rc5.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:5011: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5016 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
1999-10-18 07:25:24 +08:00
1999-10-08 07:47:09 +08:00
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1999-10-08 07:47:09 +08:00
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:5066: checking for a BSD compatible install" >&5
1999-10-08 07:47:09 +08:00
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1999-10-08 07:47:09 +08:00
for ac_dir in $PATH; do
# Account for people who put trailing slashes in PATH elements.
case "$ac_dir/" in
/|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
*)
# OSF1 and SCO ODT 3.0 have their own names for install.
# Don't use installbsd from OSF since it installs stuff as root
# by default.
for ac_prog in ginstall scoinst install; do
1999-10-08 07:47:09 +08:00
if test -f $ac_dir/$ac_prog; then
if test $ac_prog = install &&
grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
else
ac_cv_path_install="$ac_dir/$ac_prog -c"
break 2
fi
fi
done
;;
esac
done
IFS="$ac_save_IFS"
fi
if test "${ac_cv_path_install+set}" = set; then
INSTALL="$ac_cv_path_install"
else
# As a last resort, use the slow shell script. We don't cache a
# path for INSTALL within a source directory, because that will
# break other packages using the cache if that directory is
# removed, or if the path is relative.
INSTALL="$ac_install_sh"
fi
fi
echo "$ac_t""$INSTALL" 1>&6
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1999-10-08 07:47:09 +08:00
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2000-01-18 11:47:39 +08:00
trap '' 1 2 15
1999-10-08 07:47:09 +08:00
cat > confcache <<\EOF
# 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. It is not useful on other systems.
# If it contains results you don't want to keep, you may remove or edit it.
#
# By default, configure uses ./config.cache as the cache file,
# creating it if it does not exist already. You can give configure
# the --cache-file=FILE option to use a different cache file; that is
# what configure does when it calls configure scripts in
# subdirectories, so they share the cache.
# Giving --cache-file=/dev/null disables caching, for debugging configure.
# config.status only pays attention to the cache file if you give it the
# --recheck option to rerun configure.
#
EOF
# 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
1999-10-08 07:47:09 +08:00
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
sed -n \
-e "s/'/'\\\\''/g" \
-e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
;;
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
;;
esac >> confcache
if cmp -s $cache_file confcache; then
:
else
if test -w $cache_file; then
echo "updating cache $cache_file"
cat confcache > $cache_file
else
echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
# Any assignment to VPATH causes Sun make to only execute
# the first set of double-colon rules, so remove it if not needed.
# If there is a colon in the path, we need to keep it.
if test "x$srcdir" = x.; then
ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
fi
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
DEFS=-DHAVE_CONFIG_H
1999-10-08 07:47:09 +08:00
# Without the "./", some shells look in PATH for config.status.
: ${CONFIG_STATUS=./config.status}
echo creating $CONFIG_STATUS
rm -f $CONFIG_STATUS
cat > $CONFIG_STATUS <<EOF
#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
#
# $0 $ac_configure_args
#
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.
ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
for ac_option
do
case "\$ac_option" in
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
echo "$CONFIG_STATUS generated by autoconf version 2.13"
1999-10-08 07:47:09 +08:00
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
*) echo "\$ac_cs_usage"; exit 1 ;;
esac
done
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1999-10-08 07:47:09 +08:00
EOF
cat >> $CONFIG_STATUS <<EOF
# Protect against being on the right side of a sed subst in config.status.
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
s%@SHELL@%$SHELL%g
1999-10-08 07:47:09 +08:00
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
s%@FFLAGS@%$FFLAGS%g
1999-10-08 07:47:09 +08:00
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
s%@exec_prefix@%$exec_prefix%g
s%@prefix@%$prefix%g
s%@program_transform_name@%$program_transform_name%g
s%@bindir@%$bindir%g
s%@sbindir@%$sbindir%g
s%@libexecdir@%$libexecdir%g
s%@datadir@%$datadir%g
s%@sysconfdir@%$sysconfdir%g
s%@sharedstatedir@%$sharedstatedir%g
s%@localstatedir@%$localstatedir%g
s%@libdir@%$libdir%g
s%@includedir@%$includedir%g
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
s%@host@%$host%g
s%@host_alias@%$host_alias%g
s%@host_cpu@%$host_cpu%g
s%@host_vendor@%$host_vendor%g
s%@host_os@%$host_os%g
s%@SHLICC2@%$SHLICC2%g
s%@CC@%$CC%g
s%@CPP@%$CPP%g
s%@LIBOBJS@%$LIBOBJS%g
s%@V_CCOPT@%$V_CCOPT%g
s%@V_GROUP@%$V_GROUP%g
s%@V_INCLS@%$V_INCLS%g
s%@V_PCAPDEP@%$V_PCAPDEP%g
s%@LOCALSRC@%$LOCALSRC%g
1999-10-08 07:47:09 +08:00
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
1999-10-08 07:47:09 +08:00
s%@INSTALL_DATA@%$INSTALL_DATA%g
CEOF
EOF
cat >> $CONFIG_STATUS <<\EOF
# 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_cmds=90 # Maximum number of lines to put in a sed script.
ac_file=1 # Number of current file.
ac_beg=1 # First line for current file.
ac_end=$ac_max_sed_cmds # 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" conftest.subs > conftest.s$ac_file
else
sed "${ac_end}q" conftest.subs > conftest.s$ac_file
fi
if test ! -s conftest.s$ac_file; then
ac_more_lines=false
rm -f conftest.s$ac_file
else
if test -z "$ac_sed_cmds"; then
ac_sed_cmds="sed -f conftest.s$ac_file"
else
ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
fi
ac_file=`expr $ac_file + 1`
ac_beg=$ac_end
ac_end=`expr $ac_end + $ac_max_sed_cmds`
fi
done
if test -z "$ac_sed_cmds"; then
ac_sed_cmds=cat
fi
EOF
cat >> $CONFIG_STATUS <<EOF
CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case "$ac_file" in
*:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
*) ac_file_in="${ac_file}.in" ;;
esac
# Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
# Remove last slash and all that follows it. Not all systems have dirname.
ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
# The file is in a subdirectory.
test ! -d "$ac_dir" && mkdir "$ac_dir"
ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
# A "../" for each directory in $ac_dir_suffix.
ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
else
ac_dir_suffix= ac_dots=
fi
case "$ac_given_srcdir" in
.) srcdir=.
if test -z "$ac_dots"; then top_srcdir=.
else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
/*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
*) # Relative path.
srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
top_srcdir="$ac_dots$ac_given_srcdir" ;;
esac
case "$ac_given_INSTALL" in
[/$]*) INSTALL="$ac_given_INSTALL" ;;
*) INSTALL="$ac_dots$ac_given_INSTALL" ;;
esac
echo creating "$ac_file"
rm -f "$ac_file"
configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
case "$ac_file" in
*Makefile*) ac_comsub="1i\\
# $configure_input" ;;
*) ac_comsub= ;;
esac
ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
sed -e "$ac_comsub
s%@configure_input@%$configure_input%g
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
s%@INSTALL@%$INSTALL%g
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
fi; done
rm -f conftest.s*
# 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='\3'
ac_dD='%g'
# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ac_uB='\([ ]\)%\1#\2define\3'
ac_uC=' '
ac_uD='\4%g'
# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ac_eB='$%\1#\2define\3'
ac_eC=' '
ac_eD='%g'
if test "${CONFIG_HEADERS+set}" != set; then
EOF
cat >> $CONFIG_STATUS <<EOF
CONFIG_HEADERS="config.h"
EOF
cat >> $CONFIG_STATUS <<\EOF
fi
for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case "$ac_file" in
*:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
*) ac_file_in="${ac_file}.in" ;;
esac
echo creating $ac_file
rm -f conftest.frag conftest.in conftest.out
ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
cat $ac_file_inputs > conftest.in
EOF
# Transform confdefs.h into a sed script conftest.vals that substitutes
# the proper values into config.h.in to produce config.h. 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.vals
cat > conftest.hdr <<\EOF
s/[\\&%]/\\&/g
s%[\\$`]%\\&%g
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
s%ac_d%ac_u%gp
s%ac_u%ac_e%gp
EOF
sed -n -f conftest.hdr confdefs.h > conftest.vals
rm -f conftest.hdr
# 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.vals <<\EOF
s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
EOF
# Break up conftest.vals because some shells have a limit on
# the size of here documents, and old seds have small limits too.
rm -f conftest.tail
while :
do
ac_lines=`grep -c . conftest.vals`
# grep -c gives empty output for an empty file on some AIX systems.
if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
# Write a limited-size here document to conftest.frag.
echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
echo 'CEOF
sed -f conftest.frag conftest.in > conftest.out
rm -f conftest.in
mv conftest.out conftest.in
' >> $CONFIG_STATUS
sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
rm -f conftest.vals
mv conftest.tail conftest.vals
done
rm -f conftest.vals
cat >> $CONFIG_STATUS <<\EOF
rm -f conftest.frag conftest.h
echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
cat conftest.in >> conftest.h
rm -f conftest.in
if cmp -s $ac_file conftest.h 2>/dev/null; then
echo "$ac_file is unchanged"
rm -f conftest.h
else
# Remove last slash and all that follows it. Not all systems have dirname.
ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
# The file is in a subdirectory.
test ! -d "$ac_dir" && mkdir "$ac_dir"
fi
rm -f $ac_file
mv conftest.h $ac_file
fi
fi; done
1999-10-08 07:47:09 +08:00
EOF
cat >> $CONFIG_STATUS <<EOF
2000-05-10 16:22:09 +08:00
1999-10-08 07:47:09 +08:00
EOF
cat >> $CONFIG_STATUS <<\EOF
2000-01-18 11:47:39 +08:00
if test -f .devel; then
echo timestamp > stamp-h
cat Makefile-devel-adds >> Makefile
make depend
fi
1999-10-08 07:47:09 +08:00
exit 0
EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2000-01-18 11:47:39 +08:00
exit 0