#! /bin/sh
ac_help=
ac_default_prefix=/usr/local
ac_help="$ac_help
--enable-subdir enable local building as subdirectory (default=no)"
if test ".`echo dummy $@ | grep enable-subdir`" != .; then
enable_subdir=yes
fi
if test ".`echo dummy $@ | grep help`" = .; then
ac_prog=$0
ac_srcdir=`echo $ac_prog | sed -e 's%/[^/][^/]*$%%' -e 's%\([^/]\)/*$%\1%'`
test ".$ac_srcdir" = ".$ac_prog" && ac_srcdir=.
ac_shtool="${CONFIG_SHELL-/bin/sh} $ac_srcdir/shtool"
if test ".$enable_subdir" != .yes; then
TB=`$ac_shtool echo -n -e %B 2>/dev/null`
TN=`$ac_shtool echo -n -e %b 2>/dev/null`
else
TB=''
TN=''
fi
PTH_VERSION_STR="`$ac_shtool version -lc -dlong $ac_srcdir/pth_vers.c`"
if test ".$enable_subdir" != .yes; then
echo "Configuring ${TB}GNU Pth${TN} (Portable Threads), Version ${TB}${PTH_VERSION_STR}${TN}"
echo "Copyright (c) 1999-2001 Ralf S. Engelschall <rse@engelschall.com>"
fi
PTH_VERSION_HEX="`$ac_shtool version -lc -dhex $ac_srcdir/pth_vers.c`"
fi
ac_help="$ac_help
--with-param=ID[,ID,..] load parameters from config.param"
ac_prev=""
ac_param=""
if test -f config.param; then
ac_param="config.param:common"
fi
for ac_option
do
if test ".$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
case "$ac_option" in
--with-param=* )
case $ac_optarg in
*:* )
ac_from=`echo $ac_optarg | sed -e 's/:.*//'`
ac_what=`echo $ac_optarg | sed -e 's/.*://'`
;;
* )
ac_from="config.param"
ac_what="$ac_optarg"
;;
esac
if test ".$ac_param" = .; then
ac_param="$ac_from:$ac_what"
else
ac_param="$ac_param,$ac_from:$ac_what"
fi
;;
esac
done
if test ".$ac_param" != .; then
OIFS="$IFS"
IFS=","
pconf="/tmp/autoconf.$$"
echo "ac_options=''" >$pconf
ac_from="config.param"
for ac_section in $ac_param; do
case $ac_section in
*:* )
ac_from=`echo "$ac_section" | sed -e 's/:.*//'`
ac_section=`echo "$ac_section" | sed -e 's/.*://'`
;;
esac
(echo ''; cat $ac_from; echo '') |\
sed -e "1,/[ ]*[ ]*${ac_section}[ ]*{[ ]*/d" \
-e '/[ ]*}[ ]*/,$d' \
-e ':join' -e '/\\[ ]*$/N' -e 's/\\[ ]*\n[ ]*//' -e 'tjoin' \
-e 's/^[ ]*//g' \
-e 's/^\([^-].*=.*\) IF \(.*\)$/if \2; then \1; fi/' \
-e 's/^\(--.*=.*\) IF \(.*\)$/if \2; then ac_options="$ac_options \1"; fi/' \
-e 's/^\(--.*\) IF \(.*\)$/if \2; then ac_options="$ac_options \1"; fi/' \
-e 's/^\(--.*=.*\)$/ac_options="$ac_options \1"/' \
-e 's/^\(--.*\)$/ac_options="$ac_options \1"/' \
>>$pconf
done
IFS="$OIFS"
. $pconf
rm -f $pconf >/dev/null 2>&1
if test ".$*" = .; then
set -- $ac_options
else
set -- "$@" $ac_options
fi
fi
ac_default_prefix=/usr/local
ac_help="$ac_help
--enable-debug build for debugging (default=no)"
ac_help="$ac_help
--enable-profile build for profiling (default=no)"
ac_help="$ac_help
--enable-optimize build with optimization (default=no)"
ac_help="$ac_help
--enable-static build static libraries (default=yes)"
ac_help="$ac_help
--enable-shared build shared libraries (default=yes)"
ac_help="$ac_help
--with-mctx-mth=ID force mctx method (mcsc,sjlj)"
ac_help="$ac_help
--with-mctx-dsp=ID force mctx dispatching (sc,ssjlj,sjlj,usjlj,sjlje,...)"
ac_help="$ac_help
--with-mctx-stk=ID force mctx stack setup (mc,ss,sas,...)"
ac_help="$ac_help
--enable-syscall-soft enable soft system call mapping (default=no)"
ac_help="$ac_help
--enable-syscall-hard enable hard system call mapping (default=no)"
ac_help="$ac_help
--enable-batch enable batch build mode (default=no)"
ac_help="$ac_help
--enable-maintainer enable maintainer build targets (default=no)"
ac_help="$ac_help
--enable-tests enable test build targets (default=yes)"
ac_help="$ac_help
--enable-pthread build Pthread library (default=no)"
ac_help="$ac_help
--with-sfio[=DIR] build against Sfio library (default=no)"
ac_help="$ac_help
--with-dmalloc[=DIR] build against Dmalloc library (default=no)"
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'
subdirs=
MFLAGS= MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
ac_max_here_lines=12
ac_prev=
for ac_option
do
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
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-//'`
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" ;;
-cflag* | --cflags*)
ac_flags="$ac_optarg" ;;
-enable-* | --enable-*)
ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
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)
with_gas=yes ;;
-help | --help | --hel | --he)
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)
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"
exit 0 ;;
-with-* | --with-*)
ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
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-//'`
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)
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
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
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
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
rm -rf conftest* confdefs.h
echo > confdefs.h
ac_unique_file=README
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
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%'`
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
ac_cpp='$CPP $CPPFLAGS $ac_flags'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS $ac_flags conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS $ac_flags conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
ac_exeext=
ac_objext=o
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
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
if test "${enable_subdir+set}" = set; then
enableval="$enable_subdir"
else
enable_subdir=no
fi
if test ".$enable_subdir" = .yes; then
enable_batch=yes
enable_shared=no
fi
ac_prog=$0
ac_srcdir=`echo $ac_prog | sed -e 's%/[^/][^/]*$%%' -e 's%\([^/]\)/*$%\1%'`
if test ".$ac_srcdir" = ".$ac_prog"; then
ac_srcdir=""
elif test "x$ac_srcdir" = "x."; then
ac_srcdir=""
else
if test ".$CFLAGS" = .; then
CFLAGS="-I$ac_srcdir"
else
CFLAGS="$CFLAGS -I$ac_srcdir"
fi
ac_srcdir="$ac_srcdir/"
fi
srcdir_prefix="$ac_srcdir"
if test ".$host" != .NONE; then
PLATFORM="$host"
elif test ".$nonopt" != .NONE; then
PLATFORM="$nonopt"
else
PLATFORM=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
fi
PLATFORM=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub $PLATFORM` || exit 1
if test ".$enable_subdir" != .yes; then
echo "Platform: ${TB}${PLATFORM}${TN}"
fi
if test ".$enable_subdir" != .yes; then
echo "$ac_t""" 1>&6
echo "$ac_t""${TB}Build Tools:${TN}" 1>&6
fi
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:738: 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" 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="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
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:768: 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" else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_prog_rejected=no
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
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
set dummy $ac_cv_prog_CC
shift
if test $ 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*)
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:819: 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" 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
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:851: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
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
cat > conftest.$ac_ext << EOF
main(){return(0);}
EOF
if { (eval echo configure:867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
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
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:893: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
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:898: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.c <<EOF
yes;
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
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:926: checking whether ${CC-cc} accepts -g" >&5
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="$CFLAGS $ac_save_CFLAGS"
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
CFLAGS="$CFLAGS -g -O2 $ac_flags"
else
CFLAGS="$CFLAGS -g"
fi
else
if test "$GCC" = yes; then
CFLAGS="$CFLAGS -O2 $ac_flags"
else
CFLAGS="$CFLAGS"
fi
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:958: checking how to run the C preprocessor" >&5
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
CPP="${CC-cc} -E"
cat > conftest.$ac_ext <<EOF
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:979: \"$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} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 990 "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:996: \"$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 1007 "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:1013: \"$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=/lib/cpp
fi
rm -f conftest*
fi
rm -f conftest*
fi
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
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:1038: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftestmake <<\EOF
all:
@echo 'ac_maketemp="${MAKE}"'
EOF
eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
if test -n "$ac_maketemp"; then
eval ac_cv_prog_make_${ac_make}_set=yes
else
eval ac_cv_prog_make_${ac_make}_set=no
fi
rm -f conftestmake
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
echo "$ac_t""yes" 1>&6
SET_MAKE=
else
echo "$ac_t""no" 1>&6
SET_MAKE="MAKE=${MAKE-make}"
fi
if test "${enable_debug+set}" = set; then
enableval="$enable_debug"
if test ".$ac_cv_prog_gcc" = ".yes"; then
case "$CFLAGS" in
*-O* ) ;;
* ) CFLAGS="$CFLAGS -O2" ;;
esac
case "$CFLAGS" in
*-g* ) ;;
* ) CFLAGS="$CFLAGS -g" ;;
esac
case "$CFLAGS" in
*-pipe* ) ;;
* ) echo $ac_n "checking for compiler option -pipe""... $ac_c" 1>&6
echo "configure:1079: checking for compiler option -pipe" >&5
if eval "test \"`echo '$''{'ac_cv_compiler_option_pipe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
int main() { return 0; }
EOF
${CC-cc} -c $CFLAGS $CPPFLAGS -pipe conftest.$ac_ext 1>conftest.out 2>conftest.err
if test $? -ne 0 -o -s conftest.err; then
ac_cv_compiler_option_pipe=no
else
ac_cv_compiler_option_pipe=yes
fi
rm -f conftest.$ac_ext conftest.out conftest.err
fi
if test ".$ac_cv_compiler_option_pipe" = .yes; then
CFLAGS="$CFLAGS -pipe"
else
:
fi
echo "$ac_t""$ac_cv_compiler_option_pipe" 1>&6
;;
esac
echo $ac_n "checking for compiler option -ggdb3""... $ac_c" 1>&6
echo "configure:1105: checking for compiler option -ggdb3" >&5
if eval "test \"`echo '$''{'ac_cv_compiler_option_ggdb3'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
int main() { return 0; }
EOF
${CC-cc} -c $CFLAGS $CPPFLAGS -ggdb3 conftest.$ac_ext 1>conftest.out 2>conftest.err
if test $? -ne 0 -o -s conftest.err; then
ac_cv_compiler_option_ggdb3=no
else
ac_cv_compiler_option_ggdb3=yes
fi
rm -f conftest.$ac_ext conftest.out conftest.err
fi
if test ".$ac_cv_compiler_option_ggdb3" = .yes; then
CFLAGS="$CFLAGS -ggdb3"
else
:
fi
echo "$ac_t""$ac_cv_compiler_option_ggdb3" 1>&6
case $PLATFORM in
*-*-freebsd*|*-*-solaris* ) CFLAGS="$CFLAGS -pedantic" ;;
esac
CFLAGS="$CFLAGS -Wall"
WMORE="-Wshadow -Wpointer-arith -Wcast-align -Winline"
WMORE="$WMORE -Wmissing-prototypes -Wmissing-declarations -Wnested-externs"
echo $ac_n "checking for compiler option -W<xxx>""... $ac_c" 1>&6
echo "configure:1136: checking for compiler option -W<xxx>" >&5
if eval "test \"`echo '$''{'ac_cv_compiler_option_wmore'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
int main() { return 0; }
EOF
${CC-cc} -c $CFLAGS $CPPFLAGS $WMORE conftest.$ac_ext 1>conftest.out 2>conftest.err
if test $? -ne 0 -o -s conftest.err; then
ac_cv_compiler_option_wmore=no
else
ac_cv_compiler_option_wmore=yes
fi
rm -f conftest.$ac_ext conftest.out conftest.err
fi
if test ".$ac_cv_compiler_option_wmore" = .yes; then
CFLAGS="$CFLAGS $WMORE"
else
:
fi
echo "$ac_t""$ac_cv_compiler_option_wmore" 1>&6
echo $ac_n "checking for compiler option -Wno-long-long""... $ac_c" 1>&6
echo "configure:1161: checking for compiler option -Wno-long-long" >&5
if eval "test \"`echo '$''{'ac_cv_compiler_option_wnolonglong'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
int main() { return 0; }
EOF
${CC-cc} -c $CFLAGS $CPPFLAGS -Wno-long-long conftest.$ac_ext 1>conftest.out 2>conftest.err
if test $? -ne 0 -o -s conftest.err; then
ac_cv_compiler_option_wnolonglong=no
else
ac_cv_compiler_option_wnolonglong=yes
fi
rm -f conftest.$ac_ext conftest.out conftest.err
fi
if test ".$ac_cv_compiler_option_wnolonglong" = .yes; then
CFLAGS="$CFLAGS -Wno-long-long"
else
:
fi
echo "$ac_t""$ac_cv_compiler_option_wnolonglong" 1>&6
else
case "$CFLAGS" in
*-g* ) ;;
* ) CFLAGS="$CFLAGS -g" ;;
esac
fi
msg="enabled"
cat >> confdefs.h <<\EOF
EOF
else
if test ".$ac_cv_prog_gcc" = ".yes"; then
case "$CFLAGS" in
*-pipe* ) ;;
* ) echo $ac_n "checking for compiler option -pipe""... $ac_c" 1>&6
echo "configure:1203: checking for compiler option -pipe" >&5
if eval "test \"`echo '$''{'ac_cv_compiler_option_pipe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
int main() { return 0; }
EOF
${CC-cc} -c $CFLAGS $CPPFLAGS -pipe conftest.$ac_ext 1>conftest.out 2>conftest.err
if test $? -ne 0 -o -s conftest.err; then
ac_cv_compiler_option_pipe=no
else
ac_cv_compiler_option_pipe=yes
fi
rm -f conftest.$ac_ext conftest.out conftest.err
fi
if test ".$ac_cv_compiler_option_pipe" = .yes; then
CFLAGS="$CFLAGS -pipe"
else
:
fi
echo "$ac_t""$ac_cv_compiler_option_pipe" 1>&6
;;
esac
fi
case "$CFLAGS" in
*-g* ) CFLAGS=`echo "$CFLAGS" |\
sed -e 's/ -g / /g' -e 's/ -g$//' -e 's/^-g //g' -e 's/^-g$//'` ;;
esac
case "$CXXFLAGS" in
*-g* ) CXXFLAGS=`echo "$CXXFLAGS" |\
sed -e 's/ -g / /g' -e 's/ -g$//' -e 's/^-g //g' -e 's/^-g$//'` ;;
esac
msg="disabled"
fi
echo $ac_n "checking for compilation debug mode""... $ac_c" 1>&6
echo "configure:1241: checking for compilation debug mode" >&5
echo "$ac_t""$msg" 1>&6
if test ".$msg" = .enabled; then
enable_shared=no
fi
echo $ac_n "checking for compilation profile mode""... $ac_c" 1>&6
echo "configure:1248: checking for compilation profile mode" >&5
if test "${enable_profile+set}" = set; then
enableval="$enable_profile"
if test ".$ac_cv_prog_gcc" = ".no"; then
{ echo "configure: error: profiling requires gcc and gprof" 1>&2; exit 1; }
fi
CFLAGS=`echo "$CFLAGS" | sed -e 's/-O2//g'`
CFLAGS="$CFLAGS -O0 -pg"
LDFLAGS="$LDFLAGS -pg"
msg="enabled"
else
msg="disabled"
fi
echo "$ac_t""$msg" 1>&6
if test ".$msg" = .enabled; then
enable_shared=no
fi
if test "${enable_optimize+set}" = set; then
enableval="$enable_optimize"
if test ".$ac_cv_prog_gcc" = ".yes"; then
case "$CFLAGS" in
*-O* ) ;;
* ) CFLAGS="$CFLAGS -O2" ;;
esac
case "$CFLAGS" in
*-pipe* ) ;;
* ) echo $ac_n "checking for compiler option -pipe""... $ac_c" 1>&6
echo "configure:1282: checking for compiler option -pipe" >&5
if eval "test \"`echo '$''{'ac_cv_compiler_option_pipe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
int main() { return 0; }
EOF
${CC-cc} -c $CFLAGS $CPPFLAGS -pipe conftest.$ac_ext 1>conftest.out 2>conftest.err
if test $? -ne 0 -o -s conftest.err; then
ac_cv_compiler_option_pipe=no
else
ac_cv_compiler_option_pipe=yes
fi
rm -f conftest.$ac_ext conftest.out conftest.err
fi
if test ".$ac_cv_compiler_option_pipe" = .yes; then
CFLAGS="$CFLAGS -pipe"
else
:
fi
echo "$ac_t""$ac_cv_compiler_option_pipe" 1>&6
;;
esac
OPT_CFLAGS='-funroll-loops -fstrength-reduce -fomit-frame-pointer -ffast-math'
echo $ac_n "checking for compiler option -f<xxx> for optimizations""... $ac_c" 1>&6
echo "configure:1309: checking for compiler option -f<xxx> for optimizations" >&5
if eval "test \"`echo '$''{'ac_cv_compiler_option_optimize_std'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
int main() { return 0; }
EOF
${CC-cc} -c $CFLAGS $CPPFLAGS $OPT_CFLAGS conftest.$ac_ext 1>conftest.out 2>conftest.err
if test $? -ne 0 -o -s conftest.err; then
ac_cv_compiler_option_optimize_std=no
else
ac_cv_compiler_option_optimize_std=yes
fi
rm -f conftest.$ac_ext conftest.out conftest.err
fi
if test ".$ac_cv_compiler_option_optimize_std" = .yes; then
CFLAGS="$CFLAGS $OPT_CFLAGS"
else
:
fi
echo "$ac_t""$ac_cv_compiler_option_optimize_std" 1>&6
case $PLATFORM in
i?86*-*-*|?86*-*-* )
OPT_CFLAGS='-malign-functions=4 -malign-jumps=4 -malign-loops=4'
echo $ac_n "checking for compiler option -f<xxx> for Intel x86 CPU""... $ac_c" 1>&6
echo "configure:1337: checking for compiler option -f<xxx> for Intel x86 CPU" >&5
if eval "test \"`echo '$''{'ac_cv_compiler_option_optimize_x86'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
int main() { return 0; }
EOF
${CC-cc} -c $CFLAGS $CPPFLAGS $OPT_CFLAGS conftest.$ac_ext 1>conftest.out 2>conftest.err
if test $? -ne 0 -o -s conftest.err; then
ac_cv_compiler_option_optimize_x86=no
else
ac_cv_compiler_option_optimize_x86=yes
fi
rm -f conftest.$ac_ext conftest.out conftest.err
fi
if test ".$ac_cv_compiler_option_optimize_x86" = .yes; then
CFLAGS="$CFLAGS $OPT_CFLAGS"
else
:
fi
echo "$ac_t""$ac_cv_compiler_option_optimize_x86" 1>&6
;;
esac
else
case "$CFLAGS" in
*-O* ) ;;
* ) CFLAGS="$CFLAGS -O" ;;
esac
case $PLATFORM in
*-*-solaris* )
echo $ac_n "checking for compiler option -fast""... $ac_c" 1>&6
echo "configure:1372: checking for compiler option -fast" >&5
if eval "test \"`echo '$''{'ac_cv_compiler_option_fast'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
int main() { return 0; }
EOF
${CC-cc} -c $CFLAGS $CPPFLAGS -fast conftest.$ac_ext 1>conftest.out 2>conftest.err
if test $? -ne 0 -o -s conftest.err; then
ac_cv_compiler_option_fast=no
else
ac_cv_compiler_option_fast=yes
fi
rm -f conftest.$ac_ext conftest.out conftest.err
fi
if test ".$ac_cv_compiler_option_fast" = .yes; then
CFLAGS="$CFLAGS -fast"
else
:
fi
echo "$ac_t""$ac_cv_compiler_option_fast" 1>&6
;;
esac
fi
msg="enabled"
else
msg="disabled"
fi
echo $ac_n "checking for compilation optimization mode""... $ac_c" 1>&6
echo "configure:1407: checking for compilation optimization mode" >&5
echo "$ac_t""$msg" 1>&6
if test -f "$srcdir/ltconfig"; then
if test "${enable_static+set}" = set; then
enableval="$enable_static"
enable_static="$enableval"
else
if test ".$enable_static" = .; then
enable_static=yes
fi
fi
if test "${enable_shared+set}" = set; then
enableval="$enable_shared"
enable_shared="$enableval"
else
if test ".$enable_shared" = .; then
enable_shared=yes
fi
fi
case "$PLATFORM" in
*-pc-solaris2.[78] ) enable_shared=no ;;
esac
libtool_flags=''
libtool_flags="$libtool_flags --disable-lock"
test ".$silent" = .yes && libtool_flags="$libtool_flags --silent"
test ".$enable_static" = .no && libtool_flags="$libtool_flags --disable-static"
test ".$enable_shared" = .no && libtool_flags="$libtool_flags --disable-shared"
test ".$ac_cv_prog_gcc" = .yes && libtool_flags="$libtool_flags --with-gcc"
test ".$ac_cv_prog_gnu_ld" = .yes && libtool_flags="$libtool_flags --with-gnu-ld"
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" LD="$LD" \
${CONFIG_SHELL-/bin/sh} $srcdir/ltconfig --no-reexec \
$libtool_flags --srcdir=$srcdir --no-verify $srcdir/ltmain.sh $PLATFORM ||\
{ echo "configure: error: libtool configuration failed" 1>&2; exit 1; }
else
set dummy ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1451: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$AR"; then
ac_cv_prog_AR="$AR" 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_AR="ar"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
AR="$ac_cv_prog_AR"
if test -n "$AR"; then
echo "$ac_t""$AR" 1>&6
else
echo "$ac_t""no" 1>&6
fi
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1480: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" 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_RANLIB="ranlib"
break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
fi
fi
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
echo "$ac_t""$RANLIB" 1>&6
else
echo "$ac_t""no" 1>&6
fi
fi
case "$PLATFORM:$CC" in
*-sun-solaris2*:cc )
test ".$ac_cv_prog_gcc" = ".no" && CFLAGS="$CFLAGS -w"
;;
*-*-sysv*uw[27]*:cc )
CFLAGS="$CFLAGS -w"
;;
*-hp-hpux*:cc )
CFLAGS="$CFLAGS -Ae -O"
;;
*-hp-hpux*:CC )
CFLAGS="$CFLAGS -w"
;;
*-sgi-irix6.2:cc )
LDFLAGS="$LDFLAGS -woff 85 -Wl,-woff,84 -Wl,-woff,85"
;;
*-sgi-irix6.5.[2-9]:cc )
LDFLAGS="$LDFLAGS -woff 84,85,134"
;;
*-sgi-irix6.5:cc )
CFLAGS="$CFLAGS -woff 1110,1048"
LDFLAGS="$LDFLAGS -woff 84,85,134"
;;
*-dec-osf4*:cc )
CFLAGS="$CFLAGS -std"
;;
*-dec-osf5*:cc )
CFLAGS="$CFLAGS -std -D_XOPEN_SOURCE_EXTENDED"
;;
*-*-isc*:* )
CPPFLAGS="$CPPFLAGS -D_POSIX_SOURCE";
LIBS="$LIBS -lcposix -linet";
;;
esac
if test ".$enable_subdir" != .yes; then
echo "$ac_t""" 1>&6
echo "$ac_t""${TB}Mandatory Platform Environment:${TN}" 1>&6
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:1563: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1576: \"$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*
ac_cv_header_stdc=yes
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_header_stdc=no
fi
rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 1593 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "memchr" >/dev/null 2>&1; then
:
else
rm -rf conftest*
ac_cv_header_stdc=no
fi
rm -f conftest*
fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 1611 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "free" >/dev/null 2>&1; then
:
else
rm -rf conftest*
ac_cv_header_stdc=no
fi
rm -f conftest*
fi
if test $ac_cv_header_stdc = yes; then
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
#line 1632 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int main () { int i; for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
if { (eval echo configure:1643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
ac_cv_header_stdc=no
fi
rm -fr conftest*
fi
fi
fi
echo "$ac_t""$ac_cv_header_stdc" 1>&6
if test $ac_cv_header_stdc = yes; then
cat >> confdefs.h <<\EOF
#define STDC_HEADERS 1
EOF
fi
for ac_hdr in stdio.h stdlib.h stdarg.h string.h signal.h unistd.h setjmp.h fcntl.h errno.h sys/types.h sys/time.h sys/wait.h sys/stat.h sys/socket.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1670: 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
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1680: \"$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
EOF
else
echo "$ac_t""no" 1>&6
fi
done
for ac_func in gettimeofday select sigaction sigprocmask sigpending sigsuspend; do
echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
echo "configure:1708: checking for function $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
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
extern "C"
/* 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();
char (*f)();
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. */
choke me
f = $ac_func;
; return 0; }
EOF
if { (eval echo configure:1740: \"$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
EOF
else
echo "$ac_t""no" 1>&6
fi
done
ac_decision_item='mandatory system headers and functions'
ac_decision_msg='FAILED'
ac_decision=''
ac_rc=yes
for ac_spec in header:stdio.h header:stdlib.h header:stdarg.h header:string.h header:signal.h header:unistd.h header:setjmp.h header:fcntl.h header:errno.h header:sys/types.h header:sys/time.h header:sys/wait.h header:sys/stat.h header:sys/socket.h func:gettimeofday func:select func:sigaction func:sigprocmask func:sigpending func:sigsuspend; do
ac_type=`echo "$ac_spec" | sed -e 's/:.*$//'`
ac_item=`echo "$ac_spec" | sed -e 's/^.*://'`
case $ac_type in
header )
ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
ac_var="ac_cv_header_$ac_item"
;;
file )
ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
ac_var="ac_cv_file_$ac_item"
;;
func ) ac_var="ac_cv_func_$ac_item" ;;
lib ) ac_var="ac_cv_lib_$ac_item" ;;
define ) ac_var="ac_cv_define_$ac_item" ;;
typedef ) ac_var="ac_cv_typedef_$ac_item" ;;
custom ) ac_var="$ac_item" ;;
esac
eval "ac_val=\$$ac_var"
if test ".$ac_val" != .yes; then
ac_rc=no
break
fi
done
if test ".$ac_rc" = .yes; then
:
ac_decision='fine'
ac_decision_msg='all fine'
ac_decision_fine=yes
ac_decision_fine_msg='all fine'
else
:
fi
if test ".$ac_decision" = .; then
echo "$0:Error: decision on $ac_decision_item failed." 1>&2
echo "$0:Hint: see config.log for more details!" 1>&2
exit 1
else
if test ".$ac_decision_msg" = .; then
ac_decision_msg="$ac_decision"
fi
echo "$ac_t""decision on $ac_decision_item... ${TB}$ac_decision_msg${TN}" 1>&6
fi
if test ".$enable_subdir" != .yes; then
echo "$ac_t""" 1>&6
echo "$ac_t""${TB}Optional Platform Environment:${TN}" 1>&6
fi
echo $ac_n "checking for number of signals""... $ac_c" 1>&6
echo "configure:1826: checking for number of signals" >&5
cross_compile=no
if test "$cross_compiling" = yes; then
nsig=32
else
cat > conftest.$ac_ext <<EOF
int main(int argc, char *argv[])
{
FILE *fp;
int nsig;
nsig = NSIG;
nsig = _NSIG;
nsig = (sizeof(sigset_t)*8);
if (nsig < 32)
nsig = 32;
if ((fp = fopen("conftestval", "w")) == NULL)
exit(1);
fprintf(fp, "%d\n", nsig);
fclose(fp);
exit(0);
}
EOF
if { (eval echo configure:1863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
nsig=`cat conftestval`
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
nsig=32
fi
rm -fr conftest*
fi
echo "$ac_t""$nsig" 1>&6
cat >> confdefs.h <<EOF
#define PTH_NSIG $nsig
EOF
for ac_func in poll; do
echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
echo "configure:1883: checking for function $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
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
extern "C"
/* 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();
char (*f)();
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. */
choke me
f = $ac_func;
; return 0; }
EOF
if { (eval echo configure:1915: \"$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
EOF
else
echo "$ac_t""no" 1>&6
fi
done
echo $ac_n "checking for define POLLIN in poll.h""... $ac_c" 1>&6
echo "configure:1940: checking for define POLLIN in poll.h" >&5
if eval "test \"`echo '$''{'ac_cv_define_POLLIN'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
YES_IS_DEFINED
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "YES_IS_DEFINED" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_define_POLLIN=yes
else
rm -rf conftest*
ac_cv_define_POLLIN=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_define_POLLIN" 1>&6
if test $ac_cv_define_POLLIN = yes; then
cat >> confdefs.h <<\EOF
EOF
fi
echo $ac_n "checking whether poll(2) facility has to be faked""... $ac_c" 1>&6
echo "configure:1974: checking whether poll(2) facility has to be faked" >&5
ac_rc=yes
for ac_spec in func:poll define:POLLIN; do
ac_type=`echo "$ac_spec" | sed -e 's/:.*$//'`
ac_item=`echo "$ac_spec" | sed -e 's/^.*://'`
case $ac_type in
header )
ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
ac_var="ac_cv_header_$ac_item"
;;
file )
ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
ac_var="ac_cv_file_$ac_item"
;;
func ) ac_var="ac_cv_func_$ac_item" ;;
lib ) ac_var="ac_cv_lib_$ac_item" ;;
define ) ac_var="ac_cv_define_$ac_item" ;;
typedef ) ac_var="ac_cv_typedef_$ac_item" ;;
custom ) ac_var="$ac_item" ;;
esac
eval "ac_val=\$$ac_var"
if test ".$ac_val" != .yes; then
ac_rc=no
break
fi
done
if test ".$ac_rc" = .yes; then
:
PTH_FAKE_POLL=0
else
:
PTH_FAKE_POLL=1
fi
if test .$PTH_FAKE_POLL = .1; then
msg="yes"
else
msg="no"
fi
echo "$ac_t""$msg" 1>&6
for ac_hdr in sys/uio.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2020: 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
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2030: \"$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
EOF
else
echo "$ac_t""no" 1>&6
fi
done
for ac_func in readv writev; do
echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
echo "configure:2058: checking for function $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
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
extern "C"
/* 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();
char (*f)();
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. */
choke me
f = $ac_func;
; return 0; }
EOF
if { (eval echo configure:2090: \"$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
EOF
else
echo "$ac_t""no" 1>&6
fi
done
echo $ac_n "checking whether readv(2)/writev(2) facility has to be faked""... $ac_c" 1>&6
echo "configure:2115: checking whether readv(2)/writev(2) facility has to be faked" >&5
ac_rc=yes
for ac_spec in func:readv func:writev header:sys/uio.h; do
ac_type=`echo "$ac_spec" | sed -e 's/:.*$//'`
ac_item=`echo "$ac_spec" | sed -e 's/^.*://'`
case $ac_type in
header )
ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
ac_var="ac_cv_header_$ac_item"
;;
file )
ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
ac_var="ac_cv_file_$ac_item"
;;
func ) ac_var="ac_cv_func_$ac_item" ;;
lib ) ac_var="ac_cv_lib_$ac_item" ;;
define ) ac_var="ac_cv_define_$ac_item" ;;
typedef ) ac_var="ac_cv_typedef_$ac_item" ;;
custom ) ac_var="$ac_item" ;;
esac
eval "ac_val=\$$ac_var"
if test ".$ac_val" != .yes; then
ac_rc=no
break
fi
done
if test ".$ac_rc" = .yes; then
:
PTH_FAKE_RWV=0
else
:
PTH_FAKE_RWV=1
fi
if test .$PTH_FAKE_RWV = .1; then
msg="yes"
else
msg="no"
fi
echo "$ac_t""$msg" 1>&6
for ac_func in usleep strerror; do
echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
echo "configure:2159: checking for function $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
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
extern "C"
/* 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();
char (*f)();
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. */
choke me
f = $ac_func;
; return 0; }
EOF
if { (eval echo configure:2191: \"$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
EOF
else
echo "$ac_t""no" 1>&6
fi
done
for ac_hdr in sys/resource.h net/errno.h paths.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2220: 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
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2230: \"$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
EOF
else
echo "$ac_t""no" 1>&6
fi
done
echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6
echo "configure:2258: checking for gethostname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostname | 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="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
/* 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 gethostname();
int main() {
gethostname()
; return 0; }
EOF
if { (eval echo configure:2277: \"$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 nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
cat >> confdefs.h <<EOF
EOF
LIBS="-lnsl $LIBS"
else
echo "$ac_t""no" 1>&6
fi
if test ".`echo $LIBS | grep nsl`" = . ;then
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
echo "configure:2306: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | 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="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
/* 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:2325: \"$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 nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
cat >> confdefs.h <<EOF
EOF
LIBS="-lnsl $LIBS"
else
echo "$ac_t""no" 1>&6
fi
fi
echo $ac_n "checking for accept in -lsocket""... $ac_c" 1>&6
echo "configure:2354: checking for accept in -lsocket" >&5
ac_lib_var=`echo socket'_'accept | 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="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
/* 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 accept();
int main() {
accept()
; return 0; }
EOF
if { (eval echo configure:2373: \"$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 socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
cat >> confdefs.h <<EOF
EOF
LIBS="-lsocket $LIBS"
else
echo "$ac_t""no" 1>&6
fi
for ac_hdr in sys/select.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2405: 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
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2415: \"$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
EOF
else
echo "$ac_t""no" 1>&6
fi
done
EXTRA_INCLUDE_SYS_SELECT_H="#include <sys/select.h>"
if test ".$ac_cv_header_sys_select_h" != .yes; then
EXTRA_INCLUDE_SYS_SELECT_H="/* $EXTRA_INCLUDE_SYS_SELECT_H */"
fi
echo $ac_n "checking for typedef sig_atomic_t""... $ac_c" 1>&6
echo "configure:2448: checking for typedef sig_atomic_t" >&5
if eval "test \"`echo '$''{'ac_cv_typedef_sig_atomic_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "(^|[^a-zA-Z_0-9])sig_atomic_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_typedef_sig_atomic_t=yes
else
rm -rf conftest*
ac_cv_typedef_sig_atomic_t=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_typedef_sig_atomic_t" 1>&6
if test $ac_cv_typedef_sig_atomic_t = yes; then
cat >> confdefs.h <<\EOF
EOF
fi
FALLBACK_SIG_ATOMIC_T="typedef int sig_atomic_t;"
if test ".$ac_cv_typedef_sig_atomic_t" = .yes; then
FALLBACK_SIG_ATOMIC_T="/* $FALLBACK_SIG_ATOMIC_T */"
fi
echo $ac_n "checking for typedef pid_t""... $ac_c" 1>&6
echo "configure:2485: checking for typedef pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_typedef_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_typedef_pid_t=yes
else
rm -rf conftest*
ac_cv_typedef_pid_t=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_typedef_pid_t" 1>&6
if test $ac_cv_typedef_pid_t = yes; then
cat >> confdefs.h <<\EOF
EOF
fi
FALLBACK_PID_T="typedef int pid_t;"
if test ".$ac_cv_typedef_pid_t" = .yes; then
FALLBACK_PID_T="/* $FALLBACK_PID_T */"
fi
echo $ac_n "checking for typedef size_t""... $ac_c" 1>&6
echo "configure:2522: checking for typedef size_t" >&5
if eval "test \"`echo '$''{'ac_cv_typedef_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_typedef_size_t=yes
else
rm -rf conftest*
ac_cv_typedef_size_t=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_typedef_size_t" 1>&6
if test $ac_cv_typedef_size_t = yes; then
cat >> confdefs.h <<\EOF
EOF
fi
FALLBACK_SIZE_T="typedef unsigned int size_t;"
if test ".$ac_cv_typedef_size_t" = .yes; then
FALLBACK_SIZE_T="/* $FALLBACK_SIZE_T */"
fi
echo $ac_n "checking for typedef ssize_t""... $ac_c" 1>&6
echo "configure:2559: checking for typedef ssize_t" >&5
if eval "test \"`echo '$''{'ac_cv_typedef_ssize_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_typedef_ssize_t=yes
else
rm -rf conftest*
ac_cv_typedef_ssize_t=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_typedef_ssize_t" 1>&6
if test $ac_cv_typedef_ssize_t = yes; then
cat >> confdefs.h <<\EOF
EOF
fi
FALLBACK_SSIZE_T="typedef unsigned int ssize_t;"
if test ".$ac_cv_typedef_ssize_t" = .yes; then
FALLBACK_SSIZE_T="/* $FALLBACK_SSIZE_T */"
fi
echo $ac_n "checking for typedef off_t""... $ac_c" 1>&6
echo "configure:2596: checking for typedef off_t" >&5
if eval "test \"`echo '$''{'ac_cv_typedef_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_typedef_off_t=yes
else
rm -rf conftest*
ac_cv_typedef_off_t=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_typedef_off_t" 1>&6
if test $ac_cv_typedef_off_t = yes; then
cat >> confdefs.h <<\EOF
EOF
fi
FALLBACK_OFF_T="typedef int off_t;"
if test ".$ac_cv_typedef_off_t" = .yes; then
FALLBACK_OFF_T="/* $FALLBACK_OFF_T */"
fi
echo $ac_n "checking for typedef stack_t""... $ac_c" 1>&6
echo "configure:2633: checking for typedef stack_t" >&5
if eval "test \"`echo '$''{'ac_cv_typedef_stack_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "(^|[^a-zA-Z_0-9])stack_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_typedef_stack_t=yes
else
rm -rf conftest*
ac_cv_typedef_stack_t=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_typedef_stack_t" 1>&6
if test $ac_cv_typedef_stack_t = yes; then
cat >> confdefs.h <<\EOF
EOF
fi
echo $ac_n "checking for attribute ss_base in struct sigaltstack from sys/signal.h""... $ac_c" 1>&6
echo "configure:2665: checking for attribute ss_base in struct sigaltstack from sys/signal.h" >&5
if eval "test \"`echo '$''{'ac_cv_structattr_ss_base'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
int main() {
struct sigaltstack *sp1;
struct sigaltstack *sp2;
sp1->ss_base = sp2->ss_base;
; return 0; }
EOF
if { (eval echo configure:2685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_structattr_ss_base=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_structattr_ss_base=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_structattr_ss_base" 1>&6
if test $ac_cv_structattr_ss_base = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_SS_BASE 1
EOF
fi
echo $ac_n "checking for attribute ss_sp in struct sigaltstack from sys/signal.h""... $ac_c" 1>&6
echo "configure:2705: checking for attribute ss_sp in struct sigaltstack from sys/signal.h" >&5
if eval "test \"`echo '$''{'ac_cv_structattr_ss_sp'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
int main() {
struct sigaltstack *sp1;
struct sigaltstack *sp2;
sp1->ss_sp = sp2->ss_sp;
; return 0; }
EOF
if { (eval echo configure:2725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_structattr_ss_sp=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_structattr_ss_sp=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_structattr_ss_sp" 1>&6
if test $ac_cv_structattr_ss_sp = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_SS_SP 1
EOF
fi
echo $ac_n "checking for a single-argument based gettimeofday""... $ac_c" 1>&6
echo "configure:2746: checking for a single-argument based gettimeofday" >&5
cross_compile=no
cat > conftest.$ac_ext <<EOF
#line 2749 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <unistd.h>
int main() {
struct timeval tv;
(void)gettimeofday(&tv);
; return 0; }
EOF
if { (eval echo configure:2763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
msg="yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
msg="no"
fi
rm -f conftest*
case $PLATFORM in
*-*-aix4* ) msg="no" ;; # on AIX the compiler test doesn't work
*-*-isc* ) msg="no" ;; # on ISC the compiler test doesn't work
esac
if test ".$msg" = .yes; then
cat >> confdefs.h <<\EOF
#define HAVE_GETTIMEOFDAY_ARGS1 1
EOF
fi
echo "$ac_t""$msg" 1>&6
echo $ac_n "checking for struct timespec""... $ac_c" 1>&6
echo "configure:2788: checking for struct timespec" >&5
cross_compile=no
cat > conftest.$ac_ext <<EOF
#line 2791 "configure"
#include "confdefs.h"
#include <time.h>
#include <sys/time.h>
int main() {
struct timespec ts;
; return 0; }
EOF
if { (eval echo configure:2803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
msg="yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
msg="no"
fi
rm -f conftest*
if test ".$msg" = .yes; then
cat >> confdefs.h <<\EOF
#define HAVE_STRUCT_TIMESPEC 1
EOF
fi
echo "$ac_t""$msg" 1>&6
echo $ac_n "checking for typedef socklen_t""... $ac_c" 1>&6
echo "configure:2824: checking for typedef socklen_t" >&5
if eval "test \"`echo '$''{'ac_cv_typedef_socklen_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_typedef_socklen_t=yes
else
rm -rf conftest*
ac_cv_typedef_socklen_t=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_typedef_socklen_t" 1>&6
if test $ac_cv_typedef_socklen_t = yes; then
cat >> confdefs.h <<\EOF
EOF
fi
echo $ac_n "checking for type of argument 3 for accept()""... $ac_c" 1>&6
echo "configure:2855: checking for type of argument 3 for accept()" >&5
if eval "test \"`echo '$''{'ac_cv_argtype_accept3'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
EOF
for ifile in sys/types.h sys/socket.h; do
echo "#include <$ifile>" >>conftest.$ac_ext
done
gpat=''
spat=''
i=1
while test $i -le 3; do
gpat="$gpat[^,]*"
if test $i -eq 3; then
spat="$spat\\([^,]*\\)"
else
spat="$spat[^,]*"
fi
if test $i -lt 3; then
gpat="$gpat,"
spat="$spat,"
fi
i=`expr $i + 1`
done
(eval "$ac_cpp conftest.$ac_ext") 2>&5 |\
sed -e ':join' \
-e '/,[ ]*$/N' \
-e 's/,[ ]*\n[ ]*/, /' \
-e 'tjoin' |\
egrep "[^a-zA-Z0-9_]accept[ ]*\\($gpat\\)" | head -1 |\
sed -e "s/.*[^a-zA-Z0-9_]accept[ ]*($spat).*/\\1/" \
-e 's/(\*[a-zA-Z_][a-zA-Z_0-9]*)/(*)/' \
-e 's/^[ ]*//' -e 's/[ ]*$//' \
-e 's/^/arg:/' \
-e 's/^arg:\([^ ]*\)$/type:\1/' \
-e 's/^arg:\(.*_t\)*$/type:\1/' \
-e 's/^arg:\(.*\*\)$/type:\1/' \
-e 's/^arg:\(.*[ ]\*\)[_a-zA-Z][_a-zA-Z0-9]*$/type:\1/' \
-e 's/^arg:\(.*[ ]char\)$/type:\1/' \
-e 's/^arg:\(.*[ ]short\)$/type:\1/' \
-e 's/^arg:\(.*[ ]int\)$/type:\1/' \
-e 's/^arg:\(.*[ ]long\)$/type:\1/' \
-e 's/^arg:\(.*[ ]float\)$/type:\1/' \
-e 's/^arg:\(.*[ ]double\)$/type:\1/' \
-e 's/^arg:\(.*[ ]unsigned\)$/type:\1/' \
-e 's/^arg:\(.*[ ]signed\)$/type:\1/' \
-e 's/^arg:\(.*struct[ ][_a-zA-Z][_a-zA-Z0-9]*\)$/type:\1/' \
-e 's/^arg:\(.*\)[ ]_[_a-zA-Z0-9]*$/type:\1/' \
-e 's/^arg:\(.*\)[ ]\([^ ]*\)$/type:\1/' \
-e 's/^type://' >conftest.output
ac_cv_argtype_accept3=`cat conftest.output`
rm -f conftest*
fi
echo "$ac_t""$ac_cv_argtype_accept3" 1>&6
ac_type="$ac_cv_argtype_accept3"
:
echo $ac_n "checking for fallback socklen_t""... $ac_c" 1>&6
echo "configure:2919: checking for fallback socklen_t" >&5
if eval "test \"`echo '$''{'ac_cv_check_socklentype'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test ".$ac_cv_typedef_socklen_t" = .yes; then
ac_cv_check_socklentype='socklen_t'
elif test ".$ac_type" != .; then
ac_cv_check_socklentype=`echo "$ac_type" | sed -e 's/ *\*$//'`
else
ac_cv_check_socklentype='int'
fi
fi
echo "$ac_t""$ac_cv_check_socklentype" 1>&6
ac_type="$ac_cv_check_socklentype"
FALLBACK_SOCKLEN_T="typedef ${ac_type} socklen_t;"
if test ".$ac_type" = ".socklen_t"; then
FALLBACK_SOCKLEN_T="/* $FALLBACK_SOCKLEN_T */"
fi
echo $ac_n "checking for typedef nfds_t""... $ac_c" 1>&6
echo "configure:2946: checking for typedef nfds_t" >&5
if eval "test \"`echo '$''{'ac_cv_typedef_nfds_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "(^|[^a-zA-Z_0-9])nfds_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_typedef_nfds_t=yes
else
rm -rf conftest*
ac_cv_typedef_nfds_t=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_typedef_nfds_t" 1>&6
if test $ac_cv_typedef_nfds_t = yes; then
cat >> confdefs.h <<\EOF
EOF
fi
echo $ac_n "checking for type of argument 2 for poll()""... $ac_c" 1>&6
echo "configure:2977: checking for type of argument 2 for poll()" >&5
if eval "test \"`echo '$''{'ac_cv_argtype_poll2'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
EOF
for ifile in sys/types.h poll.h; do
echo "#include <$ifile>" >>conftest.$ac_ext
done
gpat=''
spat=''
i=1
while test $i -le 3; do
gpat="$gpat[^,]*"
if test $i -eq 2; then
spat="$spat\\([^,]*\\)"
else
spat="$spat[^,]*"
fi
if test $i -lt 3; then
gpat="$gpat,"
spat="$spat,"
fi
i=`expr $i + 1`
done
(eval "$ac_cpp conftest.$ac_ext") 2>&5 |\
sed -e ':join' \
-e '/,[ ]*$/N' \
-e 's/,[ ]*\n[ ]*/, /' \
-e 'tjoin' |\
egrep "[^a-zA-Z0-9_]poll[ ]*\\($gpat\\)" | head -1 |\
sed -e "s/.*[^a-zA-Z0-9_]poll[ ]*($spat).*/\\1/" \
-e 's/(\*[a-zA-Z_][a-zA-Z_0-9]*)/(*)/' \
-e 's/^[ ]*//' -e 's/[ ]*$//' \
-e 's/^/arg:/' \
-e 's/^arg:\([^ ]*\)$/type:\1/' \
-e 's/^arg:\(.*_t\)*$/type:\1/' \
-e 's/^arg:\(.*\*\)$/type:\1/' \
-e 's/^arg:\(.*[ ]\*\)[_a-zA-Z][_a-zA-Z0-9]*$/type:\1/' \
-e 's/^arg:\(.*[ ]char\)$/type:\1/' \
-e 's/^arg:\(.*[ ]short\)$/type:\1/' \
-e 's/^arg:\(.*[ ]int\)$/type:\1/' \
-e 's/^arg:\(.*[ ]long\)$/type:\1/' \
-e 's/^arg:\(.*[ ]float\)$/type:\1/' \
-e 's/^arg:\(.*[ ]double\)$/type:\1/' \
-e 's/^arg:\(.*[ ]unsigned\)$/type:\1/' \
-e 's/^arg:\(.*[ ]signed\)$/type:\1/' \
-e 's/^arg:\(.*struct[ ][_a-zA-Z][_a-zA-Z0-9]*\)$/type:\1/' \
-e 's/^arg:\(.*\)[ ]_[_a-zA-Z0-9]*$/type:\1/' \
-e 's/^arg:\(.*\)[ ]\([^ ]*\)$/type:\1/' \
-e 's/^type://' >conftest.output
ac_cv_argtype_poll2=`cat conftest.output`
rm -f conftest*
fi
echo "$ac_t""$ac_cv_argtype_poll2" 1>&6
ac_type="$ac_cv_argtype_poll2"
:
echo $ac_n "checking for fallback nfds_t""... $ac_c" 1>&6
echo "configure:3041: checking for fallback nfds_t" >&5
if eval "test \"`echo '$''{'ac_cv_check_nfdstype'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test ".$ac_cv_typedef_nfds_t" = .yes; then
ac_cv_check_nfdstype='nfds_t'
elif test ".$ac_type" != .; then
ac_cv_check_nfdstype=`echo "$ac_type" | sed -e 's/ *\*$//'`
else
ac_cv_check_nfdstype='unsigned int'
fi
fi
echo "$ac_t""$ac_cv_check_nfdstype" 1>&6
ac_type="$ac_cv_check_nfdstype"
FALLBACK_NFDS_T="typedef ${ac_type} nfds_t;"
if test ".$ac_type" = ".nfds_t"; then
FALLBACK_NFDS_T="/* $FALLBACK_NFDS_T */"
fi
echo $ac_n "checking for built-in type long long""... $ac_c" 1>&6
echo "configure:3068: checking for built-in type long long" >&5
if eval "test \"`echo '$''{'ac_cv_type_longlong'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
int main() {
long long X = 2, Y = 1, Z;
Z = X / Y;
; return 0; }
EOF
if { (eval echo configure:3086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_LONGLONG 1
EOF
ac_cv_type_longlong=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_type_longlong=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_type_longlong" 1>&6
echo $ac_n "checking for built-in type long double""... $ac_c" 1>&6
echo "configure:3105: checking for built-in type long double" >&5
if eval "test \"`echo '$''{'ac_cv_type_longdouble'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
int main() {
long double X = 2, Y = 1, Z;
Z = X / Y;
; return 0; }
EOF
if { (eval echo configure:3123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_LONGDOUBLE 1
EOF
ac_cv_type_longdouble=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_type_longdouble=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_type_longdouble" 1>&6
if test ".$enable_subdir" != .yes; then
echo "$ac_t""" 1>&6
echo "$ac_t""${TB}Machine Context Implementation:${TN}" 1>&6
fi
for ac_hdr in ucontext.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3154: 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
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3164: \"$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
EOF
else
echo "$ac_t""no" 1>&6
fi
done
for ac_func in makecontext swapcontext getcontext setcontext; do
echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
echo "configure:3192: checking for function $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
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
extern "C"
/* 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();
char (*f)();
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. */
choke me
f = $ac_func;
; return 0; }
EOF
if { (eval echo configure:3224: \"$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
EOF
else
echo "$ac_t""no" 1>&6
fi
done
echo $ac_n "checking for usable SVR4/SUSv2 makecontext(2)/swapcontext(2)""... $ac_c" 1>&6
echo "configure:3250: checking for usable SVR4/SUSv2 makecontext(2)/swapcontext(2)" >&5
if eval "test \"`echo '$''{'ac_cv_check_mcsc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
ac_cv_check_mcsc=no
else
cat > conftest.$ac_ext <<EOF
ucontext_t uc_child;
ucontext_t uc_main;
void child(void *arg)
{
if (arg != (void *)12345)
exit(1);
if (swapcontext(&uc_child, &uc_main) != 0)
exit(1);
}
int main(int argc, char *argv[])
{
FILE *fp;
void *stack;
/* the default is that it fails */
if ((fp = fopen("conftestval", "w")) == NULL)
exit(1);
fprintf(fp, "no\n");
fclose(fp);
/* configure a child user-space context */
if ((stack = malloc(64*1024)) == NULL)
exit(1);
if (getcontext(&uc_child) != 0)
exit(1);
uc_child.uc_link = NULL;
uc_child.uc_stack.ss_sp = (char *)stack+(32*1024);
uc_child.uc_stack.ss_size = 32*1024;
uc_child.uc_stack.ss_flags = 0;
makecontext(&uc_child, child, 2, (void *)12345);
/* switch into the user context */
if (swapcontext(&uc_main, &uc_child) != 0)
exit(1);
/* Fine, child came home */
if ((fp = fopen("conftestval", "w")) == NULL)
exit(1);
fprintf(fp, "yes\n");
fclose(fp);
/* die successfully */
exit(0);
}
EOF
if { (eval echo configure:3316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_check_mcsc=`cat conftestval`
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
ac_cv_check_mcsc=no
fi
rm -fr conftest*
fi
fi
echo "$ac_t""$ac_cv_check_mcsc" 1>&6
if test ".$ac_cv_check_mcsc" = .yes; then
mcsc=yes
else
mcsc=no
fi
for ac_hdr in signal.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3341: 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
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3351: \"$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
EOF
else
echo "$ac_t""no" 1>&6
fi
done
for ac_func in sigsetjmp siglongjmp setjmp longjmp _setjmp _longjmp; do
echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
echo "configure:3379: checking for function $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
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
extern "C"
/* 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();
char (*f)();
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. */
choke me
f = $ac_func;
; return 0; }
EOF
if { (eval echo configure:3411: \"$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
EOF
else
echo "$ac_t""no" 1>&6
fi
done
for ac_func in sigaltstack sigstack; do
echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
echo "configure:3437: checking for function $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
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
extern "C"
/* 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();
char (*f)();
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. */
choke me
f = $ac_func;
; return 0; }
EOF
if { (eval echo configure:3469: \"$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
EOF
else
echo "$ac_t""no" 1>&6
fi
done
echo $ac_n "checking for signal-mask aware setjmp(3)/longjmp(3)""... $ac_c" 1>&6
echo "configure:3494: checking for signal-mask aware setjmp(3)/longjmp(3)" >&5
if eval "test \"`echo '$''{'ac_cv_check_sjlj'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_rc=yes
for ac_spec in func:setjmp func:longjmp; do
ac_type=`echo "$ac_spec" | sed -e 's/:.*$//'`
ac_item=`echo "$ac_spec" | sed -e 's/^.*://'`
case $ac_type in
header )
ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
ac_var="ac_cv_header_$ac_item"
;;
file )
ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
ac_var="ac_cv_file_$ac_item"
;;
func ) ac_var="ac_cv_func_$ac_item" ;;
lib ) ac_var="ac_cv_lib_$ac_item" ;;
define ) ac_var="ac_cv_define_$ac_item" ;;
typedef ) ac_var="ac_cv_typedef_$ac_item" ;;
custom ) ac_var="$ac_item" ;;
esac
eval "ac_val=\$$ac_var"
if test ".$ac_val" != .yes; then
ac_rc=no
break
fi
done
if test ".$ac_rc" = .yes; then
:
ac_cv_check_sjlj=sjlje
else
:
ac_cv_check_sjlj=none
fi
cross_compile=no
for testtype in ssjlj sjlj usjlj; do
OCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -DTEST_${testtype}"
if test "$cross_compiling" = yes; then
rc=failed
else
cat > conftest.$ac_ext <<EOF
static __JMP_BUF jb;
static void sighandler(int sig)
{
sigset_t sigs;
/* get signal mask */
sigprocmask(SIG_SETMASK, NULL, &sigs);
/* make sure USR1 is still blocked */
if (!sigismember(&sigs, SIGUSR1))
exit(1);
/* block USR2 for us */
sigaddset(&sigs, SIGUSR2);
sigprocmask(SIG_SETMASK, &sigs, NULL);
/* jump back to main */
__LONGJMP(jb, 1);
exit(1);
}
int main(int argc, char *argv[])
{
FILE *fp;
sigset_t sigs;
struct sigaction sa;
/* the default is that it fails */
if ((fp = fopen("conftestval", "w")) == NULL)
exit(1);
fprintf(fp, "failed\n");
fclose(fp);
/* block USR1 and unblock USR2 signal */
sigprocmask(SIG_SETMASK, NULL, &sigs);
sigaddset(&sigs, SIGUSR1);
sigdelset(&sigs, SIGUSR2);
sigprocmask(SIG_SETMASK, &sigs, NULL);
/* set jump buffer */
if (__SETJMP(jb) == 0) {
/* install signal handler for USR1 */
memset((void *)&sa, 0, sizeof(struct sigaction));
sigemptyset(&sa.sa_mask);
sa.sa_handler = sighandler;
sa.sa_flags = 0;
sigaction(SIGUSR1, &sa, NULL);
/* send USR1 signal (which is still blocked) */
kill(getpid(), SIGUSR1);
/* unblock USR1 and wait for it */
sigprocmask(SIG_SETMASK, NULL, &sigs);
sigdelset(&sigs, SIGUSR1);
sigsuspend(&sigs);
exit(1);
}
/* get signal mask again */
sigprocmask(SIG_SETMASK, NULL, &sigs);
/* make sure USR2 is again unblocked */
if (sigismember(&sigs, SIGUSR2))
exit(1);
/* Fine... */
if ((fp = fopen("conftestval", "w")) == NULL)
exit(1);
fprintf(fp, "ok\n");
fclose(fp);
exit(0);
}
EOF
if { (eval echo configure:3641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
rc=`cat conftestval`
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
rc=failed
fi
rm -fr conftest*
fi
CFLAGS="$OCFLAGS"
if test ".$rc" = .ok; then
ac_cv_check_sjlj=$testtype
break
fi
done
case $PLATFORM in
*-*-linux* )
braindead=no
case "x`uname -r`" in
x2.[23456789]* ) ;;
* ) braindead=yes ;;
esac
case `grep __GLIBC_MINOR /usr/include/features.h | grep '#define' |\
awk '{ printf("%s", $3 >= 1 ? "yes" : "no"); }'` in
yes ) ;;
* ) braindead=yes ;;
esac
case $braindead in
yes ) ac_cv_check_sjlj=sjljlx ;;
no ) ac_cv_check_sjlj=ssjlj ;;
esac
;;
*-*-isc* )
ac_cv_check_sjlj=sjljisc
;;
*-*-interix )
# Interix is a POSIX sub-system on Windows-NT which
# can use the Interactive UNIX dispatching code.
ac_cv_check_sjlj=sjljisc
;;
*-*-cygwin* )
ac_cv_check_sjlj=sjljw32
;;
esac
fi
sjlj_type="$ac_cv_check_sjlj"
if test ".$ac_cv_check_sjlj" != .none; then
echo "$ac_t""yes: $ac_cv_check_sjlj" 1>&6
sjlj=yes
else
echo "$ac_t""no" 1>&6
sjlj=no
fi
if test ".$mcsc" = .yes; then
mctx_mth=mcsc
mctx_dsp=sc
mctx_stk=mc
elif test ".$sjlj" = .yes; then
mctx_mth=sjlj
mctx_dsp=$sjlj_type
mctx_stk=none
ac_rc=yes
for ac_spec in func:sigstack; do
ac_type=`echo "$ac_spec" | sed -e 's/:.*$//'`
ac_item=`echo "$ac_spec" | sed -e 's/^.*://'`
case $ac_type in
header )
ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
ac_var="ac_cv_header_$ac_item"
;;
file )
ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
ac_var="ac_cv_file_$ac_item"
;;
func ) ac_var="ac_cv_func_$ac_item" ;;
lib ) ac_var="ac_cv_lib_$ac_item" ;;
define ) ac_var="ac_cv_define_$ac_item" ;;
typedef ) ac_var="ac_cv_typedef_$ac_item" ;;
custom ) ac_var="$ac_item" ;;
esac
eval "ac_val=\$$ac_var"
if test ".$ac_val" != .yes; then
ac_rc=no
break
fi
done
if test ".$ac_rc" = .yes; then
:
mctx_stk=ss
else
:
fi
ac_rc=yes
for ac_spec in func:sigaltstack; do
ac_type=`echo "$ac_spec" | sed -e 's/:.*$//'`
ac_item=`echo "$ac_spec" | sed -e 's/^.*://'`
case $ac_type in
header )
ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
ac_var="ac_cv_header_$ac_item"
;;
file )
ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
ac_var="ac_cv_file_$ac_item"
;;
func ) ac_var="ac_cv_func_$ac_item" ;;
lib ) ac_var="ac_cv_lib_$ac_item" ;;
define ) ac_var="ac_cv_define_$ac_item" ;;
typedef ) ac_var="ac_cv_typedef_$ac_item" ;;
custom ) ac_var="$ac_item" ;;
esac
eval "ac_val=\$$ac_var"
if test ".$ac_val" != .yes; then
ac_rc=no
break
fi
done
if test ".$ac_rc" = .yes; then
:
mctx_stk=sas
else
:
fi
case $mctx_dsp in
sjljlx|sjljisc|sjljw32 ) mctx_stk=none
esac
else
{ echo "configure: error: no appropriate mctx method found" 1>&2; exit 1; }
fi
# Check whether --with-mctx-mth or --without-mctx-mth was given.
if test "${with_mctx_mth+set}" = set; then
withval="$with_mctx_mth"
case $withval in
mcsc|sjlj ) mctx_mth=$withval ;;
* ) { echo "configure: error: invalid mctx method -- allowed: mcsc,sjlj" 1>&2; exit 1; } ;;
esac
fi
# Check whether --with-mctx-dsp or --without-mctx-dsp was given.
if test "${with_mctx_dsp+set}" = set; then
withval="$with_mctx_dsp"
case $withval in
sc|ssjlj|sjlj|usjlj|sjlje|sjljlx|sjljisc|sjljw32 ) mctx_dsp=$withval ;;
* ) { echo "configure: error: invalid mctx dispatching -- allowed: sc,ssjlj,sjlj,usjlj,sjlje,sjljlx,sjljisc,sjljw32" 1>&2; exit 1; } ;;
esac
fi
# Check whether --with-mctx-stk or --without-mctx-stk was given.
if test "${with_mctx_stk+set}" = set; then
withval="$with_mctx_stk"
case $withval in
mc|ss|sas|none ) mctx_stk=$withval ;;
* ) { echo "configure: error: invalid mctx stack setup -- allowed: mc,ss,sas,none" 1>&2; exit 1; } ;;
esac
fi
echo $ac_n "checking for typedef stack_t""... $ac_c" 1>&6
echo "configure:3816: checking for typedef stack_t" >&5
if eval "test \"`echo '$''{'ac_cv_typedef_stack_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "(^|[^a-zA-Z_0-9])stack_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_typedef_stack_t=yes
else
rm -rf conftest*
ac_cv_typedef_stack_t=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_typedef_stack_t" 1>&6
if test $ac_cv_typedef_stack_t = yes; then
cat >> confdefs.h <<\EOF
EOF
fi
echo $ac_n "checking for direction of stack growth""... $ac_c" 1>&6
echo "configure:3848: checking for direction of stack growth" >&5
if eval "test \"`echo '$''{'ac_cv_check_stackgrowth'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cross_compile=no
if test "$cross_compiling" = yes; then
ac_cv_check_stackgrowth=down
else
cat > conftest.$ac_ext <<EOF
static int iterate = 10;
static int growsdown(int *x)
{
auto int y;
y = (x > &y);
if (--iterate > 0)
y = growsdown(&y);
if (y != (x > &y))
exit(1);
return y;
}
int main(int argc, char *argv[])
{
FILE *f;
auto int x;
if ((f = fopen("conftestval", "w")) == NULL)
exit(1);
fprintf(f, "%s\n", growsdown(&x) ? "down" : "up");;
fclose(f);
exit(0);
}
EOF
if { (eval echo configure:3888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_check_stackgrowth=`cat conftestval`
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
ac_cv_check_stackgrowth=down
fi
rm -fr conftest*
fi
fi
echo "$ac_t""$ac_cv_check_stackgrowth" 1>&6
if test ".$ac_cv_check_stackgrowth" = ".down"; then
val="-1"
else
val="+1"
fi
cat >> confdefs.h <<EOF
#define PTH_STACKGROWTH $val
EOF
if test ".$ac_cv_check_stackgrowth" = ".down"; then
PTH_STACK_GROWTH="down"
else
PTH_STACK_GROWTH="up"
fi
for ac_func in makecontext; do
echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
echo "configure:3924: checking for function $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
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
extern "C"
/* 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();
char (*f)();
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. */
choke me
f = $ac_func;
; return 0; }
EOF
if { (eval echo configure:3956: \"$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
EOF
else
echo "$ac_t""no" 1>&6
fi
done
echo $ac_n "checking for stack setup via makecontext""... $ac_c" 1>&6
echo "configure:3982: checking for stack setup via makecontext" >&5
if eval "test \"`echo '$''{'ac_cv_stacksetup_makecontext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test ".$ac_cv_func_makecontext" = .no; then
ac_cv_stacksetup_makecontext="N.A.:/*N.A.*/,/*N.A.*/"
else
OCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -DTEST_makecontext"
cross_compile=no
if test "$cross_compiling" = yes; then
ac_cv_stacksetup_makecontext='guessed:(skaddr),(sksize)'
else
cat > conftest.$ac_ext <<EOF
union alltypes {
long l;
double d;
void *vp;
void (*fp)(void);
char *cp;
};
static volatile char *handler_addr = (char *)0xDEAD;
static volatile int handler_done = 0;
void handler(int sig)
{
char garbage[1024];
int i;
auto int dummy;
for (i = 0; i < 1024; i++)
garbage[i] = 'X';
handler_addr = (char *)&dummy;
handler_done = 1;
return;
}
static ucontext_t uc_handler;
static ucontext_t uc_main;
void handler(void)
{
char garbage[1024];
int i;
auto int dummy;
for (i = 0; i < 1024; i++)
garbage[i] = 'X';
handler_addr = (char *)&dummy;
swapcontext(&uc_handler, &uc_main);
return;
}
int main(int argc, char *argv[])
{
FILE *f;
char *skaddr;
char *skbuf;
int sksize;
char result[1024];
int i;
sksize = 32768;
skbuf = (char *)malloc(sksize*2+2*sizeof(union alltypes));
if (skbuf == NULL)
exit(1);
for (i = 0; i < sksize*2+2*sizeof(union alltypes); i++)
skbuf[i] = 'A';
skaddr = skbuf+sizeof(union alltypes);
{
struct sigaction sa;
struct sigstack ss;
stack_t ss;
struct sigaltstack ss;
ss.ss_sp = (void *)(skaddr + sksize);
ss.ss_onstack = 0;
if (sigstack(&ss, NULL) < 0)
exit(1);
ss.ss_sp = (void *)(skaddr + sksize);
ss.ss_size = sksize;
ss.ss_flags = 0;
if (sigaltstack(&ss, NULL) < 0)
exit(1);
memset((void *)&sa, 0, sizeof(struct sigaction));
sa.sa_handler = handler;
sa.sa_flags = SA_ONSTACK;
sigemptyset(&sa.sa_mask);
sigaction(SIGUSR1, &sa, NULL);
kill(getpid(), SIGUSR1);
while (!handler_done)
/*nop*/;
}
{
if (getcontext(&uc_handler) != 0)
exit(1);
uc_handler.uc_link = NULL;
uc_handler.uc_stack.ss_sp = (void *)(skaddr + sksize);
uc_handler.uc_stack.ss_size = sksize;
uc_handler.uc_stack.ss_flags = 0;
makecontext(&uc_handler, handler, 1);
swapcontext(&uc_main, &uc_handler);
}
if (handler_addr == (char *)0xDEAD)
exit(1);
if (handler_addr < skaddr+sksize) {
/* stack was placed into lower area */
if (*(skaddr+sksize) != 'A')
sprintf(result, "(skaddr)+(sksize)-%d,(sksize)-%d",
sizeof(union alltypes), sizeof(union alltypes));
else
strcpy(result, "(skaddr)+(sksize),(sksize)");
}
else {
/* stack was placed into higher area */
if (*(skaddr+sksize*2) != 'A')
sprintf(result, "(skaddr),(sksize)-%d", sizeof(union alltypes));
else
strcpy(result, "(skaddr),(sksize)");
}
if ((f = fopen("conftestval", "w")) == NULL)
exit(1);
fprintf(f, "%s\n", result);
fclose(f);
exit(0);
}
EOF
if { (eval echo configure:4134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_stacksetup_makecontext=`cat conftestval`
ac_cv_stacksetup_makecontext="ok:$ac_cv_stacksetup_makecontext"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
ac_cv_stacksetup_makecontext='guessed:(skaddr),(sksize)'
fi
rm -fr conftest*
fi
CFLAGS="$OCFLAGS"
fi
fi
type=`echo $ac_cv_stacksetup_makecontext | sed -e 's;:.*$;;'`
addr=`echo $ac_cv_stacksetup_makecontext | sed -e 's;^.*:;;' -e 's;,.*$;;'`
size=`echo $ac_cv_stacksetup_makecontext | sed -e 's;^.*:;;' -e 's;^.*,;;'`
pth_skaddr_makecontext="pth_sksize_makecontext="#define pth_sksize_makecontext(skaddr,sksize) ($size)"
echo "$ac_t""$type" 1>&6
if test ".$verbose" = .yes; then
echo "$ac_t"" $pth_skaddr_makecontext" 1>&6
fi
if test ".$verbose" = .yes; then
echo "$ac_t"" $pth_sksize_makecontext" 1>&6
fi
for ac_func in sigaltstack; do
echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
echo "configure:4173: checking for function $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
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
extern "C"
/* 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();
char (*f)();
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. */
choke me
f = $ac_func;
; return 0; }
EOF
if { (eval echo configure:4205: \"$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
EOF
else
echo "$ac_t""no" 1>&6
fi
done
echo $ac_n "checking for typedef stack_t""... $ac_c" 1>&6
echo "configure:4235: checking for typedef stack_t" >&5
if eval "test \"`echo '$''{'ac_cv_typedef_stack_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "(^|[^a-zA-Z_0-9])stack_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_typedef_stack_t=yes
else
rm -rf conftest*
ac_cv_typedef_stack_t=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_typedef_stack_t" 1>&6
if test $ac_cv_typedef_stack_t = yes; then
cat >> confdefs.h <<\EOF
EOF
fi
echo $ac_n "checking for stack setup via sigaltstack""... $ac_c" 1>&6
echo "configure:4269: checking for stack setup via sigaltstack" >&5
if eval "test \"`echo '$''{'ac_cv_stacksetup_sigaltstack'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test ".$ac_cv_func_sigaltstack" = .no; then
ac_cv_stacksetup_sigaltstack="N.A.:/*N.A.*/,/*N.A.*/"
else
OCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -DTEST_sigaltstack"
cross_compile=no
if test "$cross_compiling" = yes; then
ac_cv_stacksetup_sigaltstack='guessed:(skaddr),(sksize)'
else
cat > conftest.$ac_ext <<EOF
union alltypes {
long l;
double d;
void *vp;
void (*fp)(void);
char *cp;
};
static volatile char *handler_addr = (char *)0xDEAD;
static volatile int handler_done = 0;
void handler(int sig)
{
char garbage[1024];
int i;
auto int dummy;
for (i = 0; i < 1024; i++)
garbage[i] = 'X';
handler_addr = (char *)&dummy;
handler_done = 1;
return;
}
static ucontext_t uc_handler;
static ucontext_t uc_main;
void handler(void)
{
char garbage[1024];
int i;
auto int dummy;
for (i = 0; i < 1024; i++)
garbage[i] = 'X';
handler_addr = (char *)&dummy;
swapcontext(&uc_handler, &uc_main);
return;
}
int main(int argc, char *argv[])
{
FILE *f;
char *skaddr;
char *skbuf;
int sksize;
char result[1024];
int i;
sksize = 32768;
skbuf = (char *)malloc(sksize*2+2*sizeof(union alltypes));
if (skbuf == NULL)
exit(1);
for (i = 0; i < sksize*2+2*sizeof(union alltypes); i++)
skbuf[i] = 'A';
skaddr = skbuf+sizeof(union alltypes);
{
struct sigaction sa;
struct sigstack ss;
stack_t ss;
struct sigaltstack ss;
ss.ss_sp = (void *)(skaddr + sksize);
ss.ss_onstack = 0;
if (sigstack(&ss, NULL) < 0)
exit(1);
ss.ss_sp = (void *)(skaddr + sksize);
ss.ss_size = sksize;
ss.ss_flags = 0;
if (sigaltstack(&ss, NULL) < 0)
exit(1);
memset((void *)&sa, 0, sizeof(struct sigaction));
sa.sa_handler = handler;
sa.sa_flags = SA_ONSTACK;
sigemptyset(&sa.sa_mask);
sigaction(SIGUSR1, &sa, NULL);
kill(getpid(), SIGUSR1);
while (!handler_done)
/*nop*/;
}
{
if (getcontext(&uc_handler) != 0)
exit(1);
uc_handler.uc_link = NULL;
uc_handler.uc_stack.ss_sp = (void *)(skaddr + sksize);
uc_handler.uc_stack.ss_size = sksize;
uc_handler.uc_stack.ss_flags = 0;
makecontext(&uc_handler, handler, 1);
swapcontext(&uc_main, &uc_handler);
}
if (handler_addr == (char *)0xDEAD)
exit(1);
if (handler_addr < skaddr+sksize) {
/* stack was placed into lower area */
if (*(skaddr+sksize) != 'A')
sprintf(result, "(skaddr)+(sksize)-%d,(sksize)-%d",
sizeof(union alltypes), sizeof(union alltypes));
else
strcpy(result, "(skaddr)+(sksize),(sksize)");
}
else {
/* stack was placed into higher area */
if (*(skaddr+sksize*2) != 'A')
sprintf(result, "(skaddr),(sksize)-%d", sizeof(union alltypes));
else
strcpy(result, "(skaddr),(sksize)");
}
if ((f = fopen("conftestval", "w")) == NULL)
exit(1);
fprintf(f, "%s\n", result);
fclose(f);
exit(0);
}
EOF
if { (eval echo configure:4421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_stacksetup_sigaltstack=`cat conftestval`
ac_cv_stacksetup_sigaltstack="ok:$ac_cv_stacksetup_sigaltstack"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
ac_cv_stacksetup_sigaltstack='guessed:(skaddr),(sksize)'
fi
rm -fr conftest*
fi
CFLAGS="$OCFLAGS"
fi
fi
type=`echo $ac_cv_stacksetup_sigaltstack | sed -e 's;:.*$;;'`
addr=`echo $ac_cv_stacksetup_sigaltstack | sed -e 's;^.*:;;' -e 's;,.*$;;'`
size=`echo $ac_cv_stacksetup_sigaltstack | sed -e 's;^.*:;;' -e 's;^.*,;;'`
pth_skaddr_sigaltstack="pth_sksize_sigaltstack="#define pth_sksize_sigaltstack(skaddr,sksize) ($size)"
echo "$ac_t""$type" 1>&6
if test ".$verbose" = .yes; then
echo "$ac_t"" $pth_skaddr_sigaltstack" 1>&6
fi
if test ".$verbose" = .yes; then
echo "$ac_t"" $pth_sksize_sigaltstack" 1>&6
fi
for ac_func in sigstack; do
echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
echo "configure:4459: checking for function $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
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
extern "C"
/* 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();
char (*f)();
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. */
choke me
f = $ac_func;
; return 0; }
EOF
if { (eval echo configure:4491: \"$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
EOF
else
echo "$ac_t""no" 1>&6
fi
done
echo $ac_n "checking for stack setup via sigstack""... $ac_c" 1>&6
echo "configure:4517: checking for stack setup via sigstack" >&5
if eval "test \"`echo '$''{'ac_cv_stacksetup_sigstack'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test ".$ac_cv_func_sigstack" = .no; then
ac_cv_stacksetup_sigstack="N.A.:/*N.A.*/,/*N.A.*/"
else
OCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -DTEST_sigstack"
cross_compile=no
if test "$cross_compiling" = yes; then
ac_cv_stacksetup_sigstack='guessed:(skaddr),(sksize)'
else
cat > conftest.$ac_ext <<EOF
union alltypes {
long l;
double d;
void *vp;
void (*fp)(void);
char *cp;
};
static volatile char *handler_addr = (char *)0xDEAD;
static volatile int handler_done = 0;
void handler(int sig)
{
char garbage[1024];
int i;
auto int dummy;
for (i = 0; i < 1024; i++)
garbage[i] = 'X';
handler_addr = (char *)&dummy;
handler_done = 1;
return;
}
static ucontext_t uc_handler;
static ucontext_t uc_main;
void handler(void)
{
char garbage[1024];
int i;
auto int dummy;
for (i = 0; i < 1024; i++)
garbage[i] = 'X';
handler_addr = (char *)&dummy;
swapcontext(&uc_handler, &uc_main);
return;
}
int main(int argc, char *argv[])
{
FILE *f;
char *skaddr;
char *skbuf;
int sksize;
char result[1024];
int i;
sksize = 32768;
skbuf = (char *)malloc(sksize*2+2*sizeof(union alltypes));
if (skbuf == NULL)
exit(1);
for (i = 0; i < sksize*2+2*sizeof(union alltypes); i++)
skbuf[i] = 'A';
skaddr = skbuf+sizeof(union alltypes);
{
struct sigaction sa;
struct sigstack ss;
stack_t ss;
struct sigaltstack ss;
ss.ss_sp = (void *)(skaddr + sksize);
ss.ss_onstack = 0;
if (sigstack(&ss, NULL) < 0)
exit(1);
ss.ss_sp = (void *)(skaddr + sksize);
ss.ss_size = sksize;
ss.ss_flags = 0;
if (sigaltstack(&ss, NULL) < 0)
exit(1);
memset((void *)&sa, 0, sizeof(struct sigaction));
sa.sa_handler = handler;
sa.sa_flags = SA_ONSTACK;
sigemptyset(&sa.sa_mask);
sigaction(SIGUSR1, &sa, NULL);
kill(getpid(), SIGUSR1);
while (!handler_done)
/*nop*/;
}
{
if (getcontext(&uc_handler) != 0)
exit(1);
uc_handler.uc_link = NULL;
uc_handler.uc_stack.ss_sp = (void *)(skaddr + sksize);
uc_handler.uc_stack.ss_size = sksize;
uc_handler.uc_stack.ss_flags = 0;
makecontext(&uc_handler, handler, 1);
swapcontext(&uc_main, &uc_handler);
}
if (handler_addr == (char *)0xDEAD)
exit(1);
if (handler_addr < skaddr+sksize) {
/* stack was placed into lower area */
if (*(skaddr+sksize) != 'A')
sprintf(result, "(skaddr)+(sksize)-%d,(sksize)-%d",
sizeof(union alltypes), sizeof(union alltypes));
else
strcpy(result, "(skaddr)+(sksize),(sksize)");
}
else {
/* stack was placed into higher area */
if (*(skaddr+sksize*2) != 'A')
sprintf(result, "(skaddr),(sksize)-%d", sizeof(union alltypes));
else
strcpy(result, "(skaddr),(sksize)");
}
if ((f = fopen("conftestval", "w")) == NULL)
exit(1);
fprintf(f, "%s\n", result);
fclose(f);
exit(0);
}
EOF
if { (eval echo configure:4669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_stacksetup_sigstack=`cat conftestval`
ac_cv_stacksetup_sigstack="ok:$ac_cv_stacksetup_sigstack"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
ac_cv_stacksetup_sigstack='guessed:(skaddr),(sksize)'
fi
rm -fr conftest*
fi
CFLAGS="$OCFLAGS"
fi
fi
type=`echo $ac_cv_stacksetup_sigstack | sed -e 's;:.*$;;'`
addr=`echo $ac_cv_stacksetup_sigstack | sed -e 's;^.*:;;' -e 's;,.*$;;'`
size=`echo $ac_cv_stacksetup_sigstack | sed -e 's;^.*:;;' -e 's;^.*,;;'`
pth_skaddr_sigstack="pth_sksize_sigstack="#define pth_sksize_sigstack(skaddr,sksize) ($size)"
echo "$ac_t""$type" 1>&6
if test ".$verbose" = .yes; then
echo "$ac_t"" $pth_skaddr_sigstack" 1>&6
fi
if test ".$verbose" = .yes; then
echo "$ac_t"" $pth_sksize_sigstack" 1>&6
fi
case $mctx_dsp in
ssjlj )
pth_sigjmpbuf='sigjmp_buf'
pth_sigsetjmp='sigsetjmp(buf,1)'
pth_siglongjmp='siglongjmp(buf,val)'
;;
sjlj )
pth_sigjmpbuf='jmp_buf'
pth_sigsetjmp='setjmp(buf)'
pth_siglongjmp='longjmp(buf,val)'
;;
usjlj )
pth_sigjmpbuf='jmp_buf'
pth_sigsetjmp='_setjmp(buf)'
pth_siglongjmp='_longjmp(buf,val)'
;;
sjlje )
pth_sigjmpbuf='jmp_buf'
pth_sigsetjmp='setjmp(buf)'
pth_siglongjmp='longjmp(buf,val)'
;;
sjljlx|sjljisc|sjljw32 )
pth_sigjmpbuf='sigjmp_buf'
pth_sigsetjmp='sigsetjmp(buf,1)'
pth_siglongjmp='siglongjmp(buf,val)'
;;
esac
pth_sigjmpbuf="#define pth_sigjmpbuf $pth_sigjmpbuf"
pth_sigsetjmp="#define pth_sigsetjmp(buf) $pth_sigsetjmp"
pth_siglongjmp="#define pth_siglongjmp(buf,val) $pth_siglongjmp"
cat >> confdefs.h <<EOF
EOF
cat >> confdefs.h <<EOF
EOF
cat >> confdefs.h <<EOF
EOF
PTH_MCTX_ID="$mctx_mth/$mctx_dsp/$mctx_stk"
echo "$ac_t""decision on mctx implementation... ${TB}${PTH_MCTX_ID}${TN}" 1>&6
if test ".$verbose" = .yes; then
echo "$ac_t"" decided mctx method: $mctx_mth" 1>&6
fi
if test ".$verbose" = .yes; then
echo "$ac_t"" decided mctx dispatching: $mctx_dsp" 1>&6
fi
if test ".$verbose" = .yes; then
echo "$ac_t"" decided mctx stack setup: $mctx_stk" 1>&6
fi
if test ".$enable_subdir" != .yes; then
echo "$ac_t""" 1>&6
echo "$ac_t""${TB}System Call Mapping:${TN}" 1>&6
fi
for ac_func in syscall; do
echo $ac_n "checking for function $ac_func""... $ac_c" 1>&6
echo "configure:4780: checking for function $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
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
extern "C"
/* 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();
char (*f)();
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. */
choke me
f = $ac_func;
; return 0; }
EOF
if { (eval echo configure:4812: \"$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
EOF
else
echo "$ac_t""no" 1>&6
fi
done
for ac_hdr in sys/syscall.h sys/socketcall.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4840: 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
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4850: \"$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
EOF
else
echo "$ac_t""no" 1>&6
fi
done
echo $ac_n "checking for define SYS_read in sys/syscall.h""... $ac_c" 1>&6
echo "configure:4877: checking for define SYS_read in sys/syscall.h" >&5
if eval "test \"`echo '$''{'ac_cv_define_SYS_read'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
YES_IS_DEFINED
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "YES_IS_DEFINED" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_define_SYS_read=yes
else
rm -rf conftest*
ac_cv_define_SYS_read=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_define_SYS_read" 1>&6
if test $ac_cv_define_SYS_read = yes; then
cat >> confdefs.h <<\EOF
EOF
fi
echo $ac_n "checking whether soft system call mapping is used""... $ac_c" 1>&6
echo "configure:4912: checking whether soft system call mapping is used" >&5
if test "${enable_syscall_soft+set}" = set; then
enableval="$enable_syscall_soft"
enable_syscall_soft="$enableval"
else
if test ".$enable_syscall_soft" = .; then
enable_syscall_soft=no
fi
fi
if test .$enable_syscall_soft = .yes; then
PTH_SYSCALL_SOFT=1
msg="yes"
else
PTH_SYSCALL_SOFT=0
msg="no"
fi
echo "$ac_t""$msg" 1>&6
echo $ac_n "checking whether hard system call mapping is used""... $ac_c" 1>&6
echo "configure:4934: checking whether hard system call mapping is used" >&5
if test "${enable_syscall_hard+set}" = set; then
enableval="$enable_syscall_hard"
enable_syscall_hard="$enableval"
else
if test ".$enable_syscall_hard" = .; then
enable_syscall_hard=no
fi
fi
if test ".$enable_syscall_hard" = .yes; then
ac_rc=yes
for ac_spec in func:syscall header:sys/syscall.h define:SYS_read; do
ac_type=`echo "$ac_spec" | sed -e 's/:.*$//'`
ac_item=`echo "$ac_spec" | sed -e 's/^.*://'`
case $ac_type in
header )
ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
ac_var="ac_cv_header_$ac_item"
;;
file )
ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
ac_var="ac_cv_file_$ac_item"
;;
func ) ac_var="ac_cv_func_$ac_item" ;;
lib ) ac_var="ac_cv_lib_$ac_item" ;;
define ) ac_var="ac_cv_define_$ac_item" ;;
typedef ) ac_var="ac_cv_typedef_$ac_item" ;;
custom ) ac_var="$ac_item" ;;
esac
eval "ac_val=\$$ac_var"
if test ".$ac_val" != .yes; then
ac_rc=no
break
fi
done
if test ".$ac_rc" = .yes; then
:
enable_syscall_hard=yes
else
:
enable_syscall_hard=no
fi
fi
if test ".$enable_syscall_hard" = .yes; then
PTH_SYSCALL_HARD=1
msg="yes"
else
PTH_SYSCALL_HARD=0
msg="no"
fi
echo "$ac_t""$msg" 1>&6
if test ".$enable_syscall_hard" = .yes; then
echo "${TB}Warning: The hard system call mapping variant is still work in progress.${TN}"
echo "${TB} Do neither expect it to compile on all platforms (because of${TN}"
echo "${TB} conflicts with vendor prototypes) nor to actually work!${TN}"
fi
if test ".$enable_subdir" != .yes; then
echo "$ac_t""" 1>&6
echo "$ac_t""${TB}Build Parameters:${TN}" 1>&6
fi
echo $ac_n "checking whether to activate batch build mode""... $ac_c" 1>&6
echo "configure:5005: checking whether to activate batch build mode" >&5
if test "${enable_batch+set}" = set; then
enableval="$enable_batch"
else
enable_batch=no
fi
if test ".$silent" = .yes; then
enable_batch=yes
fi
echo "$ac_t""$enable_batch" 1>&6
BATCH="$enable_batch"
TARGET_ALL='$(TARGET_PREQ) $(TARGET_LIBS)'
echo $ac_n "checking whether to activate maintainer build targets""... $ac_c" 1>&6
echo "configure:5022: checking whether to activate maintainer build targets" >&5
if test "${enable_maintainer+set}" = set; then
enableval="$enable_maintainer"
else
enable_maintainer=no
fi
echo "$ac_t""$enable_maintainer" 1>&6
if test ".$enable_maintainer" = .yes; then
TARGET_ALL="$TARGET_ALL \$(TARGET_MANS)"
fi
echo $ac_n "checking whether to activate test build targets""... $ac_c" 1>&6
echo "configure:5036: checking whether to activate test build targets" >&5
if test "${enable_tests+set}" = set; then
enableval="$enable_tests"
else
enable_tests=yes
fi
echo "$ac_t""$enable_tests" 1>&6
if test ".$enable_tests" = .yes; then
TARGET_ALL="$TARGET_ALL \$(TARGET_TEST)"
fi
echo $ac_n "checking whether to build Pthread library""... $ac_c" 1>&6
echo "configure:5053: checking whether to build Pthread library" >&5
if test "${enable_pthread+set}" = set; then
enableval="$enable_pthread"
enable_pthread="$enableval"
else
if test ".$enable_pthread" = .; then
enable_pthread=no
fi
fi
echo "$ac_t""$enable_pthread" 1>&6
if test ".$enable_pthread" = .yes; then
PTHREAD_O=pthread.o LIBPTHREAD_A=libpthread.a LIBPTHREAD_LA=libpthread.la
PTHREAD_CONFIG_1='$(S)pthread-config.1'
PTHREAD_3='$(S)pthread.3'
INSTALL_PTHREAD=install-pthread
UNINSTALL_PTHREAD=uninstall-pthread
TEST_PTHREAD=test_pthread
enable_syscall_soft=yes
for ac_hdr in pthread.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:5077: 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
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5087: \"$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
EOF
else
echo "$ac_t""no" 1>&6
fi
done
ac_warn=no
if test ".$ac_cv_header_pthread_h" = .yes; then
warn=yes
case $PLATFORM in
*-*-freebsd* ) ac_warn=no ;;
*-*-linux* ) ac_warn=no ;;
*-*-solaris* ) ac_warn=no ;;
*-*-irix* ) ac_warn=no ;;
esac
fi
if test ".$ac_warn" = .yes; then
echo "${TB}Warning: You seem to have a vendor Pthread library installed.${TN}"
echo "${TB} There might be conflicts with its pthread.h under compile-time!${TN}"
fi
else
PTHREAD_O="" LIBPTHREAD_A="" LIBPTHREAD_LA=""
PTHREAD_CONFIG_1=""
PTHREAD_3=""
INSTALL_PTHREAD=""
UNINSTALL_PTHREAD=""
TEST_PTHREAD=""
fi
PTH_EXT_SFIO=FALSE
if test "${with_sfio+set}" = set; then
withval="$with_sfio"
if test ".$with_sfio" = .yes; then
sfio_version=`(sfio-config --version) 2>/dev/null`
if test ".$sfio_version" != .; then
CPPFLAGS="$CPPFLAGS `sfio-config --cflags`"
CFLAGS="$CFLAGS `sfio-config --cflags`"
LDFLAGS="$LDFLAGS `sfio-config --ldflags`"
fi
else
if test -d "$with_sfio"; then
found=0
for dir in $with_sfio/bin $with_sfio; do
if test -f "$dir/sfio-config"; then
sfio_version=`($dir/sfio-config --version) 2>/dev/null`
if test ".$sfio_version" != .; then
CPPFLAGS="$CPPFLAGS `$dir/sfio-config --cflags`"
CFLAGS="$CFLAGS `$dir/sfio-config --cflags`"
LDFLAGS="$LDFLAGS `$dir/sfio-config --ldflags`"
found=1
break
fi
fi
done
if test ".$found" = .0; then
for dir in $with_sfio/include/sfio $with_sfio/include $with_sfio; do
if test -f "$dir/sfio.h"; then
CPPFLAGS="$CPPFLAGS -I$dir"
CFLAGS="$CFLAGS -I$dir"
found=1
break
fi
done
for dir in $with_sfio/lib/sfio $with_sfio/lib $with_sfio; do
if test -f "$dir/libsfio.a" -o -f "$dir/libsfio.so"; then
LDFLAGS="$LDFLAGS -L$dir"
found=1
break
fi
done
fi
if test ".$found" = .0; then
for file in x `find $with_sfio -name "sfio.h" -type f -print`; do
test .$file = .x && continue
dir=`echo $file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'`
CPPFLAGS="$CPPFLAGS -I$dir"
CFLAGS="$CFLAGS -I$dir"
done
for file in x `find $with_sfio -name "libsfio.[aso]" -type f -print`; do
test .$file = .x && continue
dir=`echo $file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'`
LDFLAGS="$LDFLAGS -L$dir"
done
fi
fi
fi
for ac_hdr in sfio.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:5212: 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
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5222: \"$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
EOF
else
echo "$ac_t""no" 1>&6
fi
done
echo $ac_n "checking for sfdisc in -lsfio""... $ac_c" 1>&6
echo "configure:5249: checking for sfdisc in -lsfio" >&5
ac_lib_var=`echo sfio'_'sfdisc | 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="-lsfio $LIBS"
cat > conftest.$ac_ext <<EOF
/* 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 sfdisc();
int main() {
sfdisc()
; return 0; }
EOF
if { (eval echo configure:5268: \"$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 sfio | sed -e 's/^a-zA-Z0-9_/_/g' \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
cat >> confdefs.h <<EOF
EOF
LIBS="-lsfio $LIBS"
else
echo "$ac_t""no" 1>&6
fi
ac_rc=yes
for ac_spec in header:sfio.h lib:sfio_sfdisc; do
ac_type=`echo "$ac_spec" | sed -e 's/:.*$//'`
ac_item=`echo "$ac_spec" | sed -e 's/^.*://'`
case $ac_type in
header )
ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
ac_var="ac_cv_header_$ac_item"
;;
file )
ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
ac_var="ac_cv_file_$ac_item"
;;
func ) ac_var="ac_cv_func_$ac_item" ;;
lib ) ac_var="ac_cv_lib_$ac_item" ;;
define ) ac_var="ac_cv_define_$ac_item" ;;
typedef ) ac_var="ac_cv_typedef_$ac_item" ;;
custom ) ac_var="$ac_item" ;;
esac
eval "ac_val=\$$ac_var"
if test ".$ac_val" != .yes; then
ac_rc=no
break
fi
done
if test ".$ac_rc" = .yes; then
:
with_sfio=yes
else
:
with_sfio=no
fi
if test ".$with_sfio" = .no; then
{ echo "configure: error: Unable to find Sfio library" 1>&2; exit 1; }
fi
else
if test ".$with_sfio" = .; then
with_sfio=no
fi
fi
echo $ac_n "checking whether to build against Sfio library""... $ac_c" 1>&6
echo "configure:5339: checking whether to build against Sfio library" >&5
if test ".$with_sfio" = .yes; then
PTH_EXT_SFIO=TRUE
else
:
fi
echo "$ac_t""$with_sfio" 1>&6
if test "${with_dmalloc+set}" = set; then
withval="$with_dmalloc"
if test ".$with_dmalloc" = .yes; then
dmalloc_version=`(dmalloc-config --version) 2>/dev/null`
if test ".$dmalloc_version" != .; then
CPPFLAGS="$CPPFLAGS `dmalloc-config --cflags`"
CFLAGS="$CFLAGS `dmalloc-config --cflags`"
LDFLAGS="$LDFLAGS `dmalloc-config --ldflags`"
fi
else
if test -d "$with_dmalloc"; then
found=0
for dir in $with_dmalloc/bin $with_dmalloc; do
if test -f "$dir/dmalloc-config"; then
dmalloc_version=`($dir/dmalloc-config --version) 2>/dev/null`
if test ".$dmalloc_version" != .; then
CPPFLAGS="$CPPFLAGS `$dir/dmalloc-config --cflags`"
CFLAGS="$CFLAGS `$dir/dmalloc-config --cflags`"
LDFLAGS="$LDFLAGS `$dir/dmalloc-config --ldflags`"
found=1
break
fi
fi
done
if test ".$found" = .0; then
for dir in $with_dmalloc/include/dmalloc $with_dmalloc/include $with_dmalloc; do
if test -f "$dir/dmalloc.h"; then
CPPFLAGS="$CPPFLAGS -I$dir"
CFLAGS="$CFLAGS -I$dir"
found=1
break
fi
done
for dir in $with_dmalloc/lib/dmalloc $with_dmalloc/lib $with_dmalloc; do
if test -f "$dir/libdmalloc.a" -o -f "$dir/libdmalloc.so"; then
LDFLAGS="$LDFLAGS -L$dir"
found=1
break
fi
done
fi
if test ".$found" = .0; then
for file in x `find $with_dmalloc -name "dmalloc.h" -type f -print`; do
test .$file = .x && continue
dir=`echo $file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'`
CPPFLAGS="$CPPFLAGS -I$dir"
CFLAGS="$CFLAGS -I$dir"
done
for file in x `find $with_dmalloc -name "libdmalloc.[aso]" -type f -print`; do
test .$file = .x && continue
dir=`echo $file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'`
LDFLAGS="$LDFLAGS -L$dir"
done
fi
fi
fi
for ac_hdr in dmalloc.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:5414: 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
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5424: \"$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
EOF
else
echo "$ac_t""no" 1>&6
fi
done
echo $ac_n "checking for dmalloc_debug in -ldmalloc""... $ac_c" 1>&6
echo "configure:5451: checking for dmalloc_debug in -ldmalloc" >&5
ac_lib_var=`echo dmalloc'_'dmalloc_debug | 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="-ldmalloc $LIBS"
cat > conftest.$ac_ext <<EOF
/* 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 dmalloc_debug();
int main() {
dmalloc_debug()
; return 0; }
EOF
if { (eval echo configure:5470: \"$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 dmalloc | sed -e 's/^a-zA-Z0-9_/_/g' \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
cat >> confdefs.h <<EOF
EOF
LIBS="-ldmalloc $LIBS"
else
echo "$ac_t""no" 1>&6
fi
ac_rc=yes
for ac_spec in header:dmalloc.h lib:dmalloc_dmalloc_debug; do
ac_type=`echo "$ac_spec" | sed -e 's/:.*$//'`
ac_item=`echo "$ac_spec" | sed -e 's/^.*://'`
case $ac_type in
header )
ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
ac_var="ac_cv_header_$ac_item"
;;
file )
ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
ac_var="ac_cv_file_$ac_item"
;;
func ) ac_var="ac_cv_func_$ac_item" ;;
lib ) ac_var="ac_cv_lib_$ac_item" ;;
define ) ac_var="ac_cv_define_$ac_item" ;;
typedef ) ac_var="ac_cv_typedef_$ac_item" ;;
custom ) ac_var="$ac_item" ;;
esac
eval "ac_val=\$$ac_var"
if test ".$ac_val" != .yes; then
ac_rc=no
break
fi
done
if test ".$ac_rc" = .yes; then
:
with_dmalloc=yes
else
:
with_dmalloc=no
fi
if test ".$with_dmalloc" = .no; then
{ echo "configure: error: Unable to find Dmalloc library" 1>&2; exit 1; }
fi
else
if test ".$with_dmalloc" = .; then
with_dmalloc=no
fi
fi
echo $ac_n "checking whether to build against Dmalloc library""... $ac_c" 1>&6
echo "configure:5541: checking whether to build against Dmalloc library" >&5
if test ".$with_dmalloc" = .yes; then
cat >> confdefs.h <<\EOF
EOF
else
:
fi
echo "$ac_t""$with_dmalloc" 1>&6
if test ".$enable_subdir" != .yes; then
echo "$ac_t""" 1>&6
echo "$ac_t""${TB}Output Substitution:${TN}" 1>&6
fi
trap '' 1 2 15
cat > confcache <<\EOF
EOF
(set) 2>&1 |
case `(ac_space=' '; set | grep ac_space) 2>&1` in
*ac_space=\ *)
sed -n \
-e "s/'/'\\\\''/g" \
-e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
;;
*)
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
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
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
: ${CONFIG_STATUS=./config.status}
echo creating $CONFIG_STATUS
rm -f $CONFIG_STATUS
cat > $CONFIG_STATUS <<EOF
#! /bin/sh
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"
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
trap 'rm -fr `echo "Makefile pthread-config pthread.h pth-config pth.h pth_acmac.h pth_acdef.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
s%@FFLAGS@%$FFLAGS%g
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%@srcdir_prefix@%$srcdir_prefix%g
s%@PTH_VERSION_STR@%$PTH_VERSION_STR%g
s%@PTH_VERSION_HEX@%$PTH_VERSION_HEX%g
s%@PLATFORM@%$PLATFORM%g
s%@CC@%$CC%g
s%@CPP@%$CPP%g
s%@SET_MAKE@%$SET_MAKE%g
s%@AR@%$AR%g
s%@RANLIB@%$RANLIB%g
s%@PTH_FAKE_POLL@%$PTH_FAKE_POLL%g
s%@PTH_FAKE_RWV@%$PTH_FAKE_RWV%g
s%@EXTRA_INCLUDE_SYS_SELECT_H@%$EXTRA_INCLUDE_SYS_SELECT_H%g
s%@FALLBACK_SIG_ATOMIC_T@%$FALLBACK_SIG_ATOMIC_T%g
s%@FALLBACK_PID_T@%$FALLBACK_PID_T%g
s%@FALLBACK_SIZE_T@%$FALLBACK_SIZE_T%g
s%@FALLBACK_SSIZE_T@%$FALLBACK_SSIZE_T%g
s%@FALLBACK_OFF_T@%$FALLBACK_OFF_T%g
s%@FALLBACK_SOCKLEN_T@%$FALLBACK_SOCKLEN_T%g
s%@FALLBACK_NFDS_T@%$FALLBACK_NFDS_T%g
s%@PTH_STACK_GROWTH@%$PTH_STACK_GROWTH%g
s%@pth_skaddr_makecontext@%$pth_skaddr_makecontext%g
s%@pth_sksize_makecontext@%$pth_sksize_makecontext%g
s%@pth_skaddr_sigaltstack@%$pth_skaddr_sigaltstack%g
s%@pth_sksize_sigaltstack@%$pth_sksize_sigaltstack%g
s%@pth_skaddr_sigstack@%$pth_skaddr_sigstack%g
s%@pth_sksize_sigstack@%$pth_sksize_sigstack%g
s%@pth_sigjmpbuf@%$pth_sigjmpbuf%g
s%@pth_sigsetjmp@%$pth_sigsetjmp%g
s%@pth_siglongjmp@%$pth_siglongjmp%g
s%@PTH_MCTX_ID@%$PTH_MCTX_ID%g
s%@PTH_SYSCALL_SOFT@%$PTH_SYSCALL_SOFT%g
s%@PTH_SYSCALL_HARD@%$PTH_SYSCALL_HARD%g
s%@BATCH@%$BATCH%g
s%@TARGET_ALL@%$TARGET_ALL%g
s%@PTHREAD_O@%$PTHREAD_O%g
s%@LIBPTHREAD_A@%$LIBPTHREAD_A%g
s%@LIBPTHREAD_LA@%$LIBPTHREAD_LA%g
s%@PTHREAD_CONFIG_1@%$PTHREAD_CONFIG_1%g
s%@PTHREAD_3@%$PTHREAD_3%g
s%@INSTALL_PTHREAD@%$INSTALL_PTHREAD%g
s%@UNINSTALL_PTHREAD@%$UNINSTALL_PTHREAD%g
s%@TEST_PTHREAD@%$TEST_PTHREAD%g
s%@PTH_EXT_SFIO@%$PTH_EXT_SFIO%g
CEOF
EOF
cat >> $CONFIG_STATUS <<\EOF
ac_max_sed_cmds=90 ac_file=1 ac_beg=1 ac_end=$ac_max_sed_cmds 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 pthread-config pthread.h pth-config pth.h pth_acmac.h "}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
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
ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
test ! -d "$ac_dir" && mkdir "$ac_dir"
ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
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" ;;
*) srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
top_srcdir="$ac_dots$ac_given_srcdir" ;;
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
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
fi; done
rm -f conftest.s*
ac_dA='s%^\([ ]*\)ac_dB='\([ ][ ]*\)[^ ]*%\1ac_dC='\3'
ac_dD='%g'
ac_uA='s%^\([ ]*\)ac_uB='\([ ]\)%\1ac_uC=' '
ac_uD='\4%g'
ac_eA='s%^\([ ]*\)ac_eB='$%\1ac_eC=' '
ac_eD='%g'
if test "${CONFIG_HEADERS+set}" != set; then
EOF
cat >> $CONFIG_STATUS <<EOF
CONFIG_HEADERS="pth_acdef.h"
EOF
cat >> $CONFIG_STATUS <<\EOF
fi
for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
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
rm -f conftest.vals
cat > conftest.hdr <<\EOF
s/[\\&%]/\\&/g
s%[\\$`]%\\&%g
s%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
cat >> conftest.vals <<\EOF
s%^[ ]*EOF
rm -f conftest.tail
while :
do
ac_lines=`grep -c . conftest.vals`
if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
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
ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
test ! -d "$ac_dir" && mkdir "$ac_dir"
fi
rm -f $ac_file
mv conftest.h $ac_file
fi
fi; done
EOF
cat >> $CONFIG_STATUS <<EOF
EOF
cat >> $CONFIG_STATUS <<\EOF
chmod +rx pthread-config
chmod +rx pth-config
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
if test ".$enable_pthread" = .no; then
rm -f pthread-config
rm -f pthread.h
fi
if test ".$enable_batch" != .yes; then
echo ""
echo "Now please type \`${TB}make${TN}' to compile. Good luck."
echo ""
fi