#! /bin/sh

# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.13 
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.

# Defaults:
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
  --enable-ccm            build CCM-specific parts"
ac_help="$ac_help
  --disable-messaging     disable CORBA messaging specific parts"
ac_help="$ac_help
  --disable-coss,         do not use MICO COSS"
ac_help="$ac_help
  --enable-csl2           enable CORBASec Level 2"
ac_help="$ac_help
  --disable-csiv2         disable CSIv2"
ac_help="$ac_help
  --disable-sl3           disable SL3"
ac_help="$ac_help
  --disable-naming,       do not use MICO Naming Service"
ac_help="$ac_help
  --enable-relship,       enable MICO Relationship Service"
ac_help="$ac_help
  --disable-events,       do not use MICO Event Service"
ac_help="$ac_help
  --enable-streams,      use MICO Stream Service"
ac_help="$ac_help
  --disable-property,     do not use MICO Property Service"
ac_help="$ac_help
  --enable-trader,       use MICO Trading Service"
ac_help="$ac_help
  --disable-time,         do not use MICO Time Service"
ac_help="$ac_help
  --enable-life,          use MICO Life Cycle Service"
ac_help="$ac_help
  --enable-externalize,   use MICO Externalization Service"
ac_help="$ac_help
  --enable-wireless         include full Wireless CORBA support"
ac_help="$ac_help
  --enable-wireless-home    compile Home Location Agent for wCORBA"
ac_help="$ac_help
  --enable-wireless-terminal  Wireless CORBA for terminals"
ac_help="$ac_help
  --enable-wireless-access  Wireless CORBA Access Bridge"
ac_help="$ac_help
  --enable-mini-stl       use MICO-supplied STL"
ac_help="$ac_help
  --enable-repo           use gcc's template repository"
ac_help="$ac_help
  --disable-optimize      do not use -O2 to compile"
ac_help="$ac_help
  --enable-debug          use -g to compile"
ac_help="$ac_help
  --disable-shared        don't build shared libs"
ac_help="$ac_help
  --disable-static        don't build static libs"
ac_help="$ac_help
  --disable-dynamic       disable dynamic loading"
ac_help="$ac_help
  --enable-final          build size optimized lib (needs lots of memory)"
ac_help="$ac_help
  --disable-except        disable exception handling"
ac_help="$ac_help
  --disable-std-eh        disable CORBA compliant exception handling"
ac_help="$ac_help
  --enable-cd             disable use of fancy libs etc"
ac_help="$ac_help
  --with-qt=qtdir         use QT installed in qtdir"
ac_help="$ac_help
  --with-gtk=gtkdir       use GTK installed in gtkdir"
ac_help="$ac_help
  --with-tcl=tcldir       use TCL installed in tcldir"
ac_help="$ac_help
  --with-ssl=ssldir       use SSL/TLS installed in ssldir"
ac_help="$ac_help
  --with-bluetooth=btdir  use Bluetooth installed in btdir"
ac_help="$ac_help
  --with-extra-dir=dir    add dir(s) into extra dirs"
ac_help="$ac_help
  --with-pgsql=pgsqldir   use PostgreSQL installed in pgsqldir"
ac_help="$ac_help
  --with-mico=micodir     use MICO installed in micodir (suitable for cross-compiling)"
ac_help="$ac_help
  --with-snacc=snaccdir   use SNACC installed in snaccdir (needed for SL3 AC support)"
ac_help="$ac_help
  --with-smp=smpdir   use SMP library installed in smpdir (needed for SL3 AC support)"
ac_help="$ac_help
  --disable-split         dont split large source files"
ac_help="$ac_help
  --disable-orb-excepts   build libmico without exception support"
ac_help="$ac_help
  --enable-memcheck       for debugging MICO memory management"
ac_help="$ac_help
  --enable-compiled-headers  use precompiled headers if supported"
ac_help="$ac_help
  --enable-speed-tune     compile MICO for maximum peformance"
ac_help="$ac_help
  --disable-threads       compile single-threaded MICO"
ac_help="$ac_help
  --enable-minimum-corba  build minimum ORB only"
ac_help="$ac_help
  --enable-orb-core-only  build only ORB core w/o IDL/IR and other libraries"
ac_help="$ac_help
  --disable-threading-policies  do not build Threading Policies"
ac_help="$ac_help
  --with-gtk-prefix=PFX   Prefix where GTK is installed (optional)"
ac_help="$ac_help
  --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)"
ac_help="$ac_help
  --disable-gtktest       Do not try to compile and run a test GTK program"
ac_help="$ac_help
  --with-x                use the X Window System"

# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
build=NONE
cache_file=./config.cache
exec_prefix=NONE
host=NONE
no_create=
nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'

# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12

ac_prev=
for ac_option
do

  # If the previous option needs an argument, assign it.
  if test -n "$ac_prev"; then
    eval "$ac_prev=\$ac_option"
    ac_prev=
    continue
  fi

  case "$ac_option" in
  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) ac_optarg= ;;
  esac

  # Accept the important Cygnus configure options, so we can diagnose typos.

  case "$ac_option" in

  -bindir | --bindir | --bindi | --bind | --bin | --bi)
    ac_prev=bindir ;;
  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
    bindir="$ac_optarg" ;;

  -build | --build | --buil | --bui | --bu)
    ac_prev=build ;;
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
    build="$ac_optarg" ;;

  -cache-file | --cache-file | --cache-fil | --cache-fi \
  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
    ac_prev=cache_file ;;
  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
    cache_file="$ac_optarg" ;;

  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
    ac_prev=datadir ;;
  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  | --da=*)
    datadir="$ac_optarg" ;;

  -disable-* | --disable-*)
    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
    fi
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
    eval "enable_${ac_feature}=no" ;;

  -enable-* | --enable-*)
    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
    fi
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
    case "$ac_option" in
      *=*) ;;
      *) ac_optarg=yes ;;
    esac
    eval "enable_${ac_feature}='$ac_optarg'" ;;

  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  | --exec | --exe | --ex)
    ac_prev=exec_prefix ;;
  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  | --exec=* | --exe=* | --ex=*)
    exec_prefix="$ac_optarg" ;;

  -gas | --gas | --ga | --g)
    # Obsolete; use --with-gas.
    with_gas=yes ;;

  -help | --help | --hel | --he)
    # Omit some internal or obsolete options to make the list less imposing.
    # This message is too long to be a string in the A/UX 3.1 sh.
    cat << EOF
Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
Configuration:
  --cache-file=FILE       cache test results in FILE
  --help                  print this message
  --no-create             do not create output files
  --quiet, --silent       do not print \`checking...' messages
  --version               print the version of autoconf that created configure
Directory and file names:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [$ac_default_prefix]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [same as prefix]
  --bindir=DIR            user executables in DIR [EPREFIX/bin]
  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  --datadir=DIR           read-only architecture-independent data in DIR
                          [PREFIX/share]
  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
                          [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  --includedir=DIR        C header files in DIR [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  --infodir=DIR           info documentation in DIR [PREFIX/info]
  --mandir=DIR            man documentation in DIR [PREFIX/man]
  --srcdir=DIR            find the sources in DIR [configure dir or ..]
  --program-prefix=PREFIX prepend PREFIX to installed program names
  --program-suffix=SUFFIX append SUFFIX to installed program names
  --program-transform-name=PROGRAM
                          run sed PROGRAM on installed program names
EOF
    cat << EOF
Host type:
  --build=BUILD           configure for building on BUILD [BUILD=HOST]
  --host=HOST             configure for HOST [guessed]
  --target=TARGET         configure for TARGET [TARGET=HOST]
Features and packages:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --x-includes=DIR        X include files are in DIR
  --x-libraries=DIR       X library files are in DIR
EOF
    if test -n "$ac_help"; then
      echo "--enable and --with options recognized:$ac_help"
    fi
    exit 0 ;;

  -host | --host | --hos | --ho)
    ac_prev=host ;;
  -host=* | --host=* | --hos=* | --ho=*)
    host="$ac_optarg" ;;

  -includedir | --includedir | --includedi | --included | --include \
  | --includ | --inclu | --incl | --inc)
    ac_prev=includedir ;;
  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  | --includ=* | --inclu=* | --incl=* | --inc=*)
    includedir="$ac_optarg" ;;

  -infodir | --infodir | --infodi | --infod | --info | --inf)
    ac_prev=infodir ;;
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
    infodir="$ac_optarg" ;;

  -libdir | --libdir | --libdi | --libd)
    ac_prev=libdir ;;
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
    libdir="$ac_optarg" ;;

  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  | --libexe | --libex | --libe)
    ac_prev=libexecdir ;;
  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  | --libexe=* | --libex=* | --libe=*)
    libexecdir="$ac_optarg" ;;

  -localstatedir | --localstatedir | --localstatedi | --localstated \
  | --localstate | --localstat | --localsta | --localst \
  | --locals | --local | --loca | --loc | --lo)
    ac_prev=localstatedir ;;
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
    localstatedir="$ac_optarg" ;;

  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
    ac_prev=mandir ;;
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
    mandir="$ac_optarg" ;;

  -nfp | --nfp | --nf)
    # Obsolete; use --without-fp.
    with_fp=no ;;

  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  | --no-cr | --no-c)
    no_create=yes ;;

  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
    no_recursion=yes ;;

  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  | --oldin | --oldi | --old | --ol | --o)
    ac_prev=oldincludedir ;;
  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
    oldincludedir="$ac_optarg" ;;

  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
    ac_prev=prefix ;;
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
    prefix="$ac_optarg" ;;

  -program-prefix | --program-prefix | --program-prefi | --program-pref \
  | --program-pre | --program-pr | --program-p)
    ac_prev=program_prefix ;;
  -program-prefix=* | --program-prefix=* | --program-prefi=* \
  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
    program_prefix="$ac_optarg" ;;

  -program-suffix | --program-suffix | --program-suffi | --program-suff \
  | --program-suf | --program-su | --program-s)
    ac_prev=program_suffix ;;
  -program-suffix=* | --program-suffix=* | --program-suffi=* \
  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
    program_suffix="$ac_optarg" ;;

  -program-transform-name | --program-transform-name \
  | --program-transform-nam | --program-transform-na \
  | --program-transform-n | --program-transform- \
  | --program-transform | --program-transfor \
  | --program-transfo | --program-transf \
  | --program-trans | --program-tran \
  | --progr-tra | --program-tr | --program-t)
    ac_prev=program_transform_name ;;
  -program-transform-name=* | --program-transform-name=* \
  | --program-transform-nam=* | --program-transform-na=* \
  | --program-transform-n=* | --program-transform-=* \
  | --program-transform=* | --program-transfor=* \
  | --program-transfo=* | --program-transf=* \
  | --program-trans=* | --program-tran=* \
  | --progr-tra=* | --program-tr=* | --program-t=*)
    program_transform_name="$ac_optarg" ;;

  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  | -silent | --silent | --silen | --sile | --sil)
    silent=yes ;;

  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
    ac_prev=sbindir ;;
  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  | --sbi=* | --sb=*)
    sbindir="$ac_optarg" ;;

  -sharedstatedir | --sharedstatedir | --sharedstatedi \
  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  | --sharedst | --shareds | --shared | --share | --shar \
  | --sha | --sh)
    ac_prev=sharedstatedir ;;
  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  | --sha=* | --sh=*)
    sharedstatedir="$ac_optarg" ;;

  -site | --site | --sit)
    ac_prev=site ;;
  -site=* | --site=* | --sit=*)
    site="$ac_optarg" ;;

  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
    ac_prev=srcdir ;;
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
    srcdir="$ac_optarg" ;;

  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  | --syscon | --sysco | --sysc | --sys | --sy)
    ac_prev=sysconfdir ;;
  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
    sysconfdir="$ac_optarg" ;;

  -target | --target | --targe | --targ | --tar | --ta | --t)
    ac_prev=target ;;
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
    target="$ac_optarg" ;;

  -v | -verbose | --verbose | --verbos | --verbo | --verb)
    verbose=yes ;;

  -version | --version | --versio | --versi | --vers)
    echo "configure generated by autoconf version 2.13"
    exit 0 ;;

  -with-* | --with-*)
    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
    fi
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    case "$ac_option" in
      *=*) ;;
      *) ac_optarg=yes ;;
    esac
    eval "with_${ac_package}='$ac_optarg'" ;;

  -without-* | --without-*)
    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
    # Reject names that are not valid shell variable names.
    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
    fi
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    eval "with_${ac_package}=no" ;;

  --x)
    # Obsolete; use --with-x.
    with_x=yes ;;

  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  | --x-incl | --x-inc | --x-in | --x-i)
    ac_prev=x_includes ;;
  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
    x_includes="$ac_optarg" ;;

  -x-libraries | --x-libraries | --x-librarie | --x-librari \
  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
    ac_prev=x_libraries ;;
  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
    x_libraries="$ac_optarg" ;;

  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
    ;;

  *)
    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
      echo "configure: warning: $ac_option: invalid host type" 1>&2
    fi
    if test "x$nonopt" != xNONE; then
      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
    fi
    nonopt="$ac_option"
    ;;

  esac
done

if test -n "$ac_prev"; then
  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
fi

trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15

# File descriptor usage:
# 0 standard input
# 1 file creation
# 2 errors and warnings
# 3 some systems may open it to /dev/tty
# 4 used on the Kubota Titan
# 6 checking for... messages and results
# 5 compiler messages saved in config.log
if test "$silent" = yes; then
  exec 6>/dev/null
else
  exec 6>&1
fi
exec 5>./config.log

echo "\
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
" 1>&5

# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell metacharacters.
ac_configure_args=
for ac_arg
do
  case "$ac_arg" in
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  | --no-cr | --no-c) ;;
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  esac
done

# NLS nuisances.
# Only set these to C if already set.  These must not be set unconditionally
# because not all systems understand e.g. LANG=C (notably SCO).
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
# Non-C LC_CTYPE values break the ctype check.
if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi

# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
echo > confdefs.h

# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
ac_unique_file=idl/scanner.ll

# Find the source files, if location was not specified.
if test -z "$srcdir"; then
  ac_srcdir_defaulted=yes
  # Try the directory containing this script, then its parent.
  ac_prog=$0
  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  srcdir=$ac_confdir
  if test ! -r $srcdir/$ac_unique_file; then
    srcdir=..
  fi
else
  ac_srcdir_defaulted=no
fi
if test ! -r $srcdir/$ac_unique_file; then
  if test "$ac_srcdir_defaulted" = yes; then
    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  else
    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  fi
fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`

# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
  if test "x$prefix" != xNONE; then
    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  else
    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  fi
fi
for ac_site_file in $CONFIG_SITE; do
  if test -r "$ac_site_file"; then
    echo "loading site script $ac_site_file"
    . "$ac_site_file"
  fi
done

if test -r "$cache_file"; then
  echo "loading cache $cache_file"
  . $cache_file
else
  echo "creating cache $cache_file"
  > $cache_file
fi

ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
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
  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi



#
# arguments
#

# Check whether --enable-ccm or --disable-ccm was given.
if test "${enable_ccm+set}" = set; then
  enableval="$enable_ccm"
  use_ccm=$enableval
else
  use_ccm=no
fi


# Check whether --enable-messaging or --disable-messaging was given.
if test "${enable_messaging+set}" = set; then
  enableval="$enable_messaging"
  use_messaging=$enableval
else
  use_messaging=yes
fi


# Check whether --enable-coss or --disable-coss was given.
if test "${enable_coss+set}" = set; then
  enableval="$enable_coss"
  use_coss=$enableval
else
  use_coss=yes
fi


# Check whether --enable-csl2 or --disable-csl2 was given.
if test "${enable_csl2+set}" = set; then
  enableval="$enable_csl2"
  use_csl2=$enableval
else
  use_csl2=no
fi


# Check whether --enable-csiv2 or --disable-csiv2 was given.
if test "${enable_csiv2+set}" = set; then
  enableval="$enable_csiv2"
  use_csiv2=$enableval
else
  use_csiv2=yes
fi


# Check whether --enable-sl3 or --disable-sl3 was given.
if test "${enable_sl3+set}" = set; then
  enableval="$enable_sl3"
  use_sl3=$enableval
else
  use_sl3=yes
fi


# Check whether --enable-naming or --disable-naming was given.
if test "${enable_naming+set}" = set; then
  enableval="$enable_naming"
  use_naming=$enableval
else
  use_naming=$use_coss
fi


# Check whether --enable-relship or --disable-relship was given.
if test "${enable_relship+set}" = set; then
  enableval="$enable_relship"
  use_relship=$enableval
else
  use_relship=no
fi


# Check whether --enable-events or --disable-events was given.
if test "${enable_events+set}" = set; then
  enableval="$enable_events"
  use_events=$enableval
else
  use_events=$use_coss
fi


# Check whether --enable-streams or --disable-streams was given.
if test "${enable_streams+set}" = set; then
  enableval="$enable_streams"
  use_streams=$enableval
else
  use_streams=no
fi


# Check whether --enable-property or --disable-property was given.
if test "${enable_property+set}" = set; then
  enableval="$enable_property"
  use_property=$enableval
else
  use_property=$use_coss
fi


# Check whether --enable-trader or --disable-trader was given.
if test "${enable_trader+set}" = set; then
  enableval="$enable_trader"
  use_trader=$enableval
else
  use_trader=no
fi


# Check whether --enable-time or --disable-time was given.
if test "${enable_time+set}" = set; then
  enableval="$enable_time"
  use_time=$enableval
else
  use_time=$use_coss
fi


# Check whether --enable-life or --disable-life was given.
if test "${enable_life+set}" = set; then
  enableval="$enable_life"
  use_life=$enableval
else
  use_life=no
fi


# Check whether --enable-externalize or --disable-externalize was given.
if test "${enable_externalize+set}" = set; then
  enableval="$enable_externalize"
  use_extern=$enableval
else
  use_extern=no
fi


# Check whether --enable-wireless or --disable-wireless was given.
if test "${enable_wireless+set}" = set; then
  enableval="$enable_wireless"
  use_wireless=$enableval
else
  use_wireless=no
fi


# Check whether --enable-wireless-home or --disable-wireless-home was given.
if test "${enable_wireless_home+set}" = set; then
  enableval="$enable_wireless_home"
  use_wireless_home=$enableval
else
  use_wireless_home=$use_wireless
fi


# Check whether --enable-wireless-terminal or --disable-wireless-terminal was given.
if test "${enable_wireless_terminal+set}" = set; then
  enableval="$enable_wireless_terminal"
  use_wireless_terminal=$enableval
else
  use_wireless_terminal=$use_wireless
fi


# Check whether --enable-wireless-access or --disable-wireless-access was given.
if test "${enable_wireless_access+set}" = set; then
  enableval="$enable_wireless_access"
  use_wireless_access=$enableval
else
  use_wireless_access=$use_wireless
fi


# Check whether --enable-mini-stl or --disable-mini-stl was given.
if test "${enable_mini_stl+set}" = set; then
  enableval="$enable_mini_stl"
  use_mini_stl=$enableval
else
  use_mini_stl=no
fi


# Check whether --enable-repo or --disable-repo was given.
if test "${enable_repo+set}" = set; then
  enableval="$enable_repo"
  use_repo=$enableval
else
  use_repo=no
fi


# Check whether --enable-optimize or --disable-optimize was given.
if test "${enable_optimize+set}" = set; then
  enableval="$enable_optimize"
  use_opt=$enableval
else
  use_opt=yes
fi


# Check whether --enable-debug or --disable-debug was given.
if test "${enable_debug+set}" = set; then
  enableval="$enable_debug"
  use_debug=$enableval
else
  use_debug=no
fi


# Check whether --enable-shared or --disable-shared was given.
if test "${enable_shared+set}" = set; then
  enableval="$enable_shared"
  use_shared=$enableval
else
  use_shared=yes
fi


# Check whether --enable-static or --disable-static was given.
if test "${enable_static+set}" = set; then
  enableval="$enable_static"
  use_static=$enableval
else
  use_static=yes
fi


# Check whether --enable-dynamic or --disable-dynamic was given.
if test "${enable_dynamic+set}" = set; then
  enableval="$enable_dynamic"
  use_dynamic=$enableval
else
  use_dynamic=yes
fi


# Check whether --enable-final or --disable-final was given.
if test "${enable_final+set}" = set; then
  enableval="$enable_final"
  use_final=$enableval
else
  use_final=no
fi


# Check whether --enable-except or --disable-except was given.
if test "${enable_except+set}" = set; then
  enableval="$enable_except"
  use_except=$enableval
else
  use_except=yes
fi


# Check whether --enable-std-eh or --disable-std-eh was given.
if test "${enable_std_eh+set}" = set; then
  enableval="$enable_std_eh"
  use_std_eh=$enableval
else
  use_std_eh=yes
fi


# Check whether --enable-cd or --disable-cd was given.
if test "${enable_cd+set}" = set; then
  enableval="$enable_cd"
  use_cd=$enableval
else
  use_cd=no
fi


# Check whether --with-qt or --without-qt was given.
if test "${with_qt+set}" = set; then
  withval="$with_qt"
  QTDIR=$withval
else
  QTDIR=""
fi


# Check whether --with-gtk or --without-gtk was given.
if test "${with_gtk+set}" = set; then
  withval="$with_gtk"
  GTKDIR=$withval
else
  GTKDIR=""
fi


# Check whether --with-tcl or --without-tcl was given.
if test "${with_tcl+set}" = set; then
  withval="$with_tcl"
  TCLDIR=$withval
else
  TCLDIR=""
fi


# Check whether --with-ssl or --without-ssl was given.
if test "${with_ssl+set}" = set; then
  withval="$with_ssl"
  SSLDIR=$withval
else
  SSLDIR=""
fi


# Check whether --with-bluetooth or --without-bluetooth was given.
if test "${with_bluetooth+set}" = set; then
  withval="$with_bluetooth"
  BTDIR=$withval
else
  BTDIR=""
fi


# Check whether --with-extra-dir or --without-extra-dir was given.
if test "${with_extra_dir+set}" = set; then
  withval="$with_extra_dir"
  EXTRADIR="$withval"
else
  EXTRADIR=""
fi


# Check whether --with-pgsql or --without-pgsql was given.
if test "${with_pgsql+set}" = set; then
  withval="$with_pgsql"
  PGSQLDIR=$withval
else
  PGSQLDIR=""
fi
  

# Check whether --with-mico or --without-mico was given.
if test "${with_mico+set}" = set; then
  withval="$with_mico"
  MICODIR=$withval
else
  MICODIR=""
fi
  

# Check whether --with-snacc or --without-snacc was given.
if test "${with_snacc+set}" = set; then
  withval="$with_snacc"
  SNACCDIR=$withval
else
  SNACCDIR=""
fi
  

# Check whether --with-smp or --without-smp was given.
if test "${with_smp+set}" = set; then
  withval="$with_smp"
  SMPDIR=$withval
else
  SMPDIR=""
fi
  

# Check whether --enable-split or --disable-split was given.
if test "${enable_split+set}" = set; then
  enableval="$enable_split"
  use_split=$enableval
else
  use_split=yes
fi


# Check whether --enable-orb-excepts or --disable-orb-excepts was given.
if test "${enable_orb_excepts+set}" = set; then
  enableval="$enable_orb_excepts"
  use_orb_excepts=$enableval
else
  use_orb_excepts=yes
fi


# Check whether --enable-memcheck or --disable-memcheck was given.
if test "${enable_memcheck+set}" = set; then
  enableval="$enable_memcheck"
  use_memcheck=$enableval
else
  use_memcheck=no
fi


# Check whether --enable-compiled-headers or --disable-compiled-headers was given.
if test "${enable_compiled_headers+set}" = set; then
  enableval="$enable_compiled_headers"
  use_compiled_headers=$enableval
else
  use_compiled_headers=no
fi


# Check whether --enable-speed-tune or --disable-speed-tune was given.
if test "${enable_speed_tune+set}" = set; then
  enableval="$enable_speed_tune"
  use_speed_tune=$enableval
else
  use_speed_tune=no
fi


# Check whether --enable-threads or --disable-threads was given.
if test "${enable_threads+set}" = set; then
  enableval="$enable_threads"
  use_threads=$enableval
