#! /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
  --with-cc=CC            specify C compiler to use ("cc" default)"
ac_help="$ac_help
  --with-opt=OPT          specify C compiler options for optimization"
ac_help="$ac_help
  --with-debug=OPT        specify C compiler options for debuggable executaable file creation"
ac_help="$ac_help
  --with-cppflag=OPT      specify C preprocessor options"
ac_help="$ac_help
  --enable-gcc            allow use of gcc if available"
ac_help="$ac_help
  --enable-debug          enable generate executable with debug symbol (false default)."
ac_help="$ac_help
  --with-thread=TYPE      specify the default thread type to use. one of 'pthread', 'sproc' and 'solaris' (default: 'solaris' on Solaris, 'sproc' on IRIX, 'pthread' on others)."
ac_help="$ac_help
  --with-lock=TYPE        specify the default lock mechanism to use. one of 'spin' and 'mutex' (default: 'spin' on i386, mips, alpha and sparc, 'mutex' on others)."
ac_help="$ac_help
  --enable-stackThreads   enable StackThreads (false default)."
ac_help="$ac_help
  --enable-shmem          enable unix shared memory runtime (false default)."
ac_help="$ac_help
  --enable-scash          enable scash runtime (false default)."
ac_help="$ac_help
  --with-scoreDir=DIR     specify where SCore is installed."
ac_help="$ac_help
  --enable-openGR         enable OpenGR directive support (false default)."
ac_help="$ac_help
  --with-jvm              use Java runtime/development tools environment (true default)."
ac_help="$ac_help
  --enable-jexcBinary     enable using of binary executable version of xobj to C translator in omni compile driver. Experimental now (false default)."
ac_help="$ac_help
  --enable-mreal          enable multiple precision real (and real*16) support of Fortran 77 (false default)."
ac_help="$ac_help
  --with-gmpLibDir=DIR    specify where the GNU-MP library is for quad-real support."
ac_help="$ac_help
  --with-gmpIncDir=DIR    specify where the GNU-MP include headers are for quad-real support."
ac_help="$ac_help
  --with-precision=NUM    specify the default precision of real*16 in bits (128)."
ac_help="$ac_help
  --enable-installSample  install OpenMP source examples (false default)."
ac_help="$ac_help
  --enable-scoreDoc       set document install directory suitable for SCore release."
ac_help="$ac_help
  --enable-wrapper         enable using of wrapper for select omni by backend compiler(false default)."
ac_help="$ac_help
  --enable-wrapper-default enable using this compiler for default backend compiler, when enabled wrapper(false default)."

# 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=include/exc_platform.h.in

# 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


# --------------------------------------------------------------------


# --------------------------------------------------------------------
# Set Omni version

omniVersion=1.5

# --------------------------------------------------------------------


# --------------------------------------------------------------------
# prefix directory check and modify

if test "${prefix}" = "NONE"; then
    prefix=/usr/local
fi

orgPrefix=${prefix}


t=`echo ${prefix} | egrep '^/.*$'`
if test "x${t}" = "x${prefix}"; then
    prefix="\$(DESTDIR)${prefix}"
else
    prefix="\$(DESTDIR)/${prefix}"
fi
unset t

if test "${exec_prefix}" = "NONE"; then
    orgExec_prefix=${orgPrefix}
    exec_prefix='${prefix}'
else
    orgExec_prefix=${exec_prefix}
    t=`echo ${exec_prefix} | egrep '^/.*$'`
    if test "x${t}" = "x${exec_prefix}"; then
	exec_prefix="\$(DESTDIR)${exec_prefix}"
    else
	exec_prefix="\$(DESTDIR)/${exec_prefix}"
    fi
fi

# --------------------------------------------------------------------


# --------------------------------------------------------------------
# First of all, check on what system we are running.

HOSTARCH=`./utils/config.guess | grep -v Linking`
CPU=`echo $HOSTARCH | awk -F- '{ print $1 }' | sed 's/\./_/g'`
OS=`echo $HOSTARCH | awk -F- '{ print $3 }' | sed 's/\./_/g'`

case $CPU in
    i*86)
        CPU=i386;;
    alpha*)
	CPU=alpha;;
esac

case $OS in
    sunos*)
        OS=sunos;;
    solaris*)
        OS=solaris;;
    freebsd*)
	OS=freebsd;;
    netbsd*)
	OS=netbsd;;
    irix*)
	OS=irix;;
    aix*)
	OS=aix;;
    darwin*)
	OS=darwin;;
    cygwin*)
	OS=cygwin32;;
esac



# --------------------------------------------------------------------


# --------------------------------------------------------------------
# Next, check what CC will be used, and set compile flags

ccType="unknown"

isSunCC=no
sunCCPre6=0
isMipsCC=no
isAIXCC=no
isGcc=no
isIntelCC=no
isPGICC=no

mustCFlags=""
mustCppFlags=""

optCFlags=""
warnCFlags=""
debCFlags=""

userOptCFlags=""
userDebCFlags=""

debCppFlags="-DNDEBUG"
userCppFlags=""

osCppFlags=""
osCFlags=""

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


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


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


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



oCC=${CC}
oCFLAGS=${CFLAGS}
progCC=""
# Check whether --enable-gcc or --disable-gcc was given.
if test "${enable_gcc+set}" = set; then
  enableval="$enable_gcc"
  exc_ok=$enableval
else
  exc_ok=no
fi

if test "$exc_ok" = "yes"; then
    # 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:736: 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:766: 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:817: 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:849: 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 860 "configure"
#include "confdefs.h"

main(){return(0);}
EOF
if { (eval echo configure:865: \"$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:891: 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:896: 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:905: \"$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:924: 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

    progCC=${CC}
fi
CFLAGS=${oCFLAGS}
CC=${oCC}

if test "x${ccCom}" != "x"; then
    CC=${ccCom}
elif test "x${progCC}" != "x"; then
    CC=${progCC}
fi

if test "x${CC}" = "x"; then
   CC=cc
fi

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

if test "x${doDebug}" = "xyes"; then
    debCFlags="-g"
    debCppFlags="-DDEBUG"
fi

# Check it's GCC by command name
cCom=`echo ${CC} | awk '{ print $1 }'`
if test "x${GCC}" = "xyes" -o "`basename ${cCom}`" = "gcc" ; then
    isGcc=yes
fi
if test "x${isGcc}" = "xno"; then
    # Check it's GCC by command line option
    tmp=/tmp/.OmniConfCC
    ${cCom} -v > $tmp 2>&1
    if test $? -eq 0; then
	chk=`tail -1 $tmp | awk '{ print $3 }'`
	case $chk in
	    egcs*|2.*|3.*)
		isGcc=yes;;
	    *)
		case ${OS} in
		    darwin*)
			chk=`tail -1 $tmp | grep gcc`
			if test "x${chk}" = "x"; then
			    isGcc=no
			else
			    isGcc=yes
			fi;;
		    *)
			isGcc=no;;
		esac;;
	esac
    fi
    rm -f $tmp
fi

# OK now it must be decided gcc or not.
if test "x${isGcc}" = "xno"; then
    case $OS in
        linux*)
	    tmp=/tmp/.OmniConf.$$
	    ${CC} -V > $tmp 2>&1
	    x=`grep 'Intel(R) C++ Compiler ' $tmp`
	    if test "X${x}" != "X"; then
		isIntelCC=yes
	    fi
	    rm -f $tmp
	    ${CC} -V > $tmp 2>&1
	    x=`grep 'The Portland Group, Inc.' $tmp`
	    if test "X${x}" != "X"; then
		isPGICC=yes
	    fi
	    rm -f $tmp
	    ;;
	solaris*)
	    tmp=/tmp/.OmniConf.$$
	    ${CC} -V > $tmp 2>&1
	    if test $CPU = i386; then
		cStr='cc: PC'
	    else
		cStr='WorkShop'
	    fi
	    x=`grep "$cStr" $tmp`
	    if test "X${x}" != "X"; then
		isSunCC=yes
		case $CPU in
		    sparc*)
			cStr='WorkShop Compilers'
			x=`grep "$cStr" $tmp`
			if test "X${x}" != "X"; then
			    sunCCPre6=1
			fi;;
		esac
	    fi
	    rm -f $tmp
	    ;;
	irix*)
	    tmp=/tmp/.OmniConf.$$
	    ${CC} -version > $tmp 2>&1
	    x=`grep 'MIPSpro' $tmp`
	    if test "X${x}" != "X"; then
		isMipsCC=yes
	    fi
	    rm -f $tmp
	    ;;
	aix*)
	    # XXXXX FIXEME: Are there any other compilers running on AIX???
	    # Anyway asume it's XLC.
	    isAIXCC=yes
	    ;;
    esac
fi

# GCC
if test "x${isGcc}" = "xyes"; then
    # for old gcc/systems ...
    mustCppFlags="-D__USE_FIXED_PROTOTYPES__"
    warnCFlags="-Wall"
    optCFlags="-O2"
    CPP="$CC -E"
    case ${CPU} in
	powerpc*)
	    warnCFlags="${warnCFlags} -Wno-long-double"
	    case ${OS} in
		darwin*)
    		    mustCppFlags="${mustCppFlags} -traditional-cpp"
		    CPP="${CPP} -traditional-cpp";;
		*)
		    true;;
	    esac;;
	*)
	    true;;
    esac
    ccType=gcc
fi

# Intel CC
if test "X${isIntelCC}" = "Xyes"; then
  optCFlags="-O3"
  warnCFlags="-w2"
  ccType=IntelCC
fi

