#! /bin/sh

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

# Defaults:
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
  --enable-gcc            use gcc if it exists [default=cc]"
ac_help="$ac_help
  --enable-debug[=OPTS]   build for debugging [default=no]"
ac_help="$ac_help
  --with-system[=SYSTEM]  specify system"
ac_help="$ac_help
  --enable-64bit          enable 64bit support (where applicable)"
ac_help="$ac_help
  --enable-legacy         build legacy code [default=no]"
ac_help="$ac_help
  --enable-scope          scope enumerations values [default=no]"
ac_help="$ac_help
  --enable-scope          base scope for family/zone ref-to [default=no]"
ac_help="$ac_help
  --with-fortran[=F2C]    enable Fortran interface [default=yes]"
ac_help="$ac_help
  --enable-shared[=all]   build a shared library [default=no]"
ac_help="$ac_help
  --with-hdf5[=DIR]       use HDF5 [default=no]"
ac_help="$ac_help
  --with-zlib[=DIR/LIB]   use zlib with HDF5 [default=no]"
ac_help="$ac_help
  --with-szip[=LIB]       use szip with HDF5 [default=no]"
ac_help="$ac_help
  --with-mpi[=DIR/mpicc]  use MPI with HDF5 [default=no]"
ac_help="$ac_help
  --enable-parallel       enable parallel IO support [default=no]"
ac_help="$ac_help
  --enable-lfs            enable large file support [default=no]"
ac_help="$ac_help
  --enable-cgnstools      build CGNStools [default=no]"
ac_help="$ac_help
  --with-x                use the X Window System"
ac_help="$ac_help
  --with-tcl=TCLdir       directory containing Tcl distribution"
ac_help="$ac_help
  --with-tk=TKdir         directory containing TK distribution"
ac_help="$ac_help
  --enable-cut            build cgnsplot with cut plane [default=yes]"
ac_help="$ac_help
  --enable-mesh           build cgnsplot with structured mesh boundaries [default=yes]"

# 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=cgnslib.c

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

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


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



#--------------------------------------------------------------------------
# cleanup any previous build
#--------------------------------------------------------------------------

if test -f Makefile -a -f make.defs; then
  echo "$ac_t"""removing previous build"" 1>&6
  make distclean >/dev/null 2>&1
fi

#--------------------------------------------------------------------------
# get the CGNS version
#--------------------------------------------------------------------------

echo $ac_n "checking CGNS version""... $ac_c" 1>&6
echo "configure:575: checking CGNS version" >&5
CGNSVERS=`grep CGNS_DOTVERS cgnslib.h | sed "s/#define *CGNS_DOTVERS *//"`
echo "$ac_t""$CGNSVERS" 1>&6

CGNSDIR=`/bin/pwd`

## The following variables are used to distinguish between building a
## serial and parallel library.
##
##    HAVE_PARALLEL	-- defined in #scot# H5config.h if we are building
##			   a parallel library even if configure wasn't
##			   able to find some header file or library that
##			   might be required. This is defined if the
##			   compiler looks like a parallel compiler (e.g.,
##			   mpicc or mpcc) or if the user explicitly states
##			   that a parallel library is being built by supplying
##			   the `--enable-parallel' configure switch.
##
##    PARALLEL		-- This variable is set to a non-null value if
##			   configure thinks we're compiling a parallel
##			   version of the library.
##
##    RUNSERIAL	        -- This is a command which will be prepended to
##			   the executable name to run the executable using
##			   a single process. For serial versions of the
##			   library this will normally be empty. For parallel
##			   versions it might be something like `mpiexec -n 1'.
##			   The value of this variable is substituted in *.in
##			   files.
##
##    RUNPARALLEL	-- This is a command which will be prepended to
##			   the executable name to run the executable on
##			   multiple processors. For the serial library the
##			   value will normally be the empty string. For
##			   parallel library it should be something like
##			   "mpiexec -n \$\${NPROCS:=6}" where NPROCS will
##			   eventually contain the number of processors on which
##			   to run the executable (the double dollarsigns are to
##			   protect the expansion until make executes the
##			   command).  The value of this variable is
##			   substituted in *.in files.
##





#--------------------------------------------------------------------------
# get the C compiler
# If a C compiler not found, fail since can't build library
#--------------------------------------------------------------------------

echo $ac_n "checking if gcc is requested""... $ac_c" 1>&6
echo "configure:628: checking if gcc is requested" >&5
# Check whether --enable-gcc or --disable-gcc was given.
if test "${enable_gcc+set}" = set; then
  enableval="$enable_gcc"
  :
else
  enableval=no
fi

test ! "$enableval" = "no" && enableval=yes
use_gcc=$enableval
echo "$ac_t""$use_gcc" 1>&6

if test $use_gcc = 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:645: 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:675: 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:726: 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:758: 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 769 "configure"
#include "confdefs.h"