else
  use_threads=yes
fi


# Check whether --enable-minimum-corba or --disable-minimum-corba was given.
if test "${enable_minimum_corba+set}" = set; then
  enableval="$enable_minimum_corba"
  minimum_corba=$enableval
else
  minimum_corba=no
fi


# Check whether --enable-orb-core-only or --disable-orb-core-only was given.
if test "${enable_orb_core_only+set}" = set; then
  enableval="$enable_orb_core_only"
  orb_core_only=$enableval
else
  orb_core_only=no
fi


# Check whether --enable-threading-policies or --disable-threading-policies was given.
if test "${enable_threading_policies+set}" = set; then
  enableval="$enable_threading_policies"
  threading_policies=$enableval
else
  threading_policies=yes
fi





 

HAVE_MEMCHECK=$use_memcheck


USE_MEMTRACE=no


HAVE_FINAL=$use_final


HAVE_MINIMUM_CORBA=$minimum_corba


ORB_CORE_ONLY=$orb_core_only

if test X"$use_speed_tune" = Xyes; then
  use_orb_excepts=no
fi

if test X"$use_wireless_access" = Xyes -o X"$use_wireless_terminal" = Xyes -o X"$use_wireless_home" = Xyes; then
  use_wireless=yes
fi

# Bomb out as soon as possible
if test X"$use_wireless" = Xyes -a X"$use_threads" = Xyes; then
  echo ""
  { echo "configure: error: The current Wireless CORBA implementation is incompatible with multi-threading, do not use --enable-threads if Wireless CORBA is needed" 1>&2; exit 1; }
fi

# doesnt work at the moment 
#if test X"$use_split" = Xyes; then
#  AC_DEFINE(HAVE_SIZE_LIMIT)
#fi

#
# extra dirs
#

echo "checking for extra include and lib directories..." 1>&6
exdirs="$EXTRADIR $QTDIR $GTKDIR $TCLDIR $SSLDIR $PGSQLDIR $SNACCDIR $SMPDIR"

subexdirs=""
if test "$subexdirs" = "" ; then
	subexdirs="-"
fi
for subexdir in $subexdirs ; do
if test "$subexdir" = "-" ; then
	subexdir=""
else
	subexdir="/$subexdir"
fi
for exdir in $exdirs ; do
	if test "$exdir" != "/usr" || test "$subexdir" != ""; then
		incdir="${exdir}/include${subexdir}"
		
incdir="$incdir"
if test -r $incdir ; then
	case "$CPPFLAGS" in
		*-I${incdir}*)
			# echo "   + already had $incdir" 1>&6
			;;
		*)
			if test "$CPPFLAGS" = "" ; then
				CPPFLAGS="-I$incdir"
			else
				CPPFLAGS="$CPPFLAGS -I$incdir"
			fi
			echo "   + found $incdir" 1>&6
			;;
	esac
fi


		libdir="${exdir}/lib${subexdir}"
		
libdir="$libdir"
if test -r $libdir ; then
	case "$LDFLAGS" in
		*-L${libdir}*)
			# echo "   + already had $libdir" 1>&6
			;;
		*)
			if test "$LDFLAGS" = "" ; then
				LDFLAGS="-L$libdir"
			else
				LDFLAGS="$LDFLAGS -L$libdir"
			fi
			echo "   + found $libdir" 1>&6
			;;
	esac
fi


		progdir="${exdir}/bin${subexdirr}"
		
progdir="$progdir"
if test -r $progdir ; then
	case "$PATH" in
		*:${progdir}*)
			# echo "   + already had $progdir" 1>&6
			;;
		*${progdir}:*)
			# echo "   + already had $progdir" 1>&6
			;;
		*)
			if test "$PATH" = "" ; then
				PATH="$progdir"
			else
				PATH="$PATH:$progdir"
			fi
			echo "   + found $progdir" 1>&6
			;;
	esac
fi

	fi
done
done


#
# misc
#

ac_aux_dir=
for ac_dir in $srcdir/admin $srcdir/$srcdir/admin; do
  if test -f $ac_dir/install-sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install-sh -c"
    break
  elif test -f $ac_dir/install.sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install.sh -c"
    break
  fi
done
if test -z "$ac_aux_dir"; then
  { echo "configure: error: can not find install-sh or install.sh in $srcdir/admin $srcdir/$srcdir/admin" 1>&2; exit 1; }
fi
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.


# Do some error checking and defaulting for the host and target type.
# The inputs are:
#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
#
# The rules are:
# 1. You are not allowed to specify --host, --target, and nonopt at the
#    same time.
# 2. Host defaults to nonopt.
# 3. If nonopt is not specified, then host defaults to the current host,
#    as determined by config.guess.
# 4. Target and build default to nonopt.
# 5. If nonopt is not specified, then target and build default to host.

# The aliases save the names the user supplied, while $host etc.
# will get canonicalized.
case $host---$target---$nonopt in
NONE---*---* | *---NONE---* | *---*---NONE) ;;
*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
esac


# Make sure we can run config.sub.
if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi

echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:1252: checking host system type" >&5

host_alias=$host
case "$host_alias" in
NONE)
  case $nonopt in
  NONE)
    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
    fi ;;
  *) host_alias=$nonopt ;;
  esac ;;
esac

host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6

echo $ac_n "checking target system type""... $ac_c" 1>&6
echo "configure:1273: checking target system type" >&5

target_alias=$target
case "$target_alias" in
NONE)
  case $nonopt in
  NONE) target_alias=$host_alias ;;
  *) target_alias=$nonopt ;;
  esac ;;
esac

target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6

echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:1291: checking build system type" >&5

build_alias=$build
case "$build_alias" in
NONE)
  case $nonopt in
  NONE) build_alias=$host_alias ;;
  *) build_alias=$nonopt ;;
  esac ;;
esac

build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$build" 1>&6

test "$host_alias" != "$target_alias" &&
  test "$program_prefix$program_suffix$program_transform_name" = \
    NONENONEs,x,x, &&
  program_prefix=${target_alias}-