# PGI CC
if test "X${isPGICC}" = "Xyes"; then
  optCFlags="-fast"
  mustCFlags="-Mreentrant -Masmkeyword"
  ccType=PGICC
fi

# Sun CC
if test "X${isSunCC}" = "Xyes"; then
    mustCppFlags="-D__EXTENSIONS__"
    if test $sunCCPre6 -eq 0; then
	mustCppFlags="${mustCppFlags} -DSUN_WS_CC_6"
    fi
    mustCFlags="-v"
    debCFlags="${debCFlags} -xs"
    if test $CPU = i386; then
	oLvl=4
    else
	oLvl=5
    fi
    optCFlags="-fast -xO${oLvl}"
    ccType=SunCC
fi

# Mips CC
if test "X${isMipsCC}" = "Xyes"; then
    optCFlags="-O3"
    ccType=MipsCC
fi

# AIX XLC
if test "X${isAIXCC}" = "Xyes"; then
    CC=cc_r
    mustCppFlags="-DUSE_PROTOTYPE"
    optCFlags="-O3 -qstrict"
    ccType=AIXCC
fi

# Generate cpu/os specifier
CPUDEF=-DOMNI_CPU_`echo $CPU | tr '[a-z]' '[A-Z]'`
OSDEF=-DOMNI_OS_`echo $OS | tr '[a-z]' '[A-Z]'`

# OS specifics.
case ${OS} in
    netbsd*)
	osCppFlags="-I/usr/pkg/include";;
    *)
	true;;
esac

# Finally, emit.



CPPFLAGS="${CPPFLAGS} ${CPUDEF} ${OSDEF} ${debCppFlags} ${userCppFlags} ${mustCppFlags} ${osCppFlags}"


if test "x${doDebug}" != "xyes"; then
    if test "x${userOptCFlags}" = "x"; then
	optOpt=${optCFlags}
    else
 	optOpt=${userOptCFlags}
    fi
else
    if test "x${userDebCFlags}" = "x"; then
	optOpt=${debCFlags}
    else
 	optOpt=${userDebCFlags}
    fi
fi
CFLAGS="${CFLAGS} ${warnCFlags} ${optOpt} ${mustCFlags} ${osCFlags}"

# --------------------------------------------------------------------


# --------------------------------------------------------------------
# Generic config from here.

#--------------------------------------------------------------------
#	alloca check.
#--------------------------------------------------------------------
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:1183: 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 1198 "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:1204: \"$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 1215 "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:1221: \"$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 1232 "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:1238: \"$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

# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments.  Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
echo "configure:1265: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1270 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
if { (eval echo configure:1277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_header_alloca_h=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_alloca_h=no
fi
rm -f conftest*
fi

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

fi

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

#ifdef __GNUC__
# define alloca __builtin_alloca
#else
# ifdef _MSC_VER
#  include <malloc.h>
#  define alloca _alloca
# else
#  if HAVE_ALLOCA_H
#   include <alloca.h>
#  else
#   ifdef _AIX
 #pragma alloca
#   else
#    ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
#    endif
#   endif
#  endif
# endif
#endif

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

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

fi

if test $ac_cv_func_alloca_works = no; then
  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  # that cause trouble.  Some versions do not even contain alloca or
  # contain a buggy version.  If you still want to use their alloca,
  # use ar to extract alloca.o from them instead of compiling alloca.c.
  ALLOCA=alloca.${ac_objext}
  cat >> confdefs.h <<\EOF
#define C_ALLOCA 1
EOF


echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
echo "configure:1363: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1368 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
#else
wenotbecray
#endif

EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "webecray" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_os_cray=yes
else
  rm -rf conftest*
  ac_cv_os_cray=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1393: 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 1398 "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:1421: \"$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
  cat >> confdefs.h <<EOF
#define CRAY_STACKSEG_END $ac_func
EOF

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

done
fi

echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
echo "configure:1448: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_c_stack_direction=0
else
  cat > conftest.$ac_ext <<EOF
#line 1456 "configure"
#include "confdefs.h"
find_stack_direction ()
{
  static char *addr = 0;
  auto char dummy;
  if (addr == 0)
    {
      addr = &dummy;
      return find_stack_direction ();
    }
  else
    return (&dummy > addr) ? 1 : -1;
}
main ()
{
  exit (find_stack_direction() < 0);
}
EOF
if { (eval echo configure:1475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_c_stack_direction=1
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_c_stack_direction=-1
fi
rm -fr conftest*
fi

fi

echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
cat >> confdefs.h <<EOF
#define STACK_DIRECTION $ac_cv_c_stack_direction
EOF

fi


#--------------------------------------------------------------------
#       On AIX systems, libbsd.a has to be linked in to support
#       non-blocking file IO.  This library has to be linked in after
#       the MATH_LIBS or it breaks the pow() function.  The way to
#       insure proper sequencing, is to add it to the tail of MATH_LIBS.
#        This library also supplies gettimeofday.
#--------------------------------------------------------------------
libbsd=no
if test "`uname -s`" = "AIX" ; then
    echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
echo "configure:1507: checking for gettimeofday in -lbsd" >&5
ac_lib_var=`echo bsd'_'gettimeofday | 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 1515 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char gettimeofday();

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

    if test $libbsd = yes; then
	MATH_LIBS="$MATH_LIBS -lbsd"
    fi
fi

#--------------------------------------------------------------------
#	Supply substitutes for missing POSIX header files.  Special
#	notes:
#	    - stdlib.h doesn't define strtol, strtoul, or
#	      strtod insome versions of SunOS
#	    - some versions of string.h don't declare procedures such
#	      as strstr
#--------------------------------------------------------------------
ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for errno.h""... $ac_c" 1>&6
echo "configure:1561: checking for errno.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 1566 "configure"
#include "confdefs.h"
#include <errno.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1571: \"$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
cat >> confdefs.h <<\EOF
#define NO_ERRNO_H 1
EOF

fi

ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for limits.h""... $ac_c" 1>&6
echo "configure:1598: checking for limits.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 1603 "configure"
#include "confdefs.h"
#include <limits.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1608: \"$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
cat >> confdefs.h <<\EOF
#define NO_LIMITS_H 1
EOF

fi

ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
echo "configure:1635: checking for stdlib.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 1640 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1645: \"$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
cat >> confdefs.h <<\EOF
#define NO_STDLIB_H 1
EOF

fi

ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for string.h""... $ac_c" 1>&6
echo "configure:1672: checking for string.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 1677 "configure"
#include "confdefs.h"
#include <string.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1682: \"$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
cat >> confdefs.h <<\EOF
#define NO_STRING_H 1
EOF

fi

ac_safe=`echo "strings.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for strings.h""... $ac_c" 1>&6
echo "configure:1709: checking for strings.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 1714 "configure"
#include "confdefs.h"
#include <strings.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1719: \"$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
cat >> confdefs.h <<\EOF
#define NO_STRINGS_H 1
EOF

fi

ac_safe=`echo "unistd.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for unistd.h""... $ac_c" 1>&6
echo "configure:1746: checking for unistd.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 1751 "configure"
#include "confdefs.h"
#include <unistd.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1756: \"$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
cat >> confdefs.h <<\EOF
#define NO_UNISTD_H 1
EOF

fi

ac_safe=`echo "stdarg.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for stdarg.h""... $ac_c" 1>&6
echo "configure:1783: checking for stdarg.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 1788 "configure"
#include "confdefs.h"
#include <stdarg.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1793: \"$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
  cat >> confdefs.h <<\EOF
#define HAVE_STDARG_H 1
EOF

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


ac_safe=`echo "locale.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for locale.h""... $ac_c" 1>&6
echo "configure:1820: checking for locale.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 1825 "configure"
#include "confdefs.h"
#include <locale.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1830: \"$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
  haveLocale=yes
else
  echo "$ac_t""no" 1>&6
haveLocale=no
fi

if test "X${haveLocale}" = "Xyes"; then
	cat >> confdefs.h <<\EOF
#define HAVE_LOCALE_H 1
EOF

	cat > conftest.$ac_ext <<EOF
#line 1858 "configure"
#include "confdefs.h"
#include <locale.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "setlocale" >/dev/null 2>&1; then
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
#define HAVE_SETLOCALE 1
EOF

fi
rm -f conftest*

fi

ac_safe=`echo "ieeefp.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for ieeefp.h""... $ac_c" 1>&6
echo "configure:1876: checking for ieeefp.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 1881 "configure"
#include "confdefs.h"
#include <ieeefp.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1886: \"$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
cat >> confdefs.h <<\EOF
#define NO_IEEEFP_H 1
EOF

fi

ac_safe=`echo "float.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for float.h""... $ac_c" 1>&6
echo "configure:1913: checking for float.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 1918 "configure"
#include "confdefs.h"
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1923: \"$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
cat >> confdefs.h <<\EOF
#define NO_FLOAT_H 1
EOF

fi
 
ac_safe=`echo "netdb.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for netdb.h""... $ac_c" 1>&6
echo "configure:1950: checking for netdb.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 1955 "configure"
#include "confdefs.h"
#include <netdb.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1960: \"$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
cat >> confdefs.h <<\EOF
#define NO_NETDB_H 1
EOF

fi

ac_safe=`echo "sys/socket.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/socket.h""... $ac_c" 1>&6
echo "configure:1987: checking for sys/socket.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 1992 "configure"
#include "confdefs.h"
#include <sys/socket.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1997: \"$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
cat >> confdefs.h <<\EOF
#define NO_SYS_SOCKET_H 1
EOF

fi

ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
echo "configure:2024: checking for netinet/in.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 2029 "configure"
#include "confdefs.h"
#include <netinet/in.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2034: \"$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
cat >> confdefs.h <<\EOF
#define NO_NETINET_IN_H 1
EOF

fi

ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
echo "configure:2061: checking for arpa/inet.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 2066 "configure"
#include "confdefs.h"
#include <arpa/inet.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2071: \"$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
cat >> confdefs.h <<\EOF
#define NO_ARPA_INET_H 1
EOF

fi

ac_safe=`echo "sys/resource.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/resource.h""... $ac_c" 1>&6
echo "configure:2098: checking for sys/resource.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 2103 "configure"
#include "confdefs.h"
#include <sys/resource.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2108: \"$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
cat >> confdefs.h <<\EOF
#define NO_RESOURCE_H 1
EOF

fi


cat > conftest.$ac_ext <<EOF
#line 2135 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "strdup" >/dev/null 2>&1; then
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
#define HAVE_STRDUP 1
EOF

fi
rm -f conftest*


#------------------------------------------------------------------------------
#       Find out all about time handling differences.
#------------------------------------------------------------------------------
for ac_hdr in sys/time.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2157: 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 2162 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
echo "configure:2194: 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 2199 "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:2208: \"$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


#--------------------------------------------------------------------
#	Check for various typedefs and provide substitutes if
#	they don't exist.
#--------------------------------------------------------------------
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:2234: 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 2239 "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:2247: \"$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 2264 "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 2282 "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 2303 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int main () { int i; for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }

EOF
if { (eval echo configure:2314: \"$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

echo $ac_n "checking for mode_t""... $ac_c" 1>&6
echo "configure:2338: checking for mode_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2343 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_mode_t=yes
else
  rm -rf conftest*
  ac_cv_type_mode_t=no
fi
rm -f conftest*

fi
echo "$ac_t""$ac_cv_type_mode_t" 1>&6
if test $ac_cv_type_mode_t = no; then
  cat >> confdefs.h <<\EOF
#define mode_t int
EOF

fi

echo $ac_n "checking for pid_t""... $ac_c" 1>&6
echo "configure:2371: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2376 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_pid_t=yes
else
  rm -rf conftest*
  ac_cv_type_pid_t=no
fi
rm -f conftest*

fi
echo "$ac_t""$ac_cv_type_pid_t" 1>&6
if test $ac_cv_type_pid_t = no; then
  cat >> confdefs.h <<\EOF
#define pid_t int
EOF

fi

echo $ac_n "checking for size_t""... $ac_c" 1>&6
echo "configure:2404: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2409 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_size_t=yes
else
  rm -rf conftest*
  ac_cv_type_size_t=no
fi
rm -f conftest*

fi
echo "$ac_t""$ac_cv_type_size_t" 1>&6
if test $ac_cv_type_size_t = no; then
  cat >> confdefs.h <<\EOF
#define size_t unsigned
EOF

fi

echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
echo "configure:2437: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2442 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "uid_t" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_uid_t=yes
else
  rm -rf conftest*
  ac_cv_type_uid_t=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_type_uid_t" 1>&6
if test $ac_cv_type_uid_t = no; then
  cat >> confdefs.h <<\EOF
#define uid_t int
EOF

  cat >> confdefs.h <<\EOF
#define gid_t int
EOF

fi


#--------------------------------------------------------------------
#	endian check
#--------------------------------------------------------------------
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
echo "configure:2475: 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 2482 "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:2493: \"$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 2497 "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:2508: \"$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 2528 "configure"
#include "confdefs.h"
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:2541: \"$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


#--------------------------------------------------------------------
#	The code below deals with several issues related to gettimeofday:
#	1. Some systems don't provide a gettimeofday function at all
#	   (set NO_GETTOD if this is the case).
#	2. SGI systems don't use the BSD form of the gettimeofday function,
#	   but they have a BSDgettimeofday function that can be used instead.
#	3. See if gettimeofday is declared in the <sys/time.h> header file.
#	   if not, set the GETTOD_NOT_DECLARED flag so that tclPort.h can
#	   declare it.
#--------------------------------------------------------------------
echo $ac_n "checking for BSDgettimeofday""... $ac_c" 1>&6
echo "configure:2576: checking for BSDgettimeofday" >&5
if eval "test \"`echo '$''{'ac_cv_func_BSDgettimeofday'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2581 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char BSDgettimeofday(); 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 BSDgettimeofday();

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_BSDgettimeofday) || defined (__stub___BSDgettimeofday)
choke me
#else
BSDgettimeofday();
#endif

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

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

else
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
echo "configure:2625: checking for gettimeofday" >&5
if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2630 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char gettimeofday(); 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 gettimeofday();

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_gettimeofday) || defined (__stub___gettimeofday)
choke me
#else
gettimeofday();
#endif

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

if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
cat >> confdefs.h <<\EOF
#define NO_GETTOD 1
EOF

fi

fi

echo $ac_n "checking for gettimeofday declaration""... $ac_c" 1>&6
echo "configure:2679: checking for gettimeofday declaration" >&5
cat > conftest.$ac_ext <<EOF
#line 2681 "configure"
#include "confdefs.h"
#include <sys/time.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "gettimeofday" >/dev/null 2>&1; then
  rm -rf conftest*
  echo "$ac_t""present" 1>&6
else
  rm -rf conftest*
  
    echo "$ac_t""missing" 1>&6
    cat >> confdefs.h <<\EOF
#define GETTOD_NOT_DECLARED 1
EOF


fi
rm -f conftest*


# Generic config end here.
# --------------------------------------------------------------------


# --------------------------------------------------------------------
# checking gcc union size bug

gccUnionBug=unknown
rm -f ./gccBug.* ./gccBug
if test "x${isGcc}" = "xyes"; then
    echo $ac_n "checking gcc has large union size bug""... $ac_c" 1>&6
echo "configure:2713: checking gcc has large union size bug" >&5
    # check 512MB union.
    oSz='0x1fffffff'
    ${CC} ${CPPFLAGS} ${CFLAGS} -DLARGE_BUF=${oSz} -o ./gccBug ./utils/gccUnionBug.c > /dev/null 2>&1
    if test -x ./gccBug; then
	sz=`./gccBug`
	if test "x${sz}" = "x${oSz}"; then
	    gccUnionBug=no
	else
	    gccUnionBug=yes
	fi
    else
	gccUnionBug=yes
    fi
    echo "$ac_t""$gccUnionBug" 1>&6
fi
rm -f ./gccBug.* ./gccBug

# --------------------------------------------------------------------


# --------------------------------------------------------------------
# OpenMP runtime checking

def_thread_type=""
def_lock_type=""
available_threads=""
available_locks=""
ignore_pair=""
ompcLibAsmSrcs=""

# Default thread type
# Check whether --with-thread or --without-thread was given.
if test "${with_thread+set}" = set; then
  withval="$with_thread"
  thread_type=$withval
else
  thread_type=""
fi


# Default lock type
# Check whether --with-lock or --without-lock was given.
if test "${with_lock+set}" = set; then
  withval="$with_lock"
  lock_type=$withval
else
  lock_type=""
fi


case $OS in
    solaris*)
	def_thread_type=solaris
	def_lock_type=spin
	available_locks="mutex spin"
	available_threads="solaris pthread"
	case $CPU in
	    sparc*)
		ompcLibAsmSrcs="asm_sparc.s";;
	esac
	;;
    irix*)
	def_thread_type=sproc
	def_lock_type=spin
	available_locks="mutex spin"
	available_threads="pthread sproc"
	ignore_pair="sproc mutex"
	;;
    *)
	def_thread_type=pthread
	def_lock_type=mutex
	available_locks="mutex"
	available_threads="pthread"
	case $CPU in
	    i386*|mips*)
		def_lock_type=spin
		available_locks="mutex spin";;
	    sparc*)
		def_lock_type=spin
		available_locks="mutex spin"
		ompcLibAsmSrcs="asm_sparc.s";;
	    alpha*)
		def_lock_type=spin
		available_locks="mutex spin"
		ompcLibAsmSrcs="asm_alpha.s";;
	    rs6000*)
		available_locks="mutex spin";;
	    *)
		true;;
	esac
	;;
esac

if test "X${thread_type}" = "X"; then
    thread_type=${def_thread_type}
fi

if test "X${lock_type}" = "X"; then
    lock_type=${def_lock_type}
fi

case $lock_type in
    spin*)
	case $CPU in
	    i386*|mips*|sparc*|alpha*|rs6000*)
		true;;
	    *)
		echo "$ac_t""spin lock is only available on i386, mips, alpha, sparc and rs6000 architectures." 1>&6
		exit 1;;
	esac;;
    *)
	true;;
esac

THREAD_DEF=""
case $thread_type in
    solaris*)
	THREAD_DEF="-DUSE_SOL_THREAD"
	;;
    sproc*)
	THREAD_DEF="-DUSE_SPROC"
	;;
    *)
	THREAD_DEF="-DUSE_PTHREAD"
	;;
esac

LOCK_DEF=""
case $lock_type in
    mutex*)
	LOCK_DEF=""
	;;
    spin*)
	LOCK_DEF="-DUSE_SPIN_LOCK"
	;;
esac

OMPC_LIB_ASM=${ompcLibAsmSrcs}











# StackThreads
# Check whether --enable-stackThreads or --disable-stackThreads was given.
if test "${enable_stackThreads+set}" = set; then
  enableval="$enable_stackThreads"
  doStackThread=$enableval
else
  doStackThread=no