main(){return(0);}
EOF
if { (eval echo configure:774: \"$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:800: 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:805: 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:814: \"$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:833: 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

else
  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:869: 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
      # 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:918: 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
        { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
      fi
    fi
  fi
  echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:950: 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 961 "configure"
#include "confdefs.h"

main(){return(0);}
EOF
if { (eval echo configure:966: \"$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:992: 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:997: 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:1006: \"$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
fi

if test "$ac_cv_prog_gcc" = "yes"; then
  test -z "$CFLAGS" && CFLAGS=-O2
  # probably dont need this
  # CFLAGS="$CFLAGS -fwritable-strings -ffloat-store"
fi

CEOUT="-o \$(SPACE)"
COOUT="-o \$(SPACE)"

# check if the compiler supports prototyping - required

ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

echo $ac_n "checking if compiler supports prototyping""... $ac_c" 1>&6
echo "configure:1035: checking if compiler supports prototyping" >&5
cat > conftest.$ac_ext <<EOF
#line 1037 "configure"
#include "confdefs.h"
extern int func(int,int);
int func(int i, int j){return i + j;}
int main() {
func(0,1)
; return 0; }
EOF
if { (eval echo configure:1045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  proto=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  proto=no
fi
rm -f conftest*
echo "$ac_t""$proto" 1>&6
test $proto = no && \
  { echo "configure: error: compiler does not support prototyping" 1>&2; exit 1; }

#--------------------------------------------------------------------------
# get object and executable extensions
#--------------------------------------------------------------------------

echo $ac_n "checking for object suffix""... $ac_c" 1>&6
echo "configure:1064: checking for object suffix" >&5
if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  rm -f conftest*
echo 'int i = 1;' > conftest.$ac_ext
if { (eval echo configure:1070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  for ac_file in conftest.*; do
    case $ac_file in
    *.c) ;;
    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
    esac
  done
else
  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_objext" 1>&6
OBJEXT=$ac_cv_objext
ac_objext=$ac_cv_objext

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

int main() {

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

echo "$ac_t""$ac_cv_cygwin" 1>&6
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
echo "configure:1121: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1126 "configure"
#include "confdefs.h"

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

echo "$ac_t""$ac_cv_mingw32" 1>&6
MINGW32=
test "$ac_cv_mingw32" = yes && MINGW32=yes


echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
echo "configure:1152: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
  ac_cv_exeext=.exe
else
  rm -f conftest*
  echo 'int main () { return 0; }' > conftest.$ac_ext
  ac_cv_exeext=
  if { (eval echo configure:1162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
    for file in conftest.*; do
      case $file in
      *.c | *.o | *.obj) ;;
      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
      esac
    done
  else
    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
  fi
  rm -f conftest*
  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
fi
fi

EXEEXT=""
test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
echo "$ac_t""${ac_cv_exeext}" 1>&6
ac_exeext=$EXEEXT

LIBEXT=a

# Set the Fortran flags using FCFLAGS. If both FFLAGS (which predates FCFLAGS)
# and FCFLAGS is set then FFLAGS is set and FCFLAGS is ignored.
if test "x" = "x$FFLAGS" && test "x" != "x$FCFLAGS"; then
   FFLAGS="$FCFLAGS"
fi

#--------------------------------------------------------------------------
# get the Fortran compiler
# don't need it to build library, so don't fail if not found
# or the compiler doesn't work (don't use AC_PROG_F77)
# If running under CYGWIN, make sure we get g77 instead of Visual Fortran
#--------------------------------------------------------------------------
if test "x" != "x$FC"; then
    has_f77=yes
    F77=$FC
else
  if test -z "$F77"; then
    if test "$ac_cv_cygwin" = "yes"; then
      for ac_prog in g77 f2c
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:1207: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$F77"; then
  ac_cv_prog_F77="$F77" # 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_F77="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
F77="$ac_cv_prog_F77"
if test -n "$F77"; then
  echo "$ac_t""$F77" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$F77" && break
done

    else
      if test $use_gcc = yes; then
        for ac_prog in g77 f77 f90 f95 f2c
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:1243: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$F77"; then
  ac_cv_prog_F77="$F77" # 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_F77="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
F77="$ac_cv_prog_F77"
if test -n "$F77"; then
  echo "$ac_t""$F77" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$F77" && break
done

      else
        for ac_prog in f77 f90 f95 g77 f2c
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:1278: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_F77'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$F77"; then
  ac_cv_prog_F77="$F77" # 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_F77="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
F77="$ac_cv_prog_F77"
if test -n "$F77"; then
  echo "$ac_t""$F77" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

test -n "$F77" && break
done

      fi
    fi
  fi
  if test -z "$F77"; then
    has_f77=no
    F77=f77
    echo "configure: warning: no Fortran compiler was found" 1>&2
  else
    has_f77=yes
    echo $ac_n "checking whether we are using GNU Fortran 77""... $ac_c" 1>&6
echo "configure:1317: checking whether we are using GNU Fortran 77" >&5
if eval "test \"`echo '$''{'ac_cv_prog_g77'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.fpp <<EOF
#ifdef __GNUC__
  yes
#endif
EOF
if { ac_try='$F77 -E conftest.fpp'; { (eval echo configure:1326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  ac_cv_prog_g77=yes
else
  ac_cv_prog_g77=no
fi
fi

echo "$ac_t""$ac_cv_prog_g77" 1>&6
    if test "$ac_cv_prog_g77" = "yes"; then
      test -z "$FFLAGS" && FFLAGS=-O2
      test ! "$F77" = "f95" && FFLAGS="$FFLAGS -Wno-globals"
    fi
    rm -f conftest*
  fi
fi
FEOUT="-o \$(SPACE)"

#--------------------------------------------------------------------------
# check if debug requested
#--------------------------------------------------------------------------

BUILDDEBUG=0

echo $ac_n "checking if debugging is enabled""... $ac_c" 1>&6
echo "configure:1350: checking if debugging is enabled" >&5
# Check whether --enable-debug or --disable-debug was given.
if test "${enable_debug+set}" = set; then
  enableval="$enable_debug"
  :
else
  enableval=no
fi

if test "$enableval" = "no"; then
  debug=no
else
  if test "$enableval" = "" || test "$enableval" = "yes"; then
    opt=-g
  else
    opt=$enableval
  fi
  CFLAGS="$opt $CFLAGS"
  FFLAGS="$opt $FFLAGS"
  debug=yes
  BUILDDEBUG=1
fi
echo "$ac_t""$debug" 1>&6

#--------------------------------------------------------------------------
# check for programs - initialize library archiver
#--------------------------------------------------------------------------

AR="ar cr"
# 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:1382: 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 $debug = yes; then
  STRIP=:
else
  # Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1415: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$STRIP"; then
  ac_cv_prog_STRIP="$STRIP" # 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_STRIP="strip"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
fi
fi
STRIP="$ac_cv_prog_STRIP"
if test -n "$STRIP"; then
  echo "$ac_t""$STRIP" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

fi
AROUT=

#--------------------------------------------------------------------------
# check for header files
#--------------------------------------------------------------------------

echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:1450: 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 1465 "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:1471: \"$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 1482 "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:1488: \"$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 1499 "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:1505: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP=/lib/cpp
fi
rm -f conftest*
fi
rm -f conftest*
fi
rm -f conftest*
  ac_cv_prog_CPP="$CPP"
fi
  CPP="$ac_cv_prog_CPP"
else
  ac_cv_prog_CPP="$CPP"
fi
echo "$ac_t""$CPP" 1>&6

echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:1530: 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 1535 "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:1543: \"$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 1560 "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 1578 "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 1599 "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:1610: \"$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

test "$ac_cv_header_stdc" = "no" && \
  echo "configure: warning: Standard C header files not found - may not compile" 1>&2

#--------------------------------------------------------------------------
# check for typedefs and structures
#--------------------------------------------------------------------------

CFGFLAGS=

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

int main() {

/* Ultrix mips cc rejects this.  */
typedef int charset[2]; const charset x;
/* SunOS 4.1.1 cc rejects this.  */
char const *const *ccp;
char **p;
/* NEC SVR4.0.2 mips cc rejects this.  */
struct point {int x, y;};
static struct point const zero = {0,0};
/* AIX XL C 1.02.0.0 rejects this.
   It does not let you subtract one const X* pointer from another in an arm
   of an if-expression whose if-part is not a constant expression */
const char *g = "string";
ccp = &g + (g ? g-g : 0);
/* HPUX 7.0 cc rejects these. */
++ccp;
p = (char**) ccp;
ccp = (char const *const *) p;
{ /* SCO 3.2v4 cc rejects this.  */
  char *t;
  char const *s = 0 ? (char *) 0 : (char const *) 0;

  *t++ = 0;
}
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  int x[] = {25, 17};
  const int *foo = &x[0];
  ++foo;
}
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  typedef const int *iptr;
  iptr p = 0;
  ++p;
}
{ /* AIX XL C 1.02.0.0 rejects this saying
     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  struct s { int j; const int *ap[3]; };
  struct s *b; b->j = 5;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  const int foo = 10;
}

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

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

fi

test "ac_cv_c_const" = "no" && \
  CFGFLAGS="$CFGFLAGS -Dconst="

echo $ac_n "checking for size_t""... $ac_c" 1>&6
echo "configure:1721: 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 1726 "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

test "$ac_cv_type_size_t" = "no" && \
  CFGFLAGS="$CFGFLAGS -Dsize_t=unsigned"

#--------------------------------------------------------------------------
# installation program and directory
#--------------------------------------------------------------------------

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

# Find a good install program.  We prefer a C program (faster),
# so one script is as good as another.  But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:1793: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
  for ac_dir in $PATH; do
    # Account for people who put trailing slashes in PATH elements.
    case "$ac_dir/" in
    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
    *)
      # OSF1 and SCO ODT 3.0 have their own names for install.
      # Don't use installbsd from OSF since it installs stuff as root
      # by default.
      for ac_prog in ginstall scoinst install; do
        if test -f $ac_dir/$ac_prog; then
	  if test $ac_prog = install &&
            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
	    # AIX install.  It has an incompatible calling convention.
	    :
	  else
	    ac_cv_path_install="$ac_dir/$ac_prog -c"
	    break 2
	  fi
	fi
      done
      ;;
    esac
  done
  IFS="$ac_save_IFS"

fi
  if test "${ac_cv_path_install+set}" = set; then
    INSTALL="$ac_cv_path_install"
  else
    # As a last resort, use the slow shell script.  We don't cache a
    # path for INSTALL within a source directory, because that will
    # break other packages using the cache if that directory is
    # removed, or if the path is relative.
    INSTALL="$ac_install_sh"
  fi
fi
echo "$ac_t""$INSTALL" 1>&6

# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'

test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'

test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'


if test -z $prefix || test $prefix = NONE; then
  prefix=/usr/local
fi
if test -z $exec_prefix || test $exec_prefix = NONE; then
  exec_prefix=$prefix
fi
if test "$datadir" = "\${prefix}/share"; then
  datadir=$datadir/cgnstools
fi

echo $ac_n "checking where to install library""... $ac_c" 1>&6
echo "configure:1857: checking where to install library" >&5
eval "LIBDIR=$libdir"
echo "$ac_t""$LIBDIR" 1>&6

echo $ac_n "checking where to install headers""... $ac_c" 1>&6
echo "configure:1862: checking where to install headers" >&5
eval "INCLUDEDIR=$includedir"
echo "$ac_t""$INCLUDEDIR" 1>&6

echo $ac_n "checking where to install executables""... $ac_c" 1>&6
echo "configure:1867: checking where to install executables" >&5
eval "BINDIR=$bindir"
echo "$ac_t""$BINDIR" 1>&6

echo $ac_n "checking where to install Tcl scripts""... $ac_c" 1>&6
echo "configure:1872: checking where to install Tcl scripts" >&5
eval "LIB_INSTALL_DIR=$datadir"
echo "$ac_t""$LIB_INSTALL_DIR" 1>&6

#--------------------------------------------------------------------------
# get the system name and set system dependent compile flags
#--------------------------------------------------------------------------

BUILDDIR=lib
BUILD64BIT=0
CGFSIZET=\*4

test ! -x cgsystem && \
  chmod +x cgsystem

echo $ac_n "checking if system was specified""... $ac_c" 1>&6
echo "configure:1888: checking if system was specified" >&5
# Check whether --with-system or --without-system was given.
if test "${with_system+set}" = set; then
  withval="$with_system"
  withsys=$withval
fi

if test -z "$withsys" || test "$withsys" = "no"; then
  echo "$ac_t""no" 1>&6
  echo $ac_n "checking if 64bit support is requested""... $ac_c" 1>&6
echo "configure:1898: checking if 64bit support is requested" >&5
  # Check whether --enable-64bit or --disable-64bit was given.
if test "${enable_64bit+set}" = set; then
  enableval="$enable_64bit"
  :
else
  enableval=no
fi

  test ! "$enableval" = "no" && enableval=yes
  do64bit=$enableval
  echo "$ac_t""$do64bit" 1>&6
  test $do64bit = yes && opts=-64
  echo $ac_n "checking cgsystem""... $ac_c" 1>&6
echo "configure:1912: checking cgsystem" >&5
  SYSTEM=`./cgsystem $opts`
  echo "$ac_t""$SYSTEM" 1>&6
  if test $do64bit = yes; then
    BUILD64BIT=1
    CGFSIZET=\*8
    is64bit=`echo $SYSTEM | grep 64`
    test -z "$is64bit" && \
      echo "configure: warning: 64bit support not found for your machine" 1>&2
  fi
else
  SYSTEM=$withsys
  echo "$ac_t""$SYSTEM" 1>&6
fi

is64bit=`echo $SYSTEM | grep 64`
if test -z "$is64bit"; then
  is64bit=no
else
  is64bit=yes
fi

if test "$ac_cv_prog_gcc" = "no"; then
  case $SYSTEM in
    CRAY)   AR="bld rz" ;;
    HPPA11) SYSCFLAGS="+DA2.0"
            SYSFFLAGS="+DA2.0" ;;
    HPPA64) SYSCFLAGS="+DA2.0W"
            SYSFFLAGS="+DA2.0W" ;;
    HPIT)   SYSCFLAGS="+DD32"
            SYSFFLAGS="+DD32" ;;
    HPIT64) SYSCFLAGS="+DD64"
            SYSFFLAGS="+DD64" ;;
    IBM64)  SYSCFLAGS="-q64"
            SYSFFLAGS="-q64"
            AR="ar -X64 cr"
            test $debug = no && STRIP="strip -X64" ;;
    SGI6)   SYSCFLAGS="-n32"
            SYSFFLAGS="-n32" ;;
    SGI64)  SYSCFLAGS="-64"
            SYSFFLAGS="-64" ;;
    SUN64)  SYSCFLAGS="-xarch=v9"
            SYSFFLAGS="-xarch=v9" ;;
    DARWIN) CFLAGS="$CFLAGS -I/usr/include/sys" ;;
  esac
else
  if test "$is64bit" = "yes"; then
    gcc64bit=`$CC -dumpmachine | grep 64`
    if test -z "$gcc64bit"; then
      case $SYSTEM in
        HPPA64)  SYSCFLAGS="#-march=2.0" ;;
        HPIT64)  SYSCFLAGS="#-m64" ;;
        IBM64)   SYSCFLAGS="-maix64" ;;
        LINUX64) SYSCFLAGS="-m64" ;;
        SGI64)   SYSCFLAGS="-mabi=64" ;;
        SUN64)   SYSCFLAGS="-mcpu=v9 -m64" ;;
      esac
    fi
  else
    case $SYSTEM in
      SGI6) SYSCFLAGS="-mabi=n32" ;;
    esac
  fi
fi

# see if we can build a 64-bit code

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

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


  test $ac_cv_sizeof_char_p -lt 8 && \
    echo "configure: warning: does not appear your compiler can build 64-bit code" 1>&2
  CFLAGS=$CFLAGS_SAVE
fi

#--------------------------------------------------------------------------
# check if legacy build is requested
#--------------------------------------------------------------------------

BUILDLEGACY=0

echo $ac_n "checking if legacy build is enabled""... $ac_c" 1>&6
echo "configure:2033: checking if legacy build is enabled" >&5
# Check whether --enable-legacy or --disable-legacy was given.
if test "${enable_legacy+set}" = set; then
  enableval="$enable_legacy"
  :
else
  enableval=no
fi

if test ! "$enableval" = "no" ; then
  enableval=yes
  BUILDLEGACY=1
fi
echo "$ac_t""$enableval" 1>&6

#--------------------------------------------------------------------------
# check if enum scoping is requested
#--------------------------------------------------------------------------

BUILDSCOPE=0

echo $ac_n "checking if scope enumeration values is enabled""... $ac_c" 1>&6
echo "configure:2055: checking if scope enumeration values is enabled" >&5
# Check whether --enable-scope or --disable-scope was given.
if test "${enable_scope+set}" = set; then
  enableval="$enable_scope"
  :
else
  enableval=no
fi

if test ! "$enableval" = "no" ; then
  enableval=yes
  BUILDSCOPE=1
fi
echo "$ac_t""$enableval" 1>&6

#--------------------------------------------------------------------------
# check if base scope for family/zone ref-to requested
#--------------------------------------------------------------------------

BUILDBASESCOPE=0

echo $ac_n "checking if base scope for family/zone ref-to enabled""... $ac_c" 1>&6
echo "configure:2077: checking if base scope for family/zone ref-to enabled" >&5
# Check whether --enable-scope or --disable-scope was given.
if test "${enable_scope+set}" = set; then
  enableval="$enable_scope"
  :
else
  enableval=no
fi

if test ! "$enableval" = "no" ; then
  enableval=yes
  BUILDBASESCOPE=1
fi
echo "$ac_t""$enableval" 1>&6

#--------------------------------------------------------------------------
# get a usable 64-bit type
#--------------------------------------------------------------------------

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

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


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

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


  if test $ac_cv_sizeof_long_long -lt 8 ; then
    echo "configure: warning: can't find a 64-bit integer type - assuming long" 1>&2
  else
    CGLONGT="long long"
  fi
fi
CFLAGS=$CFLAGS_SAVE

#--------------------------------------------------------------------------
# set the Fortran interface
#--------------------------------------------------------------------------

FORTRAN_DEFAULT_INTEGER_C_INT64_T=0
HAVE_FORTRAN_95=0
HAVE_FORTRAN_2003=0
HAVE_FORTRAN_2008=0
HAVE_FORTRAN_2008TS=0
BUILDFORTRAN=0

echo $ac_n "checking if Fortran interface is enabled""... $ac_c" 1>&6
echo "configure:2198: checking if Fortran interface is enabled" >&5
# Check whether --with-fortran or --without-fortran was given.
if test "${with_fortran+set}" = set; then
  withval="$with_fortran"
  withfortran=$withval
else
  withfortran=yes
fi

test -z "$withfortran" && withfortran=yes
echo "$ac_t""$withfortran" 1>&6

if test $withfortran = no; then
  fortran=no
  F2CFLAGS=
else
  BUILDFORTRAN=1
  fortran=yes
  if test $withfortran = yes; then
    need_f2c=yes
  else
    case $withfortran in
      LOWERCASE | LOWERCASE_ | LOWERCASE__) ;;
      UPPERCASE | UPPERCASE_ | UPPERCASE__) ;;
      *) { echo "configure: error: unknown Fortran to C interface $withfortran" 1>&2; exit 1; } ;;
    esac
    need_f2c=no
    F2CFLAGS=-D$withfortran
  fi

  # Check if the Fortran compiler is F2003 compliant
  ## --------------------------------------------------------------------
  ## Default for FORTRAN 2003 compliant compilers
  ##
  HAVE_F2003_REQUIREMENTS="no"
  echo $ac_n "checking if Fortran compiler meets 2003 standard""... $ac_c" 1>&6
echo "configure:2234: checking if Fortran compiler meets 2003 standard" >&5

 cat >> testf03.f90 << EOF
       PROGRAM testf03
  	 USE iso_c_binding
  	 IMPLICIT NONE
  	 INTEGER(C_INT) :: a
  	 INTEGER(C_INT32_T) :: b
  	 INTEGER(C_INT64_T) :: c
         REAL(C_FLOAT) :: d
  	 REAL(C_DOUBLE) :: e
  	 CHARACTER(LEN=1,KIND=C_CHAR), TARGET :: f
  	 TYPE(C_PTR) :: g
         INTERFACE
           INTEGER(C_INT) FUNCTION test(A, UserDataName1) BIND(C, name='cg_goto')
             USE ISO_C_BINDING
             INTEGER(C_INT)   , INTENT(IN), VALUE :: A
             CHARACTER(C_CHAR), DIMENSION(*), INTENT(IN) :: UserDataName1
           END FUNCTION test
         END INTERFACE
  	 g = C_LOC(f(1:1))
      END PROGRAM testf03
EOF
  msg=`${F77} -c testf03.f90 &> /dev/null`
  if test -f testf03.o; then
    HAVE_F2003_REQUIREMENTS="yes"
    HAVE_FORTRAN_2003=1
    rm testf03.o
  fi
  if test -f testf03.f90; then
    rm testf03.f90
  fi
  echo "$ac_t""$HAVE_F2003_REQUIREMENTS" 1>&6

 ## In F2003 and F2008 optional parameters are not allowed for functions that have BIND(C).
 ## In Fortran 2003 it is constraint C530, in the latest Fortran 2008 draft it is C516:
 ## "The ALLOCATABLE, POINTER, or OPTIONAL attribute shall not be specifed
 ## for a dummy argument of a procedure that has a proc-language-binding-spec."

 ## However this is being addressed in:
 ## TS 29113 Further Interoperability of Fortran with C WG5/N1942
 ## Compilers status:
 ##  IMPLEMENTED      -- gnu (4.7,4.8,4.9), intel, portland group
 ##                      xlf 15.1.0

  HAVE_F2008TS_REQUIREMENTS="no"
  if test "$HAVE_F2003_REQUIREMENTS" = "yes"; then

  echo $ac_n "checking if Fortran compiler meets Technical Specification 29113""... $ac_c" 1>&6
echo "configure:2283: checking if Fortran compiler meets Technical Specification 29113" >&5

 cat >> testf03.f90 << EOF
       PROGRAM testf03
         USE ISO_C_BINDING
         INTERFACE
            INTEGER(C_INT) FUNCTION test(A) BIND(C, name='test')
              USE ISO_C_BINDING
              INTEGER(C_INT), OPTIONAL :: A
            END FUNCTION test
         END INTERFACE
       END PROGRAM testf03
EOF
  msg=`${F77} -c testf03.f90 &> /dev/null`
  if test -f testf03.o; then
    HAVE_F2008TS_REQUIREMENTS="yes"
    HAVE_FORTRAN_2008TS=1
    rm testf03.o
  fi
  if test -f testf03.f90; then
     rm testf03.f90
  fi
  echo "$ac_t""$HAVE_F2008TS_REQUIREMENTS" 1>&6

  ## Fortran 2008 permits having different identifiers for the same binding label,
  ## so check if the compiler has this feature.
  HAVE_F2008_REQUIREMENTS="no"
  if test "$HAVE_F2003_REQUIREMENTS" = "yes"; then

  echo $ac_n "checking if Fortran compiler meets the Fortran 2008 Standard""... $ac_c" 1>&6
echo "configure:2313: checking if Fortran compiler meets the Fortran 2008 Standard" >&5

 cat >> testf08.f90 << EOF
       MODULE test
         USE ISO_C_BINDING
         INTERFACE binding
           FUNCTION bind1(x) BIND(C, name='Cfunc')
	     IMPORT :: C_FLOAT
             REAL(C_FLOAT) :: x
	   END FUNCTION bind1
           FUNCTION bind2(x) BIND(C, name='Cfunc')
             IMPORT :: C_DOUBLE
	     REAL(C_DOUBLE) :: x
	   END FUNCTION bind2
         END INTERFACE
      END MODULE test
EOF
  msg=`${F77} -c testf08.f90 &> /dev/null`
  if test -f testf08.o; then
    HAVE_F2008_REQUIREMENTS="yes"
    HAVE_FORTRAN_2008=1
    rm testf08.o
  fi
  if test -f testf08.f90; then
     rm testf08.f90
  fi
  if test -f testf08.mod; then
     rm testf08.mod
  fi
  echo "$ac_t""$HAVE_F2008_REQUIREMENTS" 1>&6
  fi
  
else

  # Check if the Fortran compiler is at least F95 compliant
  ## --------------------------------------------------------------------
  ## Default for FORTRAN 95 compliant compilers
  ##
  HAVE_F95_REQUIREMENTS="no"
  echo $ac_n "checking if Fortran compiler meets 95 standard""... $ac_c" 1>&6
echo "configure:2353: checking if Fortran compiler meets 95 standard" >&5

 cat >> testf95.f90 << EOF
       PROGRAM testf95
  	 IMPLICIT NONE
         INTEGER, PARAMETER :: cgint_kind = SELECTED_INT_KIND(5)
      END PROGRAM testf95
EOF
  msg=`${F77} -c testf95.f90 &> /dev/null`
  if test -f testf95.o; then
    HAVE_F95_REQUIREMENTS="yes"
    HAVE_FORTRAN_95=1
    rm testf95.o
  fi
  if test -f testf95.f90; then
    rm testf95.f90
  fi
  echo "$ac_t""$HAVE_F95_REQUIREMENTS" 1>&6

  fi

  # Check the size of the default fortran integer
  ## --------------------------------------------------------------------

  if test "$HAVE_F2003_REQUIREMENTS" = "yes"; then

  echo $ac_n "checking size of default Fortran integer ""... $ac_c" 1>&6
echo "configure:2380: checking size of default Fortran integer " >&5
 cat >> testf03.f90 << EOF
      MODULE mod

        INTERFACE test_integer
           MODULE PROCEDURE test_int
           MODULE PROCEDURE test_c_int64
        END INTERFACE

      CONTAINS

        SUBROUTINE test_c_int64(a)
          USE ISO_C_BINDING
          INTEGER(C_INT64_T) :: a
        END SUBROUTINE test_c_int64

        SUBROUTINE test_int(a)
          USE ISO_C_BINDING
          INTEGER :: a
        END SUBROUTINE test_int

      END MODULE mod

      PROGRAM main

        USE mod
        INTEGER :: a

        CALL test_integer(a)

      END PROGRAM main
EOF
  msg=`${F77} $FFLAGS -c testf03.f90 &> /dev/null`
  if test -f testf03.o; then
    echo "$ac_t""c_int32_t" 1>&6
    rm testf03.o
  else
    FORTRAN_DEFAULT_INTEGER_C_INT64_T=1
    echo "$ac_t""c_int64_t" 1>&6
  fi
  if test -f testf03.f90; then
     rm testf03.f90
  fi
  if test -f mod.mod; then
     rm mod.mod
  fi

  fi

  if test $need_f2c = yes; then
    if test "$ac_cv_prog_g77" = "yes"; then
      if test "$ac_cv_prog_gcc" = "no"; then
        SYSFFLAGS=-fno-second-underscore
      else
        SYSFFLAGS="-fno-second-underscore $SYSCFLAGS"
      fi
      F2CFLAGS="-DLOWERCASE_"
      need_f2c=no
    else
      if test "$ac_cv_prog_gcc" = "no"; then
        case $SYSTEM in
          CRAY | VAX | WIN32) need_f2c=no ;;
        esac
      fi
    fi
  fi

  if test $need_f2c = yes; then
    f2c=
    echo $ac_n "checking Fortran to C interface""... $ac_c" 1>&6
echo "configure:2450: checking Fortran to C interface" >&5
    if test $has_f77 = yes; then
      LIBS_SAVE="$LIBS"
      
      for func in ffunc_ ffunc FFUNC FFUNC_ ffunc__ FFUNC__; do
        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 "void $func(){}" > conftest.c
        { (eval echo configure:2463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }
        mv conftest.$OBJEXT conffunc.$OBJEXT
        ac_ext=f
ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&5'
ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_f77_cross

        LIBS="conffunc.$OBJEXT $LIBS_SAVE"
        cat > conftest.$ac_ext <<EOF

      program main
      call ffunc
      end
EOF
if { (eval echo configure:2477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  linked=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
        rm -f conffunc* conftest*
        if test "$linked" = "yes"; then
          case $func in
            ffunc)   f2c=LOWERCASE ;;
            ffunc_)  f2c=LOWERCASE_ ;;
            ffunc__) f2c=LOWERCASE__ ;;
            FFUNC)   f2c=UPPERCASE ;;
            FFUNC_)  f2c=UPPERCASE_ ;;
            FFUNC__) f2c=UPPERCASE__ ;;
          esac
          break
        fi
      done
      LIBS="$LIBS_SAVE"
      ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

    fi
    if test -z "$f2c"; then
      f2c=LOWERCASE_
      case $SYSTEM in
        APOLLO)   f2c=LOWERCASE ;;
        BSDM68K)  f2c=UPPERCASE ;;
        BSDMIPS)  f2c=UPPERCASE ;;
        HP*)      f2c=LOWERCASE ;;
        IBM)      f2c=LOWERCASE ;;
        MACOSX)   f2c=LOWERCASE ;;
        M88K)     f2c=UPPERCASE ;;
        NEXT)     f2c=LOWERCASE ;;
      esac
      echo "$ac_t""assuming $f2c" 1>&6
    else
      echo "$ac_t""$f2c" 1>&6
    fi
    F2CFLAGS="-D$f2c"
  fi

  # check for catenization operator

  echo $ac_n "checking for concatenation operator""... $ac_c" 1>&6
echo "configure:2529: checking for concatenation operator" >&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 2539 "configure"
#include "confdefs.h"
#define CONCAT(a,b) a##b
   CONCAT(func,tion)
  
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "function" >/dev/null 2>&1; then
  rm -rf conftest*
  concat=yes
else
  rm -rf conftest*
  concat=no
fi
rm -f conftest*


  # above doesn't work on SGI for some reason,
  # while the following does

  if test $concat = no; then
    cat > conftest.$ac_ext <<EOF
#line 2561 "configure"
#include "confdefs.h"
#define CONCAT(a,b) a##b
       void function(){}
int main() {
CONCAT(func,tion)()
; return 0; }
EOF
if { (eval echo configure:2569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  concat=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  concat=no
fi
rm -f conftest*
  fi

  echo "$ac_t""$concat" 1>&6
  test $concat = no && F2CFLAGS="$F2CFLAGS -DNO_CONCATENATION"
fi

#--------------------------------------------------------------------------
# check if building shared library - currently very limited support
#--------------------------------------------------------------------------

AR_LIB=$AR
RAN_LIB=$RANLIB
EXT_LIB=$LIBEXT

echo $ac_n "checking if building a shared library""... $ac_c" 1>&6
echo "configure:2594: checking if building a shared library" >&5
# Check whether --enable-shared or --disable-shared was given.
if test "${enable_shared+set}" = set; then
  enableval="$enable_shared"
  :
else
  enableval=no
fi

test ! "$enableval" = "no" && \
test ! "$enableval" = "all" && \
  enableval=yes
shared=$enableval
echo "$ac_t""$shared" 1>&6

if test $shared = all; then
  exts="so sl a"
  shared=yes
else
  exts="a so sl"
fi
if test $shared = yes; then
  cgnsdir=`pwd`
  if test "$ac_cv_prog_gcc" = "no"; then
    case $SYSTEM in
      HP*)   CFGFLAGS="+z $CFGFLAGS"
             AR_LIB="ld -b -E +s +b $LIBDIR:$cgnsdir/$BUILDDIR:. -o"
             EXT_LIB=sl ;;
      SGI*)  AR_LIB="\$(CC) -shared $SYSCFLAGS -Wl,-rpath,$cgnsdir/$BUILDDIR -o"
             EXT_LIB=so ;;
      ALPHA) AR_LIB="\$(CC) -shared $SYSCFLAGS -o"
             EXT_LIB=so ;;
      SUN*)  CFGFLAGS="-KPIC $CFGFLAGS"
             AR_LIB="\$(CC) -G $SYSCFLAGS -Wl,-R,$LIBDIR -Wl,-R,$cgnsdir/$BUILDDIR -o"
             EXT_LIB=so ;;
      *) echo "configure: warning: don't know how to build shared lib for $SYSTEM" 1>&2
         shared=no ;;
    esac
  else
    if test "$ac_cv_cygwin" = "yes"; then
      echo "configure: warning: can't yet build shared library under CYGWIN" 1>&2
      shared=no
    else
      CFGFLAGS="-fPIC $CFGFLAGS"
      AR_LIB="\$(CC) -shared $SYSCFLAGS -Wl,-rpath,$LIBDIR:$cgnsdir/$BUILDDIR -o"
      EXT_LIB=so
    fi
  fi
  if test $shared = yes; then
    RAN_LIB="\$(STRIP)"
  fi
fi

#---------------------------------------------------------------------------
# locate HDF5 includes and library if using HDF5
#---------------------------------------------------------------------------

BUILDHDF5=0
HDF5DEF=""
HDF5INC=""
HDF5LIB=""

echo $ac_n "checking if using HDF5""... $ac_c" 1>&6
echo "configure:2657: checking if using HDF5" >&5
# Check whether --with-hdf5 or --without-hdf5 was given.
if test "${with_hdf5+set}" = set; then
  withval="$with_hdf5"
  withhdf5=$withval
else
  withhdf5=no
fi

if test "$withhdf5" = "no"; then
  echo "$ac_t""no" 1>&6
else
  BUILDHDF5=1
  if test -z "$withhdf5" || test "$withhdf5" = "yes"; then
    hdf5dir=""
    echo "$ac_t""yes" 1>&6
    ac_safe=`echo "hdf5.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for hdf5.h""... $ac_c" 1>&6
echo "configure:2675: checking for hdf5.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 2680 "configure"
#include "confdefs.h"
#include <hdf5.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2685: \"$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
  installed=yes
else
  echo "$ac_t""no" 1>&6
installed=no
fi

    if test "$installed" = "yes"; then
      HDF5LIB=-lhdf5
    else
      echo $ac_n "checking for local HDF5 distribution""... $ac_c" 1>&6
echo "configure:2711: checking for local HDF5 distribution" >&5
      for d in \
        `ls -dr * 2>/dev/null` \
        `ls -dr ../* 2>/dev/null` \
        `ls -dr ../../* 2>/dev/null` \
        `ls -dr ../../../* 2>/dev/null` ; do
        if test -f "$d/include/hdf5.h" || test -f "$d/src/hdf5.h"; then
          hdf5dir=`(cd $d; pwd)`
          echo "$ac_t""$hdf5dir" 1>&6
          break
        fi
      done
      test -z "$hdf5dir" && echo "$ac_t""not found" 1>&6
    fi
  else
    hdf5dir=$withhdf5
    withhdf5=yes
    echo "$ac_t""$hdf5dir" 1>&6
  fi

  if test -z "$HDF5LIB"; then
    test -z "$hdf5dir" && \
      { echo "configure: error: need specify the HDF5 directory with --with-hdf5=DIR" 1>&2; exit 1; }
    if test -f "$hdf5dir/include/hdf5.h"; then
      HDF5INC=$hdf5dir/include
      for a in $exts ; do
        if test -f $hdf5dir/lib/libhdf5.$a; then
          HDF5LIB=$hdf5dir/lib/libhdf5.$a
          break
        fi
      done
      test -z "$HDF5LIB" && HDF5LIB=$hdf5dir/lib/libhdf5.a
    else
      if test -f "$hdf5dir/src/hdf5.h"; then
        HDF5INC=$hdf5dir/src
        for a in $exts ; do
          if test -f $hdf5dir/src/.libs/libhdf5.$a; then
            HDF5LIB=$hdf5dir/src/.libs/libhdf5.$a
            break
          fi
        done
        test -z "$HDF5LIB" && HDF5LIB=$hdf5dir/src/.libs/libhdf5.a
      else
        { echo "configure: error: $hdf5dir directory does not contain include/hdf5.h or src/hdf5.h" 1>&2; exit 1; }
      fi
    fi
  fi
  HDF5DEF=-I$HDF5INC

  # Check if HDF5 library has multi-dataset read and write APIs
  ## --------------------------------------------------------------------

  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

  HDF5_HAVE_MULTI_DATASETS=0
  echo $ac_n "checking if HDF5 library has multi-dataset read/write APIs""... $ac_c" 1>&6
echo "configure:2772: checking if HDF5 library has multi-dataset read/write APIs" >&5

  cat >> test.c << EOF
#include "hdf5.h"
void main(void)
{
  H5D_rw_multi_t *multi_info;
  return;
}
EOF
  msg=`${CC} -c test.c ${HDF5DEF} &> /dev/null`
  if test -f test.o; then
    HDF5_HAVE_MULTI_DATASETS=1
    echo "$ac_t""yes" 1>&6
    rm test.o
  else
    echo "$ac_t""no" 1>&6
  fi
  if test -f test.c; then
     rm test.c
  fi
fi

#---------------------------------------------------------------------------
# locate zlib and szip libraries
#---------------------------------------------------------------------------

H5NEEDZLIB=0
ZLIBLIB=""

if test "$withhdf5" = "yes"; then

  echo $ac_n "checking if using zlib""... $ac_c" 1>&6
echo "configure:2805: checking if using zlib" >&5
  # Check whether --with-zlib or --without-zlib was given.
if test "${with_zlib+set}" = set; then
  withval="$with_zlib"
  withzlib=$withval
else
  withzlib="no"
fi

  if test "$withzlib" = "no"; then
    echo "$ac_t""no" 1>&6
  else
    H5NEEDZLIB=1
    if test -z "$withzlib" || test "$withzlib" = "yes"; then
      zlibdir=""
      echo "$ac_t""yes" 1>&6
      ac_safe=`echo "zlib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for zlib.h""... $ac_c" 1>&6
echo "configure:2823: checking for zlib.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 2828 "configure"
#include "confdefs.h"
#include <zlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2833: \"$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
  installed=yes
else
  echo "$ac_t""no" 1>&6
installed=no
fi

      if test "$installed" = "yes"; then
        ZLIBLIB=-lz
      else
        echo $ac_n "checking for local zlib distribution""... $ac_c" 1>&6
echo "configure:2859: checking for local zlib distribution" >&5
        for d in \
          `ls -dr * 2>/dev/null` \
          `ls -dr ../* 2>/dev/null` \
          `ls -dr ../../* 2>/dev/null` \
          `ls -dr ../../../* 2>/dev/null` ; do
          if test -f "$d/zlib.h"; then
            zlibdir=`(cd $d; pwd)`
            echo "$ac_t""$zlibdir" 1>&6
            break
          fi
        done
        test -z "$zlibdir" && echo "$ac_t""not found" 1>&6
      fi
    else
      if test -f "$withzlib/zlib.h"; then
        zlibdir=$withzlib
      else
        zlibdir=`dirname $withzlib`
      fi
      withzlib=yes
      echo "$ac_t""$zlibdir" 1>&6
    fi

    if test -z "$ZLIBLIB"; then
      test -z "$zlibdir" && \
        { echo "configure: error: need specify the zlib directory with --with-zlib=DIR" 1>&2; exit 1; }
      if test -f "$zlibdir/zlib.h"; then
        for a in $exts ; do
          if test -f $zlibdir/libz.$a; then
            ZLIBLIB=$zlibdir/libz.$a
            break
          fi
        done
        test -z "$ZLIBLIB" && ZLIBLIB=$zlibdir/libz.a
      else
        { echo "configure: error: $zlibdir directory does not contain zlib.h" 1>&2; exit 1; }
      fi
    fi

  fi
fi

H5NEEDSZIP=0
SZIPLIB=""

if test "$withhdf5" = "yes"; then
  echo $ac_n "checking if using szip""... $ac_c" 1>&6
echo "configure:2907: checking if using szip" >&5
  # Check whether --with-szip or --without-szip was given.
if test "${with_szip+set}" = set; then
  withval="$with_szip"
  sziplib=$withval
else
  sziplib="no"
fi

  if test "x$sziplib" = "xno"; then
    echo "$ac_t""no" 1>&6
  else
    H5NEEDSZIP=1
    if test -z "$sziplib" || test "$sziplib" = "yes"; then
      echo "$ac_t""yes" 1>&6
      echo $ac_n "checking for SZ_BufftoBuffCompress in -lsz""... $ac_c" 1>&6
echo "configure:2923: checking for SZ_BufftoBuffCompress in -lsz" >&5
ac_lib_var=`echo sz'_'SZ_BufftoBuffCompress | 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="-lsz  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2931 "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 SZ_BufftoBuffCompress();

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

      if test -z "$SZIPLIB"; then
        echo $ac_n "checking for local szip library""... $ac_c" 1>&6
echo "configure:2964: checking for local szip library" >&5
        for d in \
          `ls -dr * 2>/dev/null` \
          `ls -dr ../* 2>/dev/null` \
          `ls -dr ../../* 2>/dev/null` \
          `ls -dr ../../../* 2>/dev/null` ; do
          for a in $exts ; do
            if test -f "$d/libsz.$a"; then
              SZIPLIB=`(cd $d; pwd)`/libsz.$a
              echo "$ac_t""$SZIPLIB" 1>&6
              break
            fi
          done
          test ! -z "$SZIPLIB" && break
        done
      fi
    else
      echo "$ac_t""$sziplib" 1>&6
      SZIPLIB=$sziplib
    fi
  fi
fi

#---------------------------------------------------------------------------
# does HDF5 require MPI ?
#---------------------------------------------------------------------------

withmpi=no

H5NEEDMPI=0
MPIDEF=""
MPIINC=""
MPIOPTS=""
MPILIBS=""
MPICC=""
MPIEXEC=""

if test "$withhdf5" = "yes"; then
  echo $ac_n "checking if using MPI""... $ac_c" 1>&6
echo "configure:3003: checking if using MPI" >&5
  # Check whether --with-mpi or --without-mpi was given.
if test "${with_mpi+set}" = set; then
  withval="$with_mpi"
  withmpi=$withval
else
  withmpi="no"
fi

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

      if test "x$MPICC" = "x"; then
        echo $ac_n "checking for local mpicc executable""... $ac_c" 1>&6
echo "configure:3055: checking for local mpicc executable" >&5
        for d in \
          `ls -dr * 2>/dev/null` \
          `ls -dr ../* 2>/dev/null` \
          `ls -dr ../../* 2>/dev/null` \
          `ls -dr ../../../* 2>/dev/null` ; do
          if test -x "$d/mpicc"; then
            MPICC=`(cd $d; pwd)`/mpicc
            break
          fi
          if test -x "$d/bin/mpicc"; then
            MPICC=`(cd $d; pwd)`/bin/mpicc
            break
          fi
        done
      fi
    else
      mpidir=$withmpi
      test ! -d $withmpi && mpidir=`dirname $withmpi`
      if test -x "$mpidir/mpicc"; then
        MPICC=`(cd $mpidir; pwd)`/mpicc
      fi
      if test -x "$mpidir/bin/mpicc"; then
        MPICC=`(cd $mpidir; pwd)`/bin/mpicc
      fi
    fi

    if test "x$MPICC" = "x"; then
      { echo "configure: error: mpicc not found" 1>&2; exit 1; }
    else
      echo "$ac_t""$MPICC" 1>&6
      MPIEXEC=`echo $MPICC | sed "s/mpicc/mpiexec/"`
      mpibin=`dirname $MPICC`
      mpidir=`dirname $mpibin`
      if test -d "$mpidir/src/include" ; then
        MPIINC=$mpidir/src/include
      else
        MPIINC=$mpidir/include
      fi
      MPIOPTS=`grep "^CFLAGS=" $MPICC | sed s/CFLAGS=// | sed s/\"//g`
      mpilib=`grep "^MPILIBNAME=" $MPICC | sed s/MPILIBNAME=// | sed s/\"//g`
      if test "x$mpilib" = "x"; then
        MPILIBS="-L$mpidir/lib"
      else
        MPILIBS="-L$mpidir/lib -l$mpilib"
      fi
      plib=`grep "^NEEDSPLIB=" $MPICC | sed s/NEEDSPLIB=// | sed s/\"//g`
      if test "x$plib" = "xyes"; then
        pmpilib=`grep "^PMPILIBNAME=" $MPICC | sed s/PMPILIBNAME=// | sed s/\"//g`
        if test "x$pmpilib" = "x"; then
          MPILIBS="$MPILIBS"
        else
          MPILIBS="$MPILIBS -l$pmpilib"
        fi
      fi
      extralibs=`grep "^LIBS=" $MPICC | sed s/LIBS=// | sed s/\"//g`
      MPILIBS="$MPILIBS $extralibs"
    fi
    MPIDEF=-I$MPIINC
    withmpi=yes
  fi
fi

#-----------------------------------------------------------------------
# build parallel code ?
#-----------------------------------------------------------------------

BUILDPARALLEL=0
parallel=no

if test "$withmpi" = "yes"; then
  echo $ac_n "checking if parallel IO support is requested""... $ac_c" 1>&6
echo "configure:3127: checking if parallel IO support is requested" >&5
  # Check whether --enable-parallel or --disable-parallel was given.
if test "${enable_parallel+set}" = set; then
  enableval="$enable_parallel"
  :
else
  enableval="no"
fi

  test ! "x$enableval" = "xno" && enableval=yes
  BUILDPARALLEL=1
  parallel=$enableval
  echo "$ac_t""$parallel" 1>&6
fi

#--------------------------------------------------------------------------
# check for libraries
#--------------------------------------------------------------------------

if test "$withhdf5" = "yes"; then
  echo $ac_n "checking for ceil in -lm""... $ac_c" 1>&6
echo "configure:3148: checking for ceil in -lm" >&5
ac_lib_var=`echo m'_'ceil | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lm  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3156 "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 ceil();

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

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

  LIBS="-lm $LIBS"

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


  if test "`uname`" = "SunOS" -o "`uname -sr`" = "HP-UX B.11.00"; then
        echo $ac_n "checking for xdr_int in -lnsl""... $ac_c" 1>&6
echo "configure:3197: checking for xdr_int in -lnsl" >&5
ac_lib_var=`echo nsl'_'xdr_int | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lnsl  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3205 "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 xdr_int();

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

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

  LIBS="-lnsl $LIBS"

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

  fi
fi

#--------------------------------------------------------------------------
# check for large file support (files > 2Gb)
#--------------------------------------------------------------------------

echo $ac_n "checking if large file support is requested""... $ac_c" 1>&6
echo "configure:3251: checking if large file support is requested" >&5
# Check whether --enable-lfs or --disable-lfs was given.
if test "${enable_lfs+set}" = set; then
  enableval="$enable_lfs"
  :
else
  enableval="no"
fi

test ! "$enableval" = "no" && enableval=yes
echo "$ac_t""$enableval" 1>&6
if test $enableval = yes; then
  CFLAGS_SAVE=$CFLAGS
  echo $ac_n "checking for large file support options""... $ac_c" 1>&6
echo "configure:3265: checking for large file support options" >&5
  LFS=`getconf LFS_CFLAGS 2>/dev/null`
  if test "$LFS" = ""; then
    echo "$ac_t""none" 1>&6
  else
    echo "$ac_t""$LFS" 1>&6
  fi
  test "$LFS" = "undefined" && LFS=""
  CFLAGS="$CFLAGS $LFS"
  cat >>confdefs.h <<\EOF
#include <sys/types.h>
EOF
  echo $ac_n "checking size of off_t""... $ac_c" 1>&6
echo "configure:3278: checking size of off_t" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_sizeof_off_t=4
else
  cat > conftest.$ac_ext <<EOF
#line 3286 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(off_t));
  exit(0);
}
EOF
if { (eval echo configure:3297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  ac_cv_sizeof_off_t=`cat conftestval`
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_sizeof_off_t=0
fi
rm -fr conftest*
fi

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


  if test $ac_cv_sizeof_off_t = 8; then
    has_lfs=yes
  else
    echo $ac_n "checking for off64_t""... $ac_c" 1>&6
echo "configure:3320: checking for off64_t" >&5
    cat > conftest.$ac_ext <<EOF
#line 3322 "configure"
#include "confdefs.h"
#include <sys/types.h>
int main() {
off64_t n = 0;
; return 0; }
EOF
if { (eval echo configure:3329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  has_lfs=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  has_lfs=no
fi
rm -f conftest*
    echo "$ac_t""$has_lfs" 1>&6
    if test $has_lfs = yes; then
      echo $ac_n "checking for open64""... $ac_c" 1>&6
echo "configure:3342: checking for open64" >&5
if eval "test \"`echo '$''{'ac_cv_func_open64'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 3347 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char open64(); 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 open64();

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_open64) || defined (__stub___open64)
choke me
#else
open64();
#endif

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

if eval "test \"`echo '$ac_cv_func_'open64`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  LFS="-DHAS_OPEN64 $LFS"
else
  echo "$ac_t""no" 1>&6
fi

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

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_lseek64) || defined (__stub___lseek64)
choke me
#else
lseek64();
#endif

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

if eval "test \"`echo '$ac_cv_func_'lseek64`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  LFS="-DHAS_LSEEK64 $LFS"
else
  echo "$ac_t""no" 1>&6
fi

    fi
  fi
  CFLAGS=$CFLAGS_SAVE
  test $has_lfs = yes && CFGFLAGS="$LFS $CFGFLAGS"
fi

#---------------------------------------------------------------------------
# build CGNStools
#---------------------------------------------------------------------------

CGNSTOOLS=""
INSTALLCGNSTOOLS=""
X11INCS=""
X11LIBS=""
TKINCS=""
TKLIBS=""
OGLINCS=""
OGLLIBS=""
TKOGLXLIB=""
TKOGLOPTS=""
TCL_LIBRARY_SPEC=""
TK_LIBRARY_SPEC=""
LIBRARY_PATH_SPEC=""
PROGLIST="cgnsview cgnscalc utilities"
INSTLIST="install-cgnsview install-cgnscalc install-utilities"
PLOTOPTS=""
CALCOPTS=""

echo $ac_n "checking if building CGNStools""... $ac_c" 1>&6
echo "configure:3466: checking if building CGNStools" >&5
# Check whether --enable-cgnstools or --disable-cgnstools was given.
if test "${enable_cgnstools+set}" = set; then
  enableval="$enable_cgnstools"
  :
else
  enableval=no
fi

test ! "$enableval" = "no" && enableval=yes
echo "$ac_t""$enableval" 1>&6

if test "$enableval" = "yes" ; then
  CGNSTOOLS=cgnstools
  INSTALLCGNSTOOLS=install-cgnstools

#---------------------------------------------------------------------------
# get path to X11 headers and libraries
#---------------------------------------------------------------------------

  if test "$ac_cv_cygwin" = "no"; then
    # If we find X, set shell vars x_includes and x_libraries to the
# paths, otherwise set no_x=yes.
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
echo "configure:3492: checking for X" >&5

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

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

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

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

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

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

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

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

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

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

    if ! test "$x_includes" = ""; then
      X11INCS=-I$x_includes
    fi
    if ! test "$x_libraries" = ""; then
      X11LIBS="-L$x_libraries -lX11"
    else
      X11LIBS=-lX11
    fi
  fi

#---------------------------------------------------------------------------
# try to find the Tk configuration file, tkConfig.sh
#---------------------------------------------------------------------------

  echo $ac_n "checking if Tcl directory was specified""... $ac_c" 1>&6
echo "configure:3736: checking if Tcl directory was specified" >&5
  # Check whether --with-tcl or --without-tcl was given.
if test "${with_tcl+set}" = set; then
  withval="$with_tcl"
  tcldir=$withval
else
  tcldir=""
fi

  if test -z "$tcldir" || test "$tcldir" = "no"; then
    tcldir=""
    echo "$ac_t""no" 1>&6
  else
    echo "$ac_t""$tcldir" 1>&6
  fi

  echo $ac_n "checking if Tk directory was specified""... $ac_c" 1>&6
echo "configure:3753: checking if Tk directory was specified" >&5
  # Check whether --with-tk or --without-tk was given.
if test "${with_tk+set}" = set; then
  withval="$with_tk"
  tkdir=$withval
else
  tkdir=""
fi

  if test -z "$tkdir" || test "$tkdir" = "no"; then
    tkdir=""
    echo "$ac_t""no" 1>&6
  else
    echo "$ac_t""$tkdir" 1>&6
  fi

  TKCONFIG=""
  LIBRARY_PATH=""

  if test -z "$tcldir" && test -z "$tkdir"; then
    echo $ac_n "checking for installed version of Tk""... $ac_c" 1>&6
echo "configure:3774: checking for installed version of Tk" >&5
    for d in /lib /usr/lib /usr/local/lib /usr/lib64 ; do
      if test -f $d/tkConfig.sh ; then
        echo "$ac_t""$d" 1>&6
        TKCONFIG=$d/tkConfig.sh
        break
      fi
    done
    if test -z "$TKCONFIG"; then
      echo "$ac_t""no" 1>&6
      echo $ac_n "checking for local Tk distribution""... $ac_c" 1>&6
echo "configure:3785: checking for local Tk distribution" >&5
      for d in \
        `ls -dr ../tk8* 2>/dev/null` \
        `ls -dr ../../tk8* 2>/dev/null` \
        `ls -dr ../../../tk8* 2>/dev/null` ; do
        if test -f "$d/unix/tkConfig.sh"; then
          tkdir=`(cd $d; pwd)`
          break
        fi
      done
      if test -z "$tkdir"; then
        echo "$ac_t""no" 1>&6
      else
        echo "$ac_t""$tkdir" 1>&6
      fi
    else
      . $TKCONFIG
      if test -z "$TK_LIB_FLAG"; then
        if test -z "$TK_LIB_SPEC"; then
          TK_LIB_SPEC=$TK_BUILD_LIB_SPEC
        fi
        for i in $TK_LIB_SPEC ; do
          if test ! -z `echo $i | grep -e -ltk* -` ; then
            TK_LIB_FLAG=$i
            break
          fi
        done
      fi
      if test -z "$TK_LIB_FLAG"; then
        TK_LIB_FLAG=-ltk
      fi
      tcllib=`echo $TK_LIB_FLAG | sed 's/tk/tcl/'`
      X11LIBS=""
      TKLIBS="$tcllib $TK_LIB_FLAG $TK_LIBS"
    fi
  fi

  if test ! -z "$tcldir"; then
    if test ! -d "$tcldir"; then
      { echo "configure: error: Tcl directory $tcldir not found" 1>&2; exit 1; }
    fi
    tcldir=`(cd $tcldir; pwd)`
    if test ! -f "$tcldir/unix/tclConfig.sh"; then
      { echo "configure: error: tclConfig.sh not found in $tcldir/unix" 1>&2; exit 1; }
    fi
    if test -z "$tkdir"; then
      dir=`dirname $tcldir`
      for d in `ls -dr $dir/tk* 2>/dev/null` ; do
        if test -f "$d/unix/tkConfig.sh"; then
          tkdir=$d
          break
        fi
      done
      if test -z "$tkdir"; then
        { echo "configure: error: can't find a usable Tk directory" 1>&2; exit 1; }
      fi
    fi
  fi

  if test ! -z "$tkdir"; then
    if test ! -d "$tkdir"; then
      { echo "configure: error: Tk directory $tkdir not found" 1>&2; exit 1; }
    fi
    tkdir=`(cd $tkdir; pwd)`
    TKCONFIG="$tkdir/unix/tkConfig.sh"
    if test ! -f "$TKCONFIG"; then
      { echo "configure: error: tkConfig.sh not found in $tkdir/unix" 1>&2; exit 1; }
    fi
    if test -z "$tcldir"; then
      dir=`dirname $tkdir`
      for d in `ls -dr $dir/tcl* 2>/dev/null` ; do
        if test -f "$d/unix/tclConfig.sh"; then
          tcldir=$d
          break
        fi
      done
      if test -z "$tcldir"; then
        { echo "configure: error: can't find a usable Tcl directory" 1>&2; exit 1; }
      fi
    fi
    . $TKCONFIG
    tcllib=`ls -d $tcldir/unix/libtcl8* 2>/dev/null`
    tklib=`ls -d $tkdir/unix/libtk8* 2>/dev/null`
    X11LIBS=""
    TKINCS="-I$tcldir/generic -I$tkdir/generic"
    if test "$ac_cv_cygwin" = "yes"; then
      TKINCS="$TKINCS -I$tkdir/win -I$tkdir/xlib"
    fi
    TKLIBS="$tcllib $tklib $TK_LIBS"
    TCL_LIBRARY="$tcldir/library"
    TK_LIBRARY="$tkdir/library"
    LIBRARY_PATH="$tcldir/unix:$tkdir/unix"
  fi

  if test -z "$TKCONFIG"; then
    echo "configure: warning: couldn't find a tkConfig.sh" 1>&2
    echo "configure: warning: edit make.defs and set TKINCS and TKLIBS" 1>&2
    TKLIBS="-ltcl -ltk"
  else
    if test "$ac_cv_cygwin" = "yes"; then
      if test -z "$TKINCS"; then
        tkvers="$TK_MAJOR_VERSION$TK_MINOR_VERSION"
        if test -d "cygwin/tk$tkvers"; then
          TKINCS="-I../cygwin/tk$tkvers"
        else
          echo "configure: warning: edit make.defs and fix TKINCS" 1>&2
          TKINCS="#-I../cygwin/tk80"
        fi
      fi
      sharepath=`cygpath -m /usr/share`
      if test -z "$TCL_LIBRARY"; then
        for d in `ls -dr $sharepath/tcl8* 2>/dev/null` ; do
          if test -f "$d/init.tcl"; then
            TCL_LIBRARY=$d
            break
          fi
        done
      fi
      if test -z "$TK_LIBRARY"; then
        for d in `ls -dr $sharepath/tk8* 2>/dev/null` ; do
          if test -f "$d/tk.tcl"; then
            TK_LIBRARY=$d
            break
          fi
        done
      fi
    fi
  fi

  if test -z "$TCL_LIBRARY"; then
    TCL_LIBRARY_SPEC="#export TCL_LIBRARY="
  else
    TCL_LIBRARY_SPEC="TCL_LIBRARY=$TCL_LIBRARY; export TCL_LIBRARY"
  fi

  if test -z "$TK_LIBRARY"; then
    TK_LIBRARY_SPEC="#export TK_LIBRARY="
  else
    TK_LIBRARY_SPEC="TK_LIBRARY=$TK_LIBRARY; export TK_LIBRARY"
  fi

  if test -z "$LIBRARY_PATH"; then
    LIBRARY_PATH_SPEC="#export LD_LIBRARY_PATH="
  elif test $SYSTEM = SGI6 ; then
    LIBRARY_PATH_SPEC="LD_LIBRARYN32_PATH=\$LD_LIBRARYN32_PATH:$LIBRARY_PATH; export LD_LIBRARYN32_PATH"
  else
    LIBRARY_PATH_SPEC="LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:$LIBRARY_PATH; export LD_LIBRARY_PATH"
  fi

#---------------------------------------------------------------------------
# try to find OpenGL headers and libraries
# should probably check for Mesa
#---------------------------------------------------------------------------

  ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6
echo "configure:3941: checking for GL/gl.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 3946 "configure"
#include "confdefs.h"
#include <GL/gl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
fi

  if test "$ac_cv_header_GL_gl_h" = "no"; then
    if test -f "$x_includes/GL/gl.h"; then
      PROGLIST="$PROGLIST cgnsplot"
      INSTLIST="$INSTLIST install-cgnsplot"
    else
      echo "configure: warning: couldn't find OpenGL" 1>&2
      echo "configure: warning: edit make.defs to set OGLINCS and OGLLIBS" 1>&2
    fi
  else
    PROGLIST="$PROGLIST cgnsplot"
    INSTLIST="$INSTLIST install-cgnsplot"
  fi

  if test "$ac_cv_cygwin" = "yes"; then
    OGLLIBS="-L/lib/win32api -lgdi32 -lopengl32 -lglu32"
  else
    OGLLIBS="-lGL -lGLU"
  fi

#---------------------------------------------------------------------------
# tkogl settings
#---------------------------------------------------------------------------

  if test "$ac_cv_cygwin" = "yes"; then
    TKOGLOPTS="-D_WIN32"
  else
    TKOGLXLIB="-lXmu -lXext"
  fi

#--------------------------------------------------------------------------
# get calc/cgnscalc options
#--------------------------------------------------------------------------

  CALCOPTS=-DREAD_NODE

  echo $ac_n "checking for matherr in -lm""... $ac_c" 1>&6
echo "configure:4008: checking for matherr in -lm" >&5
ac_lib_var=`echo m'_'matherr | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lm  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4016 "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 matherr();

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

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

  LIBS="-lm $LIBS"

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

  if test "$ac_cv_lib_m_matherr" = "yes"; then
    CALCOPTS="$CALCOPTS -DUSE_MATHERR"
  fi

  echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
echo "configure:4059: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 4064 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
#ifdef signal
#undef signal
#endif
#ifdef __cplusplus
extern "C" void (*signal (int, void (*)(int)))(int);
#else
void (*signal ()) ();
#endif

int main() {
int i;
; return 0; }
EOF
if { (eval echo configure:4081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_type_signal=void
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_type_signal=int
fi
rm -f conftest*
fi

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


  if test ! "$ac_cv_type_signal" = "void"; then
    CALCOPTS="$CALCOPTS -DSIGNAL=$ac_cv_type_signal"
  fi

#--------------------------------------------------------------------------
# cgnsplot options
#--------------------------------------------------------------------------

  echo $ac_n "checking if cutting plane is requested""... $ac_c" 1>&6
echo "configure:4108: checking if cutting plane is requested" >&5
  # Check whether --enable-cut or --disable-cut was given.
if test "${enable_cut+set}" = set; then
  enableval="$enable_cut"
  :
else
  enableval=yes
fi

  if test "$enableval" = "yes"; then
    echo "$ac_t""yes" 1>&6
  else
    PLOTOPTS="-DNO_CUTTING_PLANE $PLOTOPTS"
    echo "$ac_t""no" 1>&6
  fi

  echo $ac_n "checking if mesh boundaries is requested""... $ac_c" 1>&6
echo "configure:4125: checking if mesh boundaries is requested" >&5
  # Check whether --enable-mesh or --disable-mesh was given.
if test "${enable_mesh+set}" = set; then
  enableval="$enable_mesh"
  :
else
  enableval=yes
fi

  if test "$enableval" = "yes"; then
    echo "$ac_t""yes" 1>&6
  else
    PLOTOPTS="-DNO_MESH_BOUNDARIES $PLOTOPTS"
    echo "$ac_t""no" 1>&6
  fi

fi

FC_D_PRE='' 
if test "$withfortran" = "yes"; then

#----------- Determine if the Fortran compiler xlf ------------------------
# xlf preprocessor needs the -WF,-D prefix, FC_D_PRE is used when passing -D 
# options to fortran programs.
#--------------------------------------------------------------------------
    fc_vendor="`$FC -qversion 2>&1 |grep 'IBM XL'`"
    if test X != "X$fc_vendor"; then
      FC_D_PRE='-WF,' 
    fi
#----------- Determine if the Fortran compiler pgi ------------------------
# The PGI compiler segfaults wehn va_start is called, so we need to add
# a special compiler flag, see CGNS-40.
#--------------------------------------------------------------------------
    fc_vendor="`$FC --version 2>&1 |grep -i 'Portland Group'`"
    if test X != "X$fc_vendor"; then
      FFLAGS="$FFLAGS -Mx,125,0x200" 
    fi
fi
#--------------------------------------------------------------------------
# substitutions and write Makefile and make.defs
#--------------------------------------------------------------------------

BUILDOPTS=""
ADFINCS=""
ADFOBJS=""
INSTALLADF=""
INSTALLPCGNS=""
PTESTS=""

if test "$withhdf5" = "yes"; then
  BUILDOPTS="$BUILDOPTS -DBUILD_HDF5"
  ADFOBJS="\$(OBJDIR)/ADFH.\$(O)"
  ADFINCS="adfh/ADFH.h"
fi

if test "$parallel" = "yes"; then
  BUILDOPTS="$BUILDOPTS -DBUILD_PARALLEL"
  ADFOBJS="$ADFOBJS \$(OBJDIR)/pcgnslib.\$(O)"
  INSTALLPCGNS=install-pcgns
  PTESTS=runptests
fi

if test $BUILDLEGACY -ne 0 ; then
  BUILD64BIT=0
  CGFSIZET=
  if test "$withhdf5" = "yes"; then
    INSTALLADF="install-adf install-adfh"
  else
    INSTALLADF="install-adf"
  fi
fi

FALL=""
FALL64=""
PFALL=""

if test $fortran = no; then
  F2COBJS=#F2COBJS
  FGNSOBJS=#FGNSOBJS
else
  F2COBJS=F2COBJS
  FGNSOBJS=FGNSOBJS
  FALL=\$\(FALL\)
  if test $BUILD64BIT -eq 0; then
    PFALL=$FALL
  else
    FALL64=\$\(FALL64\)
  fi
fi

CGNSLIB=libcgns.$EXT_LIB
test "$LIBS" = "-lm -lm " && LIBS=-lm

echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:4219: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftestmake <<\EOF
all:
	@echo 'ac_maketemp="${MAKE}"'
EOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
if test -n "$ac_maketemp"; then
  eval ac_cv_prog_make_${ac_make}_set=yes
else
  eval ac_cv_prog_make_${ac_make}_set=no
fi
rm -f conftestmake
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  SET_MAKE=
else
  echo "$ac_t""no" 1>&6
  SET_MAKE="MAKE=${MAKE-make}"
fi

















































































BIN_INSTALL_DIR=$BINDIR
EXE_INSTALL_DIR=$BINDIR/cgnstools

if test "$ac_cv_cygwin" = "yes"; then
  CG_BIN_DIR=`cygpath -m $BIN_INSTALL_DIR`
  CG_LIB_DIR=`cygpath -m $LIB_INSTALL_DIR`
else
  CG_BIN_DIR=$BIN_INSTALL_DIR
  CG_LIB_DIR=$LIB_INSTALL_DIR
fi

































trap '' 1 2 15

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
ac_given_INSTALL="$INSTALL"

trap 'rm -fr `echo "cgnstypes.h cgnstypes_f.h cgnstypes_f03.h cgnsconfig.h Makefile \
  make.defs cgnsBuild.defs tests/Makefile tools/Makefile ptests/Makefile \
  cgnstools/Makefile cgnstools/make.defs cgnstools/cgconfig" | 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%@PARALLEL@%$PARALLEL%g
s%@RUNSERIAL@%$RUNSERIAL%g
s%@RUNPARALLEL@%$RUNPARALLEL%g
s%@TESTPARALLEL@%$TESTPARALLEL%g
s%@CC@%$CC%g
s%@OBJEXT@%$OBJEXT%g
s%@EXEEXT@%$EXEEXT%g
s%@F77@%$F77%g
s%@RANLIB@%$RANLIB%g
s%@STRIP@%$STRIP%g
s%@CPP@%$CPP%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@MPICC@%$MPICC%g
s%@SET_MAKE@%$SET_MAKE%g
s%@BUILDDEBUG@%$BUILDDEBUG%g
s%@BUILDLEGACY@%$BUILDLEGACY%g
s%@BUILDSCOPE@%$BUILDSCOPE%g
s%@BUILD64BIT@%$BUILD64BIT%g
s%@BUILDFORTRAN@%$BUILDFORTRAN%g
s%@HAVE_FORTRAN_95@%$HAVE_FORTRAN_95%g
s%@HAVE_FORTRAN_2003@%$HAVE_FORTRAN_2003%g
s%@HAVE_FORTRAN_2008TS@%$HAVE_FORTRAN_2008TS%g
s%@FORTRAN_DEFAULT_INTEGER_C_INT64_T@%$FORTRAN_DEFAULT_INTEGER_C_INT64_T%g
s%@HDF5_HAVE_MULTI_DATASETS@%$HDF5_HAVE_MULTI_DATASETS%g
s%@FC_D_PRE@%$FC_D_PRE%g
s%@BUILDPARALLEL@%$BUILDPARALLEL%g
s%@BUILDBASESCOPE@%$BUILDBASESCOPE%g
s%@CGNSTOOLS@%$CGNSTOOLS%g
s%@CGLONGT@%$CGLONGT%g
s%@CGFSIZET@%$CGFSIZET%g
s%@SYSTEM@%$SYSTEM%g
s%@CGNSVERS@%$CGNSVERS%g
s%@LIBEXT@%$LIBEXT%g
s%@BUILDOPTS@%$BUILDOPTS%g
s%@BUILDDIR@%$BUILDDIR%g
s%@ADFOBJS@%$ADFOBJS%g
s%@ADFINCS@%$ADFINCS%g
s%@F2COBJS@%$F2COBJS%g
s%@FGNSOBJS@%$FGNSOBJS%g
s%@BUILDHDF5@%$BUILDHDF5%g
s%@H5NEEDMPI@%$H5NEEDMPI%g
s%@H5NEEDSZIP@%$H5NEEDSZIP%g
s%@H5NEEDZLIB@%$H5NEEDZLIB%g
s%@HDF5DEF@%$HDF5DEF%g
s%@HDF5INC@%$HDF5INC%g
s%@HDF5LIB@%$HDF5LIB%g
s%@ZLIBLIB@%$ZLIBLIB%g
s%@SZIPLIB@%$SZIPLIB%g
s%@MPIDEF@%$MPIDEF%g
s%@MPIINC@%$MPIINC%g
s%@MPILIBS@%$MPILIBS%g
s%@MPIEXEC@%$MPIEXEC%g
s%@SYSCFLAGS@%$SYSCFLAGS%g
s%@COOUT@%$COOUT%g
s%@CEOUT@%$CEOUT%g
s%@F2CFLAGS@%$F2CFLAGS%g
s%@CFGFLAGS@%$CFGFLAGS%g
s%@SYSFFLAGS@%$SYSFFLAGS%g
s%@FEOUT@%$FEOUT%g
s%@FLIBS@%$FLIBS%g
s%@AR@%$AR%g
s%@AROUT@%$AROUT%g
s%@AR_LIB@%$AR_LIB%g
s%@RAN_LIB@%$RAN_LIB%g
s%@LIBDIR@%$LIBDIR%g
s%@INCLUDEDIR@%$INCLUDEDIR%g
s%@BINDIR@%$BINDIR%g
s%@INSTALLADF@%$INSTALLADF%g
s%@INSTALLPCGNS@%$INSTALLPCGNS%g
s%@INSTALLCGNSTOOLS@%$INSTALLCGNSTOOLS%g
s%@PTESTS@%$PTESTS%g
s%@FALL@%$FALL%g
s%@FALL64@%$FALL64%g
s%@PFALL@%$PFALL%g
s%@PROGLIST@%$PROGLIST%g
s%@INSTLIST@%$INSTLIST%g
s%@CGNSDIR@%$CGNSDIR%g
s%@CGNSLIB@%$CGNSLIB%g
s%@BIN_INSTALL_DIR@%$BIN_INSTALL_DIR%g
s%@EXE_INSTALL_DIR@%$EXE_INSTALL_DIR%g
s%@LIB_INSTALL_DIR@%$LIB_INSTALL_DIR%g
s%@TKINCS@%$TKINCS%g
s%@TKLIBS@%$TKLIBS%g
s%@X11INCS@%$X11INCS%g
s%@X11LIBS@%$X11LIBS%g
s%@OGLINCS@%$OGLINCS%g
s%@OGLLIBS@%$OGLLIBS%g
s%@PLOTOPTS@%$PLOTOPTS%g
s%@TKOGLXLIB@%$TKOGLXLIB%g
s%@TKOGLOPTS@%$TKOGLOPTS%g
s%@CALCOPTS@%$CALCOPTS%g
s%@CG_BIN_DIR@%$CG_BIN_DIR%g
s%@CG_LIB_DIR@%$CG_LIB_DIR%g
s%@TCL_LIBRARY_SPEC@%$TCL_LIBRARY_SPEC%g
s%@TK_LIBRARY_SPEC@%$TK_LIBRARY_SPEC%g
s%@LIBRARY_PATH_SPEC@%$LIBRARY_PATH_SPEC%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-"cgnstypes.h cgnstypes_f.h cgnstypes_f03.h cgnsconfig.h Makefile \
  make.defs cgnsBuild.defs tests/Makefile tools/Makefile ptests/Makefile \
  cgnstools/Makefile cgnstools/make.defs cgnstools/cgconfig"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case "$ac_file" in
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

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

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

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

  case "$ac_given_INSTALL" in
  [/$]*) INSTALL="$ac_given_INSTALL" ;;
  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  esac

  echo creating "$ac_file"
  rm -f "$ac_file"
  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  case "$ac_file" in
  *Makefile*) ac_comsub="1i\\
# $configure_input" ;;
  *) ac_comsub= ;;
  esac

  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  sed -e "$ac_comsub
s%@configure_input@%$configure_input%g
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
s%@INSTALL@%$INSTALL%g
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
fi; done
rm -f conftest.s*

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