case $srcdir in
/*)
  ABSSRCDIR=$srcdir
  ;;
*)
  ABSSRCDIR=`pwd`/$srcdir
  ;;
esac

myprefix=$prefix
myexec=$exec_prefix
test "x$myprefix" = xNONE && myprefix=$ac_default_prefix
test "x$myexec" = xNONE && myexec=${myprefix}
ABSEXECDIR=$myexec
ABSSHRDDIR=$myprefix
cat >> confdefs.h <<EOF
#define ABSEXECDIR "$myexec"
EOF

cat >> confdefs.h <<EOF
#define ABSSHRDDIR "$myprefix"
EOF




if test X"$use_csl2" != Xno; then
  cat >> confdefs.h <<\EOF
#define USE_CSL2 1
EOF

fi

#if test X"$use_csiv2" != Xno; then
#  AC_DEFINE(USE_CSIV2)
#fi

if test X"$use_wireless" != Xno; then
  cat >> confdefs.h <<\EOF
#define USE_WIRELESS 1
EOF

fi


if test X"$use_mini_stl" != Xno; then
  cat >> confdefs.h <<\EOF
#define HAVE_MINI_STL 1
EOF

  #
  # hack for Cygnus CDK: replace //E/... by E:/...
  # since CDK's gcc does not understand -I//E/...
  #
  
  CDK_ABSSRCDIR=`echo $ABSSRCDIR | sed -e 's,^//\([a-zA-Z]\),\1:,g'`
  
  STLINC=-I$CDK_ABSSRCDIR/include/ministl
fi



HAVE_REPO=no
if test X"$use_repo" != Xno; then
  HAVE_REPO=yes
  REPOFLAG=-frepo
fi



HAVE_PRELINK=no



USE_PCH_DIR=no

#
# Checks for compiler.
#

# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1398: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="gcc"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

if test -z "$CC"; then
  # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1428: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_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
  # We found a bogon in the path, so make sure we never use it.
  set dummy $ac_cv_prog_CC
  shift
  if test $# -gt 0; then
    # We chose a different compiler from the bogus one.
    # However, it has the same basename, so the bogon will be chosen
    # first if we set CC to just the basename; use the full file name.
    shift
    set dummy "$ac_dir/$ac_word" "$@"
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  if test -z "$CC"; then
    case "`uname -s`" in
    *win32* | *WIN32*)
      # Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1479: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="cl"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi
 ;;
    esac
  fi
  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:1511: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5

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

cat > conftest.$ac_ext << EOF

#line 1522 "configure"
#include "confdefs.h"

main(){return(0);}
EOF
if { (eval echo configure:1527: \"$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:1553: 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:1558: 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
#ifdef __GNUC__
  yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1567: \"$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:1586: 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="$ac_save_CFLAGS"
elif test $ac_cv_prog_cc_g = yes; then
  if test "$GCC" = yes; then
    CFLAGS="-g -O2"
  else
    CFLAGS="-g"
  fi
else
  if test "$GCC" = yes; then
    CFLAGS="-O2"
  else
    CFLAGS=
  fi
fi

echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:1618: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
    # This must be in double quotes, not single quotes, because CPP may get
  # substituted into the Makefile and "${CC-cc}" will confuse make.
  CPP="${CC-cc} -E"
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp.
  cat > conftest.$ac_ext <<EOF
#line 1633 "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:1639: \"$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 1650 "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:1656: \"$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 1667 "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:1673: \"$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


for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1703: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CXX"; then
  ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CXX="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
CXX="$ac_cv_prog_CXX"
if test -n "$CXX"; then
  echo "$ac_t""$CXX" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$CXX" && break
done
test -n "$CXX" || CXX="gcc"


echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1735: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5

ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross

cat > conftest.$ac_ext << EOF

#line 1746 "configure"
#include "confdefs.h"

int main(){return(0);}
EOF
if { (eval echo configure:1751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_prog_cxx_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_cxx_cross=no
  else
    ac_cv_prog_cxx_cross=yes
  fi
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_prog_cxx_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_cxx_works" 1>&6
if test $ac_cv_prog_cxx_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 ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:1777: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross

echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
echo "configure:1782: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.C <<EOF
#ifdef __GNUC__
  yes;
#endif
EOF
if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  ac_cv_prog_gxx=yes
else
  ac_cv_prog_gxx=no
fi
fi

echo "$ac_t""$ac_cv_prog_gxx" 1>&6

if test $ac_cv_prog_gxx = yes; then
  GXX=yes
else
  GXX=
fi

ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
echo "configure:1810: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  echo 'void f(){}' > conftest.cc
if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
  ac_cv_prog_cxx_g=yes
else
  ac_cv_prog_cxx_g=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
if test "$ac_test_CXXFLAGS" = set; then
  CXXFLAGS="$ac_save_CXXFLAGS"
elif test $ac_cv_prog_cxx_g = yes; then
  if test "$GXX" = yes; then
    CXXFLAGS="-g -O2"
  else
    CXXFLAGS="-g"
  fi
else
  if test "$GXX" = yes; then
    CXXFLAGS="-O2"
  else
    CXXFLAGS=
  fi
fi

echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
echo "configure:1842: checking how to run the C++ preprocessor" >&5
if test -z "$CXXCPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
  CXXCPP="${CXX-g++} -E"
  cat > conftest.$ac_ext <<EOF
#line 1855 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1860: \"$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*
  CXXCPP=/lib/cpp
fi
rm -f conftest*
  ac_cv_prog_CXXCPP="$CXXCPP"
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
fi
fi
CXXCPP="$ac_cv_prog_CXXCPP"
echo "$ac_t""$CXXCPP" 1>&6


if test X"$cross_compiling" != X"no"; then
    # cross compiling we have to test target and host
    if test X"$host" != X"$target"; then
        # this is ok we have specified different target system
        echo
        echo "MICO will be cross-compiled for the $target target platform."
        echo
    else
        # we are cross-compiling to the target == host =>
        # the user probably forget to supply --target=xxx option
        echo "ERROR:"
        echo "ERROR:"
        echo "ERROR: Specified C++ compiler is probably cross-compiler. If so and if you"
        echo "ERROR: really try to cross-compile MICO to some other target,"
        echo "ERROR: then please use --target=<target platform name> option to specify"
        echo "ERROR: required target exactly. It is needed for correct MICO configuration."
        echo "ERROR:"
        echo "ERROR:"
        exit 1
    fi
fi

echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
echo "configure:1908: checking for POSIXized ISC" >&5
if test -d /etc/conf/kconfig.d &&
  grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
  echo "$ac_t""yes" 1>&6
  ISC=yes # If later tests want to check for ISC.
  cat >> confdefs.h <<\EOF
#define _POSIX_SOURCE 1
EOF

  if test "$GCC" = yes; then
    CC="$CC -posix"
  else
    CC="$CC -Xp"
  fi
else
  echo "$ac_t""no" 1>&6
  ISC=
fi


ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross


echo $ac_n "checking OS Type""... $ac_c" 1>&6
echo "configure:1938: checking OS Type" >&5
gxxversion=`$CXX -v 2>&1`
case $gxxversion in
*mingw*special*)
	#
	# This is the MinGW compiler in a Cygwin environment
	#
	OSTYPE=windows
	RMPROG="rm -f"
	LNPROG="cp"
	;;
*)
	OSTYPE=unix
	RMPROG="rm -f"
	LNPROG="ln -f -s"
	;;
esac
echo "$ac_t""$OSTYPE" 1>&6




#
# extra libraries ...
#


ac_link="$ac_link "'$EXTRA_LIBS'


ac_compile="$ac_compile "'$EXTRA_CXXFLAGS'

#
# thread support
#

# some platforms needs -D_REENTRANT to correctly find
# thread related header files (example: Tru64)
CPPFLAGS_BACKUP=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -D_REENTRANT"

platform_supports_threads=no

if test X"$use_pthreads" = Xyes; then
  use_solaris_threads=no
  use_dce_threads=no
  use_pth_threads=no
  echo $ac_n "checking for open in -lpthread""... $ac_c" 1>&6
echo "configure:1986: checking for open in -lpthread" >&5
ac_lib_var=`echo pthread'_'open | 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="-lpthread  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1994 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char open();

int main() {
open()
; return 0; }
EOF
if { (eval echo configure:2008: \"$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
  use_pthreads=yes
else
  echo "$ac_t""no" 1>&6
use_pthreads=no
fi

  if test X"$use_pthreads" = Xyes; then
    for ac_hdr in pthread.h sched.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2034: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2039 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2044: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
{ echo "configure: error: pthread header files incomplete" 1>&2; exit 1; }	
    
fi
done

    for ac_hdr in semaphore.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2076: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2081 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

    cat >> confdefs.h <<\EOF
#define HAVE_PTHREADS 1
EOF

    SHLIBS="-lpthread"
    platform_supports_threads=yes
    use_threads=yes
  else
    echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
echo "configure:2121: checking for pthread_create in -lc_r" >&5
ac_lib_var=`echo c_r'_'pthread_create | 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="-lc_r  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2129 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char pthread_create();

int main() {
pthread_create()
; return 0; }
EOF
if { (eval echo configure:2143: \"$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
  use_pthreads=yes
else
  echo "$ac_t""no" 1>&6
use_pthreads=no
fi

    if test X"$use_pthreads" = Xyes; then
      for ac_hdr in pthread.h sched.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2169: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2174 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
{ echo "configure: error: pthread header files incomplete" 1>&2; exit 1; }	
      
fi
done

      for ac_hdr in semaphore.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2211: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2216 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

      cat >> confdefs.h <<\EOF
#define HAVE_PTHREADS 1
EOF

      #SHLIBS="-lpthread"
      LDFLAGS="-pthread $LDFLAGS"
      platform_supports_threads=yes
      use_threads=yes
    else
      echo ""
      { echo "configure: error: "Your platform does not support POSIX-threads !"" 1>&2; exit 1; }
    fi
  fi
fi

if test X"$use_solaris_threads" = Xyes; then
  use_pthreads=no
  use_dce_threads=no
  use_pth_threads=no
  echo $ac_n "checking for open in -lthread""... $ac_c" 1>&6
echo "configure:2267: checking for open in -lthread" >&5
ac_lib_var=`echo thread'_'open | 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="-lthread  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2275 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char open();

int main() {
open()
; return 0; }
EOF
if { (eval echo configure:2289: \"$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
  use_solaris_threads=yes
else
  echo "$ac_t""no" 1>&6
use_solaris_threads=no
fi

  if test X"$use_solaris_threads" = Xyes; then
    for ac_hdr in thread.h semaphore.h synch.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2315: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2320 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
{ echo "configure: error: solaris thread header files incomplete" 1>&2; exit 1; }	
    
fi
done

    cat >> confdefs.h <<\EOF
#define HAVE_SOLARIS_THREADS 1
EOF

    SHLIBS="-lthread"
    platform_supports_threads=yes
    use_threads=yes
  else
    echo ""
    { echo "configure: error: "Your platform does not support Solaris threads !"" 1>&2; exit 1; }
  fi
fi

if test X"$use_dce_threads" = Xyes; then
  use_pthreads=no
  use_solaris_threads=no
  use_pth_threads=no
  echo $ac_n "checking for open in -lcma""... $ac_c" 1>&6
echo "configure:2371: checking for open in -lcma" >&5
ac_lib_var=`echo cma'_'open | 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="-lcma  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2379 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char open();

int main() {
open()
; return 0; }
EOF
if { (eval echo configure:2393: \"$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
  use_dcethreads=yes
else
  echo "$ac_t""no" 1>&6
use_dcethreads=no
fi

  if test X"$use_dcethreads" = Xyes; then
    for ac_hdr in pthread.h semaphore.h sched.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2419: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2424 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
{ echo "configure: error: DCE pthread header files incomplete" 1>&2; exit 1; }	
    
fi
done

    cat >> confdefs.h <<\EOF
#define HAVE_DCE_THREADS 1
EOF

    SHLIBS="-lcma"
    platform_supports_threads=yes
    use_threads=yes
  else
    echo ""
    { echo "configure: error: "Your platform does not support DCE threads !"" 1>&2; exit 1; }
  fi
fi

if test X"$use_pth_threads" = Xyes; then
  use_pthreads=no
  use_dce_threads=no
  use_solaris_threads=no
  unset pth_config_prog
  # Extract the first word of "pth-config", so it can be a program name with args.
set dummy pth-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2478: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_pth_config_prog'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$pth_config_prog"; then
  ac_cv_prog_pth_config_prog="$pth_config_prog" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_pth_config_prog="yes"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_pth_config_prog" && ac_cv_prog_pth_config_prog="no"
fi
fi
pth_config_prog="$ac_cv_prog_pth_config_prog"
if test -n "$pth_config_prog"; then
  echo "$ac_t""$pth_config_prog" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  if test X"$pth_config_prog" = Xyes; then
    PTH_HEADERS=`pth-config --cflags`
    PTH_LDFLAGS=`pth-config --ldflags`
    PTH_LIBS=`pth-config --libs`
    CFLAGS="$PTH_HEADERS $CFLAGS"
    CXXFLAGS="$PTH_HEADERS $CXXFLAGS"
    LDFLAGS="$PTH_LDFLAGS $LDFLAGS"
    PTH_INCLUDE_DIR=`pth-config --includedir`
    PTH_LIB_DIR=`pth-config --libdir`
    ac_safe=`echo "$PTH_INCLUDE_DIR/pth.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $PTH_INCLUDE_DIR/pth.h""... $ac_c" 1>&6
echo "configure:2516: checking for $PTH_INCLUDE_DIR/pth.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2521 "configure"
#include "confdefs.h"
#include <$PTH_INCLUDE_DIR/pth.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2526: \"$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
  :
else
  echo "$ac_t""no" 1>&6
fi

    echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
echo "configure:2548: checking for pth_init in -lpth" >&5
ac_lib_var=`echo pth'_'pth_init | 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="-lpth "-L$PTH_LIB_DIR" $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2556 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char pth_init();

int main() {
pth_init()
; return 0; }
EOF
if { (eval echo configure:2570: \"$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
  pth_lib=yes
else
  echo "$ac_t""no" 1>&6
pth_lib=no
fi

    cat >> confdefs.h <<\EOF
#define HAVE_PTH_THREADS 1
EOF

    cat >> confdefs.h <<\EOF
#define HAVE_PTH_H 1
EOF

    SHLIBS=$PTH_LIBS
    use_pth_threads=yes
    platform_supports_threads=yes
    use_threads=yes
  else
    echo ""
    { echo "configure: error: "Your platform does not support GNU Pth threads !"" 1>&2; exit 1; }
  fi
fi

if test X"$platform_supports_threads" = Xno; then
  if test X"$use_threads" = Xyes; then
    echo $ac_n "checking for open in -lpthread""... $ac_c" 1>&6
echo "configure:2612: checking for open in -lpthread" >&5
ac_lib_var=`echo pthread'_'open | 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="-lpthread  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2620 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char open();

int main() {
open()
; return 0; }
EOF
if { (eval echo configure:2634: \"$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
  use_pthreads=yes
else
  echo "$ac_t""no" 1>&6
use_pthreads=no
fi

    if test X"$use_pthreads" = Xyes; then
      for ac_hdr in pthread.h sched.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2660: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2665 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2670: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
{ echo "configure: error: pthread header files incomplete" 1>&2; exit 1; }	
      
fi
done

      for ac_hdr in semaphore.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2702: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2707 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

      cat >> confdefs.h <<\EOF
#define HAVE_PTHREADS 1
EOF

      SHLIBS="-lpthread"
    else 
      echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
echo "configure:2745: checking for pthread_create in -lc_r" >&5
ac_lib_var=`echo c_r'_'pthread_create | 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="-lc_r  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2753 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char pthread_create();

int main() {
pthread_create()
; return 0; }
EOF
if { (eval echo configure:2767: \"$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
  use_pthreads=yes
else
  echo "$ac_t""no" 1>&6
use_pthreads=no
fi

      if test X"$use_pthreads" = Xyes; then
        for ac_hdr in pthread.h sched.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2793: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2798 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
{ echo "configure: error: pthread header files incomplete" 1>&2; exit 1; }
        
fi
done

        for ac_hdr in semaphore.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2835: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2840 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

        cat >> confdefs.h <<\EOF
#define HAVE_PTHREADS 1
EOF

        LDFLAGS="-pthread $LDFLAGS"
      else
        echo $ac_n "checking for open in -lthread""... $ac_c" 1>&6
echo "configure:2878: checking for open in -lthread" >&5
ac_lib_var=`echo thread'_'open | 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="-lthread  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2886 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char open();

int main() {
open()
; return 0; }
EOF
if { (eval echo configure:2900: \"$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
  use_solaris_threads=yes
else
  echo "$ac_t""no" 1>&6
use_solaris_threads=no
fi

        if test X"$use_solaris_threads" = Xyes; then
          for ac_hdr in thread.h semaphore.h synch.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2926: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2931 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2936: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
{ echo "configure: error: solaris thread header files incomplete" 1>&2; exit 1; }	
          
fi
done

          cat >> confdefs.h <<\EOF
#define HAVE_SOLARIS_THREADS 1
EOF

          SHLIBS="-lthread"
        else
          echo $ac_n "checking for open in -lcma""... $ac_c" 1>&6
echo "configure:2971: checking for open in -lcma" >&5
ac_lib_var=`echo cma'_'open | 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="-lcma  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2979 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char open();

int main() {
open()
; return 0; }
EOF
if { (eval echo configure:2993: \"$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
  use_dcethreads=yes
else
  echo "$ac_t""no" 1>&6
use_dcethreads=no
fi

          if test X"$use_dcethreads" = Xyes; then
            for ac_hdr in pthread.h semaphore.h sched.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3019: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 3024 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
{ echo "configure: error: DCE pthread header files incomplete" 1>&2; exit 1; }	
            
fi
done

            cat >> confdefs.h <<\EOF
#define HAVE_DCE_THREADS 1
EOF

            SHLIBS="-lcma"
          else
            # Extract the first word of "pth-config", so it can be a program name with args.
set dummy pth-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3066: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_pth_config_prog'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$pth_config_prog"; then
  ac_cv_prog_pth_config_prog="$pth_config_prog" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_pth_config_prog="yes"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_pth_config_prog" && ac_cv_prog_pth_config_prog="no"
fi
fi
pth_config_prog="$ac_cv_prog_pth_config_prog"
if test -n "$pth_config_prog"; then
  echo "$ac_t""$pth_config_prog" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

            if test X"$pth_config_prog" = Xyes; then
              PTH_HEADERS=`pth-config --cflags`
              PTH_LDFLAGS=`pth-config --ldflags`
              PTH_LIBS=`pth-config --libs`
              CFLAGS="$PTH_HEADERS $CFLAGS"
              CXXFLAGS="$PTH_HEADERS $CXXFLAGS"
              LDFLAGS="$PTH_LDFLAGS $LDFLAGS"
              PTH_INCLUDE_DIR=`pth-config --includedir`
              PTH_LIB_DIR=`pth-config --libdir`
              ac_safe=`echo "$PTH_INCLUDE_DIR/pth.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $PTH_INCLUDE_DIR/pth.h""... $ac_c" 1>&6
echo "configure:3104: checking for $PTH_INCLUDE_DIR/pth.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 3109 "configure"
#include "confdefs.h"
#include <$PTH_INCLUDE_DIR/pth.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3114: \"$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
  :
else
  echo "$ac_t""no" 1>&6
fi

              echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
echo "configure:3136: checking for pth_init in -lpth" >&5
ac_lib_var=`echo pth'_'pth_init | 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="-lpth "-L$PTH_LIB_DIR" $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3144 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char pth_init();

int main() {
pth_init()
; return 0; }
EOF
if { (eval echo configure:3158: \"$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
  pth_lib=yes
else
  echo "$ac_t""no" 1>&6
pth_lib=no
fi

              cat >> confdefs.h <<\EOF
#define HAVE_PTH_THREADS 1
EOF

              cat >> confdefs.h <<\EOF
#define HAVE_PTH_H 1
EOF

              SHLIBS=$PTH_LIBS
            else
              use_pthreads=no
              use_dcethreads=no
              use_solaris_threads=no
              use_pth_threads=no
            fi
          fi
        fi
      fi
    fi
  fi
fi

CPPFLAGS="$CPPFLAGS_BACKUP"


service_disabled=no


if test X"$use_threads" = Xyes; then
  if test X"$use_pthreads" = Xno -a X"$use_dcethreads" = Xno -a X"$use_solaris_threads" = Xno -a X"$use_pth_threads" = Xno; then
    echo ""
    { echo "configure: error: MICO does not support the thread package for your platform, please remove --enable-threads from your configure command-line and run configure again" 1>&2; exit 1; }
  fi
  if test X"$use_mini_stl" = Xyes; then
    # don't use mini-stl with treads
    echo "configure: warning: disabling mini-stl for multi-thread support." 1>&2
    use_mini_stl=no
    STLINC=""
  fi
  if test X"$use_ccm" = Xyes; then
#    AC_MSG_WARN(disabling CCM support for MT build.)
#    use_ccm=no
    service_disabled=yes
  fi
  if test X"$use_coss" = Xyes; then
    if test X"$use_streams" = Xyes; then
#      AC_MSG_WARN(disabling mico streams for MT build.)
#      use_streams=no
      service_disabled=yes
    fi
    if test X"$use_relship" = Xyes; then
#      AC_MSG_WARN(disabling cos relship for MT build.)
#      use_relship=no
      service_disabled=yes
    fi
    if test X"$use_trader" = Xyes; then
#      AC_MSG_WARN(disabling cos trader for MT build.)
#      use_trader=no
      service_disabled=yes
    fi
  fi
  cat >> confdefs.h <<\EOF
#define HAVE_THREADS 1
EOF

  HAVE_THREADS=yes
  
else
  HAVE_THREADS=no
  
fi


LDCONFIG=ldconfig



#
# System dependencies.
#

CONF_OPT_FLAGS=-O2
CONF_DEBUG_FLAGS=-g
CONF_LIBNSL=yes
CONF_EXCEPT_FLAGS=
CONF_NO_EXCEPT_FLAGS=
CONF_AR=ar
CONF_ARFLAGS=rc
CONF_SHARED_CC="$CC -shared"
CONF_LDSOFLAGS=
CONF_PICFLAGS=
CONF_OBJ_SIZE_LIMIT=no
CONF_SOEXT=so
CONF_LDSO_IN=admin/mico-shld.def.in
CONF_DLFLAGS=
CONF_LDFLAGS=

if test X"$GXX" = Xyes; then
  #
  # GCC
  #
  # add -Wall
  CXXFLAGS="-Wall -Wwrite-strings $CXXFLAGS"
  CFLAGS="-Wall $CFLAGS"

  if test X"$use_speed_tune" = Xyes; then
    CONF_OPT_FLAGS=-O2
  fi

  CONF_SHARED_CC="$CXX -shared"
  CONF_PICFLAGS=-fPIC
  CONF_LDSOFLAGS=-fPIC
  CONF_NO_EXCEPT_FLAGS="-fno-exceptions"
  CONF_EXCEPT_FLAGS=""

  # workaround for compiling X11 headers with gcc 2.95
  # kcg: I've commented it out, since it seems to be useless
  # for a long time now
  #SAVE_CXXFLAGS=$CXXFLAGS
  #CXXFLAGS="$SAVE_CXXFLAGS -fpermissive"
  #AC_TRY_COMPILE([],[],, CXXFLAGS=$SAVE_CXXFLAGS)
  
  GCCMT="safe"
  gccversion=`$CXX --version 2>&1`
  case $gccversion in
    *2.95*)
      GCCMT="unsafe"
      ;;
    *)
      ;;
  esac

  # kcg: GCC 4.1.x requires -fno-strict-aliasing
  GCC_STRICT_ALIASING="no"
  case $gccversion in
    # we need to avoid 4.0.x
    *4.0*)
      ;;
    *4.*)
      GCC_STRICT_ALIASING="yes"
      ;;
    *)
      ;;
  esac
  if test X"$GCC_STRICT_ALIASING" = Xyes; then
    CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
  fi

  if test X"$use_threads" = Xyes; then
    CXXFLAGS="$CXXFLAGS -D_REENTRANT"
  fi

  case $target in
  *aix*)
    CONF_LDSO_IN=admin/mico-shld.aix.in
    CONF_LDFLAGS=-Wl,-brtl,-bbigtoc
    # all code is PIC on AIX
    CONF_PICFLAGS=
    CONF_LDSOFLAGS=
    ;;
  *linux*)
    CONF_DLFLAGS=-rdynamic
    if test X"$use_threads" = Xyes; then
      CXXFLAGS="$CXXFLAGS -D_GNU_SOURCE"
    fi
    ;;
  *solaris*|*sunos*)
    if test X"$use_threads" = Xyes; then
      SHLIBS="$SHLIBS -lposix4"
    fi
    ;;
  *osf*)
    CONF_LDSOFLAGS="-Wl,-expect_unresolved,'*' $CONF_LDSOFLAGS"
    ;;
  *hpux*)
    # -mmillicode-long-calls
    CONF_LDFLAGS=-Wl,+s
    CONF_DLFLAGS=-Wl,-E
    CONF_SOEXT=sl
    CONF_OBJ_SIZE_LIMIT=yes
    ;;
  *freebsd2*|*freebsd3*)
    # does anybody still use this?
    CONF_SOEXT=so.1.0
    if test X"$use_threads" = Xyes; then
      CXXFLAGS="$CXXFLAGS -D_THREAD_SAFE"
    fi
    ;;
  *freebsd*)
    # FreeBSD 4.x and later
    # must not use .so.1.0 here
    if test X"$use_threads" = Xyes; then
      CXXFLAGS="$CXXFLAGS -D_THREAD_SAFE"
    fi
    ;;
  *netbsd*)
    # must not use .so.1.0 here
    if test X"$use_threads" = Xyes; then
      CXXFLAGS="$CXXFLAGS -D_THREAD_SAFE"
    fi
    ;;
  *bsd*)
    CONF_SOEXT=so.1.0
    if test X"$use_threads" = Xyes; then
      CXXFLAGS="$CXXFLAGS -D_THREAD_SAFE"
    fi
    ;;
  *mingw*|*cygwin*)
    # check if the compiler is cygwin or mingw
    gxxversion=`$CXX -v 2>&1`
    case $gxxversion in
    *mingw*)
	CONF_SOEXT=dll
        CONF_PICFLAGS=
        CONF_LDSOFLAGS=
	HAVE_MINGW=yes
	HAVE_CYGWIN=no
	if test "x$use_shared" = "xyes" ; then
		CXX="$CXX -mthreads"
                CONF_SHARED_CC="$CXX -shared"
	else
		CXXFLAGS="-DBUILD_MICO_DLL $CXXFLAGS"
	fi
	;;
    *cygwin*)
        # cygwin doesn't support (or Windows doesn't support)
        # symlinks to shared libraries => we just copy them
        # to the libs directory
	LNPROG="cp"
	CONF_SOEXT=dll
	CONF_PICFLAGS=
	CONF_LDSOFLAGS=
	HAVE_CYGWIN=yes
	HAVE_MINGW=no
	if test "x$use_shared" = "xyes" ; then
		CXX="$CXX -mthreads"
		CONF_SHARED_CC="$CXX -shared"
	else
		CXXFLAGS="-DBUILD_MICO_DLL $CXXFLAGS"
	fi
	;;
    esac
    ;;
  *lynxos*)
    CXXFLAGS="$CXXFLAGS -mminimal-toc"
    ;;
  *dgux*)
    CONF_SHARED_CC="$CXX -shared"
    ;;
  *apple-darwin*)
    # generated code is PIC by default
    CONF_SHARED_CC="$CXX -dynamiclib -dylib -Wl,-flat_namespace -Wl,-undefined -Wl,suppress"
    CONF_SOEXT="dylib"
    CONF_PICFLAGS=
    CONF_LDSOFLAGS=
    CXXFLAGS="$CXXFLAGS -Wno-long-double"
    LDCONFIG="echo ldconfig not run on darwin"
    ;;
  esac
else
  #
  # native C/C++ compiler
  #
  case $target in
  *irix*)
    # -KPIC is on by default
    
    if test -z "$SGI_ABI"; then
      $SGI_ABI="n32"
    fi
    case $SGI_ABI in
    "n32")
      LDFLAGS="$LDFLAGS -L/usr/lib32"
      ;;
    "o32")
      LDFLAGS="$LDFLAGS -L/usr/lib"
      ;;
    "64")
      LDFLAGS="$LDFLAGS -L/usr/lib64"
      ;;
    esac
    CONF_SHARED_CC="$CXX -shared"
    CONF_LIBNSL=no
    CONF_OPT_FLAGS=-O1
    CONF_AR="$CXX -ar -$SGI_ABI"
    CONF_ARFLAGS="-o"
    CPPFLAGS="$CPPFLAGS -$SGI_ABI -LANG:std"
    CXXFLAGS="$CXXFLAGS -$SGI_ABI -OPT:Olimit_opt=on -G 4 -LANG:std -woff 1682,1110,1116,1014,1681,1047,1460"
    LIBS=-lCio $LIBS
    if test X"$use_compiled_headers" = Xyes; then
      PCHFLAGS="$PCHFLAGS -LANG:pch_dir=$ABSSRCDIR/pch -LANG:pch -DFAST_PCH"
      USE_PCH_DIR=yes
    fi
    ;;
  *powermax*)
    CONF_NO_EXCEPT_FLAGS=--no_exceptions
    CONF_EXCEPT_FLAGS=--exceptions
    CXXFLAGS="$CXXFLAGS -DPMaxOS --auto_instantiation --display_error_number --diag_suppress=382,610,611"
    # dont know what this is for, ask <am@concurrent.co.uk>
    HAVE_REPO=yes
    ;;
  *solaris*)
    cxxversion=`$CXX -V 2>&1`
    CONF_OPT_FLAGS=-xO2
    CONF_SHARED_CC="$CXX -G"
    # kcg: following option is probably for very old SunPRO compiler
    # even Forte Developer C++ 6 update 2 should be ok with
    # -pto instead of with full template repository (-ptr switch)
#    CXXFLAGS="$CXXFLAGS -ptr$ABSSRCDIR"
    # kcg: -pto is not needed anymore since Sun Studio 8
    # where `-instances=global' was switched on by default
    # so here we test for Forte Developer 6 and Sun Studio 7
    if test ! -z "`echo $cxxversion|grep 'C++ 5.3'`" || test ! -z "`echo $cxxversion|grep 'C++ 5.4'`"; then
      CXXFLAGS="$CXXFLAGS -pto"
      HAVE_REPO=yes
    fi
    # disable anachronism warnings
    CXXFLAGS="$CXXFLAGS -erroff=badargtype2w"
    CONF_PICFLAGS=-KPIC
    CONF_LDSOFLAGS=-KPIC
    if test X"$use_threads" = Xyes; then
      CXXFLAGS="$CXXFLAGS -mt"
      LDFLAGS="$LDFLAGS -mt"
      SHLIBS="$SHLIBS -lrt"
    fi
    CONF_AR="CC"
    CONF_ARFLAGS="-xar -o"
    ;;
  *aix*)
    # Extract the first word of "makeC++SharedLib", so it can be a program name with args.
set dummy makeC++SharedLib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3511: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AIXLINKER'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$AIXLINKER" in
  /*)
  ac_cv_path_AIXLINKER="$AIXLINKER" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_AIXLINKER="$AIXLINKER" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH:/usr/lpp/xlC/bin"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_AIXLINKER="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_AIXLINKER" && ac_cv_path_AIXLINKER="makeC++SharedLib"
  ;;
esac
fi
AIXLINKER="$ac_cv_path_AIXLINKER"
if test -n "$AIXLINKER"; then
  echo "$ac_t""$AIXLINKER" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

    CONF_LDSO_IN=admin/mico-shld.aix-xlc.in
    CONF_SHARED_CC="$AIXLINKER -p 0 -G"
    CONF_LDFLAGS=-brtl
    CXXFLAGS="$CXXFLAGS -+ -qrtti=all -qnotempinc -qlongdouble -qlonglong -w"
    CFLAGS="$CFLAGS -qlongdouble -qlonglong"
    ;;
  *hpux*)
    if test X"$use_pthreads" = Xyes; then
      CXXFLAGS="$CXXFLAGS -mt"
      SHLIBS="$SHLIBS -lrt"
    fi
    if test X"$use_dcethreads" = Xyes; then
      CXXFLAGS="$CXXFLAGS -D_RW_MULTI_THREAD -D_RWSTD_MULTI_THREAD -D_HPUX_SOURCE -D_THREAD_SAFE -D_REENTRANT"
    fi
    if test X"$use_mini_stl" = Xyes; then
      # mini-stl doesn't compile under HP aCC according to
      # <kersting.andy.a@tci.com> because it clashes with the system
      # supplied Rogue-Wave STL (RWSTL does not appear to be disable-able).
      echo "configure: warning: "HP aCC found - disabling mini-stl."" 1>&2
      use_mini_stl=no
      STLINC=""
    fi
    CXXCPP="$CXXCPP -AA" # this is needed for correct detection of sstream header file below
    CONF_OPT_FLAGS=+O2
    CONF_SHARED_CC="$CXX -b"
    CONF_LDFLAGS=-Wl,+s
    CONF_DLFLAGS=-Wl,-E
    CONF_SOEXT=sl
    CONF_PICFLAGS=+Z
    CONF_LDSOFLAGS=+Z
    CXXFLAGS="$CXXFLAGS -AA -ext"
    CFLAGS="$CFLAGS -Ae"
    HAVE_REPO=yes
    ;;
  *osf*)
    # generated code is PIC by default
    CONF_SHARED_CC="ld -shared"
    CONF_LDSOFLAGS="-expect_unresolved '*'"
    CPPFLAGS="$CPPFLAGS -D__USE_STD_IOSTREAM"
    CXXFLAGS="$CXXFLAGS -ptr $ABSSRCDIR/rep -ieee"
    if test X"$use_threads" = Xyes; then
      CXXFLAGS="-pthread $CXXFLAGS"
      SHLIBS="$SHLIBS -lrt"
    fi    
    ;;
  *linux*)
    cxxversion=`$CXX -V 2>&1`
    if test ! -z "`echo $cxxversion|grep como:`"; then
      # Comeau C/C++ 4.3.x.x
      HAVE_PRELINK=yes
      PRELINK_FLAG=--prelink_objects
      CONF_OPT_FLAGS="-O2"
      CONF_PICFLAGS="-copt=-fPIC"
      CONF_DLFLAGS=--lopt=-rdynamic
      # old params for relaxed mode
      #CXXFLAGS="$CXXFLAGS --const_string_literal --diag_suppress=997"
      # new params for strict ansi warning mode
      # (for strict ansi error mode please change '-a' to '-A')
      CXXFLAGS="$CXXFLAGS -a --long_long --implicit_extern_c_type_conversion --diag_suppress=997"
      if test X"$use_compiled_headers" = Xyes; then
        PCHFLAGS="$PCHFLAGS --pch --pch_dir $ABSSRCDIR/pch -DFAST_PCH"
        USE_PCH_DIR=yes
      fi
      if test X"$use_threads" = Xyes; then
        CXXFLAGS="$CXXFLAGS -D_REENTRANT -D_GNU_SOURCE"
      fi
    elif test ! -z "`echo $cxxversion|grep Intel|grep \"Version\"`"; then
      # Intel C++ (icpc) configuration
      CONF_SHARED_CC="$CXX -shared"
      CONF_PICFLAGS=-fPIC
      CONF_LDSOFLAGS=-fPIC
      if test X"$use_opt" != Xyes; then
        # by default Intel uses -O so we need to disable it
        CONF_OPT_FLAGS=-O0
        use_opt=yes
      fi
      if test X"$use_compiled_headers" = Xyes; then
        PCHFLAGS="$PCHFLAGS -pch -pch_dir $ABSSRCDIR/pch -DFAST_PCH"
        USE_PCH_DIR=yes
      fi
      if test X"$use_threads" = Xyes; then
        CXXFLAGS="$CXXFLAGS -D_REENTRANT -D_GNU_SOURCE"
      fi
    elif test ! -z "`echo $cxxversion|grep Sun|grep C++`"; then
      # Sun C++ (CC) configuration
      CONF_OPT_FLAGS=-xO2
      CONF_SHARED_CC="$CXX -G"
      CONF_PICFLAGS=-KPIC
      CONF_LDSOFLAGS=-KPIC
      # disable anachronism warnings
      CXXFLAGS="$CXXFLAGS -erroff=badargtype2w"
      if test X"$use_threads" = Xyes; then
        CXXFLAGS="$CXXFLAGS -D_REENTRANT -D_GNU_SOURCE"
      fi
    else
      echo
      echo
      echo "WARNING: You are using an unsupported C++ compiler."
      echo "WARNING: You will probably run into trouble ..."
      echo
      echo
    fi
    ;;
  *cray*)
    HAVE_PRELINK=yes
    PRELINK_FLAG="$ABSSRCDIR/contrib/cray/dummy.cc -o dummy"
    CONF_SHARED_CC="$CXX"
    CPPFLAGS="$CPPFLAGS"
    CFLAGS="$CFLAGS -h command -h new_for_init"
    CXXFLAGS="$CXXFLAGS -h command -h new_for_init"
    ;;
  *)
    echo
    echo
    echo "WARNING: You are using an unsupported C++ compiler."
    echo "WARNING: You will probably run into trouble ..."
    echo
    echo
    ;;
  esac
fi

#
# Checks for programs.
#


CXXFLAGS=`echo " $CXXFLAGS " | sed -e 's/ -g / /g' -e 's/ -O[0-9]* / /g'`
CFLAGS=`echo " $CFLAGS " | sed -e 's/ -g / /g' -e 's/ -O[0-9]* / /g'`

if test X"$use_opt" != Xno; then
  CXXFLAGS="$CONF_OPT_FLAGS $CXXFLAGS"
  CFLAGS="$CONF_OPT_FLAGS $CFLAGS"
fi
if test X"$use_debug" != Xno; then
  CXXFLAGS="$CONF_DEBUG_FLAGS $CXXFLAGS"
  CFLAGS="$CONF_DEBUG_FLAGS $CFLAGS"
fi

if test "x$use_memcheck" = "xyes" ; then
    case $target in
    *86*linux*)
        echo $ac_n "checking for open in -liberty""... $ac_c" 1>&6
echo "configure:3687: checking for open in -liberty" >&5
ac_lib_var=`echo iberty'_'open | 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="-liberty  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3695 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char open();

int main() {
open()
; return 0; }
EOF
if { (eval echo configure:3709: \"$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 iberty | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-liberty $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

        echo $ac_n "checking for bfd_init in -lbfd""... $ac_c" 1>&6
echo "configure:3737: checking for bfd_init in -lbfd" >&5
ac_lib_var=`echo bfd'_'bfd_init | 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="-lbfd  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3745 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char bfd_init();

int main() {
bfd_init()
; return 0; }
EOF
if { (eval echo configure:3759: \"$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 bfd | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lbfd $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

        for ac_hdr in bfd.h link.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3790: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 3795 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

        if test "x$ac_cv_lib_bfd_bfd_init" = "xyes" && test "x$ac_cv_lib_iberty_open" = "xyes" && test "x$ac_cv_header_bfd_h" = "xyes" && test "x$ac_cv_header_link_h" ; then
            CFLAGS="-fno-omit-frame-pointer $CFLAGS"
            CXXFLAGS="-fno-omit-frame-pointer $CXXFLAGS"
            if test "x$use_debug" != "xyes" ; then
                CFLAGS="-g1 $CFLAGS"
                CXXFLAGS="-g1 $CXXFLAGS"
            fi
            LIBS="$LIBS -lbfd -liberty"
            cat >> confdefs.h <<\EOF
#define USE_MEMTRACE 1
EOF

            USE_MEMTRACE=yes
        fi
        ;;
    esac
fi

for ac_prog in 'bison -y' byacc
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3849: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$YACC"; then
  ac_cv_prog_YACC="$YACC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_YACC="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
YACC="$ac_cv_prog_YACC"
if test -n "$YACC"; then
  echo "$ac_t""$YACC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$YACC" && break
done
test -n "$YACC" || YACC="yacc"

# Extract the first word of "flex", so it can be a program name with args.
set dummy flex; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3882: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$LEX"; then
  ac_cv_prog_LEX="$LEX" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_LEX="flex"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
fi
fi
LEX="$ac_cv_prog_LEX"
if test -n "$LEX"; then
  echo "$ac_t""$LEX" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

if test -z "$LEXLIB"
then
  case "$LEX" in
  flex*) ac_lib=fl ;;
  *) ac_lib=l ;;
  esac
  echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
echo "configure:3916: checking for yywrap in -l$ac_lib" >&5
ac_lib_var=`echo $ac_lib'_'yywrap | 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="-l$ac_lib  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3924 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char yywrap();

int main() {
yywrap()
; return 0; }
EOF
if { (eval echo configure:3938: \"$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
  LEXLIB="-l$ac_lib"
else
  echo "$ac_t""no" 1>&6
fi

fi


AR=$CONF_AR


ARFLAGS=$CONF_ARFLAGS


echo $ac_n "checking for ar""... $ac_c" 1>&6
echo "configure:3968: checking for ar" >&5
echo "$ac_t""$AR $ARFLAGS" 1>&6


# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3975: 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" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_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

echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:4003: 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
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
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



# Extract the first word of "tclsh", so it can be a program name with args.
set dummy tclsh; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4034: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_TCLSH'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$TCLSH" in
  /*)
  ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a dos path.
  ;;
  *)
  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_path_TCLSH="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_TCLSH" && ac_cv_path_TCLSH="tclsh"
  ;;
esac
fi
TCLSH="$ac_cv_path_TCLSH"
if test -n "$TCLSH"; then
  echo "$ac_t""$TCLSH" 1>&6
else
  echo "$ac_t""no" 1>&6
fi



# Extract the first word of "javac", so it can be a program name with args.
set dummy javac; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4072: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_JAVAC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$JAVAC" in
  /*)
  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a dos path.
  ;;
  *)
  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_path_JAVAC="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_JAVAC" && ac_cv_path_JAVAC="no"
  ;;
esac
fi
JAVAC="$ac_cv_path_JAVAC"
if test -n "$JAVAC"; then
  echo "$ac_t""$JAVAC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

if test X"$JAVAC" != Xno; then
  echo $ac_n "checking for JDK 1.1""... $ac_c" 1>&6
echo "configure:4107: checking for JDK 1.1" >&5
  cat > conftest.java <<EOF
import java.awt.event.*;
public class conftest {}
EOF
  sh -c "$JAVAC conftest.java" 1>&5 2>&5
  if test $? = 0; then
    echo "$ac_t""yes" 1>&6
  else
    echo "$ac_t""no" 1>&6
    JAVAC=no
  fi
  rm -f conftest.*
fi


echo $ac_n "checking for JavaCUP""... $ac_c" 1>&6
echo "configure:4124: checking for JavaCUP" >&5
JAVACUPDIR=no
for i in `echo $CLASSPATH | tr : ' '`; do
  if test -d $i/java_cup; then
    JAVACUPDIR=$i/java_cup
  fi
done
echo "$ac_t""$JAVACUPDIR" 1>&6


HAVE_JDK=yes
if test X"$JAVAC" = Xno -o X"$JAVACUPDIR" = Xno; then
  echo "configure: warning: you have not installed JDK 1.1 and JavaCUP. java parts disabled." 1>&2
  HAVE_JDK=no
fi





if test X"$QTDIR" != X; then
  HAVE_QT=yes
  QT_LIBS="-lX11 -lqt"
  # Extract the first word of "moc", so it can be a program name with args.
set dummy moc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4150: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MOC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$MOC" in
  /*)
  ac_cv_path_MOC="$MOC" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_MOC="$MOC" # Let the user override the test with a dos path.
  ;;
  *)
  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_path_MOC="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_MOC" && ac_cv_path_MOC="no"
  ;;
esac
fi
MOC="$ac_cv_path_MOC"
if test -n "$MOC"; then
  echo "$ac_t""$MOC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  if test X"$MOC" = Xno; then
    echo "configure: warning: cannot find moc. QT parts disabled." 1>&2
    HAVE_QT=no
  fi
  if test X"$HAVE_THREADS" = Xyes; then
    echo $ac_n "checking for open in -lqt-mt""... $ac_c" 1>&6
echo "configure:4189: checking for open in -lqt-mt" >&5
ac_lib_var=`echo qt-mt'_'open | 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="-lqt-mt  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4197 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char open();

int main() {
open()
; return 0; }
EOF
if { (eval echo configure:4211: \"$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
  qt_mt=yes
else
  echo "$ac_t""no" 1>&6
qt_mt=no
fi

    if test X"$qt_mt" = Xno; then
      echo "configure: warning: cannot find multi-threaded version of QT library. QT parts disabled." 1>&2
      HAVE_QT=no
    fi
    QT_CXXFLAGS=-DQT_THREAD_SUPPORT
    QT_LIBS="-lX11 -lqt-mt"
  fi
else
  HAVE_QT=no
fi




if test X"$GTKDIR" != X; then
  # Check whether --with-gtk-prefix or --without-gtk-prefix was given.
if test "${with_gtk_prefix+set}" = set; then
  withval="$with_gtk_prefix"
  gtk_config_prefix="$withval"
else
  gtk_config_prefix=""
fi

# Check whether --with-gtk-exec-prefix or --without-gtk-exec-prefix was given.
if test "${with_gtk_exec_prefix+set}" = set; then
  withval="$with_gtk_exec_prefix"
  gtk_config_exec_prefix="$withval"
else
  gtk_config_exec_prefix=""
fi

# Check whether --enable-gtktest or --disable-gtktest was given.
if test "${enable_gtktest+set}" = set; then
  enableval="$enable_gtktest"
  :
else
  enable_gtktest=yes
fi


  if test x$gtk_config_exec_prefix != x ; then
     gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
     if test x${GTK_CONFIG+set} != xset ; then
        GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
     fi
  fi
  if test x$gtk_config_prefix != x ; then
     gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
     if test x${GTK_CONFIG+set} != xset ; then
        GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
     fi
  fi

  # Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4288: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$GTK_CONFIG" in
  /*)
  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
  ;;
  *)
  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_path_GTK_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
  ;;
esac
fi
GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
if test -n "$GTK_CONFIG"; then
  echo "$ac_t""$GTK_CONFIG" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  min_gtk_version=0.99.7
  echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
echo "configure:4323: checking for GTK - version >= $min_gtk_version" >&5
  no_gtk=""
  if test "$GTK_CONFIG" = "no" ; then
    no_gtk=yes
  else
    GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
    GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
    gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
    gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
    gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
    if test "x$enable_gtktest" = "xyes" ; then
      ac_save_CXXFLAGS="$CXXFLAGS"
      ac_save_LIBS="$LIBS"
      CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
      LIBS="$LIBS $GTK_LIBS"
      rm -f conf.gtktest
      if test "$cross_compiling" = yes; then
  echo $ac_n "cross compiling; assumed OK... $ac_c"
else
  cat > conftest.$ac_ext <<EOF
#line 4346 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif

#include <gtk/gtk.h>
#include <stdio.h>

int 
main ()
{
  int major, minor, micro;

  system ("touch conf.gtktest");

  if (sscanf("$min_gtk_version", "%d.%d.%d", &major, &minor, &micro) != 3) {
     printf("%s, bad version string\n", "$min_gtk_version");
     exit(1);
   }

  if ((gtk_major_version != $gtk_config_major_version) ||
      (gtk_minor_version != $gtk_config_minor_version) ||
      (gtk_micro_version != $gtk_config_micro_version))
    {
      printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", 
             $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
             gtk_major_version, gtk_minor_version, gtk_micro_version);
      printf ("*** was found! If gtk-config was correct, then it is best\n");
      printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
      printf("*** required on your system.\n");
      printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
      printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
      printf("*** before re-running configure\n");
    } 
  else
    {
      if ((gtk_major_version > major) ||
        ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
        ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
      {
        return 0;
       }
     else
      {
        printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
               gtk_major_version, gtk_minor_version, gtk_micro_version);
        printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
	       major, minor, micro);
        printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
        printf("***\n");
        printf("*** If you have already installed a sufficiently new version, this error\n");
        printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
        printf("*** being found. The easiest way to fix this is to remove the old version\n");
        printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
        printf("*** correct copy of gtk-config. (In this case, you will have to\n");
        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
        printf("*** so that the correct libraries are found at run-time))\n");
      }
    }
  return 1;
}

EOF
if { (eval echo configure:4412: \"$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*
  no_gtk=yes
fi
rm -fr conftest*
fi

       CXXFLAGS="$ac_save_CXXFLAGS"
       LIBS="$ac_save_LIBS"
     fi
  fi
  if test "x$no_gtk" = x ; then
     echo "$ac_t""yes" 1>&6
     HAVE_GTK=yes     
  else
     echo "$ac_t""no" 1>&6
     if test "$GTK_CONFIG" = "no" ; then
       echo "*** The gtk-config script installed by GTK could not be found"
       echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
       echo "*** your path, or set the GTK_CONFIG environment variable to the"
       echo "*** full path to gtk-config."
     else
       if test -f conf.gtktest ; then
        :
       else
          echo "*** Could not run GTK test program, checking why..."
          CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
          LIBS="$LIBS $GTK_LIBS"
          cat > conftest.$ac_ext <<EOF
#line 4446 "configure"
#include "confdefs.h"

#include <gtk/gtk.h>
#include <stdio.h>

int main() {
 return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); 
; return 0; }
EOF
if { (eval echo configure:4456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
   echo "*** The test program compiled, but did not run. This usually means"
          echo "*** that the run-time linker is not finding GTK or finding the wrong"
          echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
          echo "*** is required on your system"
	  echo "***"
          echo "*** If you have an old version installed, it is best to remove it, although"
          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
          echo "***"
          echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
          echo "*** came with the system with the command"
          echo "***"
          echo "***    rpm --erase --nodeps gtk gtk-devel" 
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
   echo "*** The test program failed to compile or link. See the file config.log for the"
          echo "*** exact error that occured. This usually means GTK was incorrectly installed"
          echo "*** or that you have moved GTK since it was installed. In the latter case, you"
          echo "*** may want to edit the gtk-config script: $GTK_CONFIG" 
fi
rm -f conftest*
          CXXFLAGS="$ac_save_CXXFLAGS"
          LIBS="$ac_save_LIBS"
       fi
     fi
     GTK_CFLAGS=""
     GTK_LIBS=""
     echo "configure: warning: cannot find gtk-config. GTK parts disabled" 1>&2
              HAVE_GTK=no
  fi
  
  
  rm -f conf.gtktest

else
  HAVE_GTK=no
fi




HAVE_TCL=no
TCL_LIBS=
if test X"$TCLDIR" != X; then
  echo $ac_n "checking for tcl version""... $ac_c" 1>&6
echo "configure:4506: checking for tcl version" >&5
  cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <tcl.h>
__grepline__:TCL_VERSION
EOF
eval "$ac_cpp conftest.$ac_ext 2>&5 | grep __grepline__ | cut -d: -f2  2>/dev/null > conftest.out"
if test $? = 0; then
  result=`cat conftest.out`
  if test X"$result" != X"TCL_VERSION"; then
    TCL_VERSION=$result
  fi
fi
rm -rf conftest*
  if test X"$TCL_VERSION" != X; then
        TCL_VERSION=`echo $TCL_VERSION | tr -d \"`
    TCL_LIBS=-ltcl$TCL_VERSION
    HAVE_TCL=yes
    echo "$ac_t""$TCL_VERSION" 1>&6
  else
    echo "$ac_t""tcl.h not found, tcl parts disabled" 1>&6
  fi
fi


#
# in case of used SL3, checking for SNACC and SMP libraries
#
if test X"$use_sl3" != Xno; then
  
  ac_safe=`echo "esnacc/c++/asn-incl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for esnacc/c++/asn-incl.h""... $ac_c" 1>&6
echo "configure:4538: checking for esnacc/c++/asn-incl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4543 "configure"
#include "confdefs.h"
#include <esnacc/c++/asn-incl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4548: \"$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
  have_snacc_headers=yes
else
  echo "$ac_t""no" 1>&6
have_snacc_headers=no
fi

  echo $ac_n "checking for open in -lc++asn1""... $ac_c" 1>&6
echo "configure:4571: checking for open in -lc++asn1" >&5
ac_lib_var=`echo c++asn1'_'open | 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="-lc++asn1  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4579 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char open();

int main() {
open()
; return 0; }
EOF
if { (eval echo configure:4593: \"$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
  have_cxxasn1=yes
else
  echo "$ac_t""no" 1>&6
have_cxxasn1=no
fi

  
  # Extract the first word of "esnacc", so it can be a program name with args.
set dummy esnacc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4618: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_SNACC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$SNACC" in
  /*)
  ac_cv_path_SNACC="$SNACC" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_SNACC="$SNACC" # Let the user override the test with a dos path.
  ;;
  *)
  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_path_SNACC="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_SNACC" && ac_cv_path_SNACC="no"
  ;;
esac
fi
SNACC="$ac_cv_path_SNACC"
if test -n "$SNACC"; then
  echo "$ac_t""$SNACC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  HAVE_SNACC=no
  if test X"$have_cxxasn1" != Xno; then
    if test X"$have_snacc_headers" != Xno; then
      HAVE_SNACC=yes
    fi
  fi
  
  # kcg: double hack, since AttributeCertificateDefinitions.h contains #include "asn-incl.h"
  #      and #include "X509Common.h" :-(
  CPPBACKUP=$ac_cpp
  if test X"$SNACCDIR" != X""; then
    ac_cpp="$CPPBACKUP -I$SNACCDIR/include/esnacc/c++"
  else
    ac_cpp="$CPPBACKUP -I/usr/include/esnacc/c++ -I/usr/local/include/esnacc/c++"
  fi
  ac_safe=`echo "smp/AttributeCertificateDefinitions.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for smp/AttributeCertificateDefinitions.h""... $ac_c" 1>&6
echo "configure:4668: checking for smp/AttributeCertificateDefinitions.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4673 "configure"
#include "confdefs.h"
#include <smp/AttributeCertificateDefinitions.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4678: \"$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
  have_acdef_header=yes
else
  echo "$ac_t""no" 1>&6
have_acdef_header=no
fi

  # restore CPP
  ac_cpp=$CPPBACKUP
  echo $ac_n "checking for open in -lcmlasn""... $ac_c" 1>&6
echo "configure:4703: checking for open in -lcmlasn" >&5
ac_lib_var=`echo cmlasn'_'open | 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="-lcmlasn  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4711 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char open();

int main() {
open()
; return 0; }
EOF
if { (eval echo configure:4725: \"$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
  have_cmlasn=yes
else
  echo "$ac_t""no" 1>&6
have_cmlasn=no
fi

  HAVE_SMP=no
  if test X"$have_cmlasn" != Xno; then
    if test X"$have_acdef_header" != Xno; then
      HAVE_SMP=yes
      if test X"$HAVE_SNACC" != Xno; then
        # viola, all support for SL3 AC presented
        # SMP uses stupid form #include "asn-incl.h" => CPPFLAGS hack
        if test X"$SNACCDIR" != X""; then
          CPPFLAGS="$CPPFLAGS -I$SNACCDIR/include/esnacc/c++"
        else
          CPPFLAGS="$CPPFLAGS -I/usr/include/esnacc/c++ -I/usr/local/include/esnacc/c++"
        fi
        # kcg: the second hack (reference above)
        if test X"$SMPDIR" != X""; then
	  CPPFLAGS="$CPPFLAGS -I$SMPDIR/include/smp"
        else
          CPPFLAGS="$CPPFLAGS -I/usr/include/smp -I/usr/local/include/smp"
        fi
        SHLIBS="$SHLIBS -lcmlasn -lc++asn1"
      fi
    fi
  fi
fi


HAVE_BLUETOOTH=no
if test X"$BTDIR" != X; then
  echo $ac_n "checking for open in -lbluetooth""... $ac_c" 1>&6
echo "configure:4774: checking for open in -lbluetooth" >&5
ac_lib_var=`echo bluetooth'_'open | 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="-lbluetooth  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4782 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char open();

int main() {
open()
; return 0; }
EOF
if { (eval echo configure:4796: \"$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 bluetooth | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lbluetooth $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

  if test X"$ac_cv_lib_bluetooth_open" = Xyes; then
    HAVE_BLUETOOTH=yes
    cat >> confdefs.h <<\EOF
#define HAVE_BLUETOOTH 1
EOF

  fi
fi

#
# Checks for libraries.
#

# special libs for Solaris,AIX
echo $ac_n "checking for open in -lm""... $ac_c" 1>&6
echo "configure:4838: checking for open in -lm" >&5
ac_lib_var=`echo m'_'open | 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="-lm  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4846 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char open();

int main() {
open()
; return 0; }
EOF
if { (eval echo configure:4860: \"$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 m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lm $LIBS"

else
  echo "$ac_t""no" 1>&6
fi


if test X"$CONF_LIBNSL" = Xyes; then
  echo $ac_n "checking for open in -lnsl""... $ac_c" 1>&6
echo "configure:4890: checking for open in -lnsl" >&5
ac_lib_var=`echo nsl'_'open | 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 -lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4898 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char open();

int main() {
open()
; return 0; }
EOF
if { (eval echo configure:4912: \"$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
#define $ac_tr_lib 1
EOF

  LIBS="-lnsl $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

fi

# this must be after the nsl check because it implicitely checks for
# -lnsl and doesnt take care whether -lnsl needs -lsocket
# If we find X, set shell vars x_includes and x_libraries to the
# paths, otherwise set no_x=yes.
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
echo "configure:4948: checking for X" >&5

# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
  withval="$with_x"
  :
fi

# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
if test "x$with_x" = xno; then
  # The user explicitly disabled X.
  have_x=disabled
else
  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
    # Both variables are already set.
    have_x=yes
  else
if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  # One or both of the vars are not set, and there is no cached value.
ac_x_includes=NO ac_x_libraries=NO
rm -fr conftestdir
if mkdir conftestdir; then
  cd conftestdir
  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  cat > Imakefile <<'EOF'
acfindx:
	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
EOF
  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
    for ac_extension in a so sl; do
      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
        test -f $ac_im_libdir/libX11.$ac_extension; then
        ac_im_usrlibdir=$ac_im_libdir; break
      fi
    done
    # Screen out bogus values from the imake configuration.  They are
    # bogus both because they are the default anyway, and because
    # using them would break gcc on systems where it needs fixed includes.
    case "$ac_im_incroot" in
	/usr/include) ;;
	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
    esac
    case "$ac_im_usrlibdir" in
	/usr/lib | /lib) ;;
	*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
    esac
  fi
  cd ..
  rm -fr conftestdir
fi

if test "$ac_x_includes" = NO; then
  # Guess where to find include files, by looking for this one X11 .h file.
  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h

  # First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
#line 5010 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5015: \"$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*
  # We can compile using X headers with no special include directory.
ac_x_includes=
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  # Look for the header file in a standard set of common directories.
# Check X11 before X11Rn because it is often a symlink to the current release.
  for ac_dir in               \
    /usr/X11/include          \
    /usr/X11R6/include        \
    /usr/X11R5/include        \
    /usr/X11R4/include        \
                              \
    /usr/include/X11          \
    /usr/include/X11R6        \
    /usr/include/X11R5        \
    /usr/include/X11R4        \
                              \
    /usr/local/X11/include    \
    /usr/local/X11R6/include  \
    /usr/local/X11R5/include  \
    /usr/local/X11R4/include  \
                              \
    /usr/local/include/X11    \
    /usr/local/include/X11R6  \
    /usr/local/include/X11R5  \
    /usr/local/include/X11R4  \
                              \
    /usr/X386/include         \
    /usr/x386/include         \
    /usr/XFree86/include/X11  \
                              \
    /usr/include              \
    /usr/local/include        \
    /usr/unsupported/include  \
    /usr/athena/include       \
    /usr/local/x11r5/include  \
    /usr/lpp/Xamples/include  \
                              \
    /usr/openwin/include      \
    /usr/openwin/share/include \
    ; \
  do
    if test -r "$ac_dir/$x_direct_test_include"; then
      ac_x_includes=$ac_dir
      break
    fi
  done
fi
rm -f conftest*
fi # $ac_x_includes = NO

if test "$ac_x_libraries" = NO; then
  # Check for the libraries.

  test -z "$x_direct_test_library" && x_direct_test_library=Xt
  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc

  # See if we find them without any special options.
  # Don't add to $LIBS permanently.
  ac_save_LIBS="$LIBS"
  LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5084 "configure"
#include "confdefs.h"

int main() {
${x_direct_test_function}()
; return 0; }
EOF
if { (eval echo configure:5091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
ac_x_libraries=
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  LIBS="$ac_save_LIBS"
# First see if replacing the include by lib works.
# Check X11 before X11Rn because it is often a symlink to the current release.
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
    /usr/X11/lib          \
    /usr/X11R6/lib        \
    /usr/X11R5/lib        \
    /usr/X11R4/lib        \
                          \
    /usr/lib/X11          \
    /usr/lib/X11R6        \
    /usr/lib/X11R5        \
    /usr/lib/X11R4        \
                          \
    /usr/local/X11/lib    \
    /usr/local/X11R6/lib  \
    /usr/local/X11R5/lib  \
    /usr/local/X11R4/lib  \
                          \
    /usr/local/lib/X11    \
    /usr/local/lib/X11R6  \
    /usr/local/lib/X11R5  \
    /usr/local/lib/X11R4  \
                          \
    /usr/X386/lib         \
    /usr/x386/lib         \
    /usr/XFree86/lib/X11  \
                          \
    /usr/lib              \
    /usr/local/lib        \
    /usr/unsupported/lib  \
    /usr/athena/lib       \
    /usr/local/x11r5/lib  \
    /usr/lpp/Xamples/lib  \
    /lib/usr/lib/X11	  \
                          \
    /usr/openwin/lib      \
    /usr/openwin/share/lib \
    ; \
do
  for ac_extension in a so sl; do
    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
      ac_x_libraries=$ac_dir
      break 2
    fi
  done
done
fi
rm -f conftest*
fi # $ac_x_libraries = NO

if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
  # Didn't find X anywhere.  Cache the known absence of X.
  ac_cv_have_x="have_x=no"
else
  # Record where we found X for the cache.
  ac_cv_have_x="have_x=yes \
	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
fi
fi
  fi
  eval "$ac_cv_have_x"
fi # $with_x != no

if test "$have_x" != yes; then
  echo "$ac_t""$have_x" 1>&6
  no_x=yes
else
  # If each of the values was on the command line, it overrides each guess.
  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  # Update the cache value to reflect the command line values.
  ac_cv_have_x="have_x=yes \
		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
fi

if test "$no_x" = yes; then
  # Not all programs may use this symbol, but it does not hurt to define it.
  cat >> confdefs.h <<\EOF
#define X_DISPLAY_MISSING 1
EOF

  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
else
  if test -n "$x_includes"; then
    X_CFLAGS="$X_CFLAGS -I$x_includes"
  fi

  # It would also be nice to do this for all -L options, not just this one.
  if test -n "$x_libraries"; then
    X_LIBS="$X_LIBS -L$x_libraries"
    # For Solaris; some versions of Sun CC require a space after -R and
    # others require no space.  Words are not sufficient . . . .
    case "`(uname -sr) 2>/dev/null`" in
    "SunOS 5"*)
      echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
echo "configure:5197: checking whether -R must be followed by a space" >&5
      ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
      cat > conftest.$ac_ext <<EOF
#line 5200 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
if { (eval echo configure:5207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_R_nospace=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_R_nospace=no
fi
rm -f conftest*
      if test $ac_R_nospace = yes; then
	echo "$ac_t""no" 1>&6
	X_LIBS="$X_LIBS -R$x_libraries"
      else
	LIBS="$ac_xsave_LIBS -R $x_libraries"
	cat > conftest.$ac_ext <<EOF
#line 5223 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
if { (eval echo configure:5230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_R_space=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_R_space=no
fi
rm -f conftest*
	if test $ac_R_space = yes; then
	  echo "$ac_t""yes" 1>&6
	  X_LIBS="$X_LIBS -R $x_libraries"
	else
	  echo "$ac_t""neither works" 1>&6
	fi
      fi
      LIBS="$ac_xsave_LIBS"
    esac
  fi

  # Check for system-dependent libraries X programs must link with.
  # Do this before checking for the system-independent R6 libraries
  # (-lICE), since we may need -lsocket or whatever for X linking.

  if test "$ISC" = yes; then
    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  else
    # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
    # libraries were built with DECnet support.  And karl@cs.umb.edu says
    # the Alpha needs dnet_stub (dnet does not exist).
    echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
echo "configure:5262: checking for dnet_ntoa in -ldnet" >&5
ac_lib_var=`echo dnet'_'dnet_ntoa | 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="-ldnet  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5270 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char dnet_ntoa();

int main() {
dnet_ntoa()
; return 0; }
EOF
if { (eval echo configure:5284: \"$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
  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
else
  echo "$ac_t""no" 1>&6
fi

    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
      echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
echo "configure:5306: checking for dnet_ntoa in -ldnet_stub" >&5
ac_lib_var=`echo dnet_stub'_'dnet_ntoa | 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="-ldnet_stub  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5314 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char dnet_ntoa();

int main() {
dnet_ntoa()
; return 0; }
EOF
if { (eval echo configure:5328: \"$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
  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
else
  echo "$ac_t""no" 1>&6
fi

    fi

    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
    # to get the SysV transport functions.
    # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
    # needs -lnsl.
    # The nsl library prevents programs from opening the X display
    # on Irix 5.2, according to dickey@clark.net.
    echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
echo "configure:5357: checking for gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5362 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char gethostbyname(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
choke me
#else
gethostbyname();
#endif

; return 0; }
EOF
if { (eval echo configure:5388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_gethostbyname=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_gethostbyname=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
fi

    if test $ac_cv_func_gethostbyname = no; then
      echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
echo "configure:5409: 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
#line 5417 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int main() {
gethostbyname()
; return 0; }
EOF
if { (eval echo configure:5431: \"$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
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
else
  echo "$ac_t""no" 1>&6
fi

    fi

    # lieder@skyler.mavd.honeywell.com says without -lsocket,
    # socket/setsockopt and other routines are undefined under SCO ODT
    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
    # on later versions), says simon@lia.di.epfl.ch: it contains
    # gethostby* variants that don't use the nameserver (or something).
    # -lsocket must be given before -lnsl if both are needed.
    # We assume that if connect needs -lnsl, so does gethostbyname.
    echo $ac_n "checking for connect""... $ac_c" 1>&6
echo "configure:5461: checking for connect" >&5
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5466 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char connect(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char connect();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_connect) || defined (__stub___connect)
choke me
#else
connect();
#endif

; return 0; }
EOF
if { (eval echo configure:5492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_connect=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_connect=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
fi

    if test $ac_cv_func_connect = no; then
      echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
echo "configure:5513: checking for connect in -lsocket" >&5
ac_lib_var=`echo socket'_'connect | 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 $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5521 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char connect();

int main() {
connect()
; return 0; }
EOF
if { (eval echo configure:5535: \"$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
  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
else
  echo "$ac_t""no" 1>&6
fi

    fi

    # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
    echo $ac_n "checking for remove""... $ac_c" 1>&6
echo "configure:5559: checking for remove" >&5
if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5564 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char remove(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char remove();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_remove) || defined (__stub___remove)
choke me
#else
remove();
#endif

; return 0; }
EOF
if { (eval echo configure:5590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_remove=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_remove=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
fi

    if test $ac_cv_func_remove = no; then
      echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
echo "configure:5611: checking for remove in -lposix" >&5
ac_lib_var=`echo posix'_'remove | 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="-lposix  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5619 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char remove();

int main() {
remove()
; return 0; }
EOF
if { (eval echo configure:5633: \"$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
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
else
  echo "$ac_t""no" 1>&6
fi

    fi

    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
    echo $ac_n "checking for shmat""... $ac_c" 1>&6
echo "configure:5657: checking for shmat" >&5
if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5662 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char shmat(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char shmat();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_shmat) || defined (__stub___shmat)
choke me
#else
shmat();
#endif

; return 0; }
EOF
if { (eval echo configure:5688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_shmat=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_shmat=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
fi

    if test $ac_cv_func_shmat = no; then
      echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
echo "configure:5709: checking for shmat in -lipc" >&5
ac_lib_var=`echo ipc'_'shmat | 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="-lipc  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5717 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char shmat();

int main() {
shmat()
; return 0; }
EOF
if { (eval echo configure:5731: \"$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
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
else
  echo "$ac_t""no" 1>&6
fi

    fi
  fi

  # Check for libraries that X11R6 Xt/Xaw programs need.
  ac_save_LDFLAGS="$LDFLAGS"
  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  # check for ICE first), but we must link in the order -lSM -lICE or
  # we get undefined symbols.  So assume we have SM if we have ICE.
  # These have to be linked with before -lX11, unlike the other
  # libraries we check for below, so use a different variable.
  #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
  echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
echo "configure:5764: checking for IceConnectionNumber in -lICE" >&5
ac_lib_var=`echo ICE'_'IceConnectionNumber | 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="-lICE $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5772 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char IceConnectionNumber();

int main() {
IceConnectionNumber()
; return 0; }
EOF
if { (eval echo configure:5786: \"$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
  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
else
  echo "$ac_t""no" 1>&6
fi

  LDFLAGS="$ac_save_LDFLAGS"

fi



HAVE_X11=$have_x


echo $ac_n "checking for open in -lsocket""... $ac_c" 1>&6
echo "configure:5816: checking for open in -lsocket" >&5
ac_lib_var=`echo socket'_'open | 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
#line 5824 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char open();

int main() {
open()
; return 0; }
EOF
if { (eval echo configure:5838: \"$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
#define $ac_tr_lib 1
EOF

  LIBS="-lsocket $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

echo $ac_n "checking for open in -lbsd""... $ac_c" 1>&6
echo "configure:5866: checking for open in -lbsd" >&5
ac_lib_var=`echo bsd'_'open | 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="-lbsd  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5874 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char open();

int main() {
open()
; return 0; }
EOF
if { (eval echo configure:5888: \"$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 bsd | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lbsd $LIBS"

else
  echo "$ac_t""no" 1>&6
fi


echo $ac_n "checking for open in -lelf""... $ac_c" 1>&6
echo "configure:5917: checking for open in -lelf" >&5
ac_lib_var=`echo elf'_'open | 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="-lelf  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5925 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char open();

int main() {
open()
; return 0; }
EOF
if { (eval echo configure:5939: \"$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 elf | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lelf $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

echo $ac_n "checking for open in -ldl""... $ac_c" 1>&6
echo "configure:5967: checking for open in -ldl" >&5
ac_lib_var=`echo dl'_'open | 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="-ldl  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5975 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char open();

int main() {
open()
; return 0; }
EOF
if { (eval echo configure:5989: \"$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 dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-ldl $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

echo $ac_n "checking for open in -ldld""... $ac_c" 1>&6
echo "configure:6017: checking for open in -ldld" >&5
ac_lib_var=`echo dld'_'open | 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="-ldld  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6025 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char open();

int main() {
open()
; return 0; }
EOF
if { (eval echo configure:6039: \"$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 dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-ldld $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

echo $ac_n "checking for open in -lld""... $ac_c" 1>&6
echo "configure:6067: checking for open in -lld" >&5
ac_lib_var=`echo ld'_'open | 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="-lld  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6075 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char open();

int main() {
open()
; return 0; }
EOF
if { (eval echo configure:6089: \"$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 ld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lld $LIBS"

else
  echo "$ac_t""no" 1>&6
fi


if test "x$OSTYPE" = "xwindows" ; then
	echo $ac_n "checking for open in -lwsock32""... $ac_c" 1>&6
echo "configure:6119: checking for open in -lwsock32" >&5
ac_lib_var=`echo wsock32'_'open | 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="-lwsock32  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6127 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char open();

int main() {
open()
; return 0; }
EOF
if { (eval echo configure:6141: \"$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 wsock32 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lwsock32 $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

fi

# for wide char functions ...
# AC_CHECK_LIB(w, open)

# must do this after -lsocket check, because -lcrypto needs it
echo $ac_n "checking for open in -lcrypto""... $ac_c" 1>&6
echo "configure:6175: checking for open in -lcrypto" >&5
ac_lib_var=`echo crypto'_'open | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lcrypto  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6183 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char open();

int main() {
open()
; return 0; }
EOF
if { (eval echo configure:6197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_lib=HAVE_LIB`echo crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lcrypto $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

echo $ac_n "checking for open in -lssl""... $ac_c" 1>&6
echo "configure:6225: checking for open in -lssl" >&5
ac_lib_var=`echo ssl'_'open | 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="-lssl  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6233 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char open();

int main() {
open()
; return 0; }
EOF
if { (eval echo configure:6247: \"$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 ssl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lssl $LIBS"

else
  echo "$ac_t""no" 1>&6
fi


# Postgresql Audit Storage

HAVE_PGSQL=no
if test X"$PGSQLDIR" != X; then
  echo $ac_n "checking for open in -lpq""... $ac_c" 1>&6
echo "configure:6280: checking for open in -lpq" >&5
ac_lib_var=`echo pq'_'open | 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="-lpq  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6288 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char open();

int main() {
open()
; return 0; }
EOF
if { (eval echo configure:6302: \"$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 pq | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lpq $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

  if test X"$ac_cv_lib_pq_open" = Xyes;
  then
    HAVE_PGSQL=yes
    cat >> confdefs.h <<\EOF
#define HAVE_PGSQL 1
EOF

  fi   
fi 


if test `uname` = FreeBSD; then
  LIBS="-lcompat $LIBS"
fi


BASE_LIBS="$LIBS $SHLIBS"

# AC_CHECK_LIB(fl, open)
if test X"$use_cd" != Xyes; then
  # ncurses
  echo $ac_n "checking for open in -lncurses""... $ac_c" 1>&6
echo "configure:6351: checking for open in -lncurses" >&5
ac_lib_var=`echo ncurses'_'open | 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="-lncurses  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6359 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char open();

int main() {
open()
; return 0; }
EOF
if { (eval echo configure:6373: \"$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 ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lncurses $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

  if test X"$ac_cv_lib_ncurses_open" = Xno; then
    # curses+termcap
    echo $ac_n "checking for open in -ltermcap""... $ac_c" 1>&6
echo "configure:6403: checking for open in -ltermcap" >&5
ac_lib_var=`echo termcap'_'open | 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="-ltermcap  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6411 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char open();

int main() {
open()
; return 0; }
EOF
if { (eval echo configure:6425: \"$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 termcap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-ltermcap $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

    # -lcurses has a broken select(2) on HP-UX
    echo $ac_n "checking for open in -lHcurses""... $ac_c" 1>&6
echo "configure:6454: checking for open in -lHcurses" >&5
ac_lib_var=`echo Hcurses'_'open | 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="-lHcurses  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6462 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char open();

int main() {
open()
; return 0; }
EOF
if { (eval echo configure:6476: \"$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 Hcurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lHcurses $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

    if test X"$ac_cv_lib_Hcurses_open" = Xno; then
      echo $ac_n "checking for open in -lcurses""... $ac_c" 1>&6
echo "configure:6505: checking for open in -lcurses" >&5
ac_lib_var=`echo curses'_'open | 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="-lcurses  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6513 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char open();

int main() {
open()
; return 0; }
EOF
if { (eval echo configure:6527: \"$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 curses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lcurses $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

    fi
  fi
  echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
echo "configure:6557: checking for readline in -lreadline" >&5
ac_lib_var=`echo readline'_'readline | 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="-lreadline  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 6565 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char readline();

int main() {
readline()
; return 0; }
EOF
if { (eval echo configure:6579: \"$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 readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lreadline $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

fi

# causes trouble with HP aCC according to <kersting.andy.a@tci.com>
# if test X"$use_mini_stl" = Xno; then
#   AC_CHECK_LIB(stdc++, open)
# fi
if test X"$use_mini_stl" != Xno; then
  cat >> confdefs.h <<\EOF
#define HAVE_MINI_STL 1
EOF

fi;


CURSES_LIBS="$LIBS $SHLIBS"

#
# Checks for header files.
#

echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:6627: 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
#line 6632 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6640: \"$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 6657 "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 6675 "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 6696 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#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:6710: \"$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 fcntl.h unistd.h sys/select.h strings.h float.h ieeefp.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6737: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 6742 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

for ac_hdr in sys/un.h netinet/in.h arpa/inet.h netdb.h dlfcn.h dl.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6777: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 6782 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

for ac_hdr in netinet/tcp.h stdlib.h sys/time.h sunmath.h sys/stat.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6817: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 6822 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

for ac_hdr in poll.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6857: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 6862 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


for ac_hdr in exception exception.h terminate.h openssl/ssl.h pgsql/libpq-fe.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6898: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 6903 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


# QT
for ac_hdr in qapplication.h qsocketnotifier.h qlineedit.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6940: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 6945 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


# Cygwin32
for ac_hdr in byteorder.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6982: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 6987 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


# Ansi C++
have_ansi_cplusplus_headers=yes
for ac_hdr in iostream map string sstream
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:7025: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 7030 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
have_ansi_cplusplus_headers=no
fi
done

echo $ac_n "checking for Ansi C++ headers""... $ac_c" 1>&6
echo "configure:7063: checking for Ansi C++ headers" >&5
if test "x$have_ansi_cplusplus_headers" = "xyes" ; then
	cat >> confdefs.h <<\EOF
#define HAVE_ANSI_CPLUSPLUS_HEADERS 1
EOF

fi
echo "$ac_t""$have_ansi_cplusplus_headers" 1>&6

# GNU C++ demangling support
for ac_hdr in cxxabi.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:7077: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 7082 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:7087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

for ac_func in __cxa_demangle
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7116: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 7121 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:7147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


#
# Checks for typedefs, structures, and compiler characteristics.
#

echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
echo "configure:7177: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 7182 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
int main() {
struct tm *tp;
; return 0; }
EOF
if { (eval echo configure:7191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_header_time=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_time=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_header_time" 1>&6
if test $ac_cv_header_time = yes; then
  cat >> confdefs.h <<\EOF
#define TIME_WITH_SYS_TIME 1
EOF

fi

echo $ac_n "checking for the third argument of getsockname""... $ac_c" 1>&6
echo "configure:7212: checking for the third argument of getsockname" >&5
if eval "test \"`echo '$''{'ac_cv_socket_size_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 7217 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/socket.h>
int main() {
socklen_t a=0; getsockname(0,0, &a);
; return 0; }
EOF
if { (eval echo configure:7226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_socket_socklen_t=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_socket_socklen_t=no"
fi
rm -f conftest*
ac_cv_tmp_old_cxxflags="$CXXFLAGS"
if test X"$GXX" = Xyes; then
  CXXFLAGS="-Werror $CXXFLAGS"
fi
cat > conftest.$ac_ext <<EOF
#line 7241 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/socket.h>
int main() {
int a=0; getsockname(0,0, &a);
; return 0; }
EOF
if { (eval echo configure:7250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_socket_size_t_int=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_socket_size_t_int=no"
fi
rm -f conftest*
CXXFLAGS=$ac_cv_tmp_old_cxxflags
if test X"$ac_cv_socket_socklen_t" = X"yes"; then
  ac_cv_socket_size_t=socklen_t
elif test X"$ac_cv_socket_size_t_int" = X"yes"; then
  ac_cv_socket_size_t=int
else
  ac_cv_socket_size_t=size_t
fi
fi

echo "$ac_t""$ac_cv_socket_size_t" 1>&6
case $ac_cv_socket_size_t in
socklen_t)
  cat >> confdefs.h <<\EOF
#define socket_size_t socklen_t
EOF

  ;;
int)
  cat >> confdefs.h <<\EOF
#define socket_size_t int
EOF

  ;;
size_t)
  cat >> confdefs.h <<\EOF
#define socket_size_t size_t
EOF

  ;;
esac

echo $ac_n "checking for the second argument of getsockname""... $ac_c" 1>&6
echo "configure:7293: checking for the second argument of getsockname" >&5
if eval "test \"`echo '$''{'ac_cv_socket_addr_caddr_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_cv_tmp_old_cxxflags="$CXXFLAGS"
if test X"$GXX" = Xyes; then
  CXXFLAGS="-Werror $CXXFLAGS"
fi
cat > conftest.$ac_ext <<EOF
#line 7302 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/socket.h>
int main() {
getsockname(0,(caddr_t)0, 0);
; return 0; }
EOF
if { (eval echo configure:7311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_socket_addr_caddr_t=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_socket_addr_caddr_t=no"
fi
rm -f conftest*
CXXFLAGS=$ac_cv_tmp_old_cxxflags
fi

if test "$ac_cv_socket_addr_caddr_t" = "yes"; then
  echo "$ac_t""caddr_t" 1>&6
  cat >> confdefs.h <<\EOF
#define socket_addr_t caddr_t
EOF

else
  echo "$ac_t""struct sockaddr *" 1>&6
  cat >> confdefs.h <<\EOF
#define socket_addr_t struct sockaddr *
EOF

fi

echo $ac_n "checking for select argument type""... $ac_c" 1>&6
echo "configure:7339: checking for select argument type" >&5
if eval "test \"`echo '$''{'ac_cv_select_int'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_cv_tmp_old_cxxflags="$CXXFLAGS"
if test X"$GXX" = Xyes; then
  CXXFLAGS="-Werror $CXXFLAGS"
fi
cat > conftest.$ac_ext <<EOF
#line 7348 "configure"
#include "confdefs.h"

#include <sys/types.h>
#include <sys/time.h>
#include <sys/socket.h>
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
int main() {
select(0, (int *)0, (int *)0, (int *)0, 0);
; return 0; }
EOF
if { (eval echo configure:7361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_select_int=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_select_int=no"
fi
rm -f conftest*
CXXFLAGS=$ac_cv_tmp_old_cxxflags
fi

if test "$ac_cv_select_int" = "yes"; then
  echo "$ac_t""int *" 1>&6
  cat >> confdefs.h <<\EOF
#define select_addr_t int *
EOF

else
  echo "$ac_t""fd_set *" 1>&6
  cat >> confdefs.h <<\EOF
#define select_addr_t fd_set *
EOF

fi

echo $ac_n "checking whether gettimeofday has two args""... $ac_c" 1>&6
echo "configure:7389: checking whether gettimeofday has two args" >&5
if eval "test \"`echo '$''{'ac_cv_gtod_twoargs'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_cv_tmp_old_cxxflags="$CXXFLAGS"
if test X"$GXX" = Xyes; then
  CXXFLAGS="-Werror $CXXFLAGS"
fi
cat > conftest.$ac_ext <<EOF
#line 7398 "configure"
#include "confdefs.h"

#include <sys/time.h>
#include <unistd.h>
int main() {
gettimeofday (0);
; return 0; }
EOF
if { (eval echo configure:7407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_gtod_twoargs=no"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_gtod_twoargs=yes"
fi
rm -f conftest*
CXXFLAGS=$ac_cv_tmp_old_cxxflags
fi

if test "$ac_cv_gtod_twoargs" = "yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_GETTIMEOFDAY_TWOARGS 1
EOF

else
  echo "$ac_t""no" 1>&6
fi


echo $ac_n "checking for scanf(\"%Lf\")""... $ac_c" 1>&6
echo "configure:7432: checking for scanf(\"%Lf\")" >&5

if test "$cross_compiling" = yes; then
  LFSCANF=cross
else
  cat > conftest.$ac_ext <<EOF
#line 7438 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif

#include <stdio.h>
#include <string.h>
int main ()
{
  long double d = 0.0L;
  sscanf ("1.125", "%Lf", &d);
  return !(d == 1.125L);
}
EOF
if { (eval echo configure:7453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  LFSCANF=ok
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  LFSCANF=broken
fi
rm -fr conftest*
fi



case $LFSCANF in
ok)
    echo "$ac_t""ok" 1>&6
    cat >> confdefs.h <<\EOF
#define HAVE_SCANF_LF 1
EOF

    ;;
cross)
    echo "$ac_t""cross-compiling, assuming ok" 1>&6
    cat >> confdefs.h <<\EOF
#define HAVE_SCANF_LF 1
EOF

    ;;
*|broken)
    echo "$ac_t""broken" 1>&6
    ;;
esac


echo $ac_n "checking for printf(\"%Lf\")""... $ac_c" 1>&6
echo "configure:7489: checking for printf(\"%Lf\")" >&5

if test "$cross_compiling" = yes; then
  LFPRINTF=cross
else
  cat > conftest.$ac_ext <<EOF
#line 7495 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif

#include <stdio.h>
#include <string.h>
int main ()
{
  long double d = 1.125;
  char buf[10];
  sprintf (buf, "%.3Lf", d);
  return strcmp (buf, "1.125");
}
EOF
if { (eval echo configure:7511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  LFPRINTF=ok
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  LFPRINTF=broken
fi
rm -fr conftest*
fi



case $LFPRINTF in
ok)
    echo "$ac_t""ok" 1>&6
    cat >> confdefs.h <<\EOF
#define HAVE_PRINTF_LF 1
EOF

    ;;
cross)
    echo "$ac_t""cross-compiling, assuming ok" 1>&6
    cat >> confdefs.h <<\EOF
#define HAVE_PRINTF_LF 1
EOF

    ;;
*|broken)
    echo "$ac_t""broken" 1>&6
    ;;
esac

#
# Checks for library functions.
#

# It seems that AC_FUNC_VPRINTF doesn't like AC_LANG_CPLUSPLUS
# kcg: not only vprinf doesn't like C++, but also other functions like
# asinl and others. The problem is observed on Solaris/GCC platform
# where GCC's libstdc++ expose some of these symbols publicly
# (probably by mistake) and hence configure is confused and declare
# those functions as available. The solution is to switch to C to
# avoid linking with libstdc++ for checking of these
# functions. Finally I decided to switch to C++ again right after
# whole this function checking block.
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_n "checking for vprintf""... $ac_c" 1>&6
echo "configure:7566: checking for vprintf" >&5
if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 7571 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char vprintf(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char vprintf();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_vprintf) || defined (__stub___vprintf)
choke me
#else
vprintf();
#endif

; return 0; }
EOF
if { (eval echo configure:7594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_vprintf=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_vprintf=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_VPRINTF 1
EOF

else
  echo "$ac_t""no" 1>&6
fi

if test "$ac_cv_func_vprintf" != yes; then
echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
echo "configure:7618: checking for _doprnt" >&5
if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 7623 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char _doprnt(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char _doprnt();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub__doprnt) || defined (__stub____doprnt)
choke me
#else
_doprnt();
#endif

; return 0; }
EOF
if { (eval echo configure:7646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func__doprnt=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func__doprnt=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_DOPRNT 1
EOF

else
  echo "$ac_t""no" 1>&6
fi

fi

for ac_func in strdup strerror gethostname infnan isnan isinf finite
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7673: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 7678 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:7701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

for ac_func in infnanl isnanl isinfl asinl ldexpl frexpl fabsl floorl ceill
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7728: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 7733 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:7756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

for ac_func in powl fmodl dlopen shl_load ftime
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7783: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 7788 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:7811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

for ac_func in backtrace backtrace_symbols
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:7838: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 7843 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
if { (eval echo configure:7866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross


#
# size of datatypes
#

if test X"$host" != X"$target"; then
  case $target in
  *arm*linux*)
      echo $ac_n "checking size of unsigned char""... $ac_c" 1>&6
echo "configure:7906: checking size of unsigned char" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_char'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_unsigned_char=1
else
  cat > conftest.$ac_ext <<EOF
#line 7914 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned char));
  exit(0);
}
EOF
if { (eval echo configure:7928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_char=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_char=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_char" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_CHAR $ac_cv_sizeof_unsigned_char
EOF


      echo $ac_n "checking size of int""... $ac_c" 1>&6
echo "configure:7948: checking size of int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_int=4
else
  cat > conftest.$ac_ext <<EOF
#line 7956 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(int));
  exit(0);
}
EOF
if { (eval echo configure:7970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_int=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_int=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_int" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_INT $ac_cv_sizeof_int
EOF


      echo $ac_n "checking size of unsigned int""... $ac_c" 1>&6
echo "configure:7990: checking size of unsigned int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_int'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_unsigned_int=4
else
  cat > conftest.$ac_ext <<EOF
#line 7998 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned int));
  exit(0);
}
EOF
if { (eval echo configure:8012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_int=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_int=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_int" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int
EOF


      echo $ac_n "checking size of long""... $ac_c" 1>&6
echo "configure:8032: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_long=4
else
  cat > conftest.$ac_ext <<EOF
#line 8040 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(long));
  exit(0);
}
EOF
if { (eval echo configure:8054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_long=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_long=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_LONG $ac_cv_sizeof_long
EOF


      echo $ac_n "checking size of unsigned long""... $ac_c" 1>&6
echo "configure:8074: checking size of unsigned long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_unsigned_long=4
else
  cat > conftest.$ac_ext <<EOF
#line 8082 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned long));
  exit(0);
}
EOF
if { (eval echo configure:8096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_long=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_long=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
EOF


      echo $ac_n "checking size of long long""... $ac_c" 1>&6
echo "configure:8116: checking size of long long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_long_long=8
else
  cat > conftest.$ac_ext <<EOF
#line 8124 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(long long));
  exit(0);
}
EOF
if { (eval echo configure:8138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_long_long=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_long_long=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
EOF


      echo $ac_n "checking size of unsigned long long""... $ac_c" 1>&6
echo "configure:8158: checking size of unsigned long long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_unsigned_long_long=8
else
  cat > conftest.$ac_ext <<EOF
#line 8166 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned long long));
  exit(0);
}
EOF
if { (eval echo configure:8180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_long_long=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_long_long=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_long_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
EOF


      echo $ac_n "checking size of short""... $ac_c" 1>&6
echo "configure:8200: checking size of short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_short=2
else
  cat > conftest.$ac_ext <<EOF
#line 8208 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(short));
  exit(0);
}
EOF
if { (eval echo configure:8222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_short=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_short=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_short" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_SHORT $ac_cv_sizeof_short
EOF


      echo $ac_n "checking size of unsigned short""... $ac_c" 1>&6
echo "configure:8242: checking size of unsigned short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_short'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_unsigned_short=2
else
  cat > conftest.$ac_ext <<EOF
#line 8250 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned short));
  exit(0);
}
EOF
if { (eval echo configure:8264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_short=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_short=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_short" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_SHORT $ac_cv_sizeof_unsigned_short
EOF


      echo $ac_n "checking size of float""... $ac_c" 1>&6
echo "configure:8284: checking size of float" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_float=4
else
  cat > conftest.$ac_ext <<EOF
#line 8292 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(float));
  exit(0);
}
EOF
if { (eval echo configure:8306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_float=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_float=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_float" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_FLOAT $ac_cv_sizeof_float
EOF


      echo $ac_n "checking size of double""... $ac_c" 1>&6
echo "configure:8326: checking size of double" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_double=8
else
  cat > conftest.$ac_ext <<EOF
#line 8334 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(double));
  exit(0);
}
EOF
if { (eval echo configure:8348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_double=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_double=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_double" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_DOUBLE $ac_cv_sizeof_double
EOF


      echo $ac_n "checking size of long double""... $ac_c" 1>&6
echo "configure:8368: checking size of long double" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_long_double=8
else
  cat > conftest.$ac_ext <<EOF
#line 8376 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(long double));
  exit(0);
}
EOF
if { (eval echo configure:8390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_long_double=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_long_double=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_long_double" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
EOF


      ;;
  *cris*linux*)
      echo $ac_n "checking size of unsigned char""... $ac_c" 1>&6
echo "configure:8412: checking size of unsigned char" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_char'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_unsigned_char=1
else
  cat > conftest.$ac_ext <<EOF
#line 8420 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned char));
  exit(0);
}
EOF
if { (eval echo configure:8434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_char=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_char=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_char" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_CHAR $ac_cv_sizeof_unsigned_char
EOF


      echo $ac_n "checking size of int""... $ac_c" 1>&6
echo "configure:8454: checking size of int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_int=4
else
  cat > conftest.$ac_ext <<EOF
#line 8462 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(int));
  exit(0);
}
EOF
if { (eval echo configure:8476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_int=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_int=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_int" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_INT $ac_cv_sizeof_int
EOF


      echo $ac_n "checking size of unsigned int""... $ac_c" 1>&6
echo "configure:8496: checking size of unsigned int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_int'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_unsigned_int=4
else
  cat > conftest.$ac_ext <<EOF
#line 8504 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned int));
  exit(0);
}
EOF
if { (eval echo configure:8518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_int=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_int=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_int" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int
EOF


      echo $ac_n "checking size of long""... $ac_c" 1>&6
echo "configure:8538: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_long=4
else
  cat > conftest.$ac_ext <<EOF
#line 8546 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(long));
  exit(0);
}
EOF
if { (eval echo configure:8560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_long=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_long=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_LONG $ac_cv_sizeof_long
EOF


      echo $ac_n "checking size of unsigned long""... $ac_c" 1>&6
echo "configure:8580: checking size of unsigned long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_unsigned_long=4
else
  cat > conftest.$ac_ext <<EOF
#line 8588 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned long));
  exit(0);
}
EOF
if { (eval echo configure:8602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_long=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_long=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
EOF


      echo $ac_n "checking size of long long""... $ac_c" 1>&6
echo "configure:8622: checking size of long long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_long_long=8
else
  cat > conftest.$ac_ext <<EOF
#line 8630 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(long long));
  exit(0);
}
EOF
if { (eval echo configure:8644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_long_long=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_long_long=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
EOF


      echo $ac_n "checking size of unsigned long long""... $ac_c" 1>&6
echo "configure:8664: checking size of unsigned long long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_unsigned_long_long=8
else
  cat > conftest.$ac_ext <<EOF
#line 8672 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned long long));
  exit(0);
}
EOF
if { (eval echo configure:8686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_long_long=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_long_long=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_long_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
EOF


      echo $ac_n "checking size of short""... $ac_c" 1>&6
echo "configure:8706: checking size of short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_short=2
else
  cat > conftest.$ac_ext <<EOF
#line 8714 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(short));
  exit(0);
}
EOF
if { (eval echo configure:8728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_short=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_short=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_short" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_SHORT $ac_cv_sizeof_short
EOF


      echo $ac_n "checking size of unsigned short""... $ac_c" 1>&6
echo "configure:8748: checking size of unsigned short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_short'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_unsigned_short=2
else
  cat > conftest.$ac_ext <<EOF
#line 8756 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned short));
  exit(0);
}
EOF
if { (eval echo configure:8770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_short=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_short=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_short" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_SHORT $ac_cv_sizeof_unsigned_short
EOF


      echo $ac_n "checking size of float""... $ac_c" 1>&6
echo "configure:8790: checking size of float" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_float=4
else
  cat > conftest.$ac_ext <<EOF
#line 8798 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(float));
  exit(0);
}
EOF
if { (eval echo configure:8812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_float=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_float=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_float" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_FLOAT $ac_cv_sizeof_float
EOF


      echo $ac_n "checking size of double""... $ac_c" 1>&6
echo "configure:8832: checking size of double" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_double=8
else
  cat > conftest.$ac_ext <<EOF
#line 8840 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(double));
  exit(0);
}
EOF
if { (eval echo configure:8854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_double=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_double=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_double" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_DOUBLE $ac_cv_sizeof_double
EOF


      echo $ac_n "checking size of long double""... $ac_c" 1>&6
echo "configure:8874: checking size of long double" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_long_double=8
else
  cat > conftest.$ac_ext <<EOF
#line 8882 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(long double));
  exit(0);
}
EOF
if { (eval echo configure:8896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_long_double=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_long_double=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_long_double" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
EOF


      ;;
  *mips*linux*)
      echo $ac_n "checking size of unsigned char""... $ac_c" 1>&6
echo "configure:8918: checking size of unsigned char" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_char'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_unsigned_char=1
else
  cat > conftest.$ac_ext <<EOF
#line 8926 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned char));
  exit(0);
}
EOF
if { (eval echo configure:8940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_char=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_char=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_char" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_CHAR $ac_cv_sizeof_unsigned_char
EOF


      echo $ac_n "checking size of int""... $ac_c" 1>&6
echo "configure:8960: checking size of int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_int=4
else
  cat > conftest.$ac_ext <<EOF
#line 8968 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(int));
  exit(0);
}
EOF
if { (eval echo configure:8982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_int=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_int=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_int" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_INT $ac_cv_sizeof_int
EOF


      echo $ac_n "checking size of unsigned int""... $ac_c" 1>&6
echo "configure:9002: checking size of unsigned int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_int'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_unsigned_int=4
else
  cat > conftest.$ac_ext <<EOF
#line 9010 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned int));
  exit(0);
}
EOF
if { (eval echo configure:9024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_int=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_int=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_int" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int
EOF


      echo $ac_n "checking size of long""... $ac_c" 1>&6
echo "configure:9044: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_long=4
else
  cat > conftest.$ac_ext <<EOF
#line 9052 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(long));
  exit(0);
}
EOF
if { (eval echo configure:9066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_long=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_long=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_LONG $ac_cv_sizeof_long
EOF


      echo $ac_n "checking size of unsigned long""... $ac_c" 1>&6
echo "configure:9086: checking size of unsigned long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_unsigned_long=4
else
  cat > conftest.$ac_ext <<EOF
#line 9094 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned long));
  exit(0);
}
EOF
if { (eval echo configure:9108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_long=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_long=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
EOF


      echo $ac_n "checking size of long long""... $ac_c" 1>&6
echo "configure:9128: checking size of long long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_long_long=8
else
  cat > conftest.$ac_ext <<EOF
#line 9136 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(long long));
  exit(0);
}
EOF
if { (eval echo configure:9150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_long_long=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_long_long=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
EOF


      echo $ac_n "checking size of unsigned long long""... $ac_c" 1>&6
echo "configure:9170: checking size of unsigned long long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_unsigned_long_long=8
else
  cat > conftest.$ac_ext <<EOF
#line 9178 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned long long));
  exit(0);
}
EOF
if { (eval echo configure:9192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_long_long=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_long_long=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_long_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
EOF


      echo $ac_n "checking size of short""... $ac_c" 1>&6
echo "configure:9212: checking size of short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_short=2
else
  cat > conftest.$ac_ext <<EOF
#line 9220 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(short));
  exit(0);
}
EOF
if { (eval echo configure:9234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_short=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_short=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_short" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_SHORT $ac_cv_sizeof_short
EOF


      echo $ac_n "checking size of unsigned short""... $ac_c" 1>&6
echo "configure:9254: checking size of unsigned short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_short'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_unsigned_short=2
else
  cat > conftest.$ac_ext <<EOF
#line 9262 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned short));
  exit(0);
}
EOF
if { (eval echo configure:9276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_short=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_short=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_short" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_SHORT $ac_cv_sizeof_unsigned_short
EOF


      echo $ac_n "checking size of float""... $ac_c" 1>&6
echo "configure:9296: checking size of float" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_float=4
else
  cat > conftest.$ac_ext <<EOF
#line 9304 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(float));
  exit(0);
}
EOF
if { (eval echo configure:9318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_float=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_float=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_float" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_FLOAT $ac_cv_sizeof_float
EOF


      echo $ac_n "checking size of double""... $ac_c" 1>&6
echo "configure:9338: checking size of double" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_double=8
else
  cat > conftest.$ac_ext <<EOF
#line 9346 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(double));
  exit(0);
}
EOF
if { (eval echo configure:9360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_double=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_double=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_double" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_DOUBLE $ac_cv_sizeof_double
EOF


      echo $ac_n "checking size of long double""... $ac_c" 1>&6
echo "configure:9380: checking size of long double" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_long_double=8
else
  cat > conftest.$ac_ext <<EOF
#line 9388 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(long double));
  exit(0);
}
EOF
if { (eval echo configure:9402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_long_double=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_long_double=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_long_double" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
EOF


      ;;
  *powerpc*linux*)
      echo $ac_n "checking size of unsigned char""... $ac_c" 1>&6
echo "configure:9424: checking size of unsigned char" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_char'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_unsigned_char=1
else
  cat > conftest.$ac_ext <<EOF
#line 9432 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned char));
  exit(0);
}
EOF
if { (eval echo configure:9446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_char=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_char=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_char" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_CHAR $ac_cv_sizeof_unsigned_char
EOF


      echo $ac_n "checking size of int""... $ac_c" 1>&6
echo "configure:9466: checking size of int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_int=4
else
  cat > conftest.$ac_ext <<EOF
#line 9474 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(int));
  exit(0);
}
EOF
if { (eval echo configure:9488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_int=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_int=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_int" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_INT $ac_cv_sizeof_int
EOF


      echo $ac_n "checking size of unsigned int""... $ac_c" 1>&6
echo "configure:9508: checking size of unsigned int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_int'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_unsigned_int=4
else
  cat > conftest.$ac_ext <<EOF
#line 9516 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned int));
  exit(0);
}
EOF
if { (eval echo configure:9530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_int=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_int=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_int" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int
EOF


      echo $ac_n "checking size of long""... $ac_c" 1>&6
echo "configure:9550: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_long=4
else
  cat > conftest.$ac_ext <<EOF
#line 9558 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(long));
  exit(0);
}
EOF
if { (eval echo configure:9572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_long=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_long=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_LONG $ac_cv_sizeof_long
EOF


      echo $ac_n "checking size of unsigned long""... $ac_c" 1>&6
echo "configure:9592: checking size of unsigned long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_unsigned_long=4
else
  cat > conftest.$ac_ext <<EOF
#line 9600 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned long));
  exit(0);
}
EOF
if { (eval echo configure:9614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_long=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_long=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
EOF


      echo $ac_n "checking size of long long""... $ac_c" 1>&6
echo "configure:9634: checking size of long long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_long_long=8
else
  cat > conftest.$ac_ext <<EOF
#line 9642 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(long long));
  exit(0);
}
EOF
if { (eval echo configure:9656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_long_long=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_long_long=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
EOF


      echo $ac_n "checking size of unsigned long long""... $ac_c" 1>&6
echo "configure:9676: checking size of unsigned long long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_unsigned_long_long=8
else
  cat > conftest.$ac_ext <<EOF
#line 9684 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned long long));
  exit(0);
}
EOF
if { (eval echo configure:9698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_long_long=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_long_long=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_long_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
EOF


      echo $ac_n "checking size of short""... $ac_c" 1>&6
echo "configure:9718: checking size of short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_short=2
else
  cat > conftest.$ac_ext <<EOF
#line 9726 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(short));
  exit(0);
}
EOF
if { (eval echo configure:9740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_short=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_short=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_short" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_SHORT $ac_cv_sizeof_short
EOF


      echo $ac_n "checking size of unsigned short""... $ac_c" 1>&6
echo "configure:9760: checking size of unsigned short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_short'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_unsigned_short=2
else
  cat > conftest.$ac_ext <<EOF
#line 9768 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned short));
  exit(0);
}
EOF
if { (eval echo configure:9782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_short=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_short=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_short" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_SHORT $ac_cv_sizeof_unsigned_short
EOF


      echo $ac_n "checking size of float""... $ac_c" 1>&6
echo "configure:9802: checking size of float" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_float=4
else
  cat > conftest.$ac_ext <<EOF
#line 9810 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(float));
  exit(0);
}
EOF
if { (eval echo configure:9824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_float=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_float=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_float" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_FLOAT $ac_cv_sizeof_float
EOF


      echo $ac_n "checking size of double""... $ac_c" 1>&6
echo "configure:9844: checking size of double" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_double=8
else
  cat > conftest.$ac_ext <<EOF
#line 9852 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(double));
  exit(0);
}
EOF
if { (eval echo configure:9866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_double=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_double=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_double" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_DOUBLE $ac_cv_sizeof_double
EOF


      echo $ac_n "checking size of long double""... $ac_c" 1>&6
echo "configure:9886: checking size of long double" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_long_double=8
else
  cat > conftest.$ac_ext <<EOF
#line 9894 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(long double));
  exit(0);
}
EOF
if { (eval echo configure:9908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_long_double=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_long_double=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_long_double" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
EOF


      ;;
  *)
      echo "ERROR:"
      echo "ERROR:"
      echo "ERROR: You are trying to configure MICO for cross-compiling"
      echo "ERROR: to the target which is not supported."
      echo "ERROR:"
      echo "ERROR:"
      exit 1
      ;;
  esac
else
  echo $ac_n "checking size of unsigned char""... $ac_c" 1>&6
echo "configure:9940: checking size of unsigned char" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_char'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_unsigned_char=1
else
  cat > conftest.$ac_ext <<EOF
#line 9948 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned char));
  exit(0);
}
EOF
if { (eval echo configure:9962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_char=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_char=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_char" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_CHAR $ac_cv_sizeof_unsigned_char
EOF


  echo $ac_n "checking size of int""... $ac_c" 1>&6
echo "configure:9982: checking size of int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_int=4
else
  cat > conftest.$ac_ext <<EOF
#line 9990 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(int));
  exit(0);
}
EOF
if { (eval echo configure:10004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_int=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_int=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_int" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_INT $ac_cv_sizeof_int
EOF


  echo $ac_n "checking size of unsigned int""... $ac_c" 1>&6
echo "configure:10024: checking size of unsigned int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_int'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_unsigned_int=4
else
  cat > conftest.$ac_ext <<EOF
#line 10032 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned int));
  exit(0);
}
EOF
if { (eval echo configure:10046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_int=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_int=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_int" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int
EOF


  echo $ac_n "checking size of long""... $ac_c" 1>&6
echo "configure:10066: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_long=4
else
  cat > conftest.$ac_ext <<EOF
#line 10074 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(long));
  exit(0);
}
EOF
if { (eval echo configure:10088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_long=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_long=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_LONG $ac_cv_sizeof_long
EOF


  echo $ac_n "checking size of unsigned long""... $ac_c" 1>&6
echo "configure:10108: checking size of unsigned long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_unsigned_long=4
else
  cat > conftest.$ac_ext <<EOF
#line 10116 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned long));
  exit(0);
}
EOF
if { (eval echo configure:10130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_long=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_long=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
EOF


  echo $ac_n "checking size of long long""... $ac_c" 1>&6
echo "configure:10150: checking size of long long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_long_long=8
else
  cat > conftest.$ac_ext <<EOF
#line 10158 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(long long));
  exit(0);
}
EOF
if { (eval echo configure:10172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_long_long=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_long_long=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
EOF


  echo $ac_n "checking size of unsigned long long""... $ac_c" 1>&6
echo "configure:10192: checking size of unsigned long long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_unsigned_long_long=8
else
  cat > conftest.$ac_ext <<EOF
#line 10200 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned long long));
  exit(0);
}
EOF
if { (eval echo configure:10214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_long_long=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_long_long=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_long_long" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
EOF


  echo $ac_n "checking size of short""... $ac_c" 1>&6
echo "configure:10234: checking size of short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_short=2
else
  cat > conftest.$ac_ext <<EOF
#line 10242 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(short));
  exit(0);
}
EOF
if { (eval echo configure:10256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_short=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_short=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_short" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_SHORT $ac_cv_sizeof_short
EOF


  echo $ac_n "checking size of unsigned short""... $ac_c" 1>&6
echo "configure:10276: checking size of unsigned short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_short'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_unsigned_short=2
else
  cat > conftest.$ac_ext <<EOF
#line 10284 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(unsigned short));
  exit(0);
}
EOF
if { (eval echo configure:10298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_unsigned_short=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_unsigned_short=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_unsigned_short" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_UNSIGNED_SHORT $ac_cv_sizeof_unsigned_short
EOF


  echo $ac_n "checking size of float""... $ac_c" 1>&6
echo "configure:10318: checking size of float" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_float=4
else
  cat > conftest.$ac_ext <<EOF
#line 10326 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(float));
  exit(0);
}
EOF
if { (eval echo configure:10340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_float=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_float=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_float" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_FLOAT $ac_cv_sizeof_float
EOF


  echo $ac_n "checking size of double""... $ac_c" 1>&6
echo "configure:10360: checking size of double" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_double=8
else
  cat > conftest.$ac_ext <<EOF
#line 10368 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(double));
  exit(0);
}
EOF
if { (eval echo configure:10382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_double=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_double=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_double" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_DOUBLE $ac_cv_sizeof_double
EOF


  echo $ac_n "checking size of long double""... $ac_c" 1>&6
echo "configure:10402: checking size of long double" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_long_double=12
else
  cat > conftest.$ac_ext <<EOF
#line 10410 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(long double));
  exit(0);
}
EOF
if { (eval echo configure:10424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_long_double=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_long_double=0
fi
rm -fr conftest*
fi

fi
echo "$ac_t""$ac_cv_sizeof_long_double" 1>&6
cat >> confdefs.h <<EOF
#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
EOF


fi

#
# byteorder
#

echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
echo "configure:10450: checking whether byte ordering is bigendian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
#line 10457 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
int main() {

#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
 bogus endian macros
#endif
; return 0; }
EOF
if { (eval echo configure:10468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  # It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
#line 10472 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
int main() {

#if BYTE_ORDER != BIG_ENDIAN
 not big endian
#endif
; return 0; }
EOF
if { (eval echo configure:10483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_c_bigendian=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_bigendian=no
fi
rm -f conftest*
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
if test $ac_cv_c_bigendian = unknown; then
if test "$cross_compiling" = yes; then
    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
  cat > conftest.$ac_ext <<EOF
#line 10503 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif
main () {
  /* Are we little or big endian?  From Harbison&Steele.  */
  union
  {
    long l;
    char c[sizeof (long)];
  } u;
  u.l = 1;
  exit (u.c[sizeof (long) - 1] == 1);
}
EOF
if { (eval echo configure:10519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_c_bigendian=no
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_c_bigendian=yes
fi
rm -fr conftest*
fi

fi
fi

echo "$ac_t""$ac_cv_c_bigendian" 1>&6
if test $ac_cv_c_bigendian = yes; then
  cat >> confdefs.h <<\EOF
#define WORDS_BIGENDIAN 1
EOF

fi


case $ac_cv_c_bigendian in
yes)
  cat >> confdefs.h <<\EOF
#define HAVE_BYTEORDER_BE 1
EOF

  ;;
no)
  cat >> confdefs.h <<\EOF