fi

LIBOMPST_DIR=""
if test "x${doStackThread}" = "xyes"; then
    LIBOMPST_DIR=lib/libompst
fi



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



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



if test "x${doUnixShmem}" = "xyes" -a "x${doScash}" = "xyes"; then
    echo "$ac_t""unix shared mamory and scash are exclusive." 1>&6
    exit 1
fi

LIBOMPSM_DIR=""
if test "x${doUnixShmem}" = "xyes" -o "x${doScash}" = "xyes"; then
    LIBOMPSM_DIR=lib/libompsm
fi


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


scoreNickname=""
if test "x${doScash}" = "xyes"; then
    if test "x${scoreDir}" = "x"; then
	if test -z ${RWCROOT}; then
	    scoreDir=/opt/score
	else
	    scoreDir=${RWCROOT}
	fi
    fi

    if test ! -d ${scoreDir}; then
	echo "$ac_t""can't find ${scoreDir}" 1>&6
	exit 1
    fi
	    
    if test -x ${scoreDir}/deploy/config.nickname; then
	scoreNickname=`${scoreDir}/deploy/config.nickname`
    else
	echo "$ac_t""can't find ${scoreDir}/deploy/config.nickname" 1>&6
	exit 1
    fi
fi



SHMEM_FLAGS=""
SHMEM_SRC="Unused"
SCASH_INC=""
if test "x${doUnixShmem}" = "xyes"; then
    SHMEM_FLAGS="-DUSE_UNIX_SHMEM"
    SHMEM_SRC=ompsm_unix_shmem
fi
if test "x${doScash}" = "xyes"; then
    SHMEM_FLAGS="-DUSE_SCASH"
    SCASH_INC="-I${scoreDir}/include"
    SHMEM_SRC=ompsm_scash
fi




# OpenGR
# Check whether --enable-openGR or --disable-openGR was given.
if test "${enable_openGR+set}" = set; then
  enableval="$enable_openGR"
  doOpenGR=$enableval
else
  doOpenGR=no
fi

LIBOGR_DIR=""
OPENGR_DEF=""
OPENGR_HDR=""
OPENGR_SRCS=""
OPENGR_OBJS=""
OGRCC_DRIVER=""
GRIDRPC_DEF=""
GRIDRPC_LIBS=""
if test "x${doOpenGR}" = "xyes"; then
    if test "x${GLOBUS_INSTALL_PATH}" = "x"; then
	echo "$ac_t""GLOBUS_INSTALL_PATH environmental variable not set. exit." 1>&6
	exit 1
    fi
    if test "x${NS_DIR}" = "x"; then
	echo "$ac_t""NS_DIR environmental variable not set. exit." 1>&6
	exit 1
    fi
    if test -x "${NS_DIR}/bin/globusflags"; then
	true
    else
	echo "$ac_t""can't find ${NS_DIR}/bin/globusflags. exit." 1>&6
	exit 1
    fi
    gRPCOpt=`sh ${NS_DIR}/bin/globusflags GLOBUS_GRAM_CLIENT GLOBUS_IO SSL LDAP 2>/dev/null`
    if test $? -eq 0; then
	for i in / ${gRPCOpt}
	do
	    case ${i} in
		/)
		    continue;;
		-D*|-I*|-U*)
		    GRIDRPC_DEF="${GRIDRPC_DEF} ${i}";;
		-L*|-l*)
		    GRIDRPC_LIBS="${GRIDRPC_LIBS} ${i}";;
		*)
		    true;;
	    esac
	done
    else
	echo "$ac_t""can't exec ${NS_DIR}/bin/globusflags. exit." 1>&6
	exit 1
    fi
    LIBOGR_DIR='lib/libogr'
    OPENGR_DEF='-DUSE_OPENGR_PRAGMA'
    OPENGR_HDR='opengr.h'
    OPENGR_SRCS="C-ogr-pragma.c C-ogr-hash.c"
    OPENGR_OBJS=`echo ${OPENGR_SRCS} | sed "s:\.c:\.o:g"`
    OGRCC_DRIVER='ogrcc ogrc++'
    GRIDRPC_DEF="-I${NS_DIR}/include -I${NS_DIR}/include/expat ${GRIDRPC_DEF}"
    GRIDRPC_LIBS="-L${NS_DIR}/lib -lnsclient -lnslib -lnsutil -lnet -lxmlread ${GRIDRPC_LIBS}"
fi









# --------------------------------------------------------------------


# --------------------------------------------------------------------
# Use Java or not

useJava=yes
EXC_JAVADIR=exc-tools-java/exc
TLOGVIEW_DIR=tools/tlogview
JMPSTAT_DIR=tools/jmpstat
# Check whether --with-jvm or --without-jvm was given.
if test "${with_jvm+set}" = set; then
  withval="$with_jvm"
  useJava=$withval
else
  useJava=yes
fi

if test "x${useJava}" = "xno"; then
    cFile=./utils/etjClass.tar
    if test -f $cFile; then
	echo "$ac_t""Choosing Java-free configuraion, --enable-jexcBinary flag is implied." 1>&6
    else
	echo "$ac_t""Using Omni without Java needs pre-compiled exc-tools-java class files, but can't find them (${cFile}). exit." 1>&6
	exit 1
    fi
    EXC_JAVADIR=""
    TLOGVIEW_DIR=""
    JMPSTAT_DIR=""
fi




# --------------------------------------------------------------------


# --------------------------------------------------------------------
# jexc backend support.

jexcBackend=""
jexcDir=""
# Check whether --enable-jexcBinary or --disable-jexcBinary was given.
if test "${enable_jexcBinary+set}" = set; then
  enableval="$enable_jexcBinary"
  doJexcBackend=$enableval
else
  doJexcBackend=no
fi

# Force jexc if useJava == no
if test "x${useJava}" = "xno"; then
    doJexcBackend=yes
fi

if test "x${doJexcBackend}" = "xyes"; then
    jexcDir=./tools/jexc
    jexcBackend="C-back F-back"
#   Enabling followings when shmem translator is supported.
#   if test "x${doUnixShmem}" = "xyes" -o "x${doScash}" = "xyes"; then
#	jexcBackend="${jexcBackend} C-back.sm F-back.sm"
#   fi
    if test "x${doOpenGR}" = "xyes"; then
	jexcBackend="${jexcBackend} C-back.ogr"
    fi
fi



# --------------------------------------------------------------------


# --------------------------------------------------------------------
# check has "long long"

hasLL=no
echo $ac_n "checking has long long""... $ac_c" 1>&6
echo "configure:3108: checking has long long" >&5
cat > conftest.$ac_ext <<EOF
#line 3110 "configure"
#include "confdefs.h"

int main() {
long long int x;
; return 0; }
EOF
if { (eval echo configure:3117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  hasLL=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  hasLL=no
fi
rm -f conftest*
echo "$ac_t""$hasLL" 1>&6
hasLLFlags=""
if test $hasLL = yes; then
    hasLLFlags="-DHAS_LONGLONG"
    cat >> confdefs.h <<\EOF
#define HAS_LONGLONG 1
EOF

fi

hasLD=no
echo $ac_n "checking has long double""... $ac_c" 1>&6
echo "configure:3139: checking has long double" >&5
cat > conftest.$ac_ext <<EOF
#line 3141 "configure"
#include "confdefs.h"

int main() {
long double x;
; return 0; }
EOF
if { (eval echo configure:3148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  hasLD=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  hasLD=no
fi
rm -f conftest*
echo "$ac_t""$hasLD" 1>&6
hasLDFlags=""
if test $hasLD = yes; then
    hasLDFlags="-DHAS_LONGDOUBLE"
    cat >> confdefs.h <<\EOF
#define HAS_LONGDOUBLE 1
EOF

fi

echo $ac_n "checking size of unsigned short""... $ac_c" 1>&6
echo "configure:3169: 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
    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
  cat > conftest.$ac_ext <<EOF
#line 3177 "configure"
#include "confdefs.h"
#include <stdio.h>
int main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) return(1);
  fprintf(f, "%d\n", sizeof(unsigned short));
  return(0);
}
EOF
if { (eval echo configure:3188: \"$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 unsigned int""... $ac_c" 1>&6
echo "configure:3208: 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
    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
  cat > conftest.$ac_ext <<EOF
#line 3216 "configure"
#include "confdefs.h"
#include <stdio.h>
int main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) return(1);
  fprintf(f, "%d\n", sizeof(unsigned int));
  return(0);
}
EOF
if { (eval echo configure:3227: \"$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 unsigned long""... $ac_c" 1>&6
echo "configure:3247: 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
    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
  cat > conftest.$ac_ext <<EOF
#line 3255 "configure"
#include "confdefs.h"
#include <stdio.h>
int main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) return(1);
  fprintf(f, "%d\n", sizeof(unsigned long));
  return(0);
}
EOF
if { (eval echo configure:3266: \"$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


llTyp=''
if test $hasLL = yes; then
    echo $ac_n "checking size of unsigned long long""... $ac_c" 1>&6
echo "configure:3288: 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
    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
  cat > conftest.$ac_ext <<EOF
#line 3296 "configure"
#include "confdefs.h"
#include <stdio.h>
int main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) return(1);
  fprintf(f, "%d\n", sizeof(unsigned long long));
  return(0);
}
EOF
if { (eval echo configure:3307: \"$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


    llTyp='longlongint'
fi
echo $ac_n "checking size of float""... $ac_c" 1>&6
echo "configure:3329: 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
    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
  cat > conftest.$ac_ext <<EOF
#line 3337 "configure"
#include "confdefs.h"
#include <stdio.h>
int main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) return(1);
  fprintf(f, "%d\n", sizeof(float));
  return(0);
}
EOF
if { (eval echo configure:3348: \"$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:3368: 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
    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
  cat > conftest.$ac_ext <<EOF
#line 3376 "configure"
#include "confdefs.h"
#include <stdio.h>
int main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) return(1);
  fprintf(f, "%d\n", sizeof(double));
  return(0);
}
EOF
if { (eval echo configure:3387: \"$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


ldTyp=''
if test $hasLD = yes; then
    echo $ac_n "checking size of long double""... $ac_c" 1>&6
echo "configure:3409: 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
    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
  cat > conftest.$ac_ext <<EOF
#line 3417 "configure"
#include "confdefs.h"
#include <stdio.h>
int main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) return(1);
  fprintf(f, "%d\n", sizeof(long double));
  return(0);
}
EOF
if { (eval echo configure:3428: \"$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


    ldTyp='longdouble'
fi
echo $ac_n "checking size of void *""... $ac_c" 1>&6
echo "configure:3450: checking size of void *" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  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 3458 "configure"
#include "confdefs.h"
#include <stdio.h>
int main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) return(1);
  fprintf(f, "%d\n", sizeof(void *));
  return(0);
}
EOF
if { (eval echo configure:3469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_void_p=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_void_p=0
fi
rm -fr conftest*
fi

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


# --------------------------------------------------------------------


# --------------------------------------------------------------------
# align

for i in char short int long "$llTyp" float double "$ldTyp"
do
    if test "x${i}" = x; then
	continue
    fi
    getAlign=0
    rm -rf ./align ./align.*
    case $i in
	longlongint)
	    echo $ac_n "checking default align of long long int""... $ac_c" 1>&6
echo "configure:3504: checking default align of long long int" >&5;;
	longdouble)
	    echo $ac_n "checking default align of long double""... $ac_c" 1>&6
echo "configure:3507: checking default align of long double" >&5;;
	*)
	    echo $ac_n "checking default align of $i""... $ac_c" 1>&6
echo "configure:3510: checking default align of $i" >&5;;
    esac
    ${CC} ${CPPFLAGS} ${CFLAGS} ${hasLLFlags} ${hasLDFlags} -DCHECK_TYPE=$i ./utils/align.c -o align
    if test -x ./align; then
	getAlign=`./align | grep -v Linking`
    fi
    if test $getAlign -eq 0; then
	echo "$ac_t""can't determine????" 1>&6
	exit 1
    else
	echo "$ac_t""$getAlign" 1>&6
	case $i in
	    char)
		cat >> confdefs.h <<EOF