#define HAVE_BYTEORDER_LE 1
EOF

  ;;
unknown|*)
  cat >> confdefs.h <<\EOF
#define HAVE_BYTEORDER_BE 1
EOF

  ;;
esac


#
# floating point characteristics
#

echo $ac_n "checking for floating point type""... $ac_c" 1>&6
echo "configure:10570: checking for floating point type" >&5
if test "$cross_compiling" = yes; then
  IEEEFP=cross
else
  cat > conftest.$ac_ext <<EOF
#line 10575 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif

int main ()
{
  float f;

  f = 0;
  if (*(int *)&f != 0)
    return 1;

  f = 1000.5;
  if (*(unsigned int *)&f != 0x447a2000)
    return 1;

  f = -1000.5;
  if (*(unsigned int *)&f != 0xc47a2000)
    return 1;

  return 0;
}
EOF
if { (eval echo configure:10600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  IEEEFP=ok
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  IEEEFP=broken
fi
rm -fr conftest*
fi



case $IEEEFP in
ok)
    echo "$ac_t""IEEE" 1>&6
    cat >> confdefs.h <<\EOF
#define HAVE_IEEE_FP 1
EOF

    ;;
cross)
    echo "$ac_t""cross-compiling, assuming IEEE" 1>&6
    cat >> confdefs.h <<\EOF
#define HAVE_IEEE_FP 1
EOF

    ;;
*|broken)
    echo "$ac_t""non IEEE" 1>&6
    ;;
esac


#
# prototypes
#

echo $ac_n "checking for gethostname prototype""... $ac_c" 1>&6
echo "configure:10640: checking for gethostname prototype" >&5
gethostname_pt=no
cat > conftest.$ac_ext <<EOF
#line 10643 "configure"
#include "confdefs.h"
#include <unistd.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "gethostname" >/dev/null 2>&1; then
  rm -rf conftest*
  gethostname_pt=yes
fi
rm -f conftest*

cat > conftest.$ac_ext <<EOF
#line 10655 "configure"
#include "confdefs.h"
#include <sys/socket.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "gethostname" >/dev/null 2>&1; then
  rm -rf conftest*
  gethostname_pt=yes
fi
rm -f conftest*

cat > conftest.$ac_ext <<EOF
#line 10667 "configure"
#include "confdefs.h"
#include <winsock.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "gethostname" >/dev/null 2>&1; then
  rm -rf conftest*
  gethostname_pt=yes
fi
rm -f conftest*

if test $gethostname_pt = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_GETHOSTNAME_PROTO 1
EOF

fi
echo "$ac_t""$gethostname_pt" 1>&6