#define CHAR_ALIGN $getAlign
EOF
;;
	    short)
		cat >> confdefs.h <<EOF
#define SHORT_ALIGN $getAlign
EOF
;;
	    int)
		cat >> confdefs.h <<EOF
#define INT_ALIGN $getAlign
EOF
;;
	    long)
		cat >> confdefs.h <<EOF
#define LONG_ALIGN $getAlign
EOF
;;
	    longlongint)
		cat >> confdefs.h <<EOF
#define LONGLONG_ALIGN $getAlign
EOF
;;
	    float)
		cat >> confdefs.h <<EOF
#define FLOAT_ALIGN $getAlign
EOF
;;
	    double)
		cat >> confdefs.h <<EOF
#define DOUBLE_ALIGN $getAlign
EOF
;;
	    longdouble)
		cat >> confdefs.h <<EOF
#define LONGDOUBLE_ALIGN $getAlign
EOF
;;
	esac
    fi
    rm -rf ./align ./align.*
done
# --------------------------------------------------------------------


# --------------------------------------------------------------------
# i386 double-align

if test ${CPU} = "i386" -a "x${isGcc}" = "xyes"; then
    for i in char short int long "$llTyp" float double "$ldTyp"
    do
	if test "x${i}" = x; then
	    continue
	fi
	getAlign=0
	rm -rf ./align ./align.*
	case $i in
	    longlongint)
		echo $ac_n "checking i386 double-align of long long int""... $ac_c" 1>&6
echo "configure:3583: checking i386 double-align of long long int" >&5;;
	    longdouble)
		echo $ac_n "checking i386 double-align of long double""... $ac_c" 1>&6
echo "configure:3586: checking i386 double-align of long double" >&5;;
	    *)
		echo $ac_n "checking i386 double-align of $i""... $ac_c" 1>&6
echo "configure:3589: checking i386 double-align of $i" >&5;;
	esac
	${CC} ${CPPFLAGS} ${CFLAGS} -malign-double ${hasLLFlags} ${hasLDFlags} -DCHECK_TYPE=$i ./utils/align.c -o align
	if test -x ./align; then
	    getAlign=`./align | grep -v Linking`
	fi
	if test $getAlign -eq 0; then
	    echo "$ac_t""can't determine????" 1>&6
	    exit 1
	else
	    echo "$ac_t""$getAlign" 1>&6
	    case $i in
		char)
		    cat >> confdefs.h <<EOF
#define I386_CHAR_ALIGN2 $getAlign
EOF
;;
		short)
		    cat >> confdefs.h <<EOF
#define I386_SHORT_ALIGN2 $getAlign
EOF
;;
		int)
		    cat >> confdefs.h <<EOF
#define I386_INT_ALIGN2 $getAlign
EOF
;;
		long)
		    cat >> confdefs.h <<EOF
#define I386_LONG_ALIGN2 $getAlign
EOF
;;
		longlongint)
		    cat >> confdefs.h <<EOF
#define I386_LONGLONG_ALIGN2 $getAlign
EOF
;;
		float)
		    cat >> confdefs.h <<EOF
#define I386_FLOAT_ALIGN2 $getAlign
EOF
;;
		double)
		    cat >> confdefs.h <<EOF
#define I386_DOUBLE_ALIGN2 $getAlign
EOF
;;
		longdouble)
		    cat >> confdefs.h <<EOF
#define I386_LONGDOUBLE_ALIGN2 $getAlign
EOF
;;
	    esac
	fi
	rm -rf ./align ./align.*
    done
fi
# --------------------------------------------------------------------


# --------------------------------------------------------------------
# 32/64 bit int type

rm -rf ./szchk ./szchk.*
echo "$ac_t""Creating size check program" 1>&6
${CC} ${CPPFLAGS} ${CFLAGS} ${hasLLFlags} ./utils/size.c -o szchk
if test ! -x ./szchk; then
    echo "$ac_t""can't create size check program. exit." 1>&6
    exit 1
fi

F2C_INT64_FLAGS=""
for i in 16 32 64
do
    echo $ac_n "checking $i bit integer""... $ac_c" 1>&6
echo "configure:3664: checking $i bit integer" >&5
    typName=`./szchk $i`
    if test "x${typName}" = "xunknown"; then
	case $i in
	    16)
		TYPE_INT16="short"
		
		asump=${TYPE_INT16};;
	    32)
		TYPE_INT32="int"
		
		asump=${TYPE_INT32};;
	    64)
		TYPE_INT64="long long int"
		
		asump=${TYPE_INT64};;
	esac
	echo "$ac_t""not supported. use $asump" 1>&6
    else
	echo "$ac_t""$typName" 1>&6
	case $i in
	    16)
		cat >> confdefs.h <<\EOF
#define HAS_INT16 1
EOF

		TYPE_INT16=${typName}
		;;
	    32)
		cat >> confdefs.h <<\EOF
#define HAS_INT32 1
EOF

		TYPE_INT32=${typName}
		;;
	    64)
		cat >> confdefs.h <<\EOF
#define HAS_INT64 1
EOF

		F2C_INT64_FLAGS="-DAllow_TYQUAD"
		TYPE_INT64=${typName}
		;;
	esac
    fi
done

rm -rf ./szchk ./szchk.*
# --------------------------------------------------------------------


# --------------------------------------------------------------------
# check size of integer enough to hold size of void *

echo $ac_n "checking integer type enough to hold void pointer""... $ac_c" 1>&6
echo "configure:3719: checking integer type enough to hold void pointer" >&5
${CC} -I. ${CPPFLAGS} ${CFLAGS} ${hasLLFlags} ./utils/chkvoidp.c -o chkvoidp
voidPint="unknown"
if test -x ./chkvoidp; then
    voidPint=`./chkvoidp`
else
    echo "$ac_t""can't create check program. exit." 1>&6
    exit 1
fi
if test "x${voidPint}" = "xunknown"; then
    echo "$ac_t""can't determine????" 1>&6
    exit 1
else
    echo "$ac_t""$voidPint" 1>&6
fi
INT_ENUFF_FOR_VOIDP=$voidPint

rm -f ./chkvoidp.* ./chkvoidp
# --------------------------------------------------------------------


# --------------------------------------------------------------------
# check 64 bit virtual address

echo $ac_n "checking 64 bit virtual address""... $ac_c" 1>&6
echo "configure:3744: checking 64 bit virtual address" >&5
${CC} -I. ${CPPFLAGS} ${CFLAGS} ./utils/addr64.c -o ./addr64
addrIs64="unknown"
if test -x ./addr64; then
    addrIs64=`./addr64`
else
    echo "$ac_t""can't create check program. exit." 1>&6
    exit 1
fi
if test "x$addrIs64" = "xunknown"; then
    echo "$ac_t""can't determine????" 1>&6
    exit 1
else
    if test "x$addrIs64" = "x8"; then
	echo "$ac_t""yes" 1>&6
	cat >> confdefs.h <<\EOF