echo $ac_n "checking for finite prototype""... $ac_c" 1>&6
echo "configure:10688: checking for finite prototype" >&5
finite_pt=no
cat > conftest.$ac_ext <<EOF
#line 10691 "configure"
#include "confdefs.h"
#include <math.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "finite" >/dev/null 2>&1; then
  rm -rf conftest*
  finite_pt=yes
fi
rm -f conftest*

if test $finite_pt = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_FINITE_PROTO 1
EOF

fi
echo "$ac_t""$finite_pt" 1>&6


echo $ac_n "checking for strerror prototype""... $ac_c" 1>&6
echo "configure:10712: checking for strerror prototype" >&5
strerror_pt=no
cat > conftest.$ac_ext <<EOF
#line 10715 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "strerror" >/dev/null 2>&1; then
  rm -rf conftest*
  strerror_pt=yes
fi
rm -f conftest*

if test $strerror_pt = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_STRERROR_PROTO 1
EOF

fi
echo "$ac_t""$strerror_pt" 1>&6


echo $ac_n "checking for ftime prototype""... $ac_c" 1>&6
echo "configure:10736: checking for ftime prototype" >&5
ftime_pt=no
# solaris 2.5.1 mentions `ftime' it the header but doesnt have a prototype ...
cat > conftest.$ac_ext <<EOF
#line 10740 "configure"
#include "confdefs.h"
#include <sys/timeb.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "ftime" >/dev/null 2>&1; then
  rm -rf conftest*
  ftime_pt=yes