#define ADDR_IS_64 1
EOF

    else
	echo "$ac_t""no" 1>&6
    fi
fi
rm -f ./addr64.* ./addr64
# --------------------------------------------------------------------


# --------------------------------------------------------------------
# has printf "%qd"

rm -f ./hasqd.* ./hasqd
echo $ac_n "checking has quad-precision print format""... $ac_c" 1>&6
echo "configure:3776: checking has quad-precision print format" >&5
${CC} -I. ${CPPFLAGS} ${CFLAGS} ./utils/hasqd.c -o ./hasqd > /dev/null 2>&1
hasQD=no
if test -x ./hasqd; then
    ret=`./hasqd`
    if test "x$ret" = "xqd" -o "x$ret" = "x%qd"; then
	hasQD=no
    else
	hasQD=yes
    fi
fi
echo "$ac_t""${hasQD}" 1>&6
if test "x${hasQD}" = "xyes"; then
    cat >> confdefs.h <<\EOF
#define HAS_QUAD_PRINT 1
EOF

fi
rm -f ./hasqd.* ./hasqd
# --------------------------------------------------------------------


# --------------------------------------------------------------------
# quad real support

if test "${OS}" = "linux"; then
    gmpIncDir=/usr/include
    gmpLibDir=/usr/lib
else
    gmpIncDir=/usr/local/include
    gmpLibDir=/usr/local/lib
fi

gmpIncOpt=""
gmpDirOpt=""
qRealPrecBits=128

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


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


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


if test "x${doQReal}" = "xyes"; then
    if test -f ${gmpIncDir}/gmp.h; then
	true
    else
	echo "$ac_t""can't find ${gmpIncDir}/gmp.h. exit." 1>&6
	exit 1
    fi
    gmpLibs=`ls ${gmpLibDir}/libgmp.* 2> /dev/null`
    if test "x${gmpLibs}" = "x"; then
	echo "$ac_t""can't find ${gmpLibDir}/libgmp.*. exit." 1>&6
	exit 1
    fi
    gmpIncOpt="-I${gmpIncDir}"
    gmpLibOpt="-L${gmpLibDir} -lgmp"
fi

# Check whether --with-precision or --without-precision was given.
if test "${with_precision+set}" = set; then
  withval="$with_precision"
  qRealPrecBits=$withval
else
  qRealPrecBits=128
fi



# libgmp check
omniLimbT="int"
omniExpT="int"
omniQRealPrecInLimb="1"
omniQRealFillGap=""
if test "x${doQReal}" = "xyes"; then
    omniQPrec=$qRealPrecBits
    cat >> confdefs.h <<\EOF
#define ENABLE_QREAL 1
EOF

    cat >> confdefs.h <<EOF
#define OMNI_QREAL_PREC $omniQPrec
EOF


    qcCC () {
	rm -f $2 ${2}.*
	${CC} -I. ${CPPFLAGS} ${CFLAGS} -DENABLE_QREAL ${hasLLFlags} ${gmpIncOpt} $3 $1 -o $2 ${gmpLibOpt}
	if test -x $2; then
	    ret=`$2 $4`
	    if test "x${ret}" = "x"; then
		echo "$ac_t""can't determine??. exit." 1>&6
		exit 1
	    else
		rm -f $2 ${2}.*
		echo ${ret}
	    fi
	else
	    echo "$ac_t""can't create check program. exit." 1>&6
	    exit 1
	fi
    }

    # check size of mp_exp_t
    echo $ac_n "checking size of GNU-MP mp_exp_t""... $ac_c" 1>&6
echo "configure:3902: checking size of GNU-MP mp_exp_t" >&5
    eSz=`qcCC utils/csMPexp.c ./csMPexp`
    echo "$ac_t""${eSz}" 1>&6
    omniExpT=""
    case ${eSz} in
	2)
	    omniExpT=${TYPE_INT16};;
	4)
	    omniExpT=${TYPE_INT32};;
	8)
	    omniExpT=${TYPE_INT64};;
	*)
	    echo "$ac_t""can't determine basic type of mp_exp_t ??. exit." 1>&6
	    exit 1;;
    esac
    cat >> confdefs.h <<EOF
#define OMNI_SIZEOF_QEXP_T $eSz
EOF


    # check size of mp_limb_t
    echo $ac_n "checking size of GNU-MP mp_limb_t""... $ac_c" 1>&6
echo "configure:3924: checking size of GNU-MP mp_limb_t" >&5
    lSz=`qcCC utils/csMPlimb.c ./csMPlimb`
    echo "$ac_t""${lSz}" 1>&6
    omniLimbT=""
    case ${lSz} in
	2)
	    omniLimbT=${TYPE_INT16};;
	4)
	    omniLimbT=${TYPE_INT32};;
	8)
	    omniLimbT=${TYPE_INT64};;
	*)
	    echo "$ac_t""can't determine basic type of mp_limb_t ??. exit." 1>&6
	    exit 1;;
    esac
    cat >> confdefs.h <<EOF
#define OMNI_SIZEOF_QLIM_T $lSz
EOF


    # check how many mp_limb_t the GNU-MP needed for N bit precision.
    echo $ac_n "checking how many mp_limb_t needed for $omniQPrec bit precision""... $ac_c" 1>&6
echo "configure:3946: checking how many mp_limb_t needed for $omniQPrec bit precision" >&5
    omniQRealPrecInLimb=`qcCC utils/cMPlb.c ./cMPlb '' $omniQPrec`
    echo "$ac_t""$omniQRealPrecInLimb" 1>&6
    cat >> confdefs.h <<EOF
#define OMNI_QLIM_LEN $omniQRealPrecInLimb
EOF


    # check _omQReal_t needs a gap between _mp_exp and _mp_d[omniQRealPrecInLimb].
    echo $ac_n "checking _omQReal_t needs a gap between _mp_exp and _mp_d""... $ac_c" 1>&6
echo "configure:3956: checking _omQReal_t needs a gap between _mp_exp and _mp_d" >&5
    gapInByte=`expr $lSz - $eSz`
    subStr=""
    if test ${gapInByte} -gt 0; then
	case ${gapInByte} in
	    2)
		# lim == int, exp == short
		subStr="${TYPE_INT16} _gap_;";;
	    4)
		# lim == long long, exp == int
		subStr="${TYPE_INT32} _gap_;";;
	    *)
		# lim == long long, exp == short
				subStr="char _gap_[${gapInByte}];"
				;;
	esac
    fi
    if test "x${subStr}" != "x"; then
	echo "$ac_t""yes, put a \"${subStr}\" member in _omQReal_t." 1>&6
	omniQRealFillGap=${subStr}
	cat >> confdefs.h <<\EOF
#define OMNI_QREAL_NEED_GAP_MEMBER 1
EOF

	cat >> confdefs.h <<EOF
#define OMNI_QREAL_GAP_SIZE ${gapInByte}
EOF

    else
	omniQRealFillGap="/* if ((sizeof(mp_exp_t) < sizeof(mp_limb_t)), here must be a gap filling member. */"
	echo "$ac_t""no" 1>&6
    fi

    # check libgmp has an mpf_floor(), appeared in gmp3 later.
    oLIBS=${LIBS}
    LIBS="${LIBS} ${gmpLibOpt}"
    oCFLAGS=${CFLAGS}
    CFLAGS="${CFLAGS} ${CPPFLAGS} -DENABLE_QREAL ${gmpIncOpt}"
    echo $ac_n "checking mpf_floor() in $LIBS""... $ac_c" 1>&6
echo "configure:3995: checking mpf_floor() in $LIBS" >&5
    hasFloor=no
    cat > conftest.$ac_ext <<EOF
#line 3998 "configure"
#include "confdefs.h"

	    #include "gmp.h"
	