fi
rm -f conftest*

if test $ftime_pt = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_FTIME_PROTO 1
EOF

fi
echo "$ac_t""$ftime_pt" 1>&6

#
# C++ features
#

# bool

echo $ac_n "checking for bool""... $ac_c" 1>&6
echo "configure:10766: checking for bool" >&5
if eval "test \"`echo '$''{'ac_cv_have_bool_type'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 10771 "configure"
#include "confdefs.h"

int main() {
bool b = true;
; return 0; }
EOF
if { (eval echo configure:10778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_have_bool_type=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_have_bool_type=no"
fi
rm -f conftest*
fi

if test $ac_cv_have_bool_type = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_BOOL_TYPE 1
EOF

  echo "$ac_t""yes" 1>&6
else
  echo "$ac_t""no" 1>&6
fi


# typename

echo $ac_n "checking for typename""... $ac_c" 1>&6
echo "configure:10804: checking for typename" >&5
if eval "test \"`echo '$''{'ac_cv_have_typename'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_cv_tmp_old_cxxflags="$CXXFLAGS"
if test X"$GXX" = Xyes; then
  CXXFLAGS="-Werror $CXXFLAGS"
fi
cat > conftest.$ac_ext <<EOF
#line 10813 "configure"
#include "confdefs.h"


  struct foo { typedef int Type; };

  template<class T>
  struct bar {
    void f (typename T::Type x) {}
  };

  bar<foo> i;

int main() { return 0; }
EOF
if { (eval echo configure:10828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    eval "ac_cv_have_typename=yes"
else
    rm -rf conftest*
    eval "ac_cv_have_typename=no"
fi
rm -f conftest*

CXXFLAGS=$ac_cv_tmp_old_cxxflags

fi

if test $ac_cv_have_typename = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_TYPENAME 1
EOF

  echo "$ac_t""yes" 1>&6
else
  cat >> confdefs.h <<\EOF
#define typename 
EOF

  echo "$ac_t""no" 1>&6
fi


# guiding delcarations

echo $ac_n "checking for guiding declarations""... $ac_c" 1>&6
echo "configure:10859: checking for guiding declarations" >&5
if eval "test \"`echo '$''{'ac_cv_have_guiding_decls'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_cv_tmp_old_cxxflags="$CXXFLAGS"
if test X"$GXX" = Xyes; then
  CXXFLAGS="-Werror $CXXFLAGS"
fi
cat > conftest.$ac_ext <<EOF
#line 10868 "configure"
#include "confdefs.h"


  template<class T>
  void func (T &x)
  {
  }

  template<class T>
  class foo {
  public:
    friend void func<> (T &x);
  };

  foo<int> i;

int main() { return 0; }
EOF
if { (eval echo configure:10887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    eval "ac_cv_have_guiding_decls=yes"
else
    rm -rf conftest*
    eval "ac_cv_have_guiding_decls=no"
fi
rm -f conftest*

CXXFLAGS=$ac_cv_tmp_old_cxxflags

fi

if test $ac_cv_have_guiding_decls = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_GUIDING_DECLS 1
EOF

  echo "$ac_t""yes" 1>&6
else
  echo "$ac_t""no" 1>&6
fi


# namespaces

echo $ac_n "checking for namespaces""... $ac_c" 1>&6
echo "configure:10914: checking for namespaces" >&5
if eval "test \"`echo '$''{'ac_cv_have_namespace'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_cv_tmp_old_cxxflags="$CXXFLAGS"
if test X"$GXX" = Xyes; then
  CXXFLAGS="-Werror $CXXFLAGS"
fi
cat > conftest.$ac_ext <<EOF
#line 10923 "configure"
#include "confdefs.h"


// cause an error for gcc 2.7.2 ...
#if __GNUG__ == 2 && __GNUC_MINOR__ == 7
#error "gcc 2.7.2 doesnt have namespaces"
#endif
  namespace foo { struct bar{ bar(); }; };
  foo::bar::bar() {}

  struct bar{ bar(); };
  bar::bar() {}

  foo::bar i;
  bar j;

int main() { return 0; }
EOF
if { (eval echo configure:10942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    eval "ac_cv_have_namespace=yes"
else
    rm -rf conftest*
    eval "ac_cv_have_namespace=no"
fi
rm -f conftest*

CXXFLAGS=$ac_cv_tmp_old_cxxflags

fi


HAVE_NAMESPACE=$ac_cv_have_namespace
if test $ac_cv_have_namespace = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_NAMESPACE 1
EOF

  echo "$ac_t""yes" 1>&6
else
  echo "$ac_t""no" 1>&6
fi


if test "x$HAVE_NAMESPACE" != "xyes" ; then
  { echo "configure: error: sorry" 1>&2; exit 1; }
fi

# const overload

echo $ac_n "checking for const overload""... $ac_c" 1>&6
echo "configure:10975: checking for const overload" >&5
if eval "test \"`echo '$''{'ac_cv_have_const_overload'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_cv_tmp_old_cxxflags="$CXXFLAGS"
if test X"$GXX" = Xyes; then
  CXXFLAGS="-Werror $CXXFLAGS"
fi
cat > conftest.$ac_ext <<EOF
#line 10984 "configure"
#include "confdefs.h"


  struct S {
    int *i;
    operator const int *() const { return i; }
    operator int *&() { return i; }
    operator const int &() const { return *i; }
    operator int &() { return *i; }
  };

  void bar (const int &, int &, const int *, int *, int *&);

  void foo (S &s, const S &cs)
  {
     int i = s; i = cs; i = *s; i = *cs;
     bar (s, s, s, s, s);
     bar (cs, s, cs, s, s);
  }

int main() { return 0; }
EOF
if { (eval echo configure:11007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    eval "ac_cv_have_const_overload=yes"
else
    rm -rf conftest*
    eval "ac_cv_have_const_overload=no"
fi
rm -f conftest*

CXXFLAGS=$ac_cv_tmp_old_cxxflags

fi

if test $ac_cv_have_const_overload = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_CONST_OVERLOAD 1
EOF

  echo "$ac_t""yes" 1>&6
else
  echo "$ac_t""no" 1>&6
fi


# explicit method override

echo $ac_n "checking for explicit method override""... $ac_c" 1>&6
echo "configure:11034: checking for explicit method override" >&5
if eval "test \"`echo '$''{'ac_cv_have_explicit_method_override'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_cv_tmp_old_cxxflags="$CXXFLAGS"
if test X"$GXX" = Xyes; then
  CXXFLAGS="-Werror $CXXFLAGS"
fi
cat > conftest.$ac_ext <<EOF
#line 11043 "configure"
#include "confdefs.h"


struct Base {
  virtual void f () {}
};
struct Skel1 : virtual public Base {
  virtual void f () {}
};
struct Skel2 : virtual public Base {
  virtual void f () {}
};
struct Skel3 : virtual public Skel1, virtual public Skel2 {
  virtual void f () {}
};
struct Impl1 : virtual public Skel1 {
};
struct Impl2 : virtual public Skel2 {
};
struct Impl3 : virtual public Impl1,
               virtual public Impl2,
               virtual public Skel3 {
};
void m () {
  Impl3 i;
  i.f();
}

int main() { return 0; }
EOF
if { (eval echo configure:11074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    eval "ac_cv_have_explicit_method_override=no"
else
    rm -rf conftest*
    eval "ac_cv_have_explicit_method_override=yes"
fi
rm -f conftest*

CXXFLAGS=$ac_cv_tmp_old_cxxflags

fi

if test $ac_cv_have_explicit_method_override = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_EXPLICIT_METHOD_OVERRIDE 1
EOF

  echo "$ac_t""yes" 1>&6
else
  echo "$ac_t""no" 1>&6
fi


# whether compiler fails to generate working ctor, dtor etc for structs
# with template members

echo $ac_n "checking whether explicit struct methods are needed""... $ac_c" 1>&6
echo "configure:11102: checking whether explicit struct methods are needed" >&5
if eval "test \"`echo '$''{'ac_cv_have_explicit_struct_ops'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_cv_tmp_old_cxxflags="$CXXFLAGS"
if test X"$GXX" = Xyes; then
  CXXFLAGS="-Werror $CXXFLAGS"
fi
cat > conftest.$ac_ext <<EOF
#line 11111 "configure"
#include "confdefs.h"


// cause an error for gcc 2.7.2 ...
#if __GNUG__ == 2 && __GNUC_MINOR__ == 7
#error "gcc 2.7.2 needs struct ops"
#endif
  template<class T>
  struct S {
    S ();
    S (const S<T> &);
    S<T> &operator= (const S<T> &);
    ~S ();
  };

  typedef S<int> Sint;

  struct A {
    Sint s;
  };

  void f (const A &a1)
  {
    A a2 (a1), a3;
    a3 = a2;
  }

  template<class T>
  S<T>::S ()
  {
  }

  template<class T>
  S<T>::S (const S<T> &s)
  {
  }

  template<class T>
  S<T> &S<T>::operator= (const S<T> &s)
  {
    return *this;
  }

  template<class T>
  S<T>::~S ()
  {
  }

int main() { return 0; }
EOF
if { (eval echo configure:11162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  eval "ac_cv_have_explicit_struct_ops=no"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_have_explicit_struct_ops=yes"
fi
rm -f conftest*
CXXFLAGS=$ac_cv_tmp_old_cxxflags

fi

if test $ac_cv_have_explicit_struct_ops = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_EXPLICIT_STRUCT_OPS 1
EOF

  echo "$ac_t""yes" 1>&6
else
  echo "$ac_t""no" 1>&6
fi


# overloaded typedefs

echo $ac_n "checking for overloaded typedefs""... $ac_c" 1>&6
echo "configure:11190: checking for overloaded typedefs" >&5
if eval "test \"`echo '$''{'ac_cv_have_typedef_overload'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_cv_tmp_old_cxxflags="$CXXFLAGS"
if test X"$GXX" = Xyes; then
  CXXFLAGS="-Werror $CXXFLAGS"
fi
cat > conftest.$ac_ext <<EOF
#line 11199 "configure"
#include "confdefs.h"


  struct A {
    struct D {
      typedef D *T;
    };
  };
  struct B {
    struct D {
      typedef D *T;
    };
  };

int main() { return 0; }
EOF
if { (eval echo configure:11216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    rm -rf conftest*
    eval "ac_cv_have_typedef_overload=yes"
else
    rm -rf conftest*
    eval "ac_cv_have_typedef_overload=no"
fi
rm -f conftest*

CXXFLAGS=$ac_cv_tmp_old_cxxflags

fi


HAVE_TYPEDEF_OVERLOAD=$ac_cv_typedef_overload
if test $ac_cv_have_typedef_overload = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_TYPEDEF_OVERLOAD 1
EOF

  echo "$ac_t""yes" 1>&6
else
  echo "$ac_t""no" 1>&6
fi


# dynamic casting
echo $ac_n "checking for dynamic_cast support""... $ac_c" 1>&6
echo "configure:11244: checking for dynamic_cast support" >&5
if eval "test \"`echo '$''{'ac_cv_cxx_dynamic_cast'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 11249 "configure"
#include "confdefs.h"

  class A {
  public:
    virtual int f() = 0;
  };

  class B : virtual public A {
  public:
    int f() { return 1; }
  };

  class C : virtual public A {
  public:
    int f() { return 2; }
  };

  class D : virtual public B, virtual public C {
  public:
    int f() { return 3; }
  };
int main() {

  B * b = new D;
  C * c = dynamic_cast<C*> (b);

; return 0; }
EOF
if { (eval echo configure:11278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_cxx_dynamic_cast=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_cxx_dynamic_cast=no"
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_cxx_dynamic_cast" 1>&6
if test "x$ac_cv_cxx_dynamic_cast" = "xyes" ; then
  cat >> confdefs.h <<\EOF
#define HAVE_DYNAMIC_CAST 1
EOF

fi


# exception handling flags

echo $ac_n "checking for exception handling flags""... $ac_c" 1>&6
echo "configure:11302: checking for exception handling flags" >&5

if test X"$CONF_EXCEPT_FLAGS" != X; then
  echo "$ac_t""$CONF_EXCEPT_FLAGS" 1>&6
else
  echo "$ac_t""none" 1>&6
fi

# exception handling





HAVE_EXCEPTIONS=no

if test X"$use_except" = Xyes; then
    SAVE_CXXFLAGS=$CXXFLAGS
    CXXFLAGS="$CXXFLAGS $CONF_EXCEPT_FLAGS"

    echo $ac_n "checking for exception handling""... $ac_c" 1>&6
echo "configure:11323: checking for exception handling" >&5
    if test "$cross_compiling" = yes; then
  EXCEPT=cross
else
  cat > conftest.$ac_ext <<EOF
#line 11328 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif

class Ex {};

int main ()
{
  try {
    throw Ex();
    return 1;
  } catch (Ex &ex) {
    return 0;
  } catch (...) {
    return 1;
  }
}
EOF
if { (eval echo configure:11348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  EXCEPT=ok
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  EXCEPT=broken
fi
rm -fr conftest*
fi


    case $EXCEPT in
    ok)
	echo "$ac_t""ok" 1>&6
	cat >> confdefs.h <<\EOF
#define HAVE_EXCEPTS 1
EOF

	HAVE_EXCEPTIONS=yes
	EHFLAGS=$CONF_EXCEPT_FLAGS
	EHOPTFLAGS=$CONF_EXCEPT_OPT_FLAGS
	NOEHFLAGS=$CONF_NO_EXCEPT_FLAGS
	;;
    cross)
	echo "$ac_t""cross-compiling, assuming working exceptions" 1>&6
	cat >> confdefs.h <<\EOF
#define HAVE_EXCEPTS 1
EOF

	HAVE_EXCEPTIONS=yes
	EHFLAGS=$CONF_EXCEPT_FLAGS
	EHOPTFLAGS=$CONF_EXCEPT_OPT_FLAGS
	NOEHFLAGS=$CONF_NO_EXCEPT_FLAGS
	;;
    *|broken)
	echo "$ac_t""broken, exception support disabled" 1>&6
	EHFLAGS=$CONF_NO_EXCEPT_FLAGS
	EHOPTFLAGS=$CONF_NO_EXCEPT_FLAGS
	NOEHFLAGS=$CONF_NO_EXCEPT_FLAGS
	;;
    esac

    CXXFLAGS=$SAVE_CXXFLAGS
fi

# standard exception handling


HAVE_STD_EH=no

if test X"$HAVE_EXCEPTIONS" = Xyes && test X"$use_std_eh" = Xyes; then
    SAVE_CXXFLAGS=$CXXFLAGS
    CXXFLAGS="$CXXFLAGS $EHFLAGS"

    echo $ac_n "checking for standard exception handling""... $ac_c" 1>&6
echo "configure:11405: checking for standard exception handling" >&5
    if test "$cross_compiling" = yes; then
  STDEH=cross
else
  cat > conftest.$ac_ext <<EOF
#line 11410 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif

class Bex { public: virtual ~Bex () {} };

class Dex: public Bex {};

static void f () { throw Dex(); }

int main ()
{
  try {
    f();
    return 1;
  } catch (const Bex &) {
    return 0;
  } catch (...) {
    return 1;
  }
}
EOF
if { (eval echo configure:11434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  STDEH=ok
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  STDEH=broken
fi
rm -fr conftest*
fi


    case $STDEH in
    ok)
	echo "$ac_t""ok" 1>&6
	cat >> confdefs.h <<\EOF
#define HAVE_STD_EH 1
EOF

	HAVE_STD_EH=yes
	;;
    cross)
	echo "$ac_t""cross-compiling, assuming working std EH" 1>&6
	cat >> confdefs.h <<\EOF
#define HAVE_STD_EH 1
EOF

	HAVE_STD_EH=yes
	;;
    *|broken)
	echo "$ac_t""broken, std EH disabled" 1>&6
	;;
    esac

    CXXFLAGS=$SAVE_CXXFLAGS
fi

#
# shared libraries
#





#AC_SUBST(LDSO)

POSTLD=true

SAVE_CXXFLAGS=$CXXFLAGS

if test X"$use_shared" = Xyes -o X"$use_dynamic" = Xyes; then
    #
    # step 1) guess settings
    #
    echo $ac_n "checking how to create shared libraries""... $ac_c" 1>&6
echo "configure:11491: checking how to create shared libraries" >&5
    LDSO_IN=$CONF_LDSO_IN
    PICFLAGS=$CONF_PICFLAGS
    LDFLAGS="$LDFLAGS $CONF_LDFLAGS"
    DLFLAGS=$CONF_DLFLAGS
    SOEXT=$CONF_SOEXT
    LDSOFLAGS=$CONF_LDSOFLAGS

    echo "$ac_t""using $LDSO_IN with $PICFLAGS" 1>&6

    #
    # create mico-shld
    #
    sed -e "s%@LDFLAGS@%$LDFLAGS%g" \
	-e "s%@SHARED_CC@%$CONF_SHARED_CC%g" \
	-e "s%@DLFLAGS@%$DLFLAGS%g" \
	-e "s%@LDSOFLAGS@%$LDSOFLAGS%g" \
	-e "s%@PICFLAGS@%$PICFLAGS%g" \
	-e "s%@SOEXT@%$SOEXT%g" \
	-e "s%@LIBS@%$LIBS%g" < $srcdir/$LDSO_IN > $srcdir/admin/mico-shld
    chmod +x $srcdir/admin/mico-shld

    CXXFLAGS="$PICFLAGS $DLFLAGS $CXXFLAGS"
    if test X"$HAVE_EXCEPTIONS" = Xyes; then
	CXXFLAGS="$CXXFLAGS $EHFLAGS -DHAVE_EXCEPTIONS"
    fi
    #
    # step 2) build a PIC object file
    #
    echo $ac_n "checking build of PIC object file""... $ac_c" 1>&6
echo "configure:11521: checking build of PIC object file" >&5
    cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#ifdef HAVE_ANSI_CPLUSPLUS_HEADERS
#include <iostream>
#else
#include <iostream.h>
#endif

using namespace std;

struct Global {
  long i;
  Global () { i = 0x31415927; }
  int ok () { return i == 0x31415927; }
};

Global gbl;

extern "C" int
foo ()
{
  cout << flush;
  return gbl.ok();
}

#ifdef HAVE_EXCEPTIONS
class Ex {};

void bar ()
{
  throw Ex();
}
#endif

EOF
    if (eval $ac_compile) && test -f conftest.o; then
        mv conftest.o shtest.o
        rm -f conftest.*
        echo "$ac_t""ok" 1>&6
        echo $ac_n "checking creation of shared lib""... $ac_c" 1>&6
echo "configure:11562: checking creation of shared lib" >&5
        #
        # step 2) build shlib
        #
        #if (eval $LDSO libshtest 0 shtest.o) 1>&5 2>&5; then
        if (eval $srcdir/admin/mico-shld -o libshtest shtest.o) 1>&5 2>&5; then
	    echo "$ac_t""ok" 1>&6
	else
	    echo "$ac_t""failed, shared libs/dynamic loading disabled" 1>&6
	    use_shared=no
	    use_dynamic=no
	fi
    else
        echo "$ac_t""failed, shared libs/dynamic loading disabled" 1>&6
        use_shared=no
        use_dynamic=no
    fi
fi

if test X"$use_shared" = Xyes; then
    #
    # step 3) run program linked with shlib
    #
    echo $ac_n "checking if binary linked against shlib works""... $ac_c" 1>&6
echo "configure:11586: checking if binary linked against shlib works" >&5
    SAVE_LDFLAGS=$LDFLAGS
    LDFLAGS="-L. $LDFLAGS $DLFLAGS"
    SAVE_LIBS=$LIBS
    LIBS="-lshtest $LIBS"
    LD_LIBRARY_PATH="`pwd`:$LD_LIBRARY_PATH"
    LIBPATH="`pwd`:$LIBPATH"
    SHLIB_PATH="`pwd`:$SHLIB_PATH"
    export LD_LIBRARY_PATH LIBPATH SHLIB_PATH

    if test "$cross_compiling" = yes; then
  SHRUN=cross-compiling
else
  cat > conftest.$ac_ext <<EOF
#line 11600 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif

extern "C" int foo ();
int main ()
{
  return foo() ? 0 : 1;
}
EOF
if { (eval echo configure:11612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  SHRUN=ok
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  SHRUN=failed
fi
rm -fr conftest*
fi


    LDFLAGS=$SAVE_LDFLAGS
    LIBS=$SAVE_LIBS
    case $SHRUN in
    ok)
        echo "$ac_t""ok" 1>&6
        ;;
    cross-compiling)
        echo "$ac_t""cross-compiling, assuming working shared libraries" 1>&6
        ;;
    *|failed)
        echo "$ac_t""$SHRUN, shared libs disabled" 1>&6
	use_shared=no
        ;;
    esac
fi


HAVE_SHARED=$use_shared


if test X"$HAVE_SHARED" = Xyes; then
  HAVE_STATIC=$use_static
else
  HAVE_STATIC=yes
fi


HAVE_SHARED_EXCEPTS=no

if test X"$HAVE_SHARED" = Xyes && test X"$HAVE_EXCEPTIONS" = Xyes; then
    echo $ac_n "checking for exceptions in shared libraries""... $ac_c" 1>&6
echo "configure:11656: checking for exceptions in shared libraries" >&5
    SAVE_LDFLAGS=$LDFLAGS
    LDFLAGS="-L. $LDFLAGS $DLFLAGS"
    SAVE_LIBS=$LIBS
    LIBS="-lshtest $LIBS"
    LD_LIBRARY_PATH="`pwd`:$LD_LIBRARY_PATH"
    LIBPATH="`pwd`:$LIBPATH"
    SHLIB_PATH="`pwd`:$SHLIB_PATH"
    export LD_LIBRARY_PATH LIBPATH SHLIB_PATH

    if test "$cross_compiling" = yes; then
  SHEXRUN=cross-compiling
else
  cat > conftest.$ac_ext <<EOF
#line 11670 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif

class Ex {};
extern void bar ();
int main ()
{
  try {
    bar();
  } catch (Ex &e) {
    return 0;
  } catch (...) {
    return 1;
  }
  return 1;
}
EOF
if { (eval echo configure:11690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  SHEXRUN=ok
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  SHEXRUN=failed
fi
rm -fr conftest*
fi


    LDFLAGS=$SAVE_LDFLAGS
    LIBS=$SAVE_LIBS
    case $SHEXRUN in
    ok)
	echo "$ac_t""ok" 1>&6
	HAVE_SHARED_EXCEPTS=yes
	cat >> confdefs.h <<\EOF
#define HAVE_SHARED_EXCEPTS 1
EOF

        ;;
    cross-compiling)
        echo "$ac_t""cross-compiling, assuming working exceptions in shared libraries" 1>&6
	HAVE_SHARED_EXCEPTS=yes
	cat >> confdefs.h <<\EOF
#define HAVE_SHARED_EXCEPTS 1
EOF

        ;;
    *|failed)
        echo "$ac_t""$SHEXRUN, exceptions in shared libs disabled" 1>&6
        ;;
    esac
fi

# exception in libmico


HAVE_ORB_EXCEPTS=no
if test X"$use_orb_excepts" = Xyes; then
    HAVE_ORB_EXCEPTS=yes
    cat >> confdefs.h <<\EOF
#define HAVE_ORB_EXCEPTS 1
EOF

fi

CXXFLAGS=$SAVE_CXXFLAGS

# dynamic loading

if test X"$use_dynamic" = Xyes; then
    echo $ac_n "checking for dynamic loading""... $ac_c" 1>&6
echo "configure:11746: checking for dynamic loading" >&5

    if test X"$ac_cv_func_dlopen" = Xyes; then
	DLTYPE='dlopen()'
	SAVE_LDFLAGS=$LDFLAGS
	LDFLAGS="$LDFLAGS $DLFLAGS"

	if test "$cross_compiling" = yes; then
  DLRUN=cross-compiling
else
  cat > conftest.$ac_ext <<EOF
#line 11757 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif

#ifdef HAVE_ANSI_CPLUSPLUS_HEADERS
#include <iostream>
#else
#include <iostream.h>
#endif
#include <stdlib.h>
#include <stdio.h>
#include <dlfcn.h>

#ifndef RTLD_NOW
#define RTLD_NOW 1
#endif

using namespace std;

int main ()
{
    cout << flush;
    void *h = dlopen ("./libshtest.$SOEXT", RTLD_NOW);
    if (!h) { puts (dlerror()); return 1; }
    int (*foo) () = (int (*) ())dlsym (h, "foo");
    if (!foo) { puts (dlerror()); return 1; }
    if ((*foo) ())
	return 0;

    void (*initfn) () = (void (*) ())dlsym (h, "_GLOBAL__DI");
    if (!initfn) { puts (dlerror()); return 1; }
    (*initfn) ();
    system ("touch mconf.explicit-ctors");

    return (*foo) () ? 0 : 1;
}
EOF
if { (eval echo configure:11796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  DLRUN=ok
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  DLRUN=failed
fi
rm -fr conftest*
fi


	LDFLAGS=$SAVE_LDFLAGS
    elif test X"$ac_cv_func_shl_load" = Xyes; then
	DLTYPE='shl_load()'
	SAVE_LDFLAGS=$LDFLAGS
	LDFLAGS="$LDFLAGS $DLFLAGS"

	if test "$cross_compiling" = yes; then
  DLRUN=cross-compiling
else
  cat > conftest.$ac_ext <<EOF
#line 11819 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif

#ifdef HAVE_ANSI_CPLUSPLUS_HEADERS
#include <iostream>
#else
#include <iostream.h>
#endif
#include <stdlib.h>
#include <dl.h>

int main ()
{
    cout << flush;
    shl_t h = shl_load ("./libshtest.$SOEXT", BIND_IMMEDIATE, 0L);
    if (!h) return 1;
    void *val;
    if (shl_findsym (&h, "foo", TYPE_PROCEDURE, &val) < 0 &&
	shl_findsym (&h, "_foo", TYPE_PROCEDURE, &val) < 0)
	return 1;
    int (*foo) () = (int (*) ())val;
    if ((*foo) ())
	return 0;

    if (shl_findsym (&h, "_GLOBAL__DI", TYPE_PROCEDURE, &val) < 0 &&
	shl_findsym (&h, "__GLOBAL__DI", TYPE_PROCEDURE, &val) < 0)
	return 1;

    void (*initfn) () = (void (*) ())val;
    (*initfn) ();

    system ("touch mconf.explicit-ctors");
    return (*foo) () ? 0 : 1;
}
EOF
if { (eval echo configure:11857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  DLRUN=ok
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  DLRUN=failed
fi
rm -fr conftest*
fi


	LDFLAGS=$SAVE_LDFLAGS
    else
	DLTYPE=
	DLRUN=failed
    fi

    case $DLRUN in
    failed)
	echo "$ac_t""failed, dynamic loading disabled" 1>&6
	use_dynamic=no
	;;
    *)
	echo "$ac_t""$DLRUN, using $DLTYPE family" 1>&6
	if test -f mconf.explicit-ctors; then
	    cat >> confdefs.h <<\EOF
#define HAVE_EXPLICIT_CTORS 1
EOF

	fi
	;;
    esac
    rm -f mconf.*
fi


HAVE_DYNAMIC=$use_dynamic
if test X"$HAVE_DYNAMIC" = Xyes; then
  cat >> confdefs.h <<\EOF
#define HAVE_DYNAMIC 1
EOF

fi

rm -f shtest* libshtest* conftest*

# checking for thread-safe OpenSSL when it is needed
SSLMTRUN=""

if test X"$ac_cv_lib_ssl_open" = Xyes -a X"$ac_cv_lib_crypto_open" = Xyes -a X"$ac_cv_header_openssl_ssl_h" = Xyes -a X"$use_threads" = Xyes; then
  echo $ac_n "checking for thread-safe openssl""... $ac_c" 1>&6
echo "configure:11910: checking for thread-safe openssl" >&5
  if test "$cross_compiling" = yes; then
  SSLMTRUN=cross-compiling
else
  cat > conftest.$ac_ext <<EOF
#line 11915 "configure"
#include "confdefs.h"
#ifdef __cplusplus
#include <stdlib.h>
#endif

int
main()
{
#define OPENSSL_THREAD_DEFINES
#undef THREADS
#undef OPENSSL_THREADS
#include <openssl/opensslconf.h>
#if !defined(THREADS) && !defined(OPENSSL_THREADS)
//error You are trying to build multi-threaded MICO with single-threaded OpenSSL!
return 1;
#endif // THREADS
return 0;
}
  
EOF
if { (eval echo configure:11936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  SSLMTRUN=ok
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  SSLMTRUN=failed
fi
rm -fr conftest*
fi


  case $SSLMTRUN in
  failed)
	echo "$ac_t""failed, security framework disabled" 1>&6
	;;
  *)
	echo "$ac_t""$SSLMTRUN" 1>&6
	;;
  esac
fi

if test X"$use_threads" = Xyes -a X"$service_disabled" = Xyes; then
  echo ""
  echo ""
  echo "\
Note that services streams, relship, externalize, life-cycle and
trader and CCM implementation are not prepared for running on top of
multi-threaded MICO. You can use them safely on single-threaded
version of MICO or on MICO/MT servers which use at most one thread for
request processing (param -ORBRequestLimit 1)"
  echo ""
fi

if test X"$GCCMT" = Xunsafe -a X"$use_threads" = Xyes; then
  #
  # Unsupported compiler for MT build
  #
  echo "WARNING:"
  echo "WARNING:"
  echo "WARNING: You are using GCC 2.95.x compiler for compiling MICO. Please note that"
  echo "WARNING: this compiler provides not fully thread-safe libstdc++ implementation"
  echo "WARNING: and so you will likely see some MICO application crashes. We highly"
  echo "WARNING: recommend you to use at least GCC 3.1.x/3.2.x for compiling"
  echo "WARNING: multi-threaded MICO."
  echo "WARNING:"
  echo "WARNING:"
fi

if test X"$use_wireless" = Xyes -a ! X"$use_naming" = Xyes ; then
  echo ""
  echo "Wireless CORBA applications require the use of Naming Service"
  echo "Naming Service turned on"
  echo ""
  use_naming=yes
fi

if test \( X"$use_wireless_access" = Xyes -o X"$use_wireless_terminal" = Xyes \) -a ! X"$use_events" = Xyes ; then
  echo ""
  echo "Wireless CORBA Bridges require the use of Event Service"
  echo "Event Service turned on"
  echo ""
  use_events=yes
fi


USE_CCM=$use_ccm
if test "x$USE_CCM" = "xyes" ; then
  cat >> confdefs.h <<\EOF
#define USE_CCM 1
EOF

fi


USE_MESSAGING=$use_messaging
if test "x$USE_MESSAGING" = "xyes" ; then
  cat >> confdefs.h <<\EOF
#define USE_MESSAGING 1
EOF

fi


USE_NAMING=$use_naming


USE_CSL2=$use_csl2

# ssl/csiv2 setup

HAVE_SSL=no
if test X"$ac_cv_lib_ssl_open" = Xyes -a X"$ac_cv_lib_crypto_open" = Xyes -a X"$ac_cv_header_openssl_ssl_h" = Xyes -a X"$SSLMTRUN" != Xfailed;
then
  HAVE_SSL=yes
  cat >> confdefs.h <<\EOF
#define HAVE_SSL 1
EOF

fi

if test X"$use_csiv2" != Xno -a X"$HAVE_SSL" != Xno; then
  cat >> confdefs.h <<\EOF
#define USE_CSIV2 1
EOF

else
  # we need to disable CSIv2
  use_csiv2=no
fi

if test X"$use_sl3" != Xno -a X"$HAVE_SSL" != Xno -a X"$use_csiv2" != Xno; then
  cat >> confdefs.h <<\EOF
#define USE_SL3 1
EOF

else
  # we need to disable SL3
  use_sl3=no
fi


USE_CSIV2=$use_csiv2


USE_SL3=$use_sl3


USE_EVENTS=$use_events


USE_STREAMS=$use_streams


USE_RELSHIP=$use_relship


USE_PROPERTY=$use_property


USE_TRADER=$use_trader


USE_TIME=$use_time


USE_LIFE=$use_life


USE_EXTERN=$use_extern


USE_WIRELESS=$use_wireless


USE_WIRELESS_HOME=$use_wireless_home


USE_WIRELESS_TERMINAL=$use_wireless_terminal


USE_WIRELESS_ACCESS=$use_wireless_access

if test X"$threading_policies" != Xno -a X"$HAVE_THREADS" != Xno; then
  cat >> confdefs.h <<\EOF
#define THREADING_POLICIES 1
EOF

else
  # we need to disable Threading Policies
  threading_policies=no
fi


THREADING_POLICIES=$threading_policies






if test X"$MICODIR" = X""; then
  IDL="\$(SRCDIR)/idl/idl"
  IDLGEN="\$(SRCDIR)/idl/idl"
  CCMGEN="\$(SRCDIR)/ccm/mico-ccm"
  MKDEPEND="\$(SRCDIR)/admin/mkdepend"
  LIBPATH="\$(SRCDIR)/libs"
  CPPPATH="\$(SRCDIR)/cpp"
else
  IDL=$MICODIR/bin/idl
  IDLGEN=$MICODIR/bin/idl
  CCMGEN=$MICODIR/bin/mico-ccm
  MKDEPEND=$MICODIR/bin/mkdepend
  LIBPATH=$MICODIR/lib
  CPPPATH=$MICODIR/bin
fi


patch_version=`patch --version 2>&1`
gpatch_version=`gpatch --version 2>&1`
if test ! -z "`echo $patch_version|grep GNU`"; then
   PATCHPROG=patch
else
if test ! -z "`echo $gpatch_version|grep GNU`"; then
   PATCHPROG=gpatch
fi
fi


MICO_VERSION=`cat $srcdir/VERSION`

#
# create output
#



trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs.  It is not useful on other systems.
# If it contains results you don't want to keep, you may remove or edit it.
#
# By default, configure uses ./config.cache as the cache file,
# creating it if it does not exist already.  You can give configure
# the --cache-file=FILE option to use a different cache file; that is
# what configure does when it calls configure scripts in
# subdirectories, so they share the cache.
# Giving --cache-file=/dev/null disables caching, for debugging configure.
# config.status only pays attention to the cache file if you give it the
# --recheck option to rerun configure.
#
EOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
  case `(ac_space=' '; set | grep ac_space) 2>&1` in
  *ac_space=\ *)
    # `set' does not quote correctly, so add quotes (double-quote substitution
    # turns \\\\ into \\, and sed turns \\ into \).
    sed -n \
      -e "s/'/'\\\\''/g" \
      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
    ;;
  *)
    # `set' quotes correctly as required by POSIX, so do not add quotes.
    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
    ;;
  esac >> confcache
if cmp -s $cache_file confcache; then
  :
else
  if test -w $cache_file; then
    echo "updating cache $cache_file"
    cat confcache > $cache_file
  else
    echo "not updating unwritable cache $cache_file"
  fi
fi
rm -f confcache

trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15

test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'

# Any assignment to VPATH causes Sun make to only execute
# the first set of double-colon rules, so remove it if not needed.
# If there is a colon in the path, we need to keep it.
if test "x$srcdir" = x.; then
  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
fi

trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15

DEFS=-DHAVE_CONFIG_H

# Without the "./", some shells look in PATH for config.status.
: ${CONFIG_STATUS=./config.status}

echo creating $CONFIG_STATUS
rm -f $CONFIG_STATUS
cat > $CONFIG_STATUS <<EOF
#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
#
# $0 $ac_configure_args
#
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.

ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
for ac_option
do
  case "\$ac_option" in
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
    echo "$CONFIG_STATUS generated by autoconf version 2.13"
    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 "MakeVars demo/MakeVars.install admin/mico-c++ admin/mico-shc++
 admin/mico-ld admin/mico-ar admin/mico-setup.sh admin/mico-setup.csh
 admin/mico-config include/mico/config.h include/mico/config.idl" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF

# Protect against being on the right side of a sed subst in config.status.
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
s%@SHELL@%$SHELL%g
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%@HAVE_MINGW@%$HAVE_MINGW%g
s%@HAVE_CYGWIN@%$HAVE_CYGWIN%g
s%@HAVE_MEMCHECK@%$HAVE_MEMCHECK%g
s%@USE_MEMTRACE@%$USE_MEMTRACE%g
s%@HAVE_FINAL@%$HAVE_FINAL%g
s%@HAVE_MINIMUM_CORBA@%$HAVE_MINIMUM_CORBA%g
s%@ORB_CORE_ONLY@%$ORB_CORE_ONLY%g
s%@host@%$host%g
s%@host_alias@%$host_alias%g
s%@host_cpu@%$host_cpu%g
s%@host_vendor@%$host_vendor%g
s%@host_os@%$host_os%g
s%@target@%$target%g
s%@target_alias@%$target_alias%g
s%@target_cpu@%$target_cpu%g
s%@target_vendor@%$target_vendor%g
s%@target_os@%$target_os%g
s%@build@%$build%g
s%@build_alias@%$build_alias%g
s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
s%@ABSSRCDIR@%$ABSSRCDIR%g
s%@ABSEXECDIR@%$ABSEXECDIR%g
s%@ABSSHRDDIR@%$ABSSHRDDIR%g
s%@STLINC@%$STLINC%g
s%@REPOFLAG@%$REPOFLAG%g
s%@HAVE_REPO@%$HAVE_REPO%g
s%@PRELINK_FLAG@%$PRELINK_FLAG%g
s%@HAVE_PRELINK@%$HAVE_PRELINK%g
s%@PCHFLAGS@%$PCHFLAGS%g
s%@USE_PCH_DIR@%$USE_PCH_DIR%g
s%@CC@%$CC%g
s%@CPP@%$CPP%g
s%@CXX@%$CXX%g
s%@CXXCPP@%$CXXCPP%g
s%@OSTYPE@%$OSTYPE%g
s%@RMPROG@%$RMPROG%g
s%@LNPROG@%$LNPROG%g
s%@EXTRA_LIBS@%$EXTRA_LIBS%g
s%@EXTRA_CXXFLAGS@%$EXTRA_CXXFLAGS%g
s%@pth_config_prog@%$pth_config_prog%g
s%@HAVE_THREADS@%$HAVE_THREADS%g
s%@LDCONFIG@%$LDCONFIG%g
s%@SHLIBS@%$SHLIBS%g
s%@SGI_ABI@%$SGI_ABI%g
s%@AIXLINKER@%$AIXLINKER%g
s%@YACC@%$YACC%g
s%@LEX@%$LEX%g
s%@LEXLIB@%$LEXLIB%g
s%@AR@%$AR%g
s%@ARFLAGS@%$ARFLAGS%g
s%@RANLIB@%$RANLIB%g
s%@SET_MAKE@%$SET_MAKE%g
s%@TCLSH@%$TCLSH%g
s%@JAVAC@%$JAVAC%g
s%@HAVE_JDK@%$HAVE_JDK%g
s%@HAVE_QT@%$HAVE_QT%g
s%@QT_CXXFLAGS@%$QT_CXXFLAGS%g
s%@QT_LIBS@%$QT_LIBS%g
s%@MOC@%$MOC%g
s%@HAVE_GTK@%$HAVE_GTK%g
s%@GTK_CONFIG@%$GTK_CONFIG%g
s%@GTK_CFLAGS@%$GTK_CFLAGS%g
s%@GTK_LIBS@%$GTK_LIBS%g
s%@HAVE_TCL@%$HAVE_TCL%g
s%@TCL_LIBS@%$TCL_LIBS%g
s%@HAVE_SNACC@%$HAVE_SNACC%g
s%@SNACC@%$SNACC%g
s%@HAVE_SMP@%$HAVE_SMP%g
s%@HAVE_BLUETOOTH@%$HAVE_BLUETOOTH%g
s%@X_CFLAGS@%$X_CFLAGS%g
s%@X_PRE_LIBS@%$X_PRE_LIBS%g
s%@X_LIBS@%$X_LIBS%g
s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
s%@HAVE_X11@%$HAVE_X11%g
s%@HAVE_PGSQL@%$HAVE_PGSQL%g
s%@BASE_LIBS@%$BASE_LIBS%g
s%@CURSES_LIBS@%$CURSES_LIBS%g
s%@HAVE_NAMESPACE@%$HAVE_NAMESPACE%g
s%@HAVE_TYPEDEF_OVERLOAD@%$HAVE_TYPEDEF_OVERLOAD%g
s%@EHFLAGS@%$EHFLAGS%g
s%@EHOPTFLAGS@%$EHOPTFLAGS%g
s%@NOEHFLAGS@%$NOEHFLAGS%g
s%@HAVE_EXCEPTIONS@%$HAVE_EXCEPTIONS%g
s%@HAVE_STD_EH@%$HAVE_STD_EH%g
s%@LDSOFLAGS@%$LDSOFLAGS%g
s%@DLFLAGS@%$DLFLAGS%g
s%@SOEXT@%$SOEXT%g
s%@PICFLAGS@%$PICFLAGS%g
s%@POSTLD@%$POSTLD%g
s%@HAVE_SHARED@%$HAVE_SHARED%g
s%@HAVE_STATIC@%$HAVE_STATIC%g
s%@HAVE_SHARED_EXCEPTS@%$HAVE_SHARED_EXCEPTS%g
s%@HAVE_ORB_EXCEPTS@%$HAVE_ORB_EXCEPTS%g
s%@HAVE_DYNAMIC@%$HAVE_DYNAMIC%g
s%@USE_CCM@%$USE_CCM%g
s%@USE_MESSAGING@%$USE_MESSAGING%g
s%@USE_NAMING@%$USE_NAMING%g
s%@USE_CSL2@%$USE_CSL2%g
s%@HAVE_SSL@%$HAVE_SSL%g
s%@USE_CSIV2@%$USE_CSIV2%g
s%@USE_SL3@%$USE_SL3%g
s%@USE_EVENTS@%$USE_EVENTS%g
s%@USE_STREAMS@%$USE_STREAMS%g
s%@USE_RELSHIP@%$USE_RELSHIP%g
s%@USE_PROPERTY@%$USE_PROPERTY%g
s%@USE_TRADER@%$USE_TRADER%g
s%@USE_TIME@%$USE_TIME%g
s%@USE_LIFE@%$USE_LIFE%g
s%@USE_EXTERN@%$USE_EXTERN%g
s%@USE_WIRELESS@%$USE_WIRELESS%g
s%@USE_WIRELESS_HOME@%$USE_WIRELESS_HOME%g
s%@USE_WIRELESS_TERMINAL@%$USE_WIRELESS_TERMINAL%g
s%@USE_WIRELESS_ACCESS@%$USE_WIRELESS_ACCESS%g
s%@THREADING_POLICIES@%$THREADING_POLICIES%g
s%@IDL@%$IDL%g
s%@CCMGEN@%$CCMGEN%g
s%@MKDEPEND@%$MKDEPEND%g
s%@LIBPATH@%$LIBPATH%g
s%@CPPPATH@%$CPPPATH%g
s%@PATCHPROG@%$PATCHPROG%g
s%@MICO_VERSION@%$MICO_VERSION%g

CEOF
EOF

cat >> $CONFIG_STATUS <<\EOF

# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
ac_file=1 # Number of current file.
ac_beg=1 # First line for current file.
ac_end=$ac_max_sed_cmds # Line after last line for current file.
ac_more_lines=:
ac_sed_cmds=""
while $ac_more_lines; do
  if test $ac_beg -gt 1; then
    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  else
    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  fi
  if test ! -s conftest.s$ac_file; then
    ac_more_lines=false
    rm -f conftest.s$ac_file
  else
    if test -z "$ac_sed_cmds"; then
      ac_sed_cmds="sed -f conftest.s$ac_file"
    else
      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
    fi
    ac_file=`expr $ac_file + 1`
    ac_beg=$ac_end
    ac_end=`expr $ac_end + $ac_max_sed_cmds`
  fi
done
if test -z "$ac_sed_cmds"; then
  ac_sed_cmds=cat
fi
EOF

cat >> $CONFIG_STATUS <<EOF

CONFIG_FILES=\${CONFIG_FILES-"MakeVars demo/MakeVars.install admin/mico-c++ admin/mico-shc++
 admin/mico-ld admin/mico-ar admin/mico-setup.sh admin/mico-setup.csh
 admin/mico-config"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case "$ac_file" in
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.

  # Remove last slash and all that follows it.  Not all systems have dirname.
  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
    # The file is in a subdirectory.
    test ! -d "$ac_dir" && mkdir "$ac_dir"
    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
    # A "../" for each directory in $ac_dir_suffix.
    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  else
    ac_dir_suffix= ac_dots=
  fi

  case "$ac_given_srcdir" in
  .)  srcdir=.
      if test -z "$ac_dots"; then top_srcdir=.
      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  *) # Relative path.
    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
    top_srcdir="$ac_dots$ac_given_srcdir" ;;
  esac


  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*

# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
ac_dC='\3'
ac_dD='%g'
# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
ac_uB='\([ 	]\)%\1#\2define\3'
ac_uC=' '
ac_uD='\4%g'
# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
ac_eB='$%\1#\2define\3'
ac_eC=' '
ac_eD='%g'

if test "${CONFIG_HEADERS+set}" != set; then
EOF
cat >> $CONFIG_STATUS <<EOF
  CONFIG_HEADERS="include/mico/config.h include/mico/config.idl"
EOF
cat >> $CONFIG_STATUS <<\EOF
fi
for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case "$ac_file" in
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

  echo creating $ac_file

  rm -f conftest.frag conftest.in conftest.out
  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  cat $ac_file_inputs > conftest.in

EOF

# Transform confdefs.h into a sed script conftest.vals that substitutes
# the proper values into config.h.in to produce config.h.  And first:
# Protect against being on the right side of a sed subst in config.status.
# Protect against being in an unquoted here document in config.status.
rm -f conftest.vals
cat > conftest.hdr <<\EOF
s/[\\&%]/\\&/g
s%[\\$`]%\\&%g
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
s%ac_d%ac_u%gp
s%ac_u%ac_e%gp
EOF
sed -n -f conftest.hdr confdefs.h > conftest.vals
rm -f conftest.hdr

# This sed command replaces #undef with comments.  This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
cat >> conftest.vals <<\EOF
s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
EOF

# Break up conftest.vals because some shells have a limit on
# the size of here documents, and old seds have small limits too.

rm -f conftest.tail
while :
do
  ac_lines=`grep -c . conftest.vals`
  # grep -c gives empty output for an empty file on some AIX systems.
  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  # Write a limited-size here document to conftest.frag.
  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  echo 'CEOF
  sed -f conftest.frag conftest.in > conftest.out
  rm -f conftest.in
  mv conftest.out conftest.in
' >> $CONFIG_STATUS
  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  rm -f conftest.vals
  mv conftest.tail conftest.vals
done
rm -f conftest.vals

cat >> $CONFIG_STATUS <<\EOF
  rm -f conftest.frag conftest.h
  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  cat conftest.in >> conftest.h
  rm -f conftest.in
  if cmp -s $ac_file conftest.h 2>/dev/null; then
    echo "$ac_file is unchanged"
    rm -f conftest.h
  else
    # Remove last slash and all that follows it.  Not all systems have dirname.
      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
      # The file is in a subdirectory.
      test ! -d "$ac_dir" && mkdir "$ac_dir"
    fi
    rm -f $ac_file
    mv conftest.h $ac_file
  fi
fi; done

EOF
cat >> $CONFIG_STATUS <<EOF

EOF
cat >> $CONFIG_STATUS <<\EOF

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


chmod +x $srcdir/admin/mico-c++ $srcdir/admin/mico-shc++ \
 $srcdir/admin/mico-ld $srcdir/admin/mico-ar $srcdir/admin/mico-config