int main() {

	    mpf_t a;
	    mpf_t b;
	    (void)mpf_floor(a, b);
	
; return 0; }
EOF
if { (eval echo configure:4011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6; hasFloor=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
    
fi
rm -f conftest*
    LIBS=${oLIBS}
    CFLAGS=${oCFLAGS}
    if test "x${hasFloor}" = "xno"; then
	echo "$ac_t""You have to use gmp3 or later. exit." 1>&6
	exit 1
    fi
fi









# --------------------------------------------------------------------


# --------------------------------------------------------------------
# check sample code installation

EXAMPLES_DIR=""
# install source
# Check whether --enable-installSample or --disable-installSample was given.
if test "${enable_installSample+set}" = set; then
  enableval="$enable_installSample"
  doExamples=$enableval
else
  doExamples=no
fi

if test "x${doExamples}" = "xyes"; then
    EXAMPLES_DIR="tests"
fi

# --------------------------------------------------------------------


# --------------------------------------------------------------------
# Document dir

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

if test "x$scoreDoc" = "xyes"; then
    DOC_DIR=doc
else
    DOC_DIR=lib/openmp/doc
fi

# --------------------------------------------------------------------


# --------------------------------------------------------------------
# wrapper support.

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

if test "x${doWrapper}" != "xno"; then
  wrapperOrgPrefix="${orgPrefix}"
  wrapperPrefix="${prefix}"
  if test "${exec_prefix}" = '${prefix}' ; then
    wrapperExecPrefix='${wrapper_prefix}'
  else
    t=`echo ${orgExec_prefix} | egrep '^/.*$'`
    if test "x${t}" = "x${orgExec_prefix}"; then
	wrapperExecPrefix="\$(DESTDIR)${orgExec_prefix}"
    else
	wrapperExecPrefix="\$(DESTDIR)/${orgExec_prefix}"
    fi
  fi
  t=`echo ${orgPrefix} | egrep '^/.*$'`
  if test "x${t}" = "x${orgPrefix}"; then
    orgPrefix="${orgPrefix}/lib/openmp/${ccType}"
    prefix="\$(DESTDIR)${orgPrefix}"
  else
    orgPrefix="${orgPrefix}/lib/openmp/${ccType}"
    prefix="\$(DESTDIR)/${orgPrefix}"
  fi
  unset t  
  exec_prefix='${prefix}'
  orgExec_prefix=""
else
  wrapperOrgPrefix=""
  wrapperPrefix=""
  wrapperExecPrefix=""
fi





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

if test "x${doWrapper}" = "xno"; then
    doWrapperDefault=no
fi
wrapperInstallDefault=no
if test "x${doWrapperDefault}" != "xno"; then
    wrapperInstallDefault=yes
fi


# --------------------------------------------------------------------


# --------------------------------------------------------------------
# Various command check

# Check ranlib
# 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:4153: 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

if test "x${isGcc}" = "xno"; then
    case $OS in
	solaris*|irix*)
	    RANLIB=':';;
    esac
fi

if test "${OS}" = "cygwin32"; then
    INSTALLCOM='install -c'
    MKDIRCOM='mkdir -p'
else
    INSTALLCOM='$(TOPDIR)/utils/install-sh -c'
    MKDIRCOM='$(TOPDIR)/utils/mkdirhier'
fi

AR="ar cr"

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

fi

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

if test "`basename $YACCCOM`" = "bison"; then
    YACCCOM="$YACCCOM -y"
fi

JAVACCOM=""
# 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:4282: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_JAVACCOM'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$JAVACCOM" in
  /*)
  ac_cv_path_JAVACCOM="$JAVACCOM" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_JAVACCOM="$JAVACCOM" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="${PATH}:/bin:/usr/bin:/usr/local/bin:/opt/bin:/opt/local/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_JAVACCOM="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_JAVACCOM" && ac_cv_path_JAVACCOM="javac"
  ;;
esac
fi
JAVACCOM="$ac_cv_path_JAVACCOM"
if test -n "$JAVACCOM"; then
  echo "$ac_t""$JAVACCOM" 1>&6
else
  echo "$ac_t""no" 1>&6
fi


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


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


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


GENJAR='$(TOPDIR)/utils/genjar'













# --------------------------------------------------------------------


# --------------------------------------------------------------------
# For benchtool

# check Perl versoin is 5
PERL5=""
for ac_prog in perl5 perl
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:4457: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PERL5'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$PERL5" in
  /*)
  ac_cv_path_PERL5="$PERL5" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_PERL5="$PERL5" # 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_PERL5="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
PERL5="$ac_cv_path_PERL5"
if test -n "$PERL5"; then
  echo "$ac_t""$PERL5" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$PERL5" && break
done


inDev=0
if test "$PERL5" = ""; then
    inDev=0
else
    inDev=0
    isPerlVersion5=no
    echo $ac_n "checking Perl version is 5""... $ac_c" 1>&6
echo "configure:4500: checking Perl version is 5" >&5
    pTmp=/tmp/.btoolPerlChk.$$
    ${PERL5} -v > ${pTmp} 2>&1
    chk=`grep 'This is perl, version 5' ${pTmp}`
    if test "x${chk}" = "x"; then
	echo "$ac_t""no" 1>&6
	isPerlVersion5=no
    else
	echo "$ac_t""yes" 1>&6
	isPerlVersion5=yes
    fi
    rm -f ${pTmp}
    unset chk pTmp

fi


# check bash
BASH2=""
for ac_prog in bash2 bash
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:4524: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_BASH2'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$BASH2" in
  /*)
  ac_cv_path_BASH2="$BASH2" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_BASH2="$BASH2" # 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_BASH2="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
BASH2="$ac_cv_path_BASH2"
if test -n "$BASH2"; then
  echo "$ac_t""$BASH2" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$BASH2" && break
done
test -n "$BASH2" || BASH2="${PATH}:/bin:/usr/bin:/usr/local/bin:/opt/bin:/opt/local/bin"



# check for mm5, parkbench
HOSTARCH=`./utils/config.guess | grep -v Linking`
PPTGT=""
MM5TGT=""

case $HOSTARCH in
    i*86-pc-linux*)
        PPTGT=linux
        MM5TGT=Linux;;
    alpha*-unknown-linux*)
        PPTGT=linux
        MM5TGT=ALPHA_OMNI_OMP;;
    i386-pc-solaris*)
        PPTGT=sol2
        MM5TGT=SUN_OMNI_OMP;;
    sparc-sun-solaris*)
        PPTGT=sol2
        MM5TGT=SUN_OMNI_OMP;;
    mips-sgi-irix*)
        PPTGT=orig2k
        MM5TGT=MIPS_OMNI_OMP;;
esac



# --------------------------------------------------------------------


# --------------------------------------------------------------------
# check Java VM is kaffe
isKaffe=no
if test "x${useJava}" = "xyes"; then
    echo $ac_n "checking Kaffe""... $ac_c" 1>&6
echo "configure:4595: checking Kaffe" >&5
    jTmp=/tmp/.omniJavaChk.$$
    ${JAVACCOM} > ${jTmp} 2>&1
    chk=`grep 'kjc: no source file given' ${jTmp}`
    if test "x${chk}" = "x"; then
	chk=`grep 'usage: at.dms.kjc.Main' ${jTmp}`
	if test "x${chk}" = "x"; then
	    echo "$ac_t""no" 1>&6
	else
	    echo "$ac_t""yes" 1>&6
	    isKaffe=yes
	fi
    else
        echo "$ac_t""yes" 1>&6
        isKaffe=yes
    fi
    rm -f ${jTmp}
    unset chk jTmp
fi

# --------------------------------------------------------------------


# --------------------------------------------------------------------
# check Java VM is IBM Java2
isIBMJava2=no
if test "x${useJava}" = "xyes"; then
    echo $ac_n "checking IBM Java2""... $ac_c" 1>&6
echo "configure:4623: checking IBM Java2" >&5
    jTmp=/tmp/.omniJavaChk.$$
    ${JAVACOM} -fullversion > ${jTmp} 2>&1
    chk=`grep 'J2RE 1.3.0 IBM' ${jTmp}`
    if test "x${chk}" = "x"; then
	echo "$ac_t""no" 1>&6
    else
	echo "$ac_t""yes" 1>&6
	isIBMJava2=yes
    fi
    rm -f ${jTmp}
    unset chk jTmp
fi

# --------------------------------------------------------------------


# --------------------------------------------------------------------
# Misc.
javaType=unknown
if test "x${useJava}" = "xyes"; then
    if test "x${isKaffe}" = "xyes"; then
	javaType=kaffe
    elif test "x${isIBMJava2}" = "xyes"; then
	javaType=ibm
    fi
fi

# --------------------------------------------------------------------


# --------------------------------------------------------------------
# Finally, sed.

defsTmp=.defsTmp.$$
echo '@DEFS@' > ${defsTmp}.in
echo ${CPUDEF} >> ${defsTmp}.in
echo ${OSDEF} >> ${defsTmp}.in

if test ${inDev} -eq 1; then
    if test "x${isPerlVersion5}" = "xyes"; then 
	    BENCHTOOL_DIR=tools/benchtool
	    BENCH_MK=${BENCHTOOL_DIR}/Makefile
    else
	    BENCHTOOL_DIR=''
	    BENCH_MK=''
    fi
    FTEST_MK=tests/F-test/Makefile
    FTESTOMP_MK=tests/F-test/OMP-test/Makefile
else
    BENCHTOOL_DIR=''
    BENCH_MK=''
    FTEST_MK=''
    FTESTOMP_MK=''
fi


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

# Transform confdefs.h into DEFS.
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
cat > conftest.defs <<\EOF
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
s%\[%\\&%g
s%\]%\\&%g
s%\$%$$%g
EOF
DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
rm -f conftest.defs


# 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 "$defsTmp
Makefile
include/Makefile
include/exc_platform.h
include/omp.h
include/omniQReal.h
C-front/Makefile
Cxx-front/Makefile
F-front/Makefile
exc-tools-java/exc/object/Xcodegen/Makefile
exc-tools-java/exc/Makefile
lib/libompc/Makefile
lib/libompst/Makefile
lib/libompsm/Makefile
lib/libogr/Makefile
lib/libf2c/f2c.h
lib/libf2c/Makefile
lib/libtlog/Makefile
lib/runtime/Makefile
tools/jexc/Makefile
tools/tlogview/Makefile
tools/jmpstat/Makefile
tools/driver/Makefile
tools/driver/omniDriver
tools/wrapper/Makefile
tools/wrapper/wrapper
tests/Makefile
tests/cg/Makefile
tests/laplace/Makefile
tests/laplace-f77/Makefile
tests/tiny/Makefile
tests/C-test/Makefile
utils/genjar
doc/Makefile
$BENCH_MK
$FTEST_MK
$FTESTOMP_MK
" | 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%@omniVersion@%$omniVersion%g
s%@orgPrefix@%$orgPrefix%g
s%@orgExec_prefix@%$orgExec_prefix%g
s%@OS@%$OS%g
s%@CPU@%$CPU%g
s%@CC@%$CC%g
s%@ccType@%$ccType%g
s%@CPP@%$CPP%g
s%@ALLOCA@%$ALLOCA%g
s%@gccUnionBug@%$gccUnionBug%g
s%@OMPC_LIB_ASM@%$OMPC_LIB_ASM%g
s%@THREAD_DEF@%$THREAD_DEF%g
s%@LOCK_DEF@%$LOCK_DEF%g
s%@available_threads@%$available_threads%g
s%@available_locks@%$available_locks%g
s%@thread_type@%$thread_type%g
s%@lock_type@%$lock_type%g
s%@ignore_pair@%$ignore_pair%g
s%@LIBOMPST_DIR@%$LIBOMPST_DIR%g
s%@doStackThread@%$doStackThread%g
s%@doUnixShmem@%$doUnixShmem%g
s%@doScash@%$doScash%g
s%@LIBOMPSM_DIR@%$LIBOMPSM_DIR%g
s%@scoreNickname@%$scoreNickname%g
s%@scoreDir@%$scoreDir%g
s%@SHMEM_FLAGS@%$SHMEM_FLAGS%g
s%@SCASH_INC@%$SCASH_INC%g
s%@SHMEM_SRC@%$SHMEM_SRC%g
s%@doOpenGR@%$doOpenGR%g
s%@LIBOGR_DIR@%$LIBOGR_DIR%g
s%@OPENGR_DEF@%$OPENGR_DEF%g
s%@OPENGR_HDR@%$OPENGR_HDR%g
s%@OPENGR_SRCS@%$OPENGR_SRCS%g
s%@OPENGR_OBJS@%$OPENGR_OBJS%g
s%@OGRCC_DRIVER@%$OGRCC_DRIVER%g
s%@GRIDRPC_DEF@%$GRIDRPC_DEF%g
s%@GRIDRPC_LIBS@%$GRIDRPC_LIBS%g
s%@EXC_JAVADIR@%$EXC_JAVADIR%g
s%@TLOGVIEW_DIR@%$TLOGVIEW_DIR%g
s%@JMPSTAT_DIR@%$JMPSTAT_DIR%g
s%@useJava@%$useJava%g
s%@doJexcBackend@%$doJexcBackend%g
s%@jexcDir@%$jexcDir%g
s%@jexcBackend@%$jexcBackend%g
s%@TYPE_INT16@%$TYPE_INT16%g
s%@TYPE_INT32@%$TYPE_INT32%g
s%@TYPE_INT64@%$TYPE_INT64%g
s%@F2C_INT64_FLAGS@%$F2C_INT64_FLAGS%g
s%@INT_ENUFF_FOR_VOIDP@%$INT_ENUFF_FOR_VOIDP%g
s%@doQReal@%$doQReal%g
s%@gmpIncOpt@%$gmpIncOpt%g
s%@gmpLibOpt@%$gmpLibOpt%g
s%@omniQPrec@%$omniQPrec%g
s%@omniExpT@%$omniExpT%g
s%@omniLimbT@%$omniLimbT%g
s%@omniQRealPrecInLimb@%$omniQRealPrecInLimb%g
s%@omniQRealFillGap@%$omniQRealFillGap%g
s%@EXAMPLES_DIR@%$EXAMPLES_DIR%g
s%@DOC_DIR@%$DOC_DIR%g
s%@wrapperOrgPrefix@%$wrapperOrgPrefix%g
s%@wrapperPrefix@%$wrapperPrefix%g
s%@wrapperExecPrefix@%$wrapperExecPrefix%g
s%@doWrapper@%$doWrapper%g
s%@wrapperInstallDefault@%$wrapperInstallDefault%g
s%@doWrapperDefault@%$doWrapperDefault%g
s%@RANLIB@%$RANLIB%g
s%@STGCC@%$STGCC%g
s%@YACCCOM@%$YACCCOM%g
s%@JAVACCOM@%$JAVACCOM%g
s%@JAVACOM@%$JAVACOM%g
s%@JARCOM@%$JARCOM%g
s%@ZIPCOM@%$ZIPCOM%g
s%@AR@%$AR%g
s%@INSTALLCOM@%$INSTALLCOM%g
s%@MKDIRCOM@%$MKDIRCOM%g
s%@GENJAR@%$GENJAR%g
s%@PERL5@%$PERL5%g
s%@BASH2@%$BASH2%g
s%@MM5TGT@%$MM5TGT%g
s%@PPTGT@%$PPTGT%g
s%@isKaffe@%$isKaffe%g
s%@isIBMJava2@%$isIBMJava2%g
s%@javaType@%$javaType%g
s%@BENCHTOOL_DIR@%$BENCHTOOL_DIR%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-"$defsTmp
Makefile
include/Makefile
include/exc_platform.h
include/omp.h
include/omniQReal.h
C-front/Makefile
Cxx-front/Makefile
F-front/Makefile
exc-tools-java/exc/object/Xcodegen/Makefile
exc-tools-java/exc/Makefile
lib/libompc/Makefile
lib/libompst/Makefile
lib/libompsm/Makefile
lib/libogr/Makefile
lib/libf2c/f2c.h
lib/libf2c/Makefile
lib/libtlog/Makefile
lib/runtime/Makefile
tools/jexc/Makefile
tools/tlogview/Makefile
tools/jmpstat/Makefile
tools/driver/Makefile
tools/driver/omniDriver
tools/wrapper/Makefile
tools/wrapper/wrapper
tests/Makefile
tests/cg/Makefile
tests/laplace/Makefile
tests/laplace-f77/Makefile
tests/tiny/Makefile
tests/C-test/Makefile
utils/genjar
doc/Makefile
$BENCH_MK
$FTEST_MK
$FTESTOMP_MK
"}
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*

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 755 utils/genjar
# --------------------------------------------------------------------


# --------------------------------------------------------------------
# Epilogue

checkNull () {
    if test -z "$1"; then
	return 0
    else
	return 1
    fi
}

genConfHdr () {
    dstHdr=./include/omniConfig.h
    dstHdr2=./include/omniBackend.h
    tmpHdr=/tmp/.tmpHdr.$$
    > $tmpHdr
    for i in $*
    do
	case $i in
	    -I*)
		true;;
	    -D*)
		def=`echo $i | sed 's/-D//'`
		hasEq=`echo ${def} | grep '=' 2>/dev/null`
		checkNull "${hasEq}"
		if test $? -eq 0; then
		    case ${def} in
			OMNI_OS_*|OMNI_CPU_*)
			    echo "#ifndef ${def}" >> $tmpHdr
			    echo "#define ${def} 1" >> $tmpHdr
			    echo "#endif /* !${def} */" >> $tmpHdr;;
			*)
			    echo "#define ${def} 1" >> $tmpHdr;;
		    esac
		else
		    mcr=`echo ${def} | awk -F'=' '{ print $1 }'`
		    val=`echo ${def} | awk -F'=' '{ print $NF }'`
		    if test $val -eq 0; then
			echo "#undef ${mcr}" >> $tmpHdr
		    else
			echo "#define ${mcr} ${val}" >> $tmpHdr
		    fi
		fi;;
	    -U*)
		def=`echo $i | sed 's/-U//'`
		echo "#undef ${def}" >> $tmpHdr;;
	esac
    done

    echo "$ac_t""creating ${dstHdr}" 1>&6
    cat $tmpHdr ./include/exc_platform.h > $dstHdr
    echo "$ac_t""creating ${dstHdr2}" 1>&6
    cat $tmpHdr ./include/omniBackend.h.in > $dstHdr2
    rm -f $tmpHdr
}

		    
genLibTargetTmpl () {
    dir=$1
    tmpl=${dir}/target.tmpl
    echo "$ac_t""creating ${tmpl}" 1>&6
    > ${tmpl}
    ./utils/genLibTarget --locks="${available_locks}" --threads="${available_threads}" \
	--def_lock=${lock_type} --def_thread=${thread_type} --ignore_combo="${ignore_pair}" \
	--os=${OS} --cpu=${CPU} \
	`(cd ${dir}; make checkObj)` > ${tmpl}
}

genLibTargetTmplf77 () {
    dir=$1
    tmpl=${dir}/target.tmpl
    oOpt=""
    if test "x${doStackThread}" = "xyes"; then
	oOpt="${oOpt} --use-StackThread"
    fi
    if test "x${doScash}" = "xyes"; then
	oOpt="${oOpt} --use-scash --score_dir=${scoreDir}"
    fi
    if test "x${doUnixShmem}" = "xyes"; then
	oOpt="${oOpt} --use-shmem"
    fi
    echo "$ac_t""creating ${tmpl}" 1>&6
    > ${tmpl}
    ./utils/genLibTargetf77 --locks="${available_locks}" --threads="${available_threads}" \
	--def_lock=${lock_type} --def_thread=${thread_type}  --ignore_combo="${ignore_pair}" \
	--os=${OS} --cpu=${CPU} ${oOpt} \
	`(cd ${dir}; make checkObj)` > ${tmpl}
}

genSysConf () {
    tmpl=./tools/driver/system.conf
    echo "$ac_t""creating ${tmpl}" 1>&6
    rm -f ${tmpl}
    ./utils/genSystemTmpl --os=${OS} --cpu=${CPU} --gccBug=${gccUnionBug} --useJava=${useJava} --javaType=${javaType} > ${tmpl}
}

genLibTargetTmpl lib/libompc
genLibTargetTmplf77 lib/libf2c
genSysConf
genConfHdr `cat ${defsTmp}`
rm -f ${defsTmp} ${defsTmp}.in

if test "x${useJava}" = "xno"; then
    echo "$ac_t""untar'ing exc-tools-java class file" 1>&6
    cTarF=etjClass.tar
    (cd exc-tools-java; tar xf ../utils/$cTarF)
fi
