#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.71 for FreeFEM 4.14.
#
# Report bugs to <frederic.hecht@sorbonne-universite.fr>.
#
#
# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
# Inc.
#
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## -------------------- ##
## M4sh Initialization. ##
## -------------------- ##

# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
as_nop=:
if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
then :
  emulate sh
  NULLCMD=:
  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '${1+"$@"}'='"$@"'
  setopt NO_GLOB_SUBST
else $as_nop
  case `(set -o) 2>/dev/null` in #(
  *posix*) :
    set -o posix ;; #(
  *) :
     ;;
esac
fi



# Reset variables that may have inherited troublesome values from
# the environment.

# IFS needs to be set, to space, tab, and newline, in precisely that order.
# (If _AS_PATH_WALK were called with IFS unset, it would have the
# side effect of setting IFS to empty, thus disabling word splitting.)
# Quoting is to prevent editors from complaining about space-tab.
as_nl='
'
export as_nl
IFS=" ""	$as_nl"

PS1='$ '
PS2='> '
PS4='+ '

# Ensure predictable behavior from utilities with locale-dependent output.
LC_ALL=C
export LC_ALL
LANGUAGE=C
export LANGUAGE

# We cannot yet rely on "unset" to work, but we need these variables
# to be unset--not just set to an empty or harmless value--now, to
# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
# also avoids known problems related to "unset" and subshell syntax
# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
do eval test \${$as_var+y} \
  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done

# Ensure that fds 0, 1, and 2 are open.
if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi

# The user is always right.
if ${PATH_SEPARATOR+false} :; then
  PATH_SEPARATOR=:
  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
      PATH_SEPARATOR=';'
  }
fi


# Find who we are.  Look in the path if we contain no directory separator.
as_myself=
case $0 in #((
  *[\\/]* ) as_myself=$0 ;;
  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
  done
IFS=$as_save_IFS

     ;;
esac
# We did not find ourselves, most probably we were run as `sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
  as_myself=$0
fi
if test ! -f "$as_myself"; then
  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
  exit 1
fi


# Use a proper internal environment variable to ensure we don't fall
  # into an infinite loop, continuously re-executing ourselves.
  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
    _as_can_reexec=no; export _as_can_reexec;
    # We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
# Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
case $- in # ((((
  *v*x* | *x*v* ) as_opts=-vx ;;
  *v* ) as_opts=-v ;;
  *x* ) as_opts=-x ;;
  * ) as_opts= ;;
esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
exit 255
  fi
  # We don't want this to propagate to other subprocesses.
          { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
  as_bourne_compatible="as_nop=:
if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
then :
  emulate sh
  NULLCMD=:
  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '\${1+\"\$@\"}'='\"\$@\"'
  setopt NO_GLOB_SUBST
else \$as_nop
  case \`(set -o) 2>/dev/null\` in #(
  *posix*) :
    set -o posix ;; #(
  *) :
     ;;
esac
fi
"
  as_required="as_fn_return () { (exit \$1); }
as_fn_success () { as_fn_return 0; }
as_fn_failure () { as_fn_return 1; }
as_fn_ret_success () { return 0; }
as_fn_ret_failure () { return 1; }

exitcode=0
as_fn_success || { exitcode=1; echo as_fn_success failed.; }
as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
if ( set x; as_fn_ret_success y && test x = \"\$1\" )
then :

else \$as_nop
  exitcode=1; echo positional parameters were not saved.
fi
test x\$exitcode = x0 || exit 1
blah=\$(echo \$(echo blah))
test x\"\$blah\" = xblah || exit 1
test -x / || exit 1"
  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
test \$(( 1 + 1 )) = 2 || exit 1"
  if (eval "$as_required") 2>/dev/null
then :
  as_have_required=yes
else $as_nop
  as_have_required=no
fi
  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
then :

else $as_nop
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_found=false
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
  as_found=:
  case $as_dir in #(
	 /*)
	   for as_base in sh bash ksh sh5; do
	     # Try only shells that exist, to save several forks.
	     as_shell=$as_dir$as_base
	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
		    as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
then :
  CONFIG_SHELL=$as_shell as_have_required=yes
		   if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
then :
  break 2
fi
fi
	   done;;
       esac
  as_found=false
done
IFS=$as_save_IFS
if $as_found
then :

else $as_nop
  if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
	      as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
then :
  CONFIG_SHELL=$SHELL as_have_required=yes
fi
fi


      if test "x$CONFIG_SHELL" != x
then :
  export CONFIG_SHELL
             # We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
# Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
case $- in # ((((
  *v*x* | *x*v* ) as_opts=-vx ;;
  *v* ) as_opts=-v ;;
  *x* ) as_opts=-x ;;
  * ) as_opts= ;;
esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
exit 255
fi

    if test x$as_have_required = xno
then :
  printf "%s\n" "$0: This script requires a shell more modern than all"
  printf "%s\n" "$0: the shells that I found on your system."
  if test ${ZSH_VERSION+y} ; then
    printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
    printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
  else
    printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and
$0: frederic.hecht@sorbonne-universite.fr about your
$0: system, including any error possibly output before this
$0: message. Then install a modern shell, or manually run
$0: the script under such a shell if you do have one."
  fi
  exit 1
fi
fi
fi
SHELL=${CONFIG_SHELL-/bin/sh}
export SHELL
# Unset more variables known to interfere with behavior of common tools.
CLICOLOR_FORCE= GREP_OPTIONS=
unset CLICOLOR_FORCE GREP_OPTIONS

## --------------------- ##
## M4sh Shell Functions. ##
## --------------------- ##
# as_fn_unset VAR
# ---------------
# Portably unset VAR.
as_fn_unset ()
{
  { eval $1=; unset $1;}
}
as_unset=as_fn_unset


# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
as_fn_set_status ()
{
  return $1
} # as_fn_set_status

# as_fn_exit STATUS
# -----------------
# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
as_fn_exit ()
{
  set +e
  as_fn_set_status $1
  exit $1
} # as_fn_exit
# as_fn_nop
# ---------
# Do nothing but, unlike ":", preserve the value of $?.
as_fn_nop ()
{
  return $?
}
as_nop=as_fn_nop

# as_fn_mkdir_p
# -------------
# Create "$as_dir" as a directory, including parents if necessary.
as_fn_mkdir_p ()
{

  case $as_dir in #(
  -*) as_dir=./$as_dir;;
  esac
  test -d "$as_dir" || eval $as_mkdir_p || {
    as_dirs=
    while :; do
      case $as_dir in #(
      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
      *) as_qdir=$as_dir;;
      esac
      as_dirs="'$as_qdir' $as_dirs"
      as_dir=`$as_dirname -- "$as_dir" ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$as_dir" : 'X\(//\)[^/]' \| \
	 X"$as_dir" : 'X\(//\)$' \| \
	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"$as_dir" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
      test -d "$as_dir" && break
    done
    test -z "$as_dirs" || eval "mkdir $as_dirs"
  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"


} # as_fn_mkdir_p

# as_fn_executable_p FILE
# -----------------------
# Test if FILE is an executable regular file.
as_fn_executable_p ()
{
  test -f "$1" && test -x "$1"
} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
then :
  eval 'as_fn_append ()
  {
    eval $1+=\$2
  }'
else $as_nop
  as_fn_append ()
  {
    eval $1=\$$1\$2
  }
fi # as_fn_append

# as_fn_arith ARG...
# ------------------
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
then :
  eval 'as_fn_arith ()
  {
    as_val=$(( $* ))
  }'
else $as_nop
  as_fn_arith ()
  {
    as_val=`expr "$@" || test $? -eq 1`
  }
fi # as_fn_arith

# as_fn_nop
# ---------
# Do nothing but, unlike ":", preserve the value of $?.
as_fn_nop ()
{
  return $?
}
as_nop=as_fn_nop

# as_fn_error STATUS ERROR [LINENO LOG_FD]
# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
  as_status=$1; test $as_status -eq 0 && as_status=1
  if test "$4"; then
    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
  fi
  printf "%s\n" "$as_me: error: $2" >&2
  as_fn_exit $as_status
} # as_fn_error

if expr a : '\(a\)' >/dev/null 2>&1 &&
   test "X`expr 00001 : '.*\(...\)'`" = X001; then
  as_expr=expr
else
  as_expr=false
fi

if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
  as_basename=basename
else
  as_basename=false
fi

if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
  as_dirname=dirname
else
  as_dirname=false
fi

as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
	 X"$0" : 'X\(//\)$' \| \
	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X/"$0" |
    sed '/^.*\/\([^/][^/]*\)\/*$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`

# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits


  as_lineno_1=$LINENO as_lineno_1a=$LINENO
  as_lineno_2=$LINENO as_lineno_2a=$LINENO
  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
  sed -n '
    p
    /[$]LINENO/=
  ' <$as_myself |
    sed '
      s/[$]LINENO.*/&-/
      t lineno
      b
      :lineno
      N
      :loop
      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
      t loop
      s/-\n.*//
    ' >$as_me.lineno &&
  chmod +x "$as_me.lineno" ||
    { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }

  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
  # already done that, so ensure we don't try to do so again and fall
  # in an infinite loop.  This has already happened in practice.
  _as_can_reexec=no; export _as_can_reexec
  # Don't try to exec as it changes $[0], causing all sort of problems
  # (the dirname of $[0] is not the place where we might find the
  # original and so on.  Autoconf is especially sensitive to this).
  . "./$as_me.lineno"
  # Exit status is that of the last command.
  exit
}


# Determine whether it's possible to make 'echo' print without a newline.
# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
# for compatibility with existing Makefiles.
ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
  case `echo 'xy\c'` in
  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
  xy)  ECHO_C='\c';;
  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
       ECHO_T='	';;
  esac;;
*)
  ECHO_N='-n';;
esac

# For backward compatibility with old third-party macros, we provide
# the shell variables $as_echo and $as_echo_n.  New code should use
# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
as_echo='printf %s\n'
as_echo_n='printf %s'


rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
  rm -f conf$$.dir/conf$$.file
else
  rm -f conf$$.dir
  mkdir conf$$.dir 2>/dev/null
fi
if (echo >conf$$.file) 2>/dev/null; then
  if ln -s conf$$.file conf$$ 2>/dev/null; then
    as_ln_s='ln -s'
    # ... but there are two gotchas:
    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
    # In both cases, we have to default to `cp -pR'.
    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
      as_ln_s='cp -pR'
  elif ln conf$$.file conf$$ 2>/dev/null; then
    as_ln_s=ln
  else
    as_ln_s='cp -pR'
  fi
else
  as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null

if mkdir -p . 2>/dev/null; then
  as_mkdir_p='mkdir -p "$as_dir"'
else
  test -d ./-p && rmdir ./-p
  as_mkdir_p=false
fi

as_test_x='test -x'
as_executable_p=as_fn_executable_p

# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"

# Sed expression to map a string onto a valid variable name.
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"


test -n "$DJDIR" || exec 7<&0 </dev/null
exec 6>&1

# Name of the host.
# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`

#
# Initializations.
#
ac_default_prefix=/usr/local
ac_clean_files=
ac_config_libobj_dir=.
LIBOBJS=
cross_compiling=no
subdirs=
MFLAGS=
MAKEFLAGS=

# Identity of this package.
PACKAGE_NAME='FreeFEM'
PACKAGE_TARNAME='FreeFEM'
PACKAGE_VERSION='4.14'
PACKAGE_STRING='FreeFEM 4.14'
PACKAGE_BUGREPORT='frederic.hecht@sorbonne-universite.fr'
PACKAGE_URL=''

# Factoring default headers for most tests.
ac_includes_default="\
#include <stddef.h>
#ifdef HAVE_STDIO_H
# include <stdio.h>
#endif
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#endif
#ifdef HAVE_STRING_H
# include <string.h>
#endif
#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif"

ac_header_cxx_list=
ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
UMFPACK_FALSE
UMFPACK_TRUE
TETGEN_FALSE
TETGEN_TRUE
SUPERLU_FALSE
SUPERLU_TRUE
SLEPCCOMPLEX_FALSE
SLEPCCOMPLEX_TRUE
SLEPC_FALSE
SLEPC_TRUE
SCOTCH_FALSE
SCOTCH_TRUE
SCALAPACK_FALSE
SCALAPACK_TRUE
PTSCOTCH_FALSE
PTSCOTCH_TRUE
PTHREAD_FALSE
PTHREAD_TRUE
PIPE_FALSE
PIPE_TRUE
PETSCCOMPLEX_FALSE
PETSCCOMPLEX_TRUE
PETSC_FALSE
PETSC_TRUE
PARMETIS_FALSE
PARMETIS_TRUE
NLOPT_FALSE
NLOPT_TRUE
MUMPS_seq_FALSE
MUMPS_seq_TRUE
MUMPS_scotch_FALSE
MUMPS_scotch_TRUE
MUMPS_ptscotch_FALSE
MUMPS_ptscotch_TRUE
MUMPS_FALSE
MUMPS_TRUE
MSHMET_FALSE
MSHMET_TRUE
MPI_FALSE
MPI_TRUE
PARMMG_FALSE
PARMMG_TRUE
MMG_FALSE
MMG_TRUE
MMG3D_FALSE
MMG3D_TRUE
MKL_FALSE
MKL_TRUE
METIS_FALSE
METIS_TRUE
LIBSEQ_FALSE
LIBSEQ_TRUE
IPOPT_FALSE
IPOPT_TRUE
HPDDM_FALSE
HPDDM_TRUE
HTOOL_FALSE
HTOOL_TRUE
HDF5_FALSE
HDF5_TRUE
GSL_FALSE
GSL_TRUE
GMM_FALSE
GMM_TRUE
FREEYAMS_FALSE
FREEYAMS_TRUE
FORTRAN_FALSE
FORTRAN_TRUE
FFTW3_FALSE
FFTW3_TRUE
BOOST_FALSE
BOOST_TRUE
BEMTOOL_FALSE
BEMTOOL_TRUE
BLACS_FALSE
BLACS_TRUE
ARPACK_FALSE
ARPACK_TRUE
DOWNLOAD_FALSE
DOWNLOAD_TRUE
DOWNLOADCOMPILE
HTOOL_INCLUDE_DIR
TOOL_DYLIB_bemtool
TOOL_COMPILE_bemtool
TOOL_DYLIB_hpddm
FF_LIBS
TOOL_DYLIB_mkl
TOOL_COMPILE_mkl
TOOL_DYLIB_NewSolver
TOOL_COMPILE_NewSolver
TOOL_DYLIB_gsl
TOOL_COMPILE_gsl
FFCS_WINDOWS_FALSE
FFCS_WINDOWS_TRUE
TOOL_DYLIB_iohdf5
TOOL_COMPILE_iohdf5
HDF5_TYPE
HDF5_FLIBS
HDF5_FFLAGS
HDF5_FC
HDF5_LIBS
HDF5_LDFLAGS
HDF5_CPPFLAGS
HDF5_CFLAGS
HDF5_CC
HDF5_VERSION
H5FC
H5CC
GREP
SED
TEST_FFPPMPI
TEST_FFPP_MPI
TEST_FFPP
STDPROG
BAMGPROG
FFGLUTPROG
MEDITPROG
FNOFLAGS
CNOFLAGS
LIBC_VERSION
KERNEL_VERSION
SCOTCH_INCLUDE
NO_RANGE_CHECK
LIB_PTHREAD_GOOGLE
TOOL_DYLIB_MMAP
TOOL_COMPILE_MMAP
TOOL_DYLIB_libpthread_google
TOOL_COMPILE_libpthread_google
BIN_ffmaster
TOOL_DYLIB_pipe
TOOL_COMPILE_pipe
TOOL_DYLIB_yams
TOOL_COMPILE_yams
TOOL_DYLIB_umfpack
TOOL_COMPILE_umfpack
TOOL_DYLIB_superlu
TOOL_DYLIB_scotch
TOOL_DYLIB_nlopt
TOOL_COMPILE_nlopt
TOOL_DYLIB_ffnewuoa
TOOL_DYLIB_mumps_seq
TOOL_COMPILE_mumps_seq
TOOL_DYLIB_mumps
TOOL_DYLIB_scalapack
TOOL_DYLIB_ipopt
TOOL_COMPILE_ipopt
TOOL_DYLIB_gmm
TOOL_COMPILE_gmm
TOOL_DYLIB_mshmet
TOOL_COMPILE_mshmet
TOOL_DYLIB_parmmg
TOOL_DYLIB_mmg
TOOL_DYLIB_mmg3d
TOOL_COMPILE_mmg3d
TOOL_DYLIB_parmetis
TOOL_DYLIB_metis
TOOL_DYLIB_lapack
TOOL_COMPILE_lapack
TOOL_DYLIB_tetgen
GSL_LIBS
GSL_CFLAGS
GSL_CONFIG
STD_LIBS
STD_LDFLAGS
STD_GRAPH_OBJ
DYLIB_SUFFIX
LOAD_COMPILE
LOAD_TESTS
RANLIN
ARFLAGS
AR
STATICTOOL
ff_libtool
FF_SECOND
FF_MALLOC_H
FF_HAVE_REGEX_H
UMFPACKLIBS
UMFPACK_CPPFLAGS
FF_UMFPACK_CONFIG
DOWNLOAD_UMFPACK
EIGENOBJ
ENABLE_EIGEN_FALSE
ENABLE_EIGEN_TRUE
SKIP_TESTS_EIGEN
ARPACKLIBS
LAPACK_arpack_LIB
ARPACKLIB
FF_LAPACKdir
DOWNLOAD_ARPACK
LAPACKLIBS
G2CLIB
BLASINC
BLASLIBS
BLACSLIBS
DOWNLOADED_BLAS_BUILT_SOURCES
COMPILE_OPENBLAS
DOWNLOADED_BLAS
DOWNLOAD_FFTW
WGET
ff_git
ff_curl
ff_wget
FFCS_MPIOK_FALSE
FFCS_MPIOK_TRUE
TOOL_COMPILE_htool
TOOL_COMPILE_petsccomplex
FF_conf_petsc_complex
TOOL_COMPILE_blaslapack
TOOL_COMPILE_suitesparse
TOOL_COMPILE_scalapack
TOOL_COMPILE_parmmg
TOOL_COMPILE_mmg
TOOL_COMPILE_superlu
TOOL_COMPILE_hpddm
TOOL_COMPILE_tetgen
TOOL_COMPILE_mumps
TOOL_COMPILE_scotch
TOOL_COMPILE_ptscotch
TOOL_COMPILE_metis
TOOL_COMPILE_parmetis
TOOL_COMPILE_petsc
FF_conf_petsc_real
SKIP_TESTS_MPI
MPI_RUN_OPTION
MPISCRIPT
MPIRUN
FF_generic_petsc
FF_prefix_petsc_complex
FF_prefix_petsc_real
FF_prefix_petsc
MPI_LIBFC
MPI_LIBC
MPI_LIB
MPI_LIB_DIRS
MPI_INC_DIR
MPI_INCLUDE
MPIPROG
MPIFC
MPICC
MPICXX
LIBSGLUT
FF_ZLIB
LIBSPTHREAD
ADD_PACKAGE_NAME
CXX11FLAGS
WITH_CXX11
OPTIM_TYPE
ff_prefix_dir_example
ff_prefix_dir_lib_mpi
ff_prefix_dir_etc
ff_prefix_dir_include
ff_prefix_dir_lib
ff_prefix
ff_prefix_dir
WIN32DLLTARGET
LIBSNOCONSOLE
WINDRESOBJ
FFGLUTNAME
GCCNOCYGWIN
YFLAGS
YACC
LEXLIB
LEX_OUTPUT_ROOT
LEX
CFLAGSF77
FLIBS
host_os
host_vendor
host_cpu
host
build_os
build_vendor
build_cpu
build
ac_ct_F77
FFLAGS
F77
ac_ct_FC
FCFLAGS
FC
ENABLE_FFCS_FALSE
ENABLE_FFCS_TRUE
ENABLE_FFCS
SIZEOF_PTRINBIT
SIZEOF_PTR
SIZEOF_INT
SIZEOF_LONG
ff_patch
ff_cmake
ff_flex
ff_bison
ff_m4
ff_unzip
am__fastdepCXX_FALSE
am__fastdepCXX_TRUE
CXXDEPMODE
ac_ct_CXX
CXXFLAGS
CXX
am__fastdepCC_FALSE
am__fastdepCC_TRUE
CCDEPMODE
am__nodep
AMDEPBACKSLASH
AMDEP_FALSE
AMDEP_TRUE
am__include
DEPDIR
OBJEXT
EXEEXT
ac_ct_CC
CPPFLAGS
LDFLAGS
CFLAGS
CC
MAINT
MAINTAINER_MODE_FALSE
MAINTAINER_MODE_TRUE
RANLIB
AM_BACKSLASH
AM_DEFAULT_VERBOSITY
AM_DEFAULT_V
AM_V
CSCOPE
ETAGS
CTAGS
am__untar
am__tar
AMTAR
am__leading_dot
SET_MAKE
AWK
mkdir_p
MKDIR_P
INSTALL_STRIP_PROGRAM
STRIP
install_sh
MAKEINFO
AUTOHEADER
AUTOMAKE
AUTOCONF
ACLOCAL
VERSION
PACKAGE
CYGPATH_W
am__isrc
INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
target_alias
host_alias
build_alias
LIBS
ECHO_T
ECHO_N
ECHO_C
DEFS
mandir
localedir
libdir
psdir
pdfdir
dvidir
htmldir
infodir
docdir
oldincludedir
includedir
runstatedir
localstatedir
sharedstatedir
sysconfdir
datadir
datarootdir
libexecdir
sbindir
bindir
program_transform_name
prefix
exec_prefix
PACKAGE_URL
PACKAGE_BUGREPORT
PACKAGE_STRING
PACKAGE_VERSION
PACKAGE_TARNAME
PACKAGE_NAME
PATH_SEPARATOR
SHELL
am__quote'
ac_subst_files=''
ac_user_opts='
enable_option_checking
enable_silent_rules
enable_maintainer_mode
enable_dependency_tracking
enable_ffcs
enable_fortran
with_flib
enable_c
with_zlib
with_glut
enable_cygwindll
enable_mingw64
enable_profiling
enable_m64
enable_m32
enable_debug
enable_optim
enable_generic
with_suffix
enable_opengl
enable_summary
enable_download
with_petsc
with_prefix_petsc
with_mpipath
with_mpilibs
with_mpilibsc
with_mpiinc
with_mpi
with_slepc_include
with_slepc_ldflags
with_petsc_complex
with_slepccomplex_include
with_slepccomplex_ldflags
with_wget
with_mkl
with_cadna
enable_system_fftw
enable_download_fftw
enable_system_blas
enable_mkl_mlt
with_blas
enable_openblas
with_lapack
enable_download_arpack
with_arpack
enable_system_umfpack
with_amd
with_umfpack
enable_static
with_gsl_prefix
with_gsl_exec_prefix
enable_gsltest
enable_tetgen
with_tetgen_include
with_tetgen_ldflags
enable_download_tetgen
enable_lapack
with_lapack_include
with_lapack_ldflags
enable_download_lapack
enable_metis
with_metis_include
with_metis_ldflags
enable_download_metis
enable_parmetis
with_parmetis_include
with_parmetis_ldflags
enable_download_parmetis
enable_mmg3d
with_mmg3d_include
with_mmg3d_ldflags
enable_download_mmg3d
enable_mmg
with_mmg_include
with_mmg_ldflags
enable_download_mmg
enable_parmmg
with_parmmg_include
with_parmmg_ldflags
enable_download_parmmg
enable_mshmet
with_mshmet_include
with_mshmet_ldflags
enable_download_mshmet
enable_gmm
with_gmm_include
with_gmm_ldflags
enable_download_gmm
enable_ipopt
with_ipopt_include
with_ipopt_ldflags
enable_download_ipopt
enable_scalapack
with_scalapack_include
with_scalapack_ldflags
enable_download_scalapack
enable_mumps
with_mumps_include
with_mumps_ldflags
enable_download_mumps
enable_mumps_seq
with_mumps_seq_include
with_mumps_seq_ldflags
enable_download_mumps_seq
enable_nlopt
with_nlopt_include
with_nlopt_ldflags
enable_download_nlopt
enable_scotch
with_scotch_include
with_scotch_ldflags
enable_download_scotch
enable_superlu
with_superlu_include
with_superlu_ldflags
enable_download_superlu
enable_umfpack
with_umfpack_include
with_umfpack_ldflags
enable_download_umfpack
enable_yams
with_yams_include
with_yams_ldflags
enable_download_yams
enable_pipe
with_pipe_include
with_pipe_ldflags
enable_download_pipe
enable_libpthread_google
with_libpthread_google_include
with_libpthread_google_ldflags
enable_download_libpthread_google
enable_MMAP
with_MMAP_include
with_MMAP_ldflags
enable_download_MMAP
with_hdf5
enable_NewSolver
with_NewSolver_include
with_NewSolver_ldflags
enable_download_NewSolver
enable_mkl
with_mkl_include
with_mkl_ldflags
enable_download_mkl
enable_hpddm
with_hpddm_include
with_hpddm_ldflags
enable_download_hpddm
enable_bemtool
with_bemtool_include
with_bemtool_ldflags
enable_download_bemtool
'
      ac_precious_vars='build_alias
host_alias
target_alias
CC
CFLAGS
LDFLAGS
LIBS
CPPFLAGS
CXX
CXXFLAGS
CCC
FC
FCFLAGS
F77
FFLAGS
YACC
YFLAGS
MPIRUN
MPICXX
MPIFC
MPICC'


# Initialize some variables set by options.
ac_init_help=
ac_init_version=false
ac_unrecognized_opts=
ac_unrecognized_sep=
# The variables have the same names as the options, with
# dashes changed to underlines.
cache_file=/dev/null
exec_prefix=NONE
no_create=
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
verbose=
x_includes=NONE
x_libraries=NONE

# Installation directory options.
# These are left unexpanded so users can "make install exec_prefix=/foo"
# and all the variables that are supposed to be based on exec_prefix
# by default will actually change.
# Use braces instead of parens because sh, perl, etc. also accept them.
# (The list follows the same order as the GNU Coding Standards.)
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datarootdir='${prefix}/share'
datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
infodir='${datarootdir}/info'
htmldir='${docdir}'
dvidir='${docdir}'
pdfdir='${docdir}'
psdir='${docdir}'
libdir='${exec_prefix}/lib'
localedir='${datarootdir}/locale'
mandir='${datarootdir}/man'

ac_prev=
ac_dashdash=
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=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
  *=)   ac_optarg= ;;
  *)    ac_optarg=yes ;;
  esac

  case $ac_dashdash$ac_option in
  --)
    ac_dashdash=yes ;;

  -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_alias ;;
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
    build_alias=$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 ;;

  --config-cache | -C)
    cache_file=config.cache ;;

  -datadir | --datadir | --datadi | --datad)
    ac_prev=datadir ;;
  -datadir=* | --datadir=* | --datadi=* | --datad=*)
    datadir=$ac_optarg ;;

  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
  | --dataroo | --dataro | --datar)
    ac_prev=datarootdir ;;
  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
    datarootdir=$ac_optarg ;;

  -disable-* | --disable-*)
    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
      as_fn_error $? "invalid feature name: \`$ac_useropt'"
    ac_useropt_orig=$ac_useropt
    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
    case $ac_user_opts in
      *"
"enable_$ac_useropt"
"*) ;;
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
	 ac_unrecognized_sep=', ';;
    esac
    eval enable_$ac_useropt=no ;;

  -docdir | --docdir | --docdi | --doc | --do)
    ac_prev=docdir ;;
  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
    docdir=$ac_optarg ;;

  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
    ac_prev=dvidir ;;
  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
    dvidir=$ac_optarg ;;

  -enable-* | --enable-*)
    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
      as_fn_error $? "invalid feature name: \`$ac_useropt'"
    ac_useropt_orig=$ac_useropt
    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
    case $ac_user_opts in
      *"
"enable_$ac_useropt"
"*) ;;
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
	 ac_unrecognized_sep=', ';;
    esac
    eval enable_$ac_useropt=\$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 | -h)
    ac_init_help=long ;;
  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
    ac_init_help=recursive ;;
  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
    ac_init_help=short ;;

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

  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
    ac_prev=htmldir ;;
  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
  | --ht=*)
    htmldir=$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 ;;

  -localedir | --localedir | --localedi | --localed | --locale)
    ac_prev=localedir ;;
  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
    localedir=$ac_optarg ;;

  -localstatedir | --localstatedir | --localstatedi | --localstated \
  | --localstate | --localstat | --localsta | --localst | --locals)
    ac_prev=localstatedir ;;
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
    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 | -n)
    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 ;;

  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
    ac_prev=pdfdir ;;
  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
    pdfdir=$ac_optarg ;;

  -psdir | --psdir | --psdi | --psd | --ps)
    ac_prev=psdir ;;
  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
    psdir=$ac_optarg ;;

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

  -runstatedir | --runstatedir | --runstatedi | --runstated \
  | --runstate | --runstat | --runsta | --runst | --runs \
  | --run | --ru | --r)
    ac_prev=runstatedir ;;
  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
  | --run=* | --ru=* | --r=*)
    runstatedir=$ac_optarg ;;

  -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_alias ;;
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
    target_alias=$ac_optarg ;;

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

  -version | --version | --versio | --versi | --vers | -V)
    ac_init_version=: ;;

  -with-* | --with-*)
    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
      as_fn_error $? "invalid package name: \`$ac_useropt'"
    ac_useropt_orig=$ac_useropt
    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
    case $ac_user_opts in
      *"
"with_$ac_useropt"
"*) ;;
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
	 ac_unrecognized_sep=', ';;
    esac
    eval with_$ac_useropt=\$ac_optarg ;;

  -without-* | --without-*)
    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
    # Reject names that are not valid shell variable names.
    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
      as_fn_error $? "invalid package name: \`$ac_useropt'"
    ac_useropt_orig=$ac_useropt
    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
    case $ac_user_opts in
      *"
"with_$ac_useropt"
"*) ;;
      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
	 ac_unrecognized_sep=', ';;
    esac
    eval with_$ac_useropt=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 ;;

  -*) as_fn_error $? "unrecognized option: \`$ac_option'
Try \`$0 --help' for more information"
    ;;

  *=*)
    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
    # Reject names that are not valid shell variable names.
    case $ac_envvar in #(
      '' | [0-9]* | *[!_$as_cr_alnum]* )
      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
    esac
    eval $ac_envvar=\$ac_optarg
    export $ac_envvar ;;

  *)
    # FIXME: should be removed in autoconf 3.0.
    printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
      printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
    ;;

  esac
done

if test -n "$ac_prev"; then
  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
  as_fn_error $? "missing argument to $ac_option"
fi

if test -n "$ac_unrecognized_opts"; then
  case $enable_option_checking in
    no) ;;
    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
    *)     printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
  esac
fi

# Check all directory arguments for consistency.
for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
		datadir sysconfdir sharedstatedir localstatedir includedir \
		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
		libdir localedir mandir runstatedir
do
  eval ac_val=\$$ac_var
  # Remove trailing slashes.
  case $ac_val in
    */ )
      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
      eval $ac_var=\$ac_val;;
  esac
  # Be sure to have absolute directory names.
  case $ac_val in
    [\\/$]* | ?:[\\/]* )  continue;;
    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
  esac
  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
done

# There might be people who depend on the old broken behavior: `$host'
# used to hold the argument of --host etc.
# FIXME: To remove some day.
build=$build_alias
host=$host_alias
target=$target_alias

# FIXME: To remove some day.
if test "x$host_alias" != x; then
  if test "x$build_alias" = x; then
    cross_compiling=maybe
  elif test "x$build_alias" != "x$host_alias"; then
    cross_compiling=yes
  fi
fi

ac_tool_prefix=
test -n "$host_alias" && ac_tool_prefix=$host_alias-

test "$silent" = yes && exec 6>/dev/null


ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
  as_fn_error $? "working directory cannot be determined"
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
  as_fn_error $? "pwd does not report name of working directory"


# 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 the parent directory.
  ac_confdir=`$as_dirname -- "$as_myself" ||
$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$as_myself" : 'X\(//\)[^/]' \| \
	 X"$as_myself" : 'X\(//\)$' \| \
	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"$as_myself" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
  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
  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
fi
ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
ac_abs_confdir=`(
	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
	pwd)`
# When building in place, set srcdir=.
if test "$ac_abs_confdir" = "$ac_pwd"; then
  srcdir=.
fi
# Remove unnecessary trailing slashes from srcdir.
# Double slashes in file names in object file debugging info
# mess up M-x gdb in Emacs.
case $srcdir in
*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
esac
for ac_var in $ac_precious_vars; do
  eval ac_env_${ac_var}_set=\${${ac_var}+set}
  eval ac_env_${ac_var}_value=\$${ac_var}
  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
  eval ac_cv_env_${ac_var}_value=\$${ac_var}
done

#
# Report the --help message.
#
if test "$ac_init_help" = "long"; then
  # 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 <<_ACEOF
\`configure' configures FreeFEM 4.14 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
  -h, --help              display this help and exit
      --help=short        display options specific to this package
      --help=recursive    display the short help of all the included packages
  -V, --version           display version information and exit
  -q, --quiet, --silent   do not print \`checking ...' messages
      --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache      alias for \`--cache-file=config.cache'
  -n, --no-create         do not create output files
      --srcdir=DIR        find the sources in DIR [configure dir or \`..']

Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [$ac_default_prefix]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]

By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
an installation prefix other than \`$ac_default_prefix' using \`--prefix',
for instance \`--prefix=\$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR            user executables [EPREFIX/bin]
  --sbindir=DIR           system admin executables [EPREFIX/sbin]
  --libexecdir=DIR        program executables [EPREFIX/libexec]
  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
  --libdir=DIR            object code libraries [EPREFIX/lib]
  --includedir=DIR        C header files [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
  --infodir=DIR           info documentation [DATAROOTDIR/info]
  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR            man documentation [DATAROOTDIR/man]
  --docdir=DIR            documentation root [DATAROOTDIR/doc/FreeFEM]
  --htmldir=DIR           html documentation [DOCDIR]
  --dvidir=DIR            dvi documentation [DOCDIR]
  --pdfdir=DIR            pdf documentation [DOCDIR]
  --psdir=DIR             ps documentation [DOCDIR]
_ACEOF

  cat <<\_ACEOF

Program names:
  --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

System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
_ACEOF
fi

if test -n "$ac_init_help"; then
  case $ac_init_help in
     short | recursive ) echo "Configuration of FreeFEM 4.14:";;
   esac
  cat <<\_ACEOF

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-silent-rules   less verbose build output (undo: "make V=1")
  --disable-silent-rules  verbose build output (undo: "make V=0")
  --enable-maintainer-mode
                          enable make rules and dependencies not useful (and
                          sometimes confusing) to the casual installer
  --enable-dependency-tracking
                          do not reject slow dependency extractors
  --disable-dependency-tracking
                          speeds up one-time build
  --enable-ffcs           build FreeFEM for use by FreeFem++-cs
  --disable-fortran       No Fortran compiler available ( ARPACK need it)
  --disable-c             No C compiler available (C BLAS need it)
  --enable-cygwindll	Forces the use of the Cygwin DLL (not recommended)
  --enable-mingw64	Uses mingw64 compilers on Cygwin
  --enable-profiling	Turn on profiling
  --enable-m64	Turn on 64 bits architecture
  --enable-m32	Turn on 32 bits architecture
  --enable-debug	Turn on debug versions of FreeFem++
  --enable-optim	Turn on compiler optimization
  --enable-generic	Turn off hardware-dependant optimization options
  --enable-opengl         Enable/disable support for OpenGL
  --enable-summary        Display activated libraries list at the end of the
                          configure process
  --enable-download       Download missing libraries (BLAS,ARPACK,UMFPACK,...)
  --disable-system-fftw   Disable the automatic detection of FFTW
  --enable-download_fftw  force the download of fftw
  --disable-system-blas   Disable the search for a system-wide BLAS library
  --enable-mkl-mlt        Link with the multithreaded instead of the
                          monothreaded version of the MKL
  --disable-openblas      Disable the automatic download of OpenBLAS
  --enable-download_arpack
                          force the use download of arpack
  --disable-system-umfpack
                          Disable the automatic detection of umfpack, colmod,
                          amd, ....
  --enable-static	Build binaries with no shared library dependencies
  --disable-gsltest       Do not try to compile and run a test GSL program
  --disable-tetgen        Do not use tetgen
  --enable-download_tetgen
                          force the download of tetgen
  --disable-lapack        Do not use lapack
  --enable-download_lapack
                          force the download of lapack
  --disable-metis         Do not use metis
  --enable-download_metis force the download of metis
  --disable-parmetis      Do not use parmetis
  --enable-download_parmetis
                          force the download of parmetis
  --disable-mmg3d         Do not use mmg3d
  --enable-download_mmg3d force the download of mmg3d
  --disable-mmg           Do not use mmg
  --enable-download_mmg   force the download of mmg
  --disable-parmmg        Do not use parmmg
  --enable-download_parmmg
                          force the download of parmmg
  --disable-mshmet        Do not use mshmet
  --enable-download_mshmet
                          force the download of mshmet
  --disable-gmm           Do not use gmm
  --enable-download_gmm   force the download of gmm
  --disable-ipopt         Do not use ipopt
  --enable-download_ipopt force the download of ipopt
  --disable-scalapack     Do not use scalapack
  --enable-download_scalapack
                          force the download of scalapack
  --disable-mumps         Do not use mumps
  --enable-download_mumps force the download of mumps
  --disable-mumps_seq     Do not use mumps_seq
  --enable-download_mumps_seq
                          force the download of mumps_seq
  --disable-nlopt         Do not use nlopt
  --enable-download_nlopt force the download of nlopt
  --disable-scotch        Do not use scotch
  --enable-download_scotch
                          force the download of scotch
  --disable-superlu       Do not use superlu
  --enable-download_superlu
                          force the download of superlu
  --disable-umfpack       Do not use umfpack
  --enable-download_umfpack
                          force the download of umfpack
  --disable-yams          Do not use yams
  --enable-download_yams  force the download of yams
  --disable-pipe          Do not use pipe
  --enable-download_pipe  force the download of pipe
  --disable-libpthread_google
                          Do not use libpthread_google
  --enable-download_libpthread_google
                          force the download of libpthread_google
  --disable-MMAP          Do not use MMAP
  --enable-download_MMAP  force the download of MMAP
  --disable-NewSolver     Do not use NewSolver
  --enable-download_NewSolver
                          force the download of NewSolver
  --disable-mkl           Do not use mkl
  --enable-download_mkl   force the download of mkl
  --disable-hpddm         Do not use hpddm
  --enable-download_hpddm force the download of hpddm
  --disable-bemtool       Do not use bemtool
  --enable-download_bemtool
                          force the download of bemtool

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-flib= the fortran library
--with-zlib= the z library
  --with-glut  glutlib and include
  --with-suffix=G3/G4/G4,P4,.. or --without-suffix (default no suffix to package name)
  --with-suffix=G3/G4/G4,P4,.. or --without-suffix (default no suffix package name)
 --with-petsc=/usr/local/petsc/conf/petscvariables --without-petsc
 --prefix_petsc=directory where all PETSc/SLEPc will be installed if you download
  --with-mpipath= the path of mpich under windows (no command  mpic++, ... )
  --with-mpilibs= the libs to add to c++,fc, ... (to link with c++ - ex:   -L/usr/local/lib -lmpi_f90  -lmpi_cxx -lmpi -lopen-rte -lopen-pal -lutil)
  --with-mpilibsc= the libs to add to c  ... (to link with cc (for pastix lib)  ex:   -L/usr/local/lib -lmpi -lopen-rte -lopen-pal -lutil)
  --with-mpiinc= the include directory directive and preprocess directive  (no mpicc++, just use the compiler))
  --with-mpi=yes|no|mpic++|lam|mpich|openmpi|/usr/local/bin/mpic++|... 	or --without-mpi	Choose MPI implementation (default is mpic++)
  --with-slepc-include=   Include directives for slepc instead of automatic
                          download
  --with-slepc-ldflags=   Link-time directives for slepc instead of automatic
                          download
  --with-petsc_complex=/usr/local/petsc/conf/petscvariables   --without-petsc_complex
  --with-slepccomplex-include=
                          Include directives for slepccomplex instead of
                          automatic download
  --with-slepccomplex-ldflags=
                          Link-time directives for slepccomplex instead of
                          automatic download
  --with-wget=command	Replace "wget" with another command. Implies --enable-download
  --with-mkl= the  MKL LIBPATH : (ie. /opt/intel/mkl/RR.r.y.xxx/lib/<arch>)
  --with-cadna= cadna library --without-cadna
  --with-blas=library     Use a specific version of the Blas
  --with-lapack=library   Use a specific version of Lapack
  --with-arpack=library	Use a specific version of Arpack
  --with-amd=library      Use a specific version of AMD
  --with-umfpack=library  Use a specific version of Umfpack
  --with-gsl-prefix=PFX   Prefix where GSL is installed (optional)
  --with-gsl-exec-prefix=PFX Exec prefix where GSL is installed (optional)
  --with-tetgen-include=  Include directives for tetgen instead of automatic
                          download
  --with-tetgen-ldflags=  Link-time directives for tetgen instead of automatic
                          download
  --with-lapack-include=  Include directives for lapack instead of automatic
                          download
  --with-lapack-ldflags=  Link-time directives for lapack instead of automatic
                          download
  --with-metis-include=   Include directives for metis instead of automatic
                          download
  --with-metis-ldflags=   Link-time directives for metis instead of automatic
                          download
  --with-parmetis-include=
                          Include directives for parmetis instead of automatic
                          download
  --with-parmetis-ldflags=
                          Link-time directives for parmetis instead of
                          automatic download
  --with-mmg3d-include=   Include directives for mmg3d instead of automatic
                          download
  --with-mmg3d-ldflags=   Link-time directives for mmg3d instead of automatic
                          download
  --with-mmg-include=     Include directives for mmg instead of automatic
                          download
  --with-mmg-ldflags=     Link-time directives for mmg instead of automatic
                          download
  --with-parmmg-include=  Include directives for parmmg instead of automatic
                          download
  --with-parmmg-ldflags=  Link-time directives for parmmg instead of automatic
                          download
  --with-mshmet-include=  Include directives for mshmet instead of automatic
                          download
  --with-mshmet-ldflags=  Link-time directives for mshmet instead of automatic
                          download
  --with-gmm-include=     Include directives for gmm instead of automatic
                          download
  --with-gmm-ldflags=     Link-time directives for gmm instead of automatic
                          download
  --with-ipopt-include=   Include directives for ipopt instead of automatic
                          download
  --with-ipopt-ldflags=   Link-time directives for ipopt instead of automatic
                          download
  --with-scalapack-include=
                          Include directives for scalapack instead of
                          automatic download
  --with-scalapack-ldflags=
                          Link-time directives for scalapack instead of
                          automatic download
  --with-mumps-include=   Include directives for mumps instead of automatic
                          download
  --with-mumps-ldflags=   Link-time directives for mumps instead of automatic
                          download
  --with-mumps_seq-include=
                          Include directives for mumps_seq instead of
                          automatic download
  --with-mumps_seq-ldflags=
                          Link-time directives for mumps_seq instead of
                          automatic download
  --with-nlopt-include=   Include directives for nlopt instead of automatic
                          download
  --with-nlopt-ldflags=   Link-time directives for nlopt instead of automatic
                          download
  --with-scotch-include=  Include directives for scotch instead of automatic
                          download
  --with-scotch-ldflags=  Link-time directives for scotch instead of automatic
                          download
  --with-superlu-include= Include directives for superlu instead of automatic
                          download
  --with-superlu-ldflags= Link-time directives for superlu instead of
                          automatic download
  --with-umfpack-include= Include directives for umfpack instead of automatic
                          download
  --with-umfpack-ldflags= Link-time directives for umfpack instead of
                          automatic download
  --with-yams-include=    Include directives for yams instead of automatic
                          download
  --with-yams-ldflags=    Link-time directives for yams instead of automatic
                          download
  --with-pipe-include=    Include directives for pipe instead of automatic
                          download
  --with-pipe-ldflags=    Link-time directives for pipe instead of automatic
                          download
  --with-libpthread_google-include=
                          Include directives for libpthread_google instead of
                          automatic download
  --with-libpthread_google-ldflags=
                          Link-time directives for libpthread_google instead
                          of automatic download
  --with-MMAP-include=    Include directives for MMAP instead of automatic
                          download
  --with-MMAP-ldflags=    Link-time directives for MMAP instead of automatic
                          download
  --with-hdf5=yes/no/PATH location of h5cc or h5pcc for HDF5 configuration
  --with-NewSolver-include=
                          Include directives for NewSolver instead of
                          automatic download
  --with-NewSolver-ldflags=
                          Link-time directives for NewSolver instead of
                          automatic download
  --with-mkl-include=     Include directives for mkl instead of automatic
                          download
  --with-mkl-ldflags=     Link-time directives for mkl instead of automatic
                          download
  --with-hpddm-include=   Include directives for hpddm instead of automatic
                          download
  --with-hpddm-ldflags=   Link-time directives for hpddm instead of automatic
                          download
  --with-bemtool-include= Include directives for bemtool instead of automatic
                          download
  --with-bemtool-ldflags= Link-time directives for bemtool instead of
                          automatic download

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
  CXX         C++ compiler command
  CXXFLAGS    C++ compiler flags
  FC          Fortran compiler command
  FCFLAGS     Fortran compiler flags
  F77         Fortran 77 compiler command
  FFLAGS      Fortran 77 compiler flags
  YACC        The `Yet Another Compiler Compiler' implementation to use.
              Defaults to the first program found out of: `bison -y', `byacc',
              `yacc'.
  YFLAGS      The list of arguments that will be passed by default to $YACC.
              This script will default YFLAGS to the empty string to avoid a
              default value of `-d' given by some make applications.
  MPIRUN      MPI run command
  MPICXX      MPI C++ compiler command
  MPIFC       MPI Fortran 90 compiler command
  MPICC       MPI C compiler command in $ff_mpi_path

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.

Report bugs to <frederic.hecht@sorbonne-universite.fr>.
_ACEOF
ac_status=$?
fi

if test "$ac_init_help" = "recursive"; then
  # If there are subdirs, report their specific --help.
  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
    test -d "$ac_dir" ||
      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
      continue
    ac_builddir=.

case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
  # A ".." for each directory in $ac_dir_suffix.
  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
  case $ac_top_builddir_sub in
  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
  esac ;;
esac
ac_abs_top_builddir=$ac_pwd
ac_abs_builddir=$ac_pwd$ac_dir_suffix
# for backward compatibility:
ac_top_builddir=$ac_top_build_prefix

case $srcdir in
  .)  # We are building in place.
    ac_srcdir=.
    ac_top_srcdir=$ac_top_builddir_sub
    ac_abs_top_srcdir=$ac_pwd ;;
  [\\/]* | ?:[\\/]* )  # Absolute name.
    ac_srcdir=$srcdir$ac_dir_suffix;
    ac_top_srcdir=$srcdir
    ac_abs_top_srcdir=$srcdir ;;
  *) # Relative name.
    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
    ac_top_srcdir=$ac_top_build_prefix$srcdir
    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix

    cd "$ac_dir" || { ac_status=$?; continue; }
    # Check for configure.gnu first; this name is used for a wrapper for
    # Metaconfig's "Configure" on case-insensitive file systems.
    if test -f "$ac_srcdir/configure.gnu"; then
      echo &&
      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
    elif test -f "$ac_srcdir/configure"; then
      echo &&
      $SHELL "$ac_srcdir/configure" --help=recursive
    else
      printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
    fi || ac_status=$?
    cd "$ac_pwd" || { ac_status=$?; break; }
  done
fi

test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
  cat <<\_ACEOF
FreeFEM configure 4.14
generated by GNU Autoconf 2.71

Copyright (C) 2021 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
  exit
fi

## ------------------------ ##
## Autoconf initialization. ##
## ------------------------ ##

# ac_fn_c_try_compile LINENO
# --------------------------
# Try to compile conftest.$ac_ext, and return whether this succeeded.
ac_fn_c_try_compile ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  rm -f conftest.$ac_objext conftest.beam
  if { { ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_compile") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext
then :
  ac_retval=0
else $as_nop
  printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_retval=1
fi
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_c_try_compile

# ac_fn_cxx_try_compile LINENO
# ----------------------------
# Try to compile conftest.$ac_ext, and return whether this succeeded.
ac_fn_cxx_try_compile ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  rm -f conftest.$ac_objext conftest.beam
  if { { ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_compile") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext
then :
  ac_retval=0
else $as_nop
  printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_retval=1
fi
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_cxx_try_compile

# ac_fn_cxx_try_run LINENO
# ------------------------
# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
# executables *can* be run.
ac_fn_cxx_try_run ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  if { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
  { { case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; }
then :
  ac_retval=0
else $as_nop
  printf "%s\n" "$as_me: program exited with status $ac_status" >&5
       printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

       ac_retval=$ac_status
fi
  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_cxx_try_run

# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
# ----------------------------------------------
# Tries to find the compile-time value of EXPR in a program that includes
# INCLUDES, setting VAR accordingly. Returns whether the value could be
# computed
ac_fn_cxx_compute_int ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  if test "$cross_compiling" = yes; then
    # Depending upon the size, compute the lo and hi bounds.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main (void)
{
static int test_array [1 - 2 * !(($2) >= 0)];
test_array [0] = 0;
return test_array [0];

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_lo=0 ac_mid=0
  while :; do
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main (void)
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
test_array [0] = 0;
return test_array [0];

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_hi=$ac_mid; break
else $as_nop
  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
			if test $ac_lo -le $ac_mid; then
			  ac_lo= ac_hi=
			  break
			fi
			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
  done
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main (void)
{
static int test_array [1 - 2 * !(($2) < 0)];
test_array [0] = 0;
return test_array [0];

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_hi=-1 ac_mid=-1
  while :; do
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main (void)
{
static int test_array [1 - 2 * !(($2) >= $ac_mid)];
test_array [0] = 0;
return test_array [0];

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_lo=$ac_mid; break
else $as_nop
  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
			if test $ac_mid -le $ac_hi; then
			  ac_lo= ac_hi=
			  break
			fi
			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
  done
else $as_nop
  ac_lo= ac_hi=
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
int
main (void)
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
test_array [0] = 0;
return test_array [0];

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_hi=$ac_mid
else $as_nop
  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
case $ac_lo in #((
?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
'') ac_retval=1 ;;
esac
  else
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
static long int longval (void) { return $2; }
static unsigned long int ulongval (void) { return $2; }
#include <stdio.h>
#include <stdlib.h>
int
main (void)
{

  FILE *f = fopen ("conftest.val", "w");
  if (! f)
    return 1;
  if (($2) < 0)
    {
      long int i = longval ();
      if (i != ($2))
	return 1;
      fprintf (f, "%ld", i);
    }
  else
    {
      unsigned long int i = ulongval ();
      if (i != ($2))
	return 1;
      fprintf (f, "%lu", i);
    }
  /* Do not output a trailing newline, as this causes \r\n confusion
     on some platforms.  */
  return ferror (f) || fclose (f) != 0;

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_run "$LINENO"
then :
  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
else $as_nop
  ac_retval=1
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
rm -f conftest.val

  fi
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_cxx_compute_int

# ac_fn_fc_try_compile LINENO
# ---------------------------
# Try to compile conftest.$ac_ext, and return whether this succeeded.
ac_fn_fc_try_compile ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  rm -f conftest.$ac_objext conftest.beam
  if { { ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_compile") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
	 test -z "$ac_fc_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext
then :
  ac_retval=0
else $as_nop
  printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_retval=1
fi
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_fc_try_compile

# ac_fn_f77_try_compile LINENO
# ----------------------------
# Try to compile conftest.$ac_ext, and return whether this succeeded.
ac_fn_f77_try_compile ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  rm -f conftest.$ac_objext conftest.beam
  if { { ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_compile") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
	 test -z "$ac_f77_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext
then :
  ac_retval=0
else $as_nop
  printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_retval=1
fi
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_f77_try_compile

# ac_fn_cxx_try_link LINENO
# -------------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
ac_fn_cxx_try_link ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
  if { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
	 test -z "$ac_cxx_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext && {
	 test "$cross_compiling" = yes ||
	 test -x conftest$ac_exeext
       }
then :
  ac_retval=0
else $as_nop
  printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_retval=1
fi
  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
  # interfere with the next link command; also delete a directory that is
  # left behind by Apple's compiler.  We do this before executing the actions.
  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_cxx_try_link

# ac_fn_f77_try_run LINENO
# ------------------------
# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
# executables *can* be run.
ac_fn_f77_try_run ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  if { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
  { { case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; }
then :
  ac_retval=0
else $as_nop
  printf "%s\n" "$as_me: program exited with status $ac_status" >&5
       printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

       ac_retval=$ac_status
fi
  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_f77_try_run

# ac_fn_c_try_link LINENO
# -----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
ac_fn_c_try_link ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
  if { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext && {
	 test "$cross_compiling" = yes ||
	 test -x conftest$ac_exeext
       }
then :
  ac_retval=0
else $as_nop
  printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_retval=1
fi
  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
  # interfere with the next link command; also delete a directory that is
  # left behind by Apple's compiler.  We do this before executing the actions.
  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_c_try_link

# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
# ---------------------------------------------------------
# Tests whether HEADER exists and can be compiled using the include files in
# INCLUDES, setting the cache variable VAR accordingly.
ac_fn_cxx_check_header_compile ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
printf %s "checking for $2... " >&6; }
if eval test \${$3+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
#include <$2>
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
  eval "$3=yes"
else $as_nop
  eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
eval ac_res=\$$3
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_cxx_check_header_compile

# ac_fn_f77_try_link LINENO
# -------------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
ac_fn_f77_try_link ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
  if { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
	 test -z "$ac_f77_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext && {
	 test "$cross_compiling" = yes ||
	 test -x conftest$ac_exeext
       }
then :
  ac_retval=0
else $as_nop
  printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_retval=1
fi
  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
  # interfere with the next link command; also delete a directory that is
  # left behind by Apple's compiler.  We do this before executing the actions.
  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_f77_try_link

# ac_fn_cxx_check_func LINENO FUNC VAR
# ------------------------------------
# Tests whether FUNC exists, setting the cache variable VAR accordingly
ac_fn_cxx_check_func ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
printf %s "checking for $2... " >&6; }
if eval test \${$3+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $2 innocuous_$2

/* System header to define __stub macros and hopefully few prototypes,
   which can conflict with char $2 (); below.  */

#include <limits.h>
#undef $2

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char $2 ();
/* 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_$2 || defined __stub___$2
choke me
#endif

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
return $2 ();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  eval "$3=yes"
else $as_nop
  eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
fi
eval ac_res=\$$3
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_cxx_check_func

# ac_fn_fc_try_link LINENO
# ------------------------
# Try to link conftest.$ac_ext, and return whether this succeeded.
ac_fn_fc_try_link ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
  if { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    grep -v '^ *+' conftest.err >conftest.er1
    cat conftest.er1 >&5
    mv -f conftest.er1 conftest.err
  fi
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } && {
	 test -z "$ac_fc_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest$ac_exeext && {
	 test "$cross_compiling" = yes ||
	 test -x conftest$ac_exeext
       }
then :
  ac_retval=0
else $as_nop
  printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

	ac_retval=1
fi
  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
  # interfere with the next link command; also delete a directory that is
  # left behind by Apple's compiler.  We do this before executing the actions.
  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  as_fn_set_status $ac_retval

} # ac_fn_fc_try_link

# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists and can be compiled using the include files in
# INCLUDES, setting the cache variable VAR accordingly.
ac_fn_c_check_header_compile ()
{
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
printf %s "checking for $2... " >&6; }
if eval test \${$3+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$4
#include <$2>
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  eval "$3=yes"
else $as_nop
  eval "$3=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
eval ac_res=\$$3
	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

} # ac_fn_c_check_header_compile
ac_configure_args_raw=
for ac_arg
do
  case $ac_arg in
  *\'*)
    ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
  esac
  as_fn_append ac_configure_args_raw " '$ac_arg'"
done

case $ac_configure_args_raw in
  *$as_nl*)
    ac_safe_unquote= ;;
  *)
    ac_unsafe_z='|&;<>()$`\\"*?[ ''	' # This string ends in space, tab.
    ac_unsafe_a="$ac_unsafe_z#~"
    ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
    ac_configure_args_raw=`      printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
esac

cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by FreeFEM $as_me 4.14, which was
generated by GNU Autoconf 2.71.  Invocation command line was

  $ $0$ac_configure_args_raw

_ACEOF
exec 5>>config.log
{
cat <<_ASUNAME
## --------- ##
## Platform. ##
## --------- ##

hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
uname -m = `(uname -m) 2>/dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
uname -s = `(uname -s) 2>/dev/null || echo unknown`
uname -v = `(uname -v) 2>/dev/null || echo unknown`

/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`

/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`

_ASUNAME

as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    printf "%s\n" "PATH: $as_dir"
  done
IFS=$as_save_IFS

} >&5

cat >&5 <<_ACEOF


## ----------- ##
## Core tests. ##
## ----------- ##

_ACEOF


# Keep a trace of the command line.
# Strip out --no-create and --no-recursion so they do not pile up.
# Strip out --silent because we don't want to record it for future runs.
# Also quote any args containing shell meta-characters.
# Make two passes to allow for proper duplicate-argument suppression.
ac_configure_args=
ac_configure_args0=
ac_configure_args1=
ac_must_keep_next=false
for ac_pass in 1 2
do
  for ac_arg
  do
    case $ac_arg in
    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
    | -silent | --silent | --silen | --sile | --sil)
      continue ;;
    *\'*)
      ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
    esac
    case $ac_pass in
    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
    2)
      as_fn_append ac_configure_args1 " '$ac_arg'"
      if test $ac_must_keep_next = true; then
	ac_must_keep_next=false # Got value, back to normal.
      else
	case $ac_arg in
	  *=* | --config-cache | -C | -disable-* | --disable-* \
	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
	  | -with-* | --with-* | -without-* | --without-* | --x)
	    case "$ac_configure_args0 " in
	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
	    esac
	    ;;
	  -* ) ac_must_keep_next=true ;;
	esac
      fi
      as_fn_append ac_configure_args " '$ac_arg'"
      ;;
    esac
  done
done
{ ac_configure_args0=; unset ac_configure_args0;}
{ ac_configure_args1=; unset ac_configure_args1;}

# When interrupted or exit'd, cleanup temporary files, and complete
# config.log.  We remove comments because anyway the quotes in there
# would cause problems or look ugly.
# WARNING: Use '\'' to represent an apostrophe within the trap.
# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
trap 'exit_status=$?
  # Sanitize IFS.
  IFS=" ""	$as_nl"
  # Save into config.log some information that might help in debugging.
  {
    echo

    printf "%s\n" "## ---------------- ##
## Cache variables. ##
## ---------------- ##"
    echo
    # The following way of writing the cache mishandles newlines in values,
(
  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
    eval ac_val=\$$ac_var
    case $ac_val in #(
    *${as_nl}*)
      case $ac_var in #(
      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      esac
      case $ac_var in #(
      _ | IFS | as_nl) ;; #(
      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
      *) { eval $ac_var=; unset $ac_var;} ;;
      esac ;;
    esac
  done
  (set) 2>&1 |
    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
    *${as_nl}ac_space=\ *)
      sed -n \
	"s/'\''/'\''\\\\'\'''\''/g;
	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
      ;; #(
    *)
      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
      ;;
    esac |
    sort
)
    echo

    printf "%s\n" "## ----------------- ##
## Output variables. ##
## ----------------- ##"
    echo
    for ac_var in $ac_subst_vars
    do
      eval ac_val=\$$ac_var
      case $ac_val in
      *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
      esac
      printf "%s\n" "$ac_var='\''$ac_val'\''"
    done | sort
    echo

    if test -n "$ac_subst_files"; then
      printf "%s\n" "## ------------------- ##
## File substitutions. ##
## ------------------- ##"
      echo
      for ac_var in $ac_subst_files
      do
	eval ac_val=\$$ac_var
	case $ac_val in
	*\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
	esac
	printf "%s\n" "$ac_var='\''$ac_val'\''"
      done | sort
      echo
    fi

    if test -s confdefs.h; then
      printf "%s\n" "## ----------- ##
## confdefs.h. ##
## ----------- ##"
      echo
      cat confdefs.h
      echo
    fi
    test "$ac_signal" != 0 &&
      printf "%s\n" "$as_me: caught signal $ac_signal"
    printf "%s\n" "$as_me: exit $exit_status"
  } >&5
  rm -f core *.core core.conftest.* &&
    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
    exit $exit_status
' 0
for ac_signal in 1 2 13 15; do
  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
done
ac_signal=0

# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -f -r conftest* confdefs.h

printf "%s\n" "/* confdefs.h */" > confdefs.h

# Predefined preprocessor variables.

printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h

printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h

printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h

printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h

printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h

printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h


# Let the site file select an alternate cache file if it wants to.
# Prefer an explicitly selected file to automatically selected ones.
if test -n "$CONFIG_SITE"; then
  ac_site_files="$CONFIG_SITE"
elif test "x$prefix" != xNONE; then
  ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
else
  ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi

for ac_site_file in $ac_site_files
do
  case $ac_site_file in #(
  */*) :
     ;; #(
  *) :
    ac_site_file=./$ac_site_file ;;
esac
  if test -f "$ac_site_file" && test -r "$ac_site_file"; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
    sed 's/^/| /' "$ac_site_file" >&5
    . "$ac_site_file" \
      || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "failed to load site script $ac_site_file
See \`config.log' for more details" "$LINENO" 5; }
  fi
done

if test -r "$cache_file"; then
  # Some versions of bash will fail to source /dev/null (special files
  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
    case $cache_file in
      [\\/]* | ?:[\\/]* ) . "$cache_file";;
      *)                      . "./$cache_file";;
    esac
  fi
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
  >$cache_file
fi

# Test code for whether the C compiler supports C89 (global declarations)
ac_c_conftest_c89_globals='
/* Does the compiler advertise C89 conformance?
   Do not test the value of __STDC__, because some compilers set it to 0
   while being otherwise adequately conformant. */
#if !defined __STDC__
# error "Compiler does not advertise C89 conformance"
#endif

#include <stddef.h>
#include <stdarg.h>
struct stat;
/* Most of the following tests are stolen from RCS 5.7 src/conf.sh.  */
struct buf { int x; };
struct buf * (*rcsopen) (struct buf *, struct stat *, int);
static char *e (p, i)
     char **p;
     int i;
{
  return p[i];
}
static char *f (char * (*g) (char **, int), char **p, ...)
{
  char *s;
  va_list v;
  va_start (v,p);
  s = g (p, va_arg (v,int));
  va_end (v);
  return s;
}

/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
   function prototypes and stuff, but not \xHH hex character constants.
   These do not provoke an error unfortunately, instead are silently treated
   as an "x".  The following induces an error, until -std is added to get
   proper ANSI mode.  Curiously \x00 != x always comes out true, for an
   array size at least.  It is necessary to write \x00 == 0 to get something
   that is true only with -std.  */
int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];

/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
   inside strings and character constants.  */
#define FOO(x) '\''x'\''
int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];

int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
               int, int);'

# Test code for whether the C compiler supports C89 (body of main).
ac_c_conftest_c89_main='
ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
'

# Test code for whether the C compiler supports C99 (global declarations)
ac_c_conftest_c99_globals='
// Does the compiler advertise C99 conformance?
#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
# error "Compiler does not advertise C99 conformance"
#endif

#include <stdbool.h>
extern int puts (const char *);
extern int printf (const char *, ...);
extern int dprintf (int, const char *, ...);
extern void *malloc (size_t);

// Check varargs macros.  These examples are taken from C99 6.10.3.5.
// dprintf is used instead of fprintf to avoid needing to declare
// FILE and stderr.
#define debug(...) dprintf (2, __VA_ARGS__)
#define showlist(...) puts (#__VA_ARGS__)
#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
static void
test_varargs_macros (void)
{
  int x = 1234;
  int y = 5678;
  debug ("Flag");
  debug ("X = %d\n", x);
  showlist (The first, second, and third items.);
  report (x>y, "x is %d but y is %d", x, y);
}

// Check long long types.
#define BIG64 18446744073709551615ull
#define BIG32 4294967295ul
#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
#if !BIG_OK
  #error "your preprocessor is broken"
#endif
#if BIG_OK
#else
  #error "your preprocessor is broken"
#endif
static long long int bignum = -9223372036854775807LL;
static unsigned long long int ubignum = BIG64;

struct incomplete_array
{
  int datasize;
  double data[];
};

struct named_init {
  int number;
  const wchar_t *name;
  double average;
};

typedef const char *ccp;

static inline int
test_restrict (ccp restrict text)
{
  // See if C++-style comments work.
  // Iterate through items via the restricted pointer.
  // Also check for declarations in for loops.
  for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
    continue;
  return 0;
}

// Check varargs and va_copy.
static bool
test_varargs (const char *format, ...)
{
  va_list args;
  va_start (args, format);
  va_list args_copy;
  va_copy (args_copy, args);

  const char *str = "";
  int number = 0;
  float fnumber = 0;

  while (*format)
    {
      switch (*format++)
	{
	case '\''s'\'': // string
	  str = va_arg (args_copy, const char *);
	  break;
	case '\''d'\'': // int
	  number = va_arg (args_copy, int);
	  break;
	case '\''f'\'': // float
	  fnumber = va_arg (args_copy, double);
	  break;
	default:
	  break;
	}
    }
  va_end (args_copy);
  va_end (args);

  return *str && number && fnumber;
}
'

# Test code for whether the C compiler supports C99 (body of main).
ac_c_conftest_c99_main='
  // Check bool.
  _Bool success = false;
  success |= (argc != 0);

  // Check restrict.
  if (test_restrict ("String literal") == 0)
    success = true;
  char *restrict newvar = "Another string";

  // Check varargs.
  success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
  test_varargs_macros ();

  // Check flexible array members.
  struct incomplete_array *ia =
    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
  ia->datasize = 10;
  for (int i = 0; i < ia->datasize; ++i)
    ia->data[i] = i * 1.234;

  // Check named initializers.
  struct named_init ni = {
    .number = 34,
    .name = L"Test wide string",
    .average = 543.34343,
  };

  ni.number = 58;

  int dynamic_array[ni.number];
  dynamic_array[0] = argv[0][0];
  dynamic_array[ni.number - 1] = 543;

  // work around unused variable warnings
  ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
	 || dynamic_array[ni.number - 1] != 543);
'

# Test code for whether the C compiler supports C11 (global declarations)
ac_c_conftest_c11_globals='
// Does the compiler advertise C11 conformance?
#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
# error "Compiler does not advertise C11 conformance"
#endif

// Check _Alignas.
char _Alignas (double) aligned_as_double;
char _Alignas (0) no_special_alignment;
extern char aligned_as_int;
char _Alignas (0) _Alignas (int) aligned_as_int;

// Check _Alignof.
enum
{
  int_alignment = _Alignof (int),
  int_array_alignment = _Alignof (int[100]),
  char_alignment = _Alignof (char)
};
_Static_assert (0 < -_Alignof (int), "_Alignof is signed");

// Check _Noreturn.
int _Noreturn does_not_return (void) { for (;;) continue; }

// Check _Static_assert.
struct test_static_assert
{
  int x;
  _Static_assert (sizeof (int) <= sizeof (long int),
                  "_Static_assert does not work in struct");
  long int y;
};

// Check UTF-8 literals.
#define u8 syntax error!
char const utf8_literal[] = u8"happens to be ASCII" "another string";

// Check duplicate typedefs.
typedef long *long_ptr;
typedef long int *long_ptr;
typedef long_ptr long_ptr;

// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
struct anonymous
{
  union {
    struct { int i; int j; };
    struct { int k; long int l; } w;
  };
  int m;
} v1;
'

# Test code for whether the C compiler supports C11 (body of main).
ac_c_conftest_c11_main='
  _Static_assert ((offsetof (struct anonymous, i)
		   == offsetof (struct anonymous, w.k)),
		  "Anonymous union alignment botch");
  v1.i = 2;
  v1.w.k = 5;
  ok |= v1.i != 5;
'

# Test code for whether the C compiler supports C11 (complete).
ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
${ac_c_conftest_c99_globals}
${ac_c_conftest_c11_globals}

int
main (int argc, char **argv)
{
  int ok = 0;
  ${ac_c_conftest_c89_main}
  ${ac_c_conftest_c99_main}
  ${ac_c_conftest_c11_main}
  return ok;
}
"

# Test code for whether the C compiler supports C99 (complete).
ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
${ac_c_conftest_c99_globals}

int
main (int argc, char **argv)
{
  int ok = 0;
  ${ac_c_conftest_c89_main}
  ${ac_c_conftest_c99_main}
  return ok;
}
"

# Test code for whether the C compiler supports C89 (complete).
ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}

int
main (int argc, char **argv)
{
  int ok = 0;
  ${ac_c_conftest_c89_main}
  return ok;
}
"

# Test code for whether the C++ compiler supports C++98 (global declarations)
ac_cxx_conftest_cxx98_globals='
// Does the compiler advertise C++98 conformance?
#if !defined __cplusplus || __cplusplus < 199711L
# error "Compiler does not advertise C++98 conformance"
#endif

// These inclusions are to reject old compilers that
// lack the unsuffixed header files.
#include <cstdlib>
#include <exception>

// <cassert> and <cstring> are *not* freestanding headers in C++98.
extern void assert (int);
namespace std {
  extern int strcmp (const char *, const char *);
}

// Namespaces, exceptions, and templates were all added after "C++ 2.0".
using std::exception;
using std::strcmp;

namespace {

void test_exception_syntax()
{
  try {
    throw "test";
  } catch (const char *s) {
    // Extra parentheses suppress a warning when building autoconf itself,
    // due to lint rules shared with more typical C programs.
    assert (!(strcmp) (s, "test"));
  }
}

template <typename T> struct test_template
{
  T const val;
  explicit test_template(T t) : val(t) {}
  template <typename U> T add(U u) { return static_cast<T>(u) + val; }
};

} // anonymous namespace
'

# Test code for whether the C++ compiler supports C++98 (body of main)
ac_cxx_conftest_cxx98_main='
  assert (argc);
  assert (! argv[0]);
{
  test_exception_syntax ();
  test_template<double> tt (2.0);
  assert (tt.add (4) == 6.0);
  assert (true && !false);
}
'

# Test code for whether the C++ compiler supports C++11 (global declarations)
ac_cxx_conftest_cxx11_globals='
// Does the compiler advertise C++ 2011 conformance?
#if !defined __cplusplus || __cplusplus < 201103L
# error "Compiler does not advertise C++11 conformance"
#endif

namespace cxx11test
{
  constexpr int get_val() { return 20; }

  struct testinit
  {
    int i;
    double d;
  };

  class delegate
  {
  public:
    delegate(int n) : n(n) {}
    delegate(): delegate(2354) {}

    virtual int getval() { return this->n; };
  protected:
    int n;
  };

  class overridden : public delegate
  {
  public:
    overridden(int n): delegate(n) {}
    virtual int getval() override final { return this->n * 2; }
  };

  class nocopy
  {
  public:
    nocopy(int i): i(i) {}
    nocopy() = default;
    nocopy(const nocopy&) = delete;
    nocopy & operator=(const nocopy&) = delete;
  private:
    int i;
  };

  // for testing lambda expressions
  template <typename Ret, typename Fn> Ret eval(Fn f, Ret v)
  {
    return f(v);
  }

  // for testing variadic templates and trailing return types
  template <typename V> auto sum(V first) -> V
  {
    return first;
  }
  template <typename V, typename... Args> auto sum(V first, Args... rest) -> V
  {
    return first + sum(rest...);
  }
}
'

# Test code for whether the C++ compiler supports C++11 (body of main)
ac_cxx_conftest_cxx11_main='
{
  // Test auto and decltype
  auto a1 = 6538;
  auto a2 = 48573953.4;
  auto a3 = "String literal";

  int total = 0;
  for (auto i = a3; *i; ++i) { total += *i; }

  decltype(a2) a4 = 34895.034;
}
{
  // Test constexpr
  short sa[cxx11test::get_val()] = { 0 };
}
{
  // Test initializer lists
  cxx11test::testinit il = { 4323, 435234.23544 };
}
{
  // Test range-based for
  int array[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3,
                 14, 19, 17, 8, 6, 20, 16, 2, 11, 1};
  for (auto &x : array) { x += 23; }
}
{
  // Test lambda expressions
  using cxx11test::eval;
  assert (eval ([](int x) { return x*2; }, 21) == 42);
  double d = 2.0;
  assert (eval ([&](double x) { return d += x; }, 3.0) == 5.0);
  assert (d == 5.0);
  assert (eval ([=](double x) mutable { return d += x; }, 4.0) == 9.0);
  assert (d == 5.0);
}
{
  // Test use of variadic templates
  using cxx11test::sum;
  auto a = sum(1);
  auto b = sum(1, 2);
  auto c = sum(1.0, 2.0, 3.0);
}
{
  // Test constructor delegation
  cxx11test::delegate d1;
  cxx11test::delegate d2();
  cxx11test::delegate d3(45);
}
{
  // Test override and final
  cxx11test::overridden o1(55464);
}
{
  // Test nullptr
  char *c = nullptr;
}
{
  // Test template brackets
  test_template<::test_template<int>> v(test_template<int>(12));
}
{
  // Unicode literals
  char const *utf8 = u8"UTF-8 string \u2500";
  char16_t const *utf16 = u"UTF-8 string \u2500";
  char32_t const *utf32 = U"UTF-32 string \u2500";
}
'

# Test code for whether the C compiler supports C++11 (complete).
ac_cxx_conftest_cxx11_program="${ac_cxx_conftest_cxx98_globals}
${ac_cxx_conftest_cxx11_globals}

int
main (int argc, char **argv)
{
  int ok = 0;
  ${ac_cxx_conftest_cxx98_main}
  ${ac_cxx_conftest_cxx11_main}
  return ok;
}
"

# Test code for whether the C compiler supports C++98 (complete).
ac_cxx_conftest_cxx98_program="${ac_cxx_conftest_cxx98_globals}
int
main (int argc, char **argv)
{
  int ok = 0;
  ${ac_cxx_conftest_cxx98_main}
  return ok;
}
"

as_fn_append ac_header_cxx_list " stdio.h stdio_h HAVE_STDIO_H"
as_fn_append ac_header_cxx_list " stdlib.h stdlib_h HAVE_STDLIB_H"
as_fn_append ac_header_cxx_list " string.h string_h HAVE_STRING_H"
as_fn_append ac_header_cxx_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
as_fn_append ac_header_cxx_list " stdint.h stdint_h HAVE_STDINT_H"
as_fn_append ac_header_cxx_list " strings.h strings_h HAVE_STRINGS_H"
as_fn_append ac_header_cxx_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
as_fn_append ac_header_cxx_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
as_fn_append ac_header_cxx_list " unistd.h unistd_h HAVE_UNISTD_H"
as_fn_append ac_header_cxx_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"

# Auxiliary files required by this configure script.
ac_aux_files="config.guess config.sub compile missing install-sh"

# Locations in which to look for auxiliary files.
ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.."

# Search for a directory containing all of the required auxiliary files,
# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
# If we don't find one directory that contains all the files we need,
# we report the set of missing files from the *first* directory in
# $ac_aux_dir_candidates and give up.
ac_missing_aux_files=""
ac_first_candidate=:
printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_found=false
for as_dir in $ac_aux_dir_candidates
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
  as_found=:

  printf "%s\n" "$as_me:${as_lineno-$LINENO}:  trying $as_dir" >&5
  ac_aux_dir_found=yes
  ac_install_sh=
  for ac_aux in $ac_aux_files
  do
    # As a special case, if "install-sh" is required, that requirement
    # can be satisfied by any of "install-sh", "install.sh", or "shtool",
    # and $ac_install_sh is set appropriately for whichever one is found.
    if test x"$ac_aux" = x"install-sh"
    then
      if test -f "${as_dir}install-sh"; then
        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install-sh found" >&5
        ac_install_sh="${as_dir}install-sh -c"
      elif test -f "${as_dir}install.sh"; then
        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install.sh found" >&5
        ac_install_sh="${as_dir}install.sh -c"
      elif test -f "${as_dir}shtool"; then
        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}shtool found" >&5
        ac_install_sh="${as_dir}shtool install -c"
      else
        ac_aux_dir_found=no
        if $ac_first_candidate; then
          ac_missing_aux_files="${ac_missing_aux_files} install-sh"
        else
          break
        fi
      fi
    else
      if test -f "${as_dir}${ac_aux}"; then
        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}${ac_aux} found" >&5
      else
        ac_aux_dir_found=no
        if $ac_first_candidate; then
          ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
        else
          break
        fi
      fi
    fi
  done
  if test "$ac_aux_dir_found" = yes; then
    ac_aux_dir="$as_dir"
    break
  fi
  ac_first_candidate=false

  as_found=false
done
IFS=$as_save_IFS
if $as_found
then :

else $as_nop
  as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
fi


# These three variables are undocumented and unsupported,
# and are intended to be withdrawn in a future Autoconf release.
# They can cause serious problems if a builder's source tree is in a directory
# whose full name contains unusual characters.
if test -f "${ac_aux_dir}config.guess"; then
  ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
fi
if test -f "${ac_aux_dir}config.sub"; then
  ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
fi
if test -f "$ac_aux_dir/configure"; then
  ac_configure="$SHELL ${ac_aux_dir}configure"
fi

# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
for ac_var in $ac_precious_vars; do
  eval ac_old_set=\$ac_cv_env_${ac_var}_set
  eval ac_new_set=\$ac_env_${ac_var}_set
  eval ac_old_val=\$ac_cv_env_${ac_var}_value
  eval ac_new_val=\$ac_env_${ac_var}_value
  case $ac_old_set,$ac_new_set in
    set,)
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
      ac_cache_corrupted=: ;;
    ,set)
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
      ac_cache_corrupted=: ;;
    ,);;
    *)
      if test "x$ac_old_val" != "x$ac_new_val"; then
	# differences in whitespace do not lead to failure.
	ac_old_val_w=`echo x $ac_old_val`
	ac_new_val_w=`echo x $ac_new_val`
	if test "$ac_old_val_w" != "$ac_new_val_w"; then
	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
	  ac_cache_corrupted=:
	else
	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
	  eval $ac_var=\$ac_old_val
	fi
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
printf "%s\n" "$as_me:   former value:  \`$ac_old_val'" >&2;}
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
printf "%s\n" "$as_me:   current value: \`$ac_new_val'" >&2;}
      fi;;
  esac
  # Pass precious variables to config.status.
  if test "$ac_new_set" = set; then
    case $ac_new_val in
    *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
    *) ac_arg=$ac_var=$ac_new_val ;;
    esac
    case " $ac_configure_args " in
      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
    esac
  fi
done
if $ac_cache_corrupted; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
  as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
	    and start over" "$LINENO" 5
fi
## -------------------- ##
## Main body of script. ##
## -------------------- ##

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu





# progg test  exec for windows
ff_TEST_FFPP="../../src/nw/FreeFem++"
ff_TEST_FFPP_MPI="../../src/mpi/FreeFem++-mpi"
ff_uncompile_plugin=""
ff_unlib_plugin=""
ff_download_lib=""

# Automake 1.11 is too old for check ...

# ALH - 10/9/13 - FFCS needs to skip this automake version requirement when compiling on older platforms (eg cygwin or
# last Ubuntu LTS). So we fix a low hardcoded requirement and test for higher versions when not in FFCS.

am__api_version='1.16'



  # 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
# AmigaOS /C/install, which installs bootblocks on floppy discs
# 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"
# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
# Reject install programs that cannot install multiple files.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
printf %s "checking for a BSD-compatible install... " >&6; }
if test -z "$INSTALL"; then
if test ${ac_cv_path_install+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    # Account for fact that we put trailing slashes in our PATH walk.
case $as_dir in #((
  ./ | /[cC]/* | \
  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
  /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
      for ac_exec_ext in '' $ac_executable_extensions; do
	if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
	  if test $ac_prog = install &&
	    grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
	    # AIX install.  It has an incompatible calling convention.
	    :
	  elif test $ac_prog = install &&
	    grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
	    # program-specific install script used by HP pwplus--don't use.
	    :
	  else
	    rm -rf conftest.one conftest.two conftest.dir
	    echo one > conftest.one
	    echo two > conftest.two
	    mkdir conftest.dir
	    if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
	      test -s conftest.one && test -s conftest.two &&
	      test -s conftest.dir/conftest.one &&
	      test -s conftest.dir/conftest.two
	    then
	      ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
	      break 3
	    fi
	  fi
	fi
      done
    done
    ;;
esac

  done
IFS=$as_save_IFS

rm -rf conftest.one conftest.two conftest.dir

fi
  if test ${ac_cv_path_install+y}; then
    INSTALL=$ac_cv_path_install
  else
    # As a last resort, use the slow shell script.  Don't cache a
    # value for INSTALL within a source directory, because that will
    # break other packages using the cache if that directory is
    # removed, or if the value is a relative name.
    INSTALL=$ac_install_sh
  fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
printf "%s\n" "$INSTALL" >&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}'

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

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
printf %s "checking whether build environment is sane... " >&6; }
# Reject unsafe characters in $srcdir or the absolute working directory
# name.  Accept space and tab only in the latter.
am_lf='
'
case `pwd` in
  *[\\\"\#\$\&\'\`$am_lf]*)
    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
esac
case $srcdir in
  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
esac

# Do 'set' in a subshell so we don't clobber the current shell's
# arguments.  Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
   am_has_slept=no
   for am_try in 1 2; do
     echo "timestamp, slept: $am_has_slept" > conftest.file
     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
     if test "$*" = "X"; then
	# -L didn't work.
	set X `ls -t "$srcdir/configure" conftest.file`
     fi
     if test "$*" != "X $srcdir/configure conftest.file" \
	&& test "$*" != "X conftest.file $srcdir/configure"; then

	# If neither matched, then we have a broken ls.  This can happen
	# if, for instance, CONFIG_SHELL is bash and it inherits a
	# broken ls alias from the environment.  This has actually
	# happened.  Such a system could not be considered "sane".
	as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
  alias in your environment" "$LINENO" 5
     fi
     if test "$2" = conftest.file || test $am_try -eq 2; then
       break
     fi
     # Just in case.
     sleep 1
     am_has_slept=yes
   done
   test "$2" = conftest.file
   )
then
   # Ok.
   :
else
   as_fn_error $? "newly created file is older than distributed files!
Check your system clock" "$LINENO" 5
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
# If we didn't sleep, we still need to ensure time stamps of config.status and
# generated files are strictly newer.
am_sleep_pid=
if grep 'slept: no' conftest.file >/dev/null 2>&1; then
  ( sleep 1 ) &
  am_sleep_pid=$!
fi

rm -f conftest.file

test "$program_prefix" != NONE &&
  program_transform_name="s&^&$program_prefix&;$program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
# Double any \ or $.
# By default was `s,x,x', remove it if useless.
ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`


# Expand $ac_aux_dir to an absolute path.
am_aux_dir=`cd "$ac_aux_dir" && pwd`


  if test x"${MISSING+set}" != xset; then
  MISSING="\${SHELL} '$am_aux_dir/missing'"
fi
# Use eval to expand $SHELL
if eval "$MISSING --is-lightweight"; then
  am_missing_run="$MISSING "
else
  am_missing_run=
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
fi

if test x"${install_sh+set}" != xset; then
  case $am_aux_dir in
  *\ * | *\	*)
    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
  *)
    install_sh="\${SHELL} $am_aux_dir/install-sh"
  esac
fi

# Installed binaries are usually stripped using 'strip' when the user
# run "make install-strip".  However 'strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
# will honor the 'STRIP' environment variable to overrule this program.
if test "$cross_compiling" != no; then
  if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_STRIP+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$STRIP"; then
  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
printf "%s\n" "$STRIP" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


fi
if test -z "$ac_cv_prog_STRIP"; then
  ac_ct_STRIP=$STRIP
  # Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_STRIP+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$ac_ct_STRIP"; then
  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_STRIP="strip"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
if test -n "$ac_ct_STRIP"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
printf "%s\n" "$ac_ct_STRIP" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi

  if test "x$ac_ct_STRIP" = x; then
    STRIP=":"
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    STRIP=$ac_ct_STRIP
  fi
else
  STRIP="$ac_cv_prog_STRIP"
fi

fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
printf %s "checking for a race-free mkdir -p... " >&6; }
if test -z "$MKDIR_P"; then
  if test ${ac_cv_path_mkdir+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_prog in mkdir gmkdir; do
	 for ac_exec_ext in '' $ac_executable_extensions; do
	   as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
	   case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
	     'mkdir ('*'coreutils) '* | \
	     'BusyBox '* | \
	     'mkdir (fileutils) '4.1*)
	       ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
	       break 3;;
	   esac
	 done
       done
  done
IFS=$as_save_IFS

fi

  test -d ./--version && rmdir ./--version
  if test ${ac_cv_path_mkdir+y}; then
    MKDIR_P="$ac_cv_path_mkdir -p"
  else
    # As a last resort, use the slow shell script.  Don't cache a
    # value for MKDIR_P within a source directory, because that will
    # break other packages using the cache if that directory is
    # removed, or if the value is a relative name.
    MKDIR_P="$ac_install_sh -d"
  fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
printf "%s\n" "$MKDIR_P" >&6; }

for ac_prog in gawk mawk nawk awk
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_AWK+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$AWK"; then
  ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_AWK="$ac_prog"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
printf "%s\n" "$AWK" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$AWK" && break
done

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
set x ${MAKE-make}
ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
if eval test \${ac_cv_prog_make_${ac_make}_set+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat >conftest.make <<\_ACEOF
SHELL = /bin/sh
all:
	@echo '@@@%%%=$(MAKE)=@@@%%%'
_ACEOF
# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
case `${MAKE-make} -f conftest.make 2>/dev/null` in
  *@@@%%%=?*=@@@%%%*)
    eval ac_cv_prog_make_${ac_make}_set=yes;;
  *)
    eval ac_cv_prog_make_${ac_make}_set=no;;
esac
rm -f conftest.make
fi
if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  SET_MAKE=
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  SET_MAKE="MAKE=${MAKE-make}"
fi

rm -rf .tst 2>/dev/null
mkdir .tst 2>/dev/null
if test -d .tst; then
  am__leading_dot=.
else
  am__leading_dot=_
fi
rmdir .tst 2>/dev/null

# Check whether --enable-silent-rules was given.
if test ${enable_silent_rules+y}
then :
  enableval=$enable_silent_rules;
fi

case $enable_silent_rules in # (((
  yes) AM_DEFAULT_VERBOSITY=0;;
   no) AM_DEFAULT_VERBOSITY=1;;
    *) AM_DEFAULT_VERBOSITY=1;;
esac
am_make=${MAKE-make}
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
printf %s "checking whether $am_make supports nested variables... " >&6; }
if test ${am_cv_make_support_nested_variables+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if printf "%s\n" 'TRUE=$(BAR$(V))
BAR0=false
BAR1=true
V=1
am__doit:
	@$(TRUE)
.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
  am_cv_make_support_nested_variables=yes
else
  am_cv_make_support_nested_variables=no
fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
if test $am_cv_make_support_nested_variables = yes; then
    AM_V='$(V)'
  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
else
  AM_V=$AM_DEFAULT_VERBOSITY
  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
fi
AM_BACKSLASH='\'

if test "`cd $srcdir && pwd`" != "`pwd`"; then
  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
  # is not polluted with repeated "-I."
  am__isrc=' -I$(srcdir)'
  # test to see if srcdir already configured
  if test -f $srcdir/config.status; then
    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
  fi
fi

# test whether we have cygpath
if test -z "$CYGPATH_W"; then
  if (cygpath --version) >/dev/null 2>/dev/null; then
    CYGPATH_W='cygpath -w'
  else
    CYGPATH_W=echo
  fi
fi


# Define the identity of the package.
 PACKAGE='FreeFEM'
 VERSION='4.14'


printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h


printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h

# Some tools Automake needs.

ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}


AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}


AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}


AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}


MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}

# For better backward compatibility.  To be removed once Automake 1.9.x
# dies out for good.  For more background, see:
# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
mkdir_p='$(MKDIR_P)'

# We need awk for the "check" target (and possibly the TAP driver).  The
# system "awk" is bad on some platforms.
# Always define AMTAR for backward compatibility.  Yes, it's still used
# in the wild :-(  We should find a proper way to deprecate it ...
AMTAR='$${TAR-tar}'


# We'll loop over all known methods to create a tar archive until one works.
_am_tools='gnutar  pax cpio none'

am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'





# Variables for tags utilities; see am/tags.am
if test -z "$CTAGS"; then
  CTAGS=ctags
fi

if test -z "$ETAGS"; then
  ETAGS=etags
fi

if test -z "$CSCOPE"; then
  CSCOPE=cscope
fi



# POSIX will say in a future version that running "rm -f" with no argument
# is OK; and we want to be able to make that assumption in our Makefile
# recipes.  So use an aggressive probe to check that the usage we want is
# actually supported "in the wild" to an acceptable degree.
# See automake bug#10828.
# To make any issue more visible, cause the running configure to be aborted
# by default if the 'rm' program in use doesn't match our expectations; the
# user can still override this though.
if rm -f && rm -fr && rm -rf; then : OK; else
  cat >&2 <<'END'
Oops!

Your 'rm' program seems unable to run without file operands specified
on the command line, even when the '-f' option is present.  This is contrary
to the behaviour of most rm programs out there, and not conforming with
the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>

Please tell bug-automake@gnu.org about your system, including the value
of your $PATH and any error possibly output before this message.  This
can help us improve future automake versions.

END
  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
    echo 'Configuration will proceed anyway, since you have set the' >&2
    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
    echo >&2
  else
    cat >&2 <<'END'
Aborting the configuration process, to ensure you take notice of the issue.

You can download and install GNU coreutils to get an 'rm' implementation
that behaves properly: <https://www.gnu.org/software/coreutils/>.

If you want to complete the configuration process using your problematic
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
to "yes", and re-run configure.

END
    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
  fi
fi


if test "$enable_ffcs" != yes
then
    if test "$am__api_version" \< 1.13 ;   then
	as_fn_error $? "Automake version $am__api_version needs to be 1.13 or later to enable \"make check\"" "$LINENO" 5
    fi
fi

ac_config_headers="$ac_config_headers config.h"

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
set x ${MAKE-make}
ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
if eval test \${ac_cv_prog_make_${ac_make}_set+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat >conftest.make <<\_ACEOF
SHELL = /bin/sh
all:
	@echo '@@@%%%=$(MAKE)=@@@%%%'
_ACEOF
# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
case `${MAKE-make} -f conftest.make 2>/dev/null` in
  *@@@%%%=?*=@@@%%%*)
    eval ac_cv_prog_make_${ac_make}_set=yes;;
  *)
    eval ac_cv_prog_make_${ac_make}_set=no;;
esac
rm -f conftest.make
fi
if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
  SET_MAKE=
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
  SET_MAKE="MAKE=${MAKE-make}"
fi

if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_RANLIB+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
printf "%s\n" "$RANLIB" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


fi
if test -z "$ac_cv_prog_RANLIB"; then
  ac_ct_RANLIB=$RANLIB
  # Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_RANLIB+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$ac_ct_RANLIB"; then
  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_RANLIB="ranlib"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
if test -n "$ac_ct_RANLIB"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
printf "%s\n" "$ac_ct_RANLIB" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi

  if test "x$ac_ct_RANLIB" = x; then
    RANLIB=":"
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    RANLIB=$ac_ct_RANLIB
  fi
else
  RANLIB="$ac_cv_prog_RANLIB"
fi

inc_usr_include=""
ff_where_lib_conf=plugin/seq/WHERE_LIBRARY-config


# ALH - this is required by FFCS that needs to deactivate some tools that do not work on all platforms. Some FF users
# may also find interesting to specify a local version of a tool instead of downloading it.

# m4 macro parameters: $1 = tool name, $2 = dynamic library name, $3 = download directory name if different from $1






echo "#  Build with FreeFEM with ./configure " `date`  >$ff_where_lib_conf
# To allow anonymous CVS version to contain a "./configure" and
# Makefiles


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
printf %s "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
    # Check whether --enable-maintainer-mode was given.
if test ${enable_maintainer_mode+y}
then :
  enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
else $as_nop
  USE_MAINTAINER_MODE=no
fi

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
printf "%s\n" "$USE_MAINTAINER_MODE" >&6; }
   if test $USE_MAINTAINER_MODE = yes; then
  MAINTAINER_MODE_TRUE=
  MAINTAINER_MODE_FALSE='#'
else
  MAINTAINER_MODE_TRUE='#'
  MAINTAINER_MODE_FALSE=
fi

  MAINT=$MAINTAINER_MODE_TRUE



echo >config_LIB_INFO

# Necessary compilers










ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_CC="${ac_tool_prefix}gcc"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
printf "%s\n" "$CC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


fi
if test -z "$ac_cv_prog_CC"; then
  ac_ct_CC=$CC
  # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_CC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_CC="gcc"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
printf "%s\n" "$ac_ct_CC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi

  if test "x$ac_ct_CC" = x; then
    CC=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CC=$ac_ct_CC
  fi
else
  CC="$ac_cv_prog_CC"
fi

if test -z "$CC"; then
          if test -n "$ac_tool_prefix"; then
    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_CC="${ac_tool_prefix}cc"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
printf "%s\n" "$CC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  fi
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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  ac_prog_rejected=no
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
       ac_prog_rejected=yes
       continue
     fi
    ac_cv_prog_CC="cc"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_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 $# != 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
    ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
  fi
fi
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
printf "%s\n" "$CC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


fi
if test -z "$CC"; then
  if test -n "$ac_tool_prefix"; then
  for ac_prog in cl.exe
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
printf "%s\n" "$CC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


    test -n "$CC" && break
  done
fi
if test -z "$CC"; then
  ac_ct_CC=$CC
  for ac_prog in cl.exe
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_CC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_CC="$ac_prog"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
printf "%s\n" "$ac_ct_CC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$ac_ct_CC" && break
done

  if test "x$ac_ct_CC" = x; then
    CC=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CC=$ac_ct_CC
  fi
fi

fi
if test -z "$CC"; then
  if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
set dummy ${ac_tool_prefix}clang; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_CC="${ac_tool_prefix}clang"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
printf "%s\n" "$CC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


fi
if test -z "$ac_cv_prog_CC"; then
  ac_ct_CC=$CC
  # Extract the first word of "clang", so it can be a program name with args.
set dummy clang; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_CC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_CC="clang"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
printf "%s\n" "$ac_ct_CC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi

  if test "x$ac_ct_CC" = x; then
    CC=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CC=$ac_ct_CC
  fi
else
  CC="$ac_cv_prog_CC"
fi

fi


test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "no acceptable C compiler found in \$PATH
See \`config.log' for more details" "$LINENO" 5; }

# Provide some information about the compiler.
printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
set X $ac_compile
ac_compiler=$2
for ac_option in --version -v -V -qversion -version; do
  { { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    sed '10a\
... rest of stderr output deleted ...
         10q' conftest.err >conftest.er1
    cat conftest.er1 >&5
  fi
  rm -f conftest.er1 conftest.err
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
done

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
printf %s "checking whether the C compiler works... " >&6; }
ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`

# The possible output files:
ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"

ac_rmfiles=
for ac_file in $ac_files
do
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
  esac
done
rm -f $ac_rmfiles

if { { ac_try="$ac_link_default"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_link_default") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
then :
  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
# in a Makefile.  We should not override ac_cv_exeext if it was cached,
# so that the user can short-circuit this test for compilers unknown to
# Autoconf.
for ac_file in $ac_files ''
do
  test -f "$ac_file" || continue
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
	;;
    [ab].out )
	# We found the default executable, but exeext='' is most
	# certainly right.
	break;;
    *.* )
	if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
	then :; else
	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
	fi
	# We set ac_cv_exeext here because the later test for it is not
	# safe: cross compilers may not add the suffix if given an `-o'
	# argument, so we may need to know it at that point already.
	# Even if this section looks crufty: it has the advantage of
	# actually working.
	break;;
    * )
	break;;
  esac
done
test "$ac_cv_exeext" = no && ac_cv_exeext=

else $as_nop
  ac_file=''
fi
if test -z "$ac_file"
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "C compiler cannot create executables
See \`config.log' for more details" "$LINENO" 5; }
else $as_nop
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
printf %s "checking for C compiler default output file name... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
printf "%s\n" "$ac_file" >&6; }
ac_exeext=$ac_cv_exeext

rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
printf %s "checking for suffix of executables... " >&6; }
if { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
then :
  # If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
# `rm'.
for ac_file in conftest.exe conftest conftest.*; do
  test -f "$ac_file" || continue
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
	  break;;
    * ) break;;
  esac
done
else $as_nop
  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest conftest$ac_cv_exeext
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
printf "%s\n" "$ac_cv_exeext" >&6; }

rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main (void)
{
FILE *f = fopen ("conftest.out", "w");
 return ferror (f) || fclose (f) != 0;

  ;
  return 0;
}
_ACEOF
ac_clean_files="$ac_clean_files conftest.out"
# Check that the compiler produces executables we can run.  If not, either
# the compiler is broken, or we cross compile.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
printf %s "checking whether we are cross compiling... " >&6; }
if test "$cross_compiling" != yes; then
  { { ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_link") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
  if { ac_try='./conftest$ac_cv_exeext'
  { { case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_try") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; }; then
    cross_compiling=no
  else
    if test "$cross_compiling" = maybe; then
	cross_compiling=yes
    else
	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details" "$LINENO" 5; }
    fi
  fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
printf "%s\n" "$cross_compiling" >&6; }

rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
ac_clean_files=$ac_clean_files_save
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
printf %s "checking for suffix of object files... " >&6; }
if test ${ac_cv_objext+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
rm -f conftest.o conftest.obj
if { { ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_compile") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
then :
  for ac_file in conftest.o conftest.obj conftest.*; do
  test -f "$ac_file" || continue;
  case $ac_file in
    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
       break;;
  esac
done
else $as_nop
  printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5

{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of object files: cannot compile
See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
printf "%s\n" "$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
printf %s "checking whether the compiler supports GNU C... " >&6; }
if test ${ac_cv_c_compiler_gnu+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{
#ifndef __GNUC__
       choke me
#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_compiler_gnu=yes
else $as_nop
  ac_compiler_gnu=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
ac_compiler_gnu=$ac_cv_c_compiler_gnu

if test $ac_compiler_gnu = yes; then
  GCC=yes
else
  GCC=
fi
ac_test_CFLAGS=${CFLAGS+y}
ac_save_CFLAGS=$CFLAGS
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
printf %s "checking whether $CC accepts -g... " >&6; }
if test ${ac_cv_prog_cc_g+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_save_c_werror_flag=$ac_c_werror_flag
   ac_c_werror_flag=yes
   ac_cv_prog_cc_g=no
   CFLAGS="-g"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_prog_cc_g=yes
else $as_nop
  CFLAGS=""
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :

else $as_nop
  ac_c_werror_flag=$ac_save_c_werror_flag
	 CFLAGS="-g"
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_prog_cc_g=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   ac_c_werror_flag=$ac_save_c_werror_flag
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
if test $ac_test_CFLAGS; 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
ac_prog_cc_stdc=no
if test x$ac_prog_cc_stdc = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
printf %s "checking for $CC option to enable C11 features... " >&6; }
if test ${ac_cv_prog_cc_c11+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_cv_prog_cc_c11=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_c_conftest_c11_program
_ACEOF
for ac_arg in '' -std=gnu11
do
  CC="$ac_save_CC $ac_arg"
  if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_prog_cc_c11=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam
  test "x$ac_cv_prog_cc_c11" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC
fi

if test "x$ac_cv_prog_cc_c11" = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
else $as_nop
  if test "x$ac_cv_prog_cc_c11" = x
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
else $as_nop
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
     CC="$CC $ac_cv_prog_cc_c11"
fi
  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
  ac_prog_cc_stdc=c11
fi
fi
if test x$ac_prog_cc_stdc = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
printf %s "checking for $CC option to enable C99 features... " >&6; }
if test ${ac_cv_prog_cc_c99+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_cv_prog_cc_c99=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_c_conftest_c99_program
_ACEOF
for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
do
  CC="$ac_save_CC $ac_arg"
  if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_prog_cc_c99=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam
  test "x$ac_cv_prog_cc_c99" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC
fi

if test "x$ac_cv_prog_cc_c99" = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
else $as_nop
  if test "x$ac_cv_prog_cc_c99" = x
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
else $as_nop
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
     CC="$CC $ac_cv_prog_cc_c99"
fi
  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
  ac_prog_cc_stdc=c99
fi
fi
if test x$ac_prog_cc_stdc = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
printf %s "checking for $CC option to enable C89 features... " >&6; }
if test ${ac_cv_prog_cc_c89+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_cv_prog_cc_c89=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_c_conftest_c89_program
_ACEOF
for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
  CC="$ac_save_CC $ac_arg"
  if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_prog_cc_c89=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam
  test "x$ac_cv_prog_cc_c89" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC
fi

if test "x$ac_cv_prog_cc_c89" = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
else $as_nop
  if test "x$ac_cv_prog_cc_c89" = x
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
else $as_nop
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
     CC="$CC $ac_cv_prog_cc_c89"
fi
  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
  ac_prog_cc_stdc=c89
fi
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu


  ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
printf %s "checking whether $CC understands -c and -o together... " >&6; }
if test ${am_cv_prog_cc_c_o+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
  # Make sure it works both with $CC and with simple cc.
  # Following AC_PROG_CC_C_O, we do the test twice because some
  # compilers refuse to overwrite an existing .o file with -o,
  # though they will create one.
  am_cv_prog_cc_c_o=yes
  for am_i in 1 2; do
    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } \
         && test -f conftest2.$ac_objext; then
      : OK
    else
      am_cv_prog_cc_c_o=no
      break
    fi
  done
  rm -f core conftest*
  unset am_i
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
if test "$am_cv_prog_cc_c_o" != yes; then
   # Losing compiler, so override with the script.
   # FIXME: It is wrong to rewrite CC.
   # But if we don't then we get into trouble of one sort or another.
   # A longer-term fix would be to have automake use am__CC in this case,
   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
   CC="$am_aux_dir/compile $CC"
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

DEPDIR="${am__leading_dot}deps"

ac_config_commands="$ac_config_commands depfiles"

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
cat > confinc.mk << 'END'
am__doit:
	@echo this is the am__doit target >confinc.out
.PHONY: am__doit
END
am__include="#"
am__quote=
# BSD make does it like this.
echo '.include "confinc.mk" # ignored' > confmf.BSD
# Other make implementations (GNU, Solaris 10, AIX) do it like this.
echo 'include confinc.mk # ignored' > confmf.GNU
_am_result=no
for s in GNU BSD; do
  { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
   (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
  case $?:`cat confinc.out 2>/dev/null` in #(
  '0:this is the am__doit target') :
    case $s in #(
  BSD) :
    am__include='.include' am__quote='"' ;; #(
  *) :
    am__include='include' am__quote='' ;;
esac ;; #(
  *) :
     ;;
esac
  if test "$am__include" != "#"; then
    _am_result="yes ($s style)"
    break
  fi
done
rm -f confinc.* confmf.*
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
printf "%s\n" "${_am_result}" >&6; }

# Check whether --enable-dependency-tracking was given.
if test ${enable_dependency_tracking+y}
then :
  enableval=$enable_dependency_tracking;
fi

if test "x$enable_dependency_tracking" != xno; then
  am_depcomp="$ac_aux_dir/depcomp"
  AMDEPBACKSLASH='\'
  am__nodep='_no'
fi
 if test "x$enable_dependency_tracking" != xno; then
  AMDEP_TRUE=
  AMDEP_FALSE='#'
else
  AMDEP_TRUE='#'
  AMDEP_FALSE=
fi



depcc="$CC"   am_compiler_list=

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
printf %s "checking dependency style of $depcc... " >&6; }
if test ${am_cv_CC_dependencies_compiler_type+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  # We make a subdir and do the tests there.  Otherwise we can end up
  # making bogus files that we don't know about and never remove.  For
  # instance it was reported that on HP-UX the gcc test will end up
  # making a dummy file named 'D' -- because '-MD' means "put the output
  # in D".
  rm -rf conftest.dir
  mkdir conftest.dir
  # Copy depcomp to subdir because otherwise we won't find it if we're
  # using a relative directory.
  cp "$am_depcomp" conftest.dir
  cd conftest.dir
  # We will build objects and dependencies in a subdirectory because
  # it helps to detect inapplicable dependency modes.  For instance
  # both Tru64's cc and ICC support -MD to output dependencies as a
  # side effect of compilation, but ICC will put the dependencies in
  # the current directory while Tru64 will put them in the object
  # directory.
  mkdir sub

  am_cv_CC_dependencies_compiler_type=none
  if test "$am_compiler_list" = ""; then
     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
  fi
  am__universal=false
  case " $depcc " in #(
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
     esac

  for depmode in $am_compiler_list; do
    # Setup a source with many dependencies, because some compilers
    # like to wrap large dependency lists on column 80 (with \), and
    # we should not choose a depcomp mode which is confused by this.
    #
    # We need to recreate these files for each test, as the compiler may
    # overwrite some of them when testing with obscure command lines.
    # This happens at least with the AIX C compiler.
    : > sub/conftest.c
    for i in 1 2 3 4 5 6; do
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
      # Solaris 10 /bin/sh.
      echo '/* dummy */' > sub/conftst$i.h
    done
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf

    # We check with '-c' and '-o' for the sake of the "dashmstdout"
    # mode.  It turns out that the SunPro C++ compiler does not properly
    # handle '-M -o', and we need to detect this.  Also, some Intel
    # versions had trouble with output in subdirs.
    am__obj=sub/conftest.${OBJEXT-o}
    am__minus_obj="-o $am__obj"
    case $depmode in
    gcc)
      # This depmode causes a compiler race in universal mode.
      test "$am__universal" = false || continue
      ;;
    nosideeffect)
      # After this tag, mechanisms are not by side-effect, so they'll
      # only be used when explicitly requested.
      if test "x$enable_dependency_tracking" = xyes; then
	continue
      else
	break
      fi
      ;;
    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
      # This compiler won't grok '-c -o', but also, the minuso test has
      # not run yet.  These depmodes are late enough in the game, and
      # so weak that their functioning should not be impacted.
      am__obj=conftest.${OBJEXT-o}
      am__minus_obj=
      ;;
    none) break ;;
    esac
    if depmode=$depmode \
       source=sub/conftest.c object=$am__obj \
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
         >/dev/null 2>conftest.err &&
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
      # icc doesn't choke on unknown options, it will just issue warnings
      # or remarks (even with -Werror).  So we grep stderr for any message
      # that says an option was ignored or not supported.
      # When given -MP, icc 7.0 and 7.1 complain thusly:
      #   icc: Command line warning: ignoring option '-M'; no argument required
      # The diagnosis changed in icc 8.0:
      #   icc: Command line remark: option '-MP' not supported
      if (grep 'ignoring option' conftest.err ||
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
        am_cv_CC_dependencies_compiler_type=$depmode
        break
      fi
    fi
  done

  cd ..
  rm -rf conftest.dir
else
  am_cv_CC_dependencies_compiler_type=none
fi

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type

 if
  test "x$enable_dependency_tracking" != xno \
  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
  am__fastdepCC_TRUE=
  am__fastdepCC_FALSE='#'
else
  am__fastdepCC_TRUE='#'
  am__fastdepCC_FALSE=
fi








ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
if test -z "$CXX"; then
  if test -n "$CCC"; then
    CXX=$CCC
  else
    if test -n "$ac_tool_prefix"; then
  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CXX+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$CXX"; then
  ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
printf "%s\n" "$CXX" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


    test -n "$CXX" && break
  done
fi
if test -z "$CXX"; then
  ac_ct_CXX=$CXX
  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_CXX+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$ac_ct_CXX"; then
  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_CXX="$ac_prog"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
if test -n "$ac_ct_CXX"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
printf "%s\n" "$ac_ct_CXX" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$ac_ct_CXX" && break
done

  if test "x$ac_ct_CXX" = x; then
    CXX="g++"
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CXX=$ac_ct_CXX
  fi
fi

  fi
fi
# Provide some information about the compiler.
printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
set X $ac_compile
ac_compiler=$2
for ac_option in --version -v -V -qversion; do
  { { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    sed '10a\
... rest of stderr output deleted ...
         10q' conftest.err >conftest.er1
    cat conftest.er1 >&5
  fi
  rm -f conftest.er1 conftest.err
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
done

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C++" >&5
printf %s "checking whether the compiler supports GNU C++... " >&6; }
if test ${ac_cv_cxx_compiler_gnu+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{
#ifndef __GNUC__
       choke me
#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_compiler_gnu=yes
else $as_nop
  ac_compiler_gnu=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cv_cxx_compiler_gnu=$ac_compiler_gnu

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; }
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

if test $ac_compiler_gnu = yes; then
  GXX=yes
else
  GXX=
fi
ac_test_CXXFLAGS=${CXXFLAGS+y}
ac_save_CXXFLAGS=$CXXFLAGS
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
printf %s "checking whether $CXX accepts -g... " >&6; }
if test ${ac_cv_prog_cxx_g+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
   ac_cxx_werror_flag=yes
   ac_cv_prog_cxx_g=no
   CXXFLAGS="-g"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_cv_prog_cxx_g=yes
else $as_nop
  CXXFLAGS=""
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :

else $as_nop
  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
	 CXXFLAGS="-g"
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_cv_prog_cxx_g=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
printf "%s\n" "$ac_cv_prog_cxx_g" >&6; }
if test $ac_test_CXXFLAGS; then
  CXXFLAGS=$ac_save_CXXFLAGS
elif test $ac_cv_prog_cxx_g = yes; then
  if test "$GXX" = yes; then
    CXXFLAGS="-g -O2"
  else
    CXXFLAGS="-g"
  fi
else
  if test "$GXX" = yes; then
    CXXFLAGS="-O2"
  else
    CXXFLAGS=
  fi
fi
ac_prog_cxx_stdcxx=no
if test x$ac_prog_cxx_stdcxx = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5
printf %s "checking for $CXX option to enable C++11 features... " >&6; }
if test ${ac_cv_prog_cxx_11+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_cv_prog_cxx_11=no
ac_save_CXX=$CXX
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_cxx_conftest_cxx11_program
_ACEOF
for ac_arg in '' -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x -qlanglvl=extended0x -AA
do
  CXX="$ac_save_CXX $ac_arg"
  if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_cv_prog_cxx_cxx11=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam
  test "x$ac_cv_prog_cxx_cxx11" != "xno" && break
done
rm -f conftest.$ac_ext
CXX=$ac_save_CXX
fi

if test "x$ac_cv_prog_cxx_cxx11" = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
else $as_nop
  if test "x$ac_cv_prog_cxx_cxx11" = x
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
else $as_nop
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5
printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; }
     CXX="$CXX $ac_cv_prog_cxx_cxx11"
fi
  ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11
  ac_prog_cxx_stdcxx=cxx11
fi
fi
if test x$ac_prog_cxx_stdcxx = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5
printf %s "checking for $CXX option to enable C++98 features... " >&6; }
if test ${ac_cv_prog_cxx_98+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_cv_prog_cxx_98=no
ac_save_CXX=$CXX
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_cxx_conftest_cxx98_program
_ACEOF
for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA
do
  CXX="$ac_save_CXX $ac_arg"
  if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_cv_prog_cxx_cxx98=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam
  test "x$ac_cv_prog_cxx_cxx98" != "xno" && break
done
rm -f conftest.$ac_ext
CXX=$ac_save_CXX
fi

if test "x$ac_cv_prog_cxx_cxx98" = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
else $as_nop
  if test "x$ac_cv_prog_cxx_cxx98" = x
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
else $as_nop
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5
printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; }
     CXX="$CXX $ac_cv_prog_cxx_cxx98"
fi
  ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98
  ac_prog_cxx_stdcxx=cxx98
fi
fi

ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

depcc="$CXX"  am_compiler_list=

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
printf %s "checking dependency style of $depcc... " >&6; }
if test ${am_cv_CXX_dependencies_compiler_type+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  # We make a subdir and do the tests there.  Otherwise we can end up
  # making bogus files that we don't know about and never remove.  For
  # instance it was reported that on HP-UX the gcc test will end up
  # making a dummy file named 'D' -- because '-MD' means "put the output
  # in D".
  rm -rf conftest.dir
  mkdir conftest.dir
  # Copy depcomp to subdir because otherwise we won't find it if we're
  # using a relative directory.
  cp "$am_depcomp" conftest.dir
  cd conftest.dir
  # We will build objects and dependencies in a subdirectory because
  # it helps to detect inapplicable dependency modes.  For instance
  # both Tru64's cc and ICC support -MD to output dependencies as a
  # side effect of compilation, but ICC will put the dependencies in
  # the current directory while Tru64 will put them in the object
  # directory.
  mkdir sub

  am_cv_CXX_dependencies_compiler_type=none
  if test "$am_compiler_list" = ""; then
     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
  fi
  am__universal=false
  case " $depcc " in #(
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
     esac

  for depmode in $am_compiler_list; do
    # Setup a source with many dependencies, because some compilers
    # like to wrap large dependency lists on column 80 (with \), and
    # we should not choose a depcomp mode which is confused by this.
    #
    # We need to recreate these files for each test, as the compiler may
    # overwrite some of them when testing with obscure command lines.
    # This happens at least with the AIX C compiler.
    : > sub/conftest.c
    for i in 1 2 3 4 5 6; do
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
      # Solaris 10 /bin/sh.
      echo '/* dummy */' > sub/conftst$i.h
    done
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf

    # We check with '-c' and '-o' for the sake of the "dashmstdout"
    # mode.  It turns out that the SunPro C++ compiler does not properly
    # handle '-M -o', and we need to detect this.  Also, some Intel
    # versions had trouble with output in subdirs.
    am__obj=sub/conftest.${OBJEXT-o}
    am__minus_obj="-o $am__obj"
    case $depmode in
    gcc)
      # This depmode causes a compiler race in universal mode.
      test "$am__universal" = false || continue
      ;;
    nosideeffect)
      # After this tag, mechanisms are not by side-effect, so they'll
      # only be used when explicitly requested.
      if test "x$enable_dependency_tracking" = xyes; then
	continue
      else
	break
      fi
      ;;
    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
      # This compiler won't grok '-c -o', but also, the minuso test has
      # not run yet.  These depmodes are late enough in the game, and
      # so weak that their functioning should not be impacted.
      am__obj=conftest.${OBJEXT-o}
      am__minus_obj=
      ;;
    none) break ;;
    esac
    if depmode=$depmode \
       source=sub/conftest.c object=$am__obj \
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
         >/dev/null 2>conftest.err &&
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
      # icc doesn't choke on unknown options, it will just issue warnings
      # or remarks (even with -Werror).  So we grep stderr for any message
      # that says an option was ignored or not supported.
      # When given -MP, icc 7.0 and 7.1 complain thusly:
      #   icc: Command line warning: ignoring option '-M'; no argument required
      # The diagnosis changed in icc 8.0:
      #   icc: Command line remark: option '-MP' not supported
      if (grep 'ignoring option' conftest.err ||
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
        am_cv_CXX_dependencies_compiler_type=$depmode
        break
      fi
    fi
  done

  cd ..
  rm -rf conftest.dir
else
  am_cv_CXX_dependencies_compiler_type=none
fi

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
printf "%s\n" "$am_cv_CXX_dependencies_compiler_type" >&6; }
CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type

 if
  test "x$enable_dependency_tracking" != xno \
  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
  am__fastdepCXX_TRUE=
  am__fastdepCXX_FALSE='#'
else
  am__fastdepCXX_TRUE='#'
  am__fastdepCXX_FALSE=
fi


ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

if test `uname` != Darwin; then
 ff_ldeg="-Wl,--end-group"
 ff_ldbg="-Wl,--start-group"
fi

#  suffix of  dynamic lib ..
# ---------------------------
ff_uname=`uname`
#  flag to build window 32   version   ff_mingw = yes
# bof bof F. Hecht
case $ff_uname in
    CYGWIN*|MINGW*|MSYS_NT*)
	ff_suffix_dylib="dll"
	ff_suffix_dylib_a="dll.a";;
     Darwin)
	ff_suffix_dylib="dylib"
	ff_suffix_dylib_a="dylib";;
    *)
       ff_suffix_dylib="so";
       ff_suffix_dylib_a="so";
esac
# end suffix ...



# Extract the first word of "unzip", so it can be a program name with args.
set dummy unzip; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ff_unzip+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$ff_unzip"; then
  ac_cv_prog_ff_unzip="$ff_unzip" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ff_unzip="yes"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  test -z "$ac_cv_prog_ff_unzip" && ac_cv_prog_ff_unzip="no"
fi
fi
ff_unzip=$ac_cv_prog_ff_unzip
if test -n "$ff_unzip"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_unzip" >&5
printf "%s\n" "$ff_unzip" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


# Extract the first word of "m4", so it can be a program name with args.
set dummy m4; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ff_m4+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$ff_m4"; then
  ac_cv_prog_ff_m4="$ff_m4" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ff_m4="yes"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  test -z "$ac_cv_prog_ff_m4" && ac_cv_prog_ff_m4="no"
fi
fi
ff_m4=$ac_cv_prog_ff_m4
if test -n "$ff_m4"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_m4" >&5
printf "%s\n" "$ff_m4" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


# Extract the first word of "bison", so it can be a program name with args.
set dummy bison; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ff_bison+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$ff_bison"; then
  ac_cv_prog_ff_bison="$ff_bison" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ff_bison="yes"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  test -z "$ac_cv_prog_ff_bison" && ac_cv_prog_ff_bison="no"
fi
fi
ff_bison=$ac_cv_prog_ff_bison
if test -n "$ff_bison"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_bison" >&5
printf "%s\n" "$ff_bison" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


# Extract the first word of "flex", so it can be a program name with args.
set dummy flex; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ff_flex+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$ff_flex"; then
  ac_cv_prog_ff_flex="$ff_flex" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ff_flex="yes"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  test -z "$ac_cv_prog_ff_flex" && ac_cv_prog_ff_flex="no"
fi
fi
ff_flex=$ac_cv_prog_ff_flex
if test -n "$ff_flex"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_flex" >&5
printf "%s\n" "$ff_flex" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


# Extract the first word of "cmake", so it can be a program name with args.
set dummy cmake; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ff_cmake+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$ff_cmake"; then
  ac_cv_prog_ff_cmake="$ff_cmake" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ff_cmake="yes"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  test -z "$ac_cv_prog_ff_cmake" && ac_cv_prog_ff_cmake="no"
fi
fi
ff_cmake=$ac_cv_prog_ff_cmake
if test -n "$ff_cmake"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_cmake" >&5
printf "%s\n" "$ff_cmake" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


# Extract the first word of "patch", so it can be a program name with args.
set dummy patch; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ff_patch+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$ff_patch"; then
  ac_cv_prog_ff_patch="$ff_patch" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ff_patch="yes"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  test -z "$ac_cv_prog_ff_patch" && ac_cv_prog_ff_patch="no"
fi
fi
ff_patch=$ac_cv_prog_ff_patch
if test -n "$ff_patch"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_patch" >&5
printf "%s\n" "$ff_patch" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


case "$ff_m4 $ff_bison $ff_patch $ff_flex $ff_unzip"  in
*no*)
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  to install missing package  under debian or ubuntu, try " >&5
printf "%s\n" "$as_me:  to install missing package  under debian or ubuntu, try " >&6;}
    test "$ff_unzip" = no && { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  sudo apt-get install unzip" >&5
printf "%s\n" "$as_me:  sudo apt-get install unzip" >&6;}
    test "$ff_m4" = no && { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  sudo apt-get install m4" >&5
printf "%s\n" "$as_me:  sudo apt-get install m4" >&6;}
    test "$ff_bison" = no && { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  sudo apt-get install bison" >&5
printf "%s\n" "$as_me:  sudo apt-get install bison" >&6;}
    test "$ff_flex" = no && { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  sudo apt-get install flex" >&5
printf "%s\n" "$as_me:  sudo apt-get install flex" >&6;}
    test "$ff_patch" = no && { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  sudo apt-get install patch" >&5
printf "%s\n" "$as_me:  sudo apt-get install patch" >&6;}
    as_fn_error $? " Sorry missing  unzip,m4,bison,flex,patch command !" "$LINENO" 5;;
esac


if test -z "$CXX"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  fatal error : c++ compiler !  " >&5
printf "%s\n" "$as_me:  fatal error : c++ compiler !  " >&6;};
  as_fn_error $? " Sorry no c++ compiler !" "$LINENO" 5
fi


if ac_fn_cxx_compute_int "$LINENO" "sizeof(long)" "ff_size_long"        ""
then :

fi

if ac_fn_cxx_compute_int "$LINENO" "sizeof(int)" "ff_size_int"        ""
then :

fi

if ac_fn_cxx_compute_int "$LINENO" "sizeof(int*)" "ff_size_ptr"        ""
then :

fi


SIZEOF_LONG=$ff_size_long

SIZEOF_INT=$ff_size_int

SIZEOF_PTR=$ff_size_ptr

if test "0$ff_size_ptr" -eq 4  ;then
 SIZEOF_PTRINBIT=32

 ff_ptrbit=32
elif test  "0$ff_size_ptr" -eq 8  ;then
 SIZEOF_PTRINBIT=64

 ff_ptrbit=64
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  fatal error : sizeof pointer $ff_size_ptr !  or no c++ compiler: $CXX " >&5
printf "%s\n" "$as_me:  fatal error : sizeof pointer $ff_size_ptr !  or no c++ compiler: $CXX " >&6;};
  as_fn_error $? " Sorry  sizeof c++ pointer $ff_size_ptr are not  4 or 8 " "$LINENO" 5
fi

# FFCS - build the code for FreeFem++-cs
# Check whether --enable-ffcs was given.
if test ${enable_ffcs+y}
then :
  enableval=$enable_ffcs;
fi

if test "$enable_ffcs" = yes
then

printf "%s\n" "#define ENABLE_FFCS $enable_ffcs" >>confdefs.h

else
	enable_ffcs=no
fi
ENABLE_FFCS="$enable_ffcs"

 if test $enable_ffcs = yes; then
  ENABLE_FFCS_TRUE=
  ENABLE_FFCS_FALSE='#'
else
  ENABLE_FFCS_TRUE='#'
  ENABLE_FFCS_FALSE=
fi


# dur dur car sous MacOsX le fortran n'est pas standard.
ff_AR="ar"
ff_ARFLAGS="rv"
ff_RANLIB="ranlib"
# Check whether --enable-fortran was given.
if test ${enable_fortran+y}
then :
  enableval=$enable_fortran;
fi


ff_g2c_lib="";
if test "$enable_fortran" != no
then

    # ALH-FFCS-2/3/10: add gfortran-mp-4.4 for MacPorts on MacOS 10.6
    # FH add iforr
    ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu
if test -n "$ac_tool_prefix"; then
  for ac_prog in gfortran  f90  xlf90 g95 ifort gfortran-mp-4.4
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_FC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$FC"; then
  ac_cv_prog_FC="$FC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_FC="$ac_tool_prefix$ac_prog"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
FC=$ac_cv_prog_FC
if test -n "$FC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FC" >&5
printf "%s\n" "$FC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


    test -n "$FC" && break
  done
fi
if test -z "$FC"; then
  ac_ct_FC=$FC
  for ac_prog in gfortran  f90  xlf90 g95 ifort gfortran-mp-4.4
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_FC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$ac_ct_FC"; then
  ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_FC="$ac_prog"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
ac_ct_FC=$ac_cv_prog_ac_ct_FC
if test -n "$ac_ct_FC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5
printf "%s\n" "$ac_ct_FC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$ac_ct_FC" && break
done

  if test "x$ac_ct_FC" = x; then
    FC=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    FC=$ac_ct_FC
  fi
fi


# Provide some information about the compiler.
printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5
set X $ac_compile
ac_compiler=$2
for ac_option in --version -v -V -qversion; do
  { { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    sed '10a\
... rest of stderr output deleted ...
         10q' conftest.err >conftest.er1
    cat conftest.er1 >&5
  fi
  rm -f conftest.er1 conftest.err
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
done
rm -f a.out

# If we don't use `.F' as extension, the preprocessor is not run on the
# input file.  (Note that this only needs to work for GNU compilers.)
ac_save_ext=$ac_ext
ac_ext=F
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU Fortran" >&5
printf %s "checking whether the compiler supports GNU Fortran... " >&6; }
if test ${ac_cv_fc_compiler_gnu+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat > conftest.$ac_ext <<_ACEOF
      program main
#ifndef __GNUC__
       choke me
#endif

      end
_ACEOF
if ac_fn_fc_try_compile "$LINENO"
then :
  ac_compiler_gnu=yes
else $as_nop
  ac_compiler_gnu=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cv_fc_compiler_gnu=$ac_compiler_gnu

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5
printf "%s\n" "$ac_cv_fc_compiler_gnu" >&6; }
ac_compiler_gnu=$ac_cv_fc_compiler_gnu

ac_ext=$ac_save_ext
ac_test_FCFLAGS=${FCFLAGS+y}
ac_save_FCFLAGS=$FCFLAGS
FCFLAGS=
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5
printf %s "checking whether $FC accepts -g... " >&6; }
if test ${ac_cv_prog_fc_g+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  FCFLAGS=-g
cat > conftest.$ac_ext <<_ACEOF
      program main

      end
_ACEOF
if ac_fn_fc_try_compile "$LINENO"
then :
  ac_cv_prog_fc_g=yes
else $as_nop
  ac_cv_prog_fc_g=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5
printf "%s\n" "$ac_cv_prog_fc_g" >&6; }
if test $ac_test_FCFLAGS; then
  FCFLAGS=$ac_save_FCFLAGS
elif test $ac_cv_prog_fc_g = yes; then
  if test "x$ac_cv_fc_compiler_gnu" = xyes; then
    FCFLAGS="-g -O2"
  else
    FCFLAGS="-g"
  fi
else
  if test "x$ac_cv_fc_compiler_gnu" = xyes; then
    FCFLAGS="-O2"
  else
    FCFLAGS=
  fi
fi

if test $ac_compiler_gnu = yes; then
  GFC=yes
else
  GFC=
fi
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

    ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu
if test -n "$ac_tool_prefix"; then
  for ac_prog in gfortran f90 xlf xlf90 g95 f77 fort77 "$FC" ifort gfortran-mp-4.4
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_F77+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$F77"; then
  ac_cv_prog_F77="$F77" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
F77=$ac_cv_prog_F77
if test -n "$F77"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $F77" >&5
printf "%s\n" "$F77" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


    test -n "$F77" && break
  done
fi
if test -z "$F77"; then
  ac_ct_F77=$F77
  for ac_prog in gfortran f90 xlf xlf90 g95 f77 fort77 "$FC" ifort gfortran-mp-4.4
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_F77+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$ac_ct_F77"; then
  ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_F77="$ac_prog"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
ac_ct_F77=$ac_cv_prog_ac_ct_F77
if test -n "$ac_ct_F77"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5
printf "%s\n" "$ac_ct_F77" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$ac_ct_F77" && break
done

  if test "x$ac_ct_F77" = x; then
    F77=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    F77=$ac_ct_F77
  fi
fi


# Provide some information about the compiler.
printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5
set X $ac_compile
ac_compiler=$2
for ac_option in --version -v -V -qversion; do
  { { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    sed '10a\
... rest of stderr output deleted ...
         10q' conftest.err >conftest.er1
    cat conftest.er1 >&5
  fi
  rm -f conftest.er1 conftest.err
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
done
rm -f a.out

# If we don't use `.F' as extension, the preprocessor is not run on the
# input file.  (Note that this only needs to work for GNU compilers.)
ac_save_ext=$ac_ext
ac_ext=F
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU Fortran 77" >&5
printf %s "checking whether the compiler supports GNU Fortran 77... " >&6; }
if test ${ac_cv_f77_compiler_gnu+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat > conftest.$ac_ext <<_ACEOF
      program main
#ifndef __GNUC__
       choke me
#endif

      end
_ACEOF
if ac_fn_f77_try_compile "$LINENO"
then :
  ac_compiler_gnu=yes
else $as_nop
  ac_compiler_gnu=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cv_f77_compiler_gnu=$ac_compiler_gnu

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5
printf "%s\n" "$ac_cv_f77_compiler_gnu" >&6; }
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

ac_ext=$ac_save_ext
ac_test_FFLAGS=${FFLAGS+y}
ac_save_FFLAGS=$FFLAGS
FFLAGS=
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5
printf %s "checking whether $F77 accepts -g... " >&6; }
if test ${ac_cv_prog_f77_g+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  FFLAGS=-g
cat > conftest.$ac_ext <<_ACEOF
      program main

      end
_ACEOF
if ac_fn_f77_try_compile "$LINENO"
then :
  ac_cv_prog_f77_g=yes
else $as_nop
  ac_cv_prog_f77_g=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5
printf "%s\n" "$ac_cv_prog_f77_g" >&6; }
if test $ac_test_FFLAGS; then
  FFLAGS=$ac_save_FFLAGS
elif test $ac_cv_prog_f77_g = yes; then
  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
    FFLAGS="-g -O2"
  else
    FFLAGS="-g"
  fi
else
  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
    FFLAGS="-O2"
  else
    FFLAGS=
  fi
fi

if test $ac_compiler_gnu = yes; then
  G77=yes
else
  G77=
fi
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


#	if test -n "$F77"
#	then
    ff_flibs=""
        # modif FH


  # Make sure we can run config.sub.
$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
  as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
printf %s "checking build system type... " >&6; }
if test ${ac_cv_build+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_build_alias=$build_alias
test "x$ac_build_alias" = x &&
  ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
test "x$ac_build_alias" = x &&
  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
  as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
printf "%s\n" "$ac_cv_build" >&6; }
case $ac_cv_build in
*-*-*) ;;
*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
esac
build=$ac_cv_build
ac_save_IFS=$IFS; IFS='-'
set x $ac_cv_build
shift
build_cpu=$1
build_vendor=$2
shift; shift
# Remember, the first character of IFS is used to create $*,
# except with old shells:
build_os=$*
IFS=$ac_save_IFS
case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
printf %s "checking host system type... " >&6; }
if test ${ac_cv_host+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "x$host_alias" = x; then
  ac_cv_host=$ac_cv_build
else
  ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
    as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
fi

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
printf "%s\n" "$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
esac
host=$ac_cv_host
ac_save_IFS=$IFS; IFS='-'
set x $ac_cv_host
shift
host_cpu=$1
host_vendor=$2
shift; shift
# Remember, the first character of IFS is used to create $*,
# except with old shells:
host_os=$*
IFS=$ac_save_IFS
case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac



ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $F77" >&5
printf %s "checking how to get verbose linking output from $F77... " >&6; }
if test ${ac_cv_prog_f77_v+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat > conftest.$ac_ext <<_ACEOF
      program main

      end
_ACEOF
if ac_fn_f77_try_compile "$LINENO"
then :
  ac_cv_prog_f77_v=
# Try some options frequently used verbose output
for ac_verb in -v -verbose --verbose -V -\#\#\#; do
  cat > conftest.$ac_ext <<_ACEOF
      program main

      end
_ACEOF

# Compile and link our simple test program by passing a flag (argument
# 1 to this macro) to the Fortran compiler in order to get
# "verbose" output that we can then parse for the Fortran linker
# flags.
ac_save_FFLAGS=$FFLAGS
FFLAGS="$FFLAGS $ac_verb"
eval "set x $ac_link"
shift
printf "%s\n" "$as_me:${as_lineno-$LINENO}: $*" >&5
# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH,
# LIBRARY_PATH; skip all such settings.
ac_f77_v_output=`eval $ac_link 5>&1 2>&1 |
  sed '/^Driving:/d; /^Configured with:/d;
      '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"`
printf "%s\n" "$ac_f77_v_output" >&5
FFLAGS=$ac_save_FFLAGS

rm -rf conftest*

# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where
# /foo, /bar, and /baz are search directories for the Fortran linker.
# Here, we change these into -L/foo -L/bar -L/baz (and put it first):
ac_f77_v_output="`echo $ac_f77_v_output |
	grep 'LPATH is:' |
	sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_f77_v_output"

# FIXME: we keep getting bitten by quoted arguments; a more general fix
#        that detects unbalanced quotes in FLIBS should be implemented
#        and (ugh) tested at some point.
case $ac_f77_v_output in
  # With xlf replace commas with spaces,
  # and remove "-link" and closing parenthesis.
  *xlfentry*)
    ac_f77_v_output=`echo $ac_f77_v_output |
      sed '
        s/,/ /g
        s/ -link / /g
        s/) *$//
      '
    ` ;;

  # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted
  # $LIBS confuse us, and the libraries appear later in the output anyway).
  *mGLOB_options_string*)
    ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;;

  # Portland Group compiler has singly- or doubly-quoted -cmdline argument
  # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4.
  # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2".
  *-cmdline\ * | *-ignore\ * | *-def\ *)
    ac_f77_v_output=`echo $ac_f77_v_output | sed "\
	s/-cmdline  *'[^']*'/ /g; s/-cmdline  *\"[^\"]*\"/ /g
	s/-ignore  *'[^']*'/ /g; s/-ignore  *\"[^\"]*\"/ /g
	s/-def  *'[^']*'/ /g; s/-def  *\"[^\"]*\"/ /g"` ;;

  # If we are using fort77 (the f2c wrapper) then filter output and delete quotes.
  *fort77*f2c*gcc*)
    ac_f77_v_output=`echo "$ac_f77_v_output" | sed -n '
        /:[	 ]\+Running[	 ]\{1,\}"gcc"/{
          /"-c"/d
          /[.]c"*/d
          s/^.*"gcc"/"gcc"/
          s/"//gp
        }'` ;;

  # If we are using Cray Fortran then delete quotes.
  *cft90*)
    ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"//g'` ;;
esac


  # look for -l* and *.a constructs in the output
  for ac_arg in $ac_f77_v_output; do
     case $ac_arg in
	[\\/]*.a | ?:[\\/]*.a | -[lLRu]*)
	  ac_cv_prog_f77_v=$ac_verb
	  break 2 ;;
     esac
  done
done
if test -z "$ac_cv_prog_f77_v"; then
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $F77" >&5
printf "%s\n" "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;}
fi
else $as_nop
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5
printf "%s\n" "$as_me: WARNING: compilation failed" >&2;}
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_v" >&5
printf "%s\n" "$ac_cv_prog_f77_v" >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 libraries of $F77" >&5
printf %s "checking for Fortran 77 libraries of $F77... " >&6; }
if test ${ac_cv_f77_libs+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test "x$FLIBS" != "x"; then
  ac_cv_f77_libs="$FLIBS" # Let the user override the test.
else

cat > conftest.$ac_ext <<_ACEOF
      program main

      end
_ACEOF

# Compile and link our simple test program by passing a flag (argument
# 1 to this macro) to the Fortran compiler in order to get
# "verbose" output that we can then parse for the Fortran linker
# flags.
ac_save_FFLAGS=$FFLAGS
FFLAGS="$FFLAGS $ac_cv_prog_f77_v"
eval "set x $ac_link"
shift
printf "%s\n" "$as_me:${as_lineno-$LINENO}: $*" >&5
# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH,
# LIBRARY_PATH; skip all such settings.
ac_f77_v_output=`eval $ac_link 5>&1 2>&1 |
  sed '/^Driving:/d; /^Configured with:/d;
      '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"`
printf "%s\n" "$ac_f77_v_output" >&5
FFLAGS=$ac_save_FFLAGS

rm -rf conftest*

# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where
# /foo, /bar, and /baz are search directories for the Fortran linker.
# Here, we change these into -L/foo -L/bar -L/baz (and put it first):
ac_f77_v_output="`echo $ac_f77_v_output |
	grep 'LPATH is:' |
	sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_f77_v_output"

# FIXME: we keep getting bitten by quoted arguments; a more general fix
#        that detects unbalanced quotes in FLIBS should be implemented
#        and (ugh) tested at some point.
case $ac_f77_v_output in
  # With xlf replace commas with spaces,
  # and remove "-link" and closing parenthesis.
  *xlfentry*)
    ac_f77_v_output=`echo $ac_f77_v_output |
      sed '
        s/,/ /g
        s/ -link / /g
        s/) *$//
      '
    ` ;;

  # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted
  # $LIBS confuse us, and the libraries appear later in the output anyway).
  *mGLOB_options_string*)
    ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;;

  # Portland Group compiler has singly- or doubly-quoted -cmdline argument
  # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4.
  # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2".
  *-cmdline\ * | *-ignore\ * | *-def\ *)
    ac_f77_v_output=`echo $ac_f77_v_output | sed "\
	s/-cmdline  *'[^']*'/ /g; s/-cmdline  *\"[^\"]*\"/ /g
	s/-ignore  *'[^']*'/ /g; s/-ignore  *\"[^\"]*\"/ /g
	s/-def  *'[^']*'/ /g; s/-def  *\"[^\"]*\"/ /g"` ;;

  # If we are using fort77 (the f2c wrapper) then filter output and delete quotes.
  *fort77*f2c*gcc*)
    ac_f77_v_output=`echo "$ac_f77_v_output" | sed -n '
        /:[	 ]\+Running[	 ]\{1,\}"gcc"/{
          /"-c"/d
          /[.]c"*/d
          s/^.*"gcc"/"gcc"/
          s/"//gp
        }'` ;;

  # If we are using Cray Fortran then delete quotes.
  *cft90*)
    ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"//g'` ;;
esac



ac_cv_f77_libs=

# Save positional arguments (if any)
ac_save_positional="$@"

set X $ac_f77_v_output
while test $# != 1; do
  shift
  ac_arg=$1
  case $ac_arg in
	[\\/]*.a | ?:[\\/]*.a)
	    ac_exists=false
  for ac_i in $ac_cv_f77_libs; do
    if test x"$ac_arg" = x"$ac_i"; then
      ac_exists=true
      break
    fi
  done

  if test x"$ac_exists" = xtrue
then :

else $as_nop
  ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
fi
	  ;;
	-bI:*)
	    ac_exists=false
  for ac_i in $ac_cv_f77_libs; do
    if test x"$ac_arg" = x"$ac_i"; then
      ac_exists=true
      break
    fi
  done

  if test x"$ac_exists" = xtrue
then :

else $as_nop
  if test "$ac_compiler_gnu" = yes; then
  for ac_link_opt in $ac_arg; do
    ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt"
  done
else
  ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
fi
fi
	  ;;
	  # Ignore these flags.
	-lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -little \
	  |-LANG:=* | -LIST:* | -LNO:* | -link)
	  ;;
	-lkernel32)
	  # Ignore this library only on Windows-like systems.
	  case $host_os in
	  cygwin* | msys* ) ;;
	  *)
	    ac_exists=false
  for ac_i in $ac_cv_f77_libs; do
    if test x"$ac_arg" = x"$ac_i"; then
      ac_exists=true
      break
    fi
  done

  if test x"$ac_exists" = xtrue
then :

else $as_nop
  ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
fi
	    ;;
	  esac
	  ;;
	-[LRuYz])
	  # These flags, when seen by themselves, take an argument.
	  # We remove the space between option and argument and re-iterate
	  # unless we find an empty arg or a new option (starting with -)
	  case $2 in
	     "" | -*);;
	     *)
		ac_arg="$ac_arg$2"
		shift; shift
		set X $ac_arg "$@"
		;;
	  esac
	  ;;
	-YP,*)
	  for ac_j in `printf "%s\n" "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do
	      ac_exists=false
  for ac_i in $ac_cv_f77_libs; do
    if test x"$ac_j" = x"$ac_i"; then
      ac_exists=true
      break
    fi
  done

  if test x"$ac_exists" = xtrue
then :

else $as_nop
  ac_arg="$ac_arg $ac_j"
			       ac_cv_f77_libs="$ac_cv_f77_libs $ac_j"
fi
	  done
	  ;;
	-[lLR]*)
	    ac_exists=false
  for ac_i in $ac_cv_f77_libs; do
    if test x"$ac_arg" = x"$ac_i"; then
      ac_exists=true
      break
    fi
  done

  if test x"$ac_exists" = xtrue
then :

else $as_nop
  ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
fi
	  ;;
	-zallextract*| -zdefaultextract)
	  ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg"
	  ;;
	-mllvm) ${2+shift};; # Defend against 'clang -mllvm -loopopt=0'.
	  # Ignore everything else.
  esac
done
# restore positional arguments
set X $ac_save_positional; shift

# We only consider "LD_RUN_PATH" on Solaris systems.  If this is seen,
# then we insist that the "run path" must be an absolute path (i.e. it
# must begin with a "/").
case `(uname -sr) 2>/dev/null` in
   "SunOS 5"*)
      ac_ld_run_path=`printf "%s\n" "$ac_f77_v_output" |
			sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'`
      test "x$ac_ld_run_path" != x &&
	if test "$ac_compiler_gnu" = yes; then
  for ac_link_opt in $ac_ld_run_path; do
    ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt"
  done
else
  ac_cv_f77_libs="$ac_cv_f77_libs $ac_ld_run_path"
fi
      ;;
esac
fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x"

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_libs" >&5
printf "%s\n" "$ac_cv_f77_libs" >&6; }
FLIBS="$ac_cv_f77_libs"


ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

    	# correct pb of double def under macos
    case $F77 in
	 *fort77)
	    if test -z "$FLIBS" ; then
#             FLIBS=`fort77 -v  a.out  2>&1|awk '/a.out/ && /fort77/  { print $(NF-2),$(NF-1)}'`
#  FH to remove " "
		FLIBS=`fort77 -v  a.out  2>&1|awk '/a.out/ && /fort77/  { print "echo",$(NF-2),$(NF-1)}'|sh`

		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING:   fort77   FLIBS :  $FLIBS " >&5
printf "%s\n" "$as_me: WARNING:   fort77   FLIBS :  $FLIBS " >&2;}
	    fi
	    ;;
	*g77)
	    for i in $FLIBS; do
		case $i in
# save last directory of the list
		    -L*)
			d=`expr $i : '-L\(.*\)'`;
			echo " try $d "
			if test -e "$d/libg2c.so" ; then
			    ff_flibs="$d/libg2c.so"
			elif test -e "$d/libg2c.dylib" ; then
			    ff_flibs="$d/libg2c.dylib"
			elif test -e "$d/libg2c.a" ; then
			    ff_flibs="$d/libg2c.a"
			elif test  -e $d/libg2c.so -o	-e $d/libg2c.a ; then
			    ff_flibs="$i"
			fi;;
		esac
	    done
	    if test -e "$ff_flibs"  ;then
		FLIBS="$ff_flibs"
	    else
		FLIBS="$ff_flibs -lg2c"
	    fi
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING:   get dir of -lg2c  FLIBS :  $FLIBS " >&5
printf "%s\n" "$as_me: WARNING:   get dir of -lg2c  FLIBS :  $FLIBS " >&2;}
	    ;;
# add FH sep 2006 / modif  2009
#  remove FH jan 2021 (Idea of P. Jolivet)
        *gfortran-obsolete)
	    ff_okkk=0
            for i in $FLIBS; do
		case $i in
		    -L*)
			d=`expr $i : '-L\(.*\)'`;
			if test -e "$d/libgfortran.$ff_suffix_dylib_a" -a  -e "$d/libquadmath.$ff_suffix_dylib_a"  ; then
			   ff_flibs="$d/libgfortran.$ff_suffix_dylib_a $d/libquadmath.$ff_suffix_dylib_a"
			    ff_okkk=1
			elif test -e "$d/libgfortran.a"  -a -e "$d/libquadmath.a" ; then
			   ff_flibs="$d/libgfortran.a $d/libquadmath.a"
			    ff_okkk=1
			elif test -e "$d/libgfortran.$ff_suffix_dylib_a"   ; then
			   ff_flibs="$d/libgfortran.$ff_suffix_dylib_a"
			    ff_okkk=2
			elif test -e "$d/libgfortran.a" ; then
			   ff_flibs="$d/libgfortran.a"
			    ff_okkk=2
			fi;;
		esac
            done
	    if test  "$ff_okkk" -ge  1  ;then
		FLIBS="$ff_flibs"
	    else
		FLIBS="$ff_flibs -lgfortran"
	    fi
            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING:   get dir of -lgfortran  FLIBS :  $FLIBS " >&5
printf "%s\n" "$as_me: WARNING:   get dir of -lgfortran  FLIBS :  $FLIBS " >&2;}
            ;;
    esac

# Check whether --with-flib was given.
if test ${with_flib+y}
then :
  withval=$with_flib;
fi

#  correct FH sep 2006 -o -> -a
    if test "$with_flib" != no -a -n  "$with_flib"
    then
	ff_g2c_lib="$with_flib"
	FLIBS="$with_flib"
    fi
# add FH oct 2007 for download f2c
    if test -z "$F77"  ; then
	ff_f77=`pwd`/3rdparty/bin/fort77
	ff_flibs=`pwd`/3rdparty/lib/libf2c.a
	if test -x $ff_f77  -a -f $ff_flibs ; then
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING:  no fortran, but find download f2c/fort" >&5
printf "%s\n" "$as_me: WARNING:  no fortran, but find download f2c/fort" >&2;};
	    F77=$ff_f77
	    FLIBS=$ff_flibs
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  fatal error : no fortran  " >&5
printf "%s\n" "$as_me:  fatal error : no fortran  " >&6;};
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: add --disable-fortran   " >&5
printf "%s\n" "$as_me: add --disable-fortran   " >&6;};
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: or try to compile f2c in directory 3rdparty/f2c   " >&5
printf "%s\n" "$as_me: or try to compile f2c in directory 3rdparty/f2c   " >&6;};
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:   just do:  make install  " >&5
printf "%s\n" "$as_me:   just do:  make install  " >&6;};
	    as_fn_error 1 " Fatal error No Fortran compiler . " "$LINENO" 5;
	fi
    fi
#  check if the FLIBS is correct
    ff_libs="$LIBS"
    LIBS="$ff_libs $FLIBS"
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

namespace conftest {
  extern "C" int exit ();
}
int
main (void)
{
return conftest::exit ();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_err=
else $as_nop
  ff_err=ok
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext;
    if test "$ff_err" = "ok" ; then  as_fn_error 1 " Fatal FLIBS: $FLIBS is incorrect. " "$LINENO" 5; fi
    LIBS="$ff_libs"
    echo "F77 LD $ff_libs" >config_LIB_INFO
  ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu



    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking  Size of fortran 77 integer " >&5
printf %s "checking  Size of fortran 77 integer ... " >&6; }



    if test "$cross_compiling" = yes
then :
  ff_f77intsize=4
else $as_nop
  cat > conftest.$ac_ext <<_ACEOF

		program test
		integer  p,i
		p=1024*1024
		i= p*p
		open(7,file="conftest.out")
		if (i>0) then
		    write(7,*) 8
		else
         write(7,*) 4
	 endif
	 close(7)
	 end

_ACEOF
if ac_fn_f77_try_run "$LINENO"
then :
  ff_f77intsize=`cat conftest.out`
else $as_nop
  ff_f77intsize=4
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

## AC_LANG(C++)
    ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_f77intsize" >&5
printf "%s\n" "$ff_f77intsize" >&6; }

ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran 77 libraries" >&5
printf %s "checking for dummy main to link with Fortran 77 libraries... " >&6; }
if test ${ac_cv_f77_dummy_main+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_f77_dm_save_LIBS=$LIBS
 LIBS="$LIBS $FLIBS"
 ac_fortran_dm_var=F77_DUMMY_MAIN
 ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

 # First, try linking without a dummy main:
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_fortran_dummy_main=none
else $as_nop
  ac_cv_fortran_dummy_main=unknown
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext

 if test $ac_cv_fortran_dummy_main = unknown; then
   for ac_func in MAIN__ MAIN_ __main MAIN _MAIN __MAIN main_ main__ _main; do
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#define $ac_fortran_dm_var $ac_func
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_fortran_dummy_main=$ac_func; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
   done
 fi
 ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu
 ac_cv_f77_dummy_main=$ac_cv_fortran_dummy_main
 rm -rf conftest*
 LIBS=$ac_f77_dm_save_LIBS

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_dummy_main" >&5
printf "%s\n" "$ac_cv_f77_dummy_main" >&6; }
F77_DUMMY_MAIN=$ac_cv_f77_dummy_main
if test "$F77_DUMMY_MAIN" != unknown
then :
  if test $F77_DUMMY_MAIN != none; then

printf "%s\n" "#define F77_DUMMY_MAIN $F77_DUMMY_MAIN" >>confdefs.h

  if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then

printf "%s\n" "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h

  fi
fi
else $as_nop
  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "linking to Fortran libraries from C fails
See \`config.log' for more details" "$LINENO" 5; }
fi

ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 name-mangling scheme" >&5
printf %s "checking for Fortran 77 name-mangling scheme... " >&6; }
if test ${ac_cv_f77_mangling+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat > conftest.$ac_ext <<_ACEOF
      subroutine foobar()
      return
      end
      subroutine foo_bar()
      return
      end
_ACEOF
if ac_fn_f77_try_compile "$LINENO"
then :
  mv conftest.$ac_objext cfortran_test.$ac_objext

  ac_save_LIBS=$LIBS
  LIBS="cfortran_test.$ac_objext $LIBS $FLIBS"

  ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
  ac_success=no
  for ac_foobar in foobar FOOBAR; do
    for ac_underscore in "" "_"; do
      ac_func="$ac_foobar$ac_underscore"
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
return $ac_func ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_success=yes; break 2
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
    done
  done
  ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

  if test "$ac_success" = "yes"; then
     case $ac_foobar in
	foobar)
	   ac_case=lower
	   ac_foo_bar=foo_bar
	   ;;
	FOOBAR)
	   ac_case=upper
	   ac_foo_bar=FOO_BAR
	   ;;
     esac

     ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
     ac_success_extra=no
     for ac_extra in "" "_"; do
	ac_func="$ac_foo_bar$ac_underscore$ac_extra"
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
char $ac_func ();
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
return $ac_func ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_success_extra=yes; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
     done
     ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

     if test "$ac_success_extra" = "yes"; then
	ac_cv_f77_mangling="$ac_case case"
	if test -z "$ac_underscore"; then
	   ac_cv_f77_mangling="$ac_cv_f77_mangling, no underscore"
	else
	   ac_cv_f77_mangling="$ac_cv_f77_mangling, underscore"
	fi
	if test -z "$ac_extra"; then
	   ac_cv_f77_mangling="$ac_cv_f77_mangling, no extra underscore"
	else
	   ac_cv_f77_mangling="$ac_cv_f77_mangling, extra underscore"
	fi
      else
	ac_cv_f77_mangling="unknown"
      fi
  else
     ac_cv_f77_mangling="unknown"
  fi

  LIBS=$ac_save_LIBS
  rm -rf conftest*
  rm -f cfortran_test*
else $as_nop
  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compile a simple Fortran program
See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_mangling" >&5
printf "%s\n" "$ac_cv_f77_mangling" >&6; }

ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu
case $ac_cv_f77_mangling in
  "lower case, no underscore, no extra underscore")
	  printf "%s\n" "#define F77_FUNC(name,NAME) name" >>confdefs.h

	  printf "%s\n" "#define F77_FUNC_(name,NAME) name" >>confdefs.h
 ;;
  "lower case, no underscore, extra underscore")
	  printf "%s\n" "#define F77_FUNC(name,NAME) name" >>confdefs.h

	  printf "%s\n" "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h
 ;;
  "lower case, underscore, no extra underscore")
	  printf "%s\n" "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h

	  printf "%s\n" "#define F77_FUNC_(name,NAME) name ## _" >>confdefs.h
 ;;
  "lower case, underscore, extra underscore")
	  printf "%s\n" "#define F77_FUNC(name,NAME) name ## _" >>confdefs.h

	  printf "%s\n" "#define F77_FUNC_(name,NAME) name ## __" >>confdefs.h
 ;;
  "upper case, no underscore, no extra underscore")
	  printf "%s\n" "#define F77_FUNC(name,NAME) NAME" >>confdefs.h

	  printf "%s\n" "#define F77_FUNC_(name,NAME) NAME" >>confdefs.h
 ;;
  "upper case, no underscore, extra underscore")
	  printf "%s\n" "#define F77_FUNC(name,NAME) NAME" >>confdefs.h

	  printf "%s\n" "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h
 ;;
  "upper case, underscore, no extra underscore")
	  printf "%s\n" "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h

	  printf "%s\n" "#define F77_FUNC_(name,NAME) NAME ## _" >>confdefs.h
 ;;
  "upper case, underscore, extra underscore")
	  printf "%s\n" "#define F77_FUNC(name,NAME) NAME ## _" >>confdefs.h

	  printf "%s\n" "#define F77_FUNC_(name,NAME) NAME ## __" >>confdefs.h
 ;;
  *)
	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5
printf "%s\n" "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;}
	  ;;
esac

ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


    ff_cfagsf77=""
    case $ac_cv_f77_mangling in
#  "lower case, no underscore, no extra underscore")
#  "lower case, no underscore, extra underscore")
# ;;
	"lower case, underscore, no extra underscore") 	ff_cfagsf77="-DAdd_";;
	"lower case, underscore, extra underscore")       	ff_cfagsf77="-DAdd__ -Df77IsF2C";;
	"upper case, no underscore, no extra underscore")     ff_cfagsf77="-DUPPER";;
	"upper case, no underscore, extra underscore")        ff_cfagsf77="-DUPPER -DAdd__";;
	"upper case, underscore, no extra underscore")      ff_cfagsf77="-DUPPER -DAdd_";;
	"upper case, underscore, extra underscore")           ff_cfagsf77="-DUPPER -DAdd__";;
	*) ;;
    esac
    ff_cfagsf77="$ff_cfagsf77 $ff_allow_mismatch"
    CFLAGSF77=$ff_cfagsf77

    if test $ff_f77intsize -ne  4
    then
	as_fn_error 1 " Fatal Error: Your fortran 77  compiler have by not 4 bytes integer ( $ff_f77intsize bytes) " "$LINENO" 5;
    fi
    test -f /mingw/bin/libpthread-2.dll && ff_pthread_dll=/mingw/bin/libpthread-2.dll ; \

    if test -z "$ff_where_lib_conf_f77"  ; then
	    echo "f77 LD $FLIBS"  >>$ff_where_lib_conf
	    test -n "$ff_cfagsf77 $ff_pthread_dll" && echo "f77 INCLUDE $ff_cfagsf77 $ff_pthread_dll "  >>$ff_where_lib_conf
            ff_where_lib_conf_f77=1
	    ff_where_lib_f77="$FLIBS"
	    ff_where_inc_f77="$ff_cfagsf77 $ff_pthread_dll"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add f77 : $FLIBS ;  $ff_cfagsf77 $ff_pthread_dll in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add f77 : $FLIBS ;  $ff_cfagsf77 $ff_pthread_dll in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add f77 : $FLIBS $ff_cfagsf77 $ff_pthread_dll in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add f77 : $FLIBS $ff_cfagsf77 $ff_pthread_dll in  $ff_where_lib_conf \"" >&6;}
        fi


    if test -z "$ff_where_lib_conf_fc"  ; then
	    echo "fc LD $FLIBS"  >>$ff_where_lib_conf
	    test -n "$ff_cfagsf77 $ff_pthread_dll" && echo "fc INCLUDE $ff_cfagsf77 $ff_pthread_dll "  >>$ff_where_lib_conf
            ff_where_lib_conf_fc=1
	    ff_where_lib_fc="$FLIBS"
	    ff_where_inc_fc="$ff_cfagsf77 $ff_pthread_dll"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add fc : $FLIBS ;  $ff_cfagsf77 $ff_pthread_dll in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add fc : $FLIBS ;  $ff_cfagsf77 $ff_pthread_dll in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add fc : $FLIBS $ff_cfagsf77 $ff_pthread_dll in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add fc : $FLIBS $ff_cfagsf77 $ff_pthread_dll in  $ff_where_lib_conf \"" >&6;}
        fi

fi

#  fin test FORTRAN ..........
# ----------------------------

# Check whether --enable-c was given.
if test ${enable_c+y}
then :
  enableval=$enable_c;
fi

if test "$enable_c" != no
then
    ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_CC="${ac_tool_prefix}gcc"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
printf "%s\n" "$CC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


fi
if test -z "$ac_cv_prog_CC"; then
  ac_ct_CC=$CC
  # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_CC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_CC="gcc"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
printf "%s\n" "$ac_ct_CC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi

  if test "x$ac_ct_CC" = x; then
    CC=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CC=$ac_ct_CC
  fi
else
  CC="$ac_cv_prog_CC"
fi

if test -z "$CC"; then
          if test -n "$ac_tool_prefix"; then
    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_CC="${ac_tool_prefix}cc"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
printf "%s\n" "$CC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  fi
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
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  ac_prog_rejected=no
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
       ac_prog_rejected=yes
       continue
     fi
    ac_cv_prog_CC="cc"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_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 $# != 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
    ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
  fi
fi
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
printf "%s\n" "$CC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


fi
if test -z "$CC"; then
  if test -n "$ac_tool_prefix"; then
  for ac_prog in cl.exe
  do
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
printf "%s\n" "$CC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


    test -n "$CC" && break
  done
fi
if test -z "$CC"; then
  ac_ct_CC=$CC
  for ac_prog in cl.exe
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_CC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_CC="$ac_prog"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
printf "%s\n" "$ac_ct_CC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$ac_ct_CC" && break
done

  if test "x$ac_ct_CC" = x; then
    CC=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CC=$ac_ct_CC
  fi
fi

fi
if test -z "$CC"; then
  if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
set dummy ${ac_tool_prefix}clang; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_CC="${ac_tool_prefix}clang"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
printf "%s\n" "$CC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


fi
if test -z "$ac_cv_prog_CC"; then
  ac_ct_CC=$CC
  # Extract the first word of "clang", so it can be a program name with args.
set dummy clang; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_CC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$ac_ct_CC"; then
  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ac_ct_CC="clang"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
printf "%s\n" "$ac_ct_CC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi

  if test "x$ac_ct_CC" = x; then
    CC=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    CC=$ac_ct_CC
  fi
else
  CC="$ac_cv_prog_CC"
fi

fi


test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "no acceptable C compiler found in \$PATH
See \`config.log' for more details" "$LINENO" 5; }

# Provide some information about the compiler.
printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
set X $ac_compile
ac_compiler=$2
for ac_option in --version -v -V -qversion -version; do
  { { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
  ac_status=$?
  if test -s conftest.err; then
    sed '10a\
... rest of stderr output deleted ...
         10q' conftest.err >conftest.er1
    cat conftest.er1 >&5
  fi
  rm -f conftest.er1 conftest.err
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }
done

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
printf %s "checking whether the compiler supports GNU C... " >&6; }
if test ${ac_cv_c_compiler_gnu+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
#ifndef __GNUC__
       choke me
#endif

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_compiler_gnu=yes
else $as_nop
  ac_compiler_gnu=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
ac_compiler_gnu=$ac_cv_c_compiler_gnu

if test $ac_compiler_gnu = yes; then
  GCC=yes
else
  GCC=
fi
ac_test_CFLAGS=${CFLAGS+y}
ac_save_CFLAGS=$CFLAGS
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
printf %s "checking whether $CC accepts -g... " >&6; }
if test ${ac_cv_prog_cc_g+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_save_c_werror_flag=$ac_c_werror_flag
   ac_c_werror_flag=yes
   ac_cv_prog_cc_g=no
   CFLAGS="-g"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_prog_cc_g=yes
else $as_nop
  CFLAGS=""
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :

else $as_nop
  ac_c_werror_flag=$ac_save_c_werror_flag
	 CFLAGS="-g"
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_prog_cc_g=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
   ac_c_werror_flag=$ac_save_c_werror_flag
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
if test $ac_test_CFLAGS; 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
ac_prog_cc_stdc=no
if test x$ac_prog_cc_stdc = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
printf %s "checking for $CC option to enable C11 features... " >&6; }
if test ${ac_cv_prog_cc_c11+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_cv_prog_cc_c11=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_c_conftest_c11_program
_ACEOF
for ac_arg in '' -std=gnu11
do
  CC="$ac_save_CC $ac_arg"
  if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_prog_cc_c11=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam
  test "x$ac_cv_prog_cc_c11" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC
fi

if test "x$ac_cv_prog_cc_c11" = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
else $as_nop
  if test "x$ac_cv_prog_cc_c11" = x
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
else $as_nop
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
     CC="$CC $ac_cv_prog_cc_c11"
fi
  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
  ac_prog_cc_stdc=c11
fi
fi
if test x$ac_prog_cc_stdc = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
printf %s "checking for $CC option to enable C99 features... " >&6; }
if test ${ac_cv_prog_cc_c99+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_cv_prog_cc_c99=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_c_conftest_c99_program
_ACEOF
for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
do
  CC="$ac_save_CC $ac_arg"
  if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_prog_cc_c99=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam
  test "x$ac_cv_prog_cc_c99" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC
fi

if test "x$ac_cv_prog_cc_c99" = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
else $as_nop
  if test "x$ac_cv_prog_cc_c99" = x
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
else $as_nop
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
     CC="$CC $ac_cv_prog_cc_c99"
fi
  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
  ac_prog_cc_stdc=c99
fi
fi
if test x$ac_prog_cc_stdc = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
printf %s "checking for $CC option to enable C89 features... " >&6; }
if test ${ac_cv_prog_cc_c89+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_cv_prog_cc_c89=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_c_conftest_c89_program
_ACEOF
for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
  CC="$ac_save_CC $ac_arg"
  if ac_fn_c_try_compile "$LINENO"
then :
  ac_cv_prog_cc_c89=$ac_arg
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam
  test "x$ac_cv_prog_cc_c89" != "xno" && break
done
rm -f conftest.$ac_ext
CC=$ac_save_CC
fi

if test "x$ac_cv_prog_cc_c89" = xno
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
else $as_nop
  if test "x$ac_cv_prog_cc_c89" = x
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
else $as_nop
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
     CC="$CC $ac_cv_prog_cc_c89"
fi
  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
  ac_prog_cc_stdc=c89
fi
fi

ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


  ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
printf %s "checking whether $CC understands -c and -o together... " >&6; }
if test ${am_cv_prog_cc_c_o+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
  # Make sure it works both with $CC and with simple cc.
  # Following AC_PROG_CC_C_O, we do the test twice because some
  # compilers refuse to overwrite an existing .o file with -o,
  # though they will create one.
  am_cv_prog_cc_c_o=yes
  for am_i in 1 2; do
    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } \
         && test -f conftest2.$ac_objext; then
      : OK
    else
      am_cv_prog_cc_c_o=no
      break
    fi
  done
  rm -f core conftest*
  unset am_i
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
if test "$am_cv_prog_cc_c_o" != yes; then
   # Losing compiler, so override with the script.
   # FIXME: It is wrong to rewrite CC.
   # But if we don't then we get into trouble of one sort or another.
   # A longer-term fix would be to have automake use am__CC in this case,
   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
   CC="$am_aux_dir/compile $CC"
fi
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


depcc="$CC"   am_compiler_list=

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
printf %s "checking dependency style of $depcc... " >&6; }
if test ${am_cv_CC_dependencies_compiler_type+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  # We make a subdir and do the tests there.  Otherwise we can end up
  # making bogus files that we don't know about and never remove.  For
  # instance it was reported that on HP-UX the gcc test will end up
  # making a dummy file named 'D' -- because '-MD' means "put the output
  # in D".
  rm -rf conftest.dir
  mkdir conftest.dir
  # Copy depcomp to subdir because otherwise we won't find it if we're
  # using a relative directory.
  cp "$am_depcomp" conftest.dir
  cd conftest.dir
  # We will build objects and dependencies in a subdirectory because
  # it helps to detect inapplicable dependency modes.  For instance
  # both Tru64's cc and ICC support -MD to output dependencies as a
  # side effect of compilation, but ICC will put the dependencies in
  # the current directory while Tru64 will put them in the object
  # directory.
  mkdir sub

  am_cv_CC_dependencies_compiler_type=none
  if test "$am_compiler_list" = ""; then
     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
  fi
  am__universal=false
  case " $depcc " in #(
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
     esac

  for depmode in $am_compiler_list; do
    # Setup a source with many dependencies, because some compilers
    # like to wrap large dependency lists on column 80 (with \), and
    # we should not choose a depcomp mode which is confused by this.
    #
    # We need to recreate these files for each test, as the compiler may
    # overwrite some of them when testing with obscure command lines.
    # This happens at least with the AIX C compiler.
    : > sub/conftest.c
    for i in 1 2 3 4 5 6; do
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
      # Solaris 10 /bin/sh.
      echo '/* dummy */' > sub/conftst$i.h
    done
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf

    # We check with '-c' and '-o' for the sake of the "dashmstdout"
    # mode.  It turns out that the SunPro C++ compiler does not properly
    # handle '-M -o', and we need to detect this.  Also, some Intel
    # versions had trouble with output in subdirs.
    am__obj=sub/conftest.${OBJEXT-o}
    am__minus_obj="-o $am__obj"
    case $depmode in
    gcc)
      # This depmode causes a compiler race in universal mode.
      test "$am__universal" = false || continue
      ;;
    nosideeffect)
      # After this tag, mechanisms are not by side-effect, so they'll
      # only be used when explicitly requested.
      if test "x$enable_dependency_tracking" = xyes; then
	continue
      else
	break
      fi
      ;;
    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
      # This compiler won't grok '-c -o', but also, the minuso test has
      # not run yet.  These depmodes are late enough in the game, and
      # so weak that their functioning should not be impacted.
      am__obj=conftest.${OBJEXT-o}
      am__minus_obj=
      ;;
    none) break ;;
    esac
    if depmode=$depmode \
       source=sub/conftest.c object=$am__obj \
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
         >/dev/null 2>conftest.err &&
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
      # icc doesn't choke on unknown options, it will just issue warnings
      # or remarks (even with -Werror).  So we grep stderr for any message
      # that says an option was ignored or not supported.
      # When given -MP, icc 7.0 and 7.1 complain thusly:
      #   icc: Command line warning: ignoring option '-M'; no argument required
      # The diagnosis changed in icc 8.0:
      #   icc: Command line remark: option '-MP' not supported
      if (grep 'ignoring option' conftest.err ||
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
        am_cv_CC_dependencies_compiler_type=$depmode
        break
      fi
    fi
  done

  cd ..
  rm -rf conftest.dir
else
  am_cv_CC_dependencies_compiler_type=none
fi

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type

 if
  test "x$enable_dependency_tracking" != xno \
  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
  am__fastdepCC_TRUE=
  am__fastdepCC_FALSE='#'
else
  am__fastdepCC_TRUE='#'
  am__fastdepCC_FALSE=
fi



else

	# We need to define this otherwise ./configure crashes with
	# the message "configure: error: conditional "am__fastdepCC"
	# was never defined".

    am__fastdepCC_TRUE=
    am__fastdepCC_FALSE='#'
fi

for ac_prog in flex lex
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_LEX+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$LEX"; then
  ac_cv_prog_LEX="$LEX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_LEX="$ac_prog"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
LEX=$ac_cv_prog_LEX
if test -n "$LEX"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
printf "%s\n" "$LEX" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$LEX" && break
done
test -n "$LEX" || LEX=":"

  if test "x$LEX" != "x:"; then
    cat >conftest.l <<_ACEOF
%{
#ifdef __cplusplus
extern "C"
#endif
int yywrap(void);
%}
%%
a { ECHO; }
b { REJECT; }
c { yymore (); }
d { yyless (1); }
e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
#ifdef __cplusplus
    yyless ((yyinput () != 0));
#else
    yyless ((input () != 0));
#endif
  }
f { unput (yytext[0]); }
. { BEGIN INITIAL; }
%%
#ifdef YYTEXT_POINTER
extern char *yytext;
#endif
int
yywrap (void)
{
  return 1;
}
int
main (void)
{
  return ! yylex ();
}
_ACEOF
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex output file root" >&5
printf %s "checking for lex output file root... " >&6; }
if test ${ac_cv_prog_lex_root+y}
then :
  printf %s "(cached) " >&6
else $as_nop

ac_cv_prog_lex_root=unknown
{ { ac_try="$LEX conftest.l"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
printf "%s\n" "$ac_try_echo"; } >&5
  (eval "$LEX conftest.l") 2>&5
  ac_status=$?
  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; } &&
if test -f lex.yy.c; then
  ac_cv_prog_lex_root=lex.yy
elif test -f lexyy.c; then
  ac_cv_prog_lex_root=lexyy
fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
printf "%s\n" "$ac_cv_prog_lex_root" >&6; }
if test "$ac_cv_prog_lex_root" = unknown
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find output from $LEX; giving up on $LEX" >&5
printf "%s\n" "$as_me: WARNING: cannot find output from $LEX; giving up on $LEX" >&2;}
   LEX=: LEXLIB=
fi
LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root

if test ${LEXLIB+y}
then :

else $as_nop

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex library" >&5
printf %s "checking for lex library... " >&6; }
if test ${ac_cv_lib_lex+y}
then :
  printf %s "(cached) " >&6
else $as_nop

    ac_save_LIBS="$LIBS"
    ac_found=false
    for ac_cv_lib_lex in 'none needed' -lfl -ll 'not found'; do
      case $ac_cv_lib_lex in #(
  'none needed') :
     ;; #(
  'not found') :
    break ;; #(
  *) :
    LIBS="$ac_cv_lib_lex $ac_save_LIBS" ;; #(
  *) :
     ;;
esac

      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
`cat $LEX_OUTPUT_ROOT.c`
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ac_found=:
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
      if $ac_found; then
        break
      fi
    done
    LIBS="$ac_save_LIBS"

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
printf "%s\n" "$ac_cv_lib_lex" >&6; }
  if test "$ac_cv_lib_lex" = 'not found'
then :
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: required lex library not found; giving up on $LEX" >&5
printf "%s\n" "$as_me: WARNING: required lex library not found; giving up on $LEX" >&2;}
	 LEX=: LEXLIB=
elif test "$ac_cv_lib_lex" = 'none needed'
then :
  LEXLIB=''
else $as_nop
  LEXLIB=$ac_cv_lib_lex
fi
  ac_save_LIBS="$LIBS"
      LIBS=
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing yywrap" >&5
printf %s "checking for library containing yywrap... " >&6; }
if test ${ac_cv_search_yywrap+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

namespace conftest {
  extern "C" int yywrap ();
}
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
return conftest::yywrap ();
  ;
  return 0;
}
_ACEOF
for ac_lib in '' fl l
do
  if test -z "$ac_lib"; then
    ac_res="none required"
  else
    ac_res=-l$ac_lib
    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
  fi
  if ac_fn_cxx_try_link "$LINENO"
then :
  ac_cv_search_yywrap=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext
  if test ${ac_cv_search_yywrap+y}
then :
  break
fi
done
if test ${ac_cv_search_yywrap+y}
then :

else $as_nop
  ac_cv_search_yywrap=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_yywrap" >&5
printf "%s\n" "$ac_cv_search_yywrap" >&6; }
ac_res=$ac_cv_search_yywrap
if test "$ac_res" != no
then :
  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
  LEXLIB="$LIBS"
fi

      LIBS="$ac_save_LIBS"
fi


if test "$LEX" != :
then :

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
printf %s "checking whether yytext is a pointer... " >&6; }
if test ${ac_cv_prog_lex_yytext_pointer+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  # POSIX says lex can declare yytext either as a pointer or an array; the
# default is implementation-dependent.  Figure out which it is, since
# not all implementations provide the %pointer and %array declarations.
ac_cv_prog_lex_yytext_pointer=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

  #define YYTEXT_POINTER 1
`cat $LEX_OUTPUT_ROOT.c`
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
  ac_cv_prog_lex_yytext_pointer=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
printf "%s\n" "$ac_cv_prog_lex_yytext_pointer" >&6; }
if test $ac_cv_prog_lex_yytext_pointer = yes; then

printf "%s\n" "#define YYTEXT_POINTER 1" >>confdefs.h

fi

fi
rm -f conftest.l $LEX_OUTPUT_ROOT.c

fi
if test "$LEX" = :; then
  LEX=${am_missing_run}flex
fi
for ac_prog in 'bison -y' byacc
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_YACC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$YACC"; then
  ac_cv_prog_YACC="$YACC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_YACC="$ac_prog"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

fi
fi
YACC=$ac_cv_prog_YACC
if test -n "$YACC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
printf "%s\n" "$YACC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


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

ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu



# Some useful libraries
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&5
printf %s "checking for deflate in -lz... " >&6; }
if test ${ac_cv_lib_z_deflate+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lz  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

namespace conftest {
  extern "C" int deflate ();
}
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
return conftest::deflate ();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ac_cv_lib_z_deflate=yes
else $as_nop
  ac_cv_lib_z_deflate=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_deflate" >&5
printf "%s\n" "$ac_cv_lib_z_deflate" >&6; }
if test "x$ac_cv_lib_z_deflate" = xyes
then :
  ff_zlib="-lz"
else $as_nop
  ff_zlib=""
fi


# Check whether --with-zlib was given.
if test ${with_zlib+y}
then :
  withval=$with_zlib;
fi

if test "$with_zlib" != no -a  -n "$with_glut" ; then
    ff_zlib="$with_zlib";
elif test "$with_zlib" = no ; then
    ff_zlib=""
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
printf %s "checking for pthread_create in -lpthread... " >&6; }
if test ${ac_cv_lib_pthread_pthread_create+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lpthread  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

namespace conftest {
  extern "C" int pthread_create ();
}
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
return conftest::pthread_create ();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ac_cv_lib_pthread_pthread_create=yes
else $as_nop
  ac_cv_lib_pthread_pthread_create=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
printf "%s\n" "$ac_cv_lib_pthread_pthread_create" >&6; }
if test "x$ac_cv_lib_pthread_pthread_create" = xyes
then :
  ff_pthread="-lpthread"
else $as_nop
  ff_pthread=""
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for omp_get_wtime in -liomp5" >&5
printf %s "checking for omp_get_wtime in -liomp5... " >&6; }
if test ${ac_cv_lib_iomp5_omp_get_wtime+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-liomp5  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

namespace conftest {
  extern "C" int omp_get_wtime ();
}
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
return conftest::omp_get_wtime ();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ac_cv_lib_iomp5_omp_get_wtime=yes
else $as_nop
  ac_cv_lib_iomp5_omp_get_wtime=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iomp5_omp_get_wtime" >&5
printf "%s\n" "$ac_cv_lib_iomp5_omp_get_wtime" >&6; }
if test "x$ac_cv_lib_iomp5_omp_get_wtime" = xyes
then :
  ff_iomp5="-liomp5"
else $as_nop
  ff_iomp5=""
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
printf %s "checking for clock_gettime in -lrt... " >&6; }
if test ${ac_cv_lib_rt_clock_gettime+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lrt  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

namespace conftest {
  extern "C" int clock_gettime ();
}
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
return conftest::clock_gettime ();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ac_cv_lib_rt_clock_gettime=yes
else $as_nop
  ac_cv_lib_rt_clock_gettime=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
printf "%s\n" "$ac_cv_lib_rt_clock_gettime" >&6; }
if test "x$ac_cv_lib_rt_clock_gettime" = xyes
then :
  printf "%s\n" "#define HAVE_LIBRT 1" >>confdefs.h

  LIBS="-lrt $LIBS"

fi

ac_header= ac_cache=
for ac_item in $ac_header_cxx_list
do
  if test $ac_cache; then
    ac_fn_cxx_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
    if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
      printf "%s\n" "#define $ac_item 1" >> confdefs.h
    fi
    ac_header= ac_cache=
  elif test $ac_header; then
    ac_cache=$ac_item
  else
    ac_header=$ac_item
  fi
done








if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
then :

printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h

fi
       for ac_header in zlib.h
do :
  ac_fn_cxx_check_header_compile "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
if test "x$ac_cv_header_zlib_h" = xyes
then :
  printf "%s\n" "#define HAVE_ZLIB_H 1" >>confdefs.h
 ff_zlib_ok=yes

else $as_nop
  ff_zlib_ok=no

fi

done

if test -n "$ff_pthread"  ; then

    if test -z "$ff_where_lib_conf_pthread"  ; then
	    echo "pthread LD $ff_pthread"  >>$ff_where_lib_conf
	    test -n "" && echo "pthread INCLUDE  "  >>$ff_where_lib_conf
            ff_where_lib_conf_pthread=1
	    ff_where_lib_pthread="$ff_pthread"
	    ff_where_inc_pthread=""
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add pthread : $ff_pthread ;   in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add pthread : $ff_pthread ;   in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add pthread : $ff_pthread  in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add pthread : $ff_pthread  in  $ff_where_lib_conf \"" >&6;}
        fi

fi

# Necessary absolute pathname for local directory when some libraries
# are used from several different locations (for instance locally in
# configure.ac and in a subdir).
curdir=`pwd`

# Configure options
# -----------------

echo "$PATH" > config.path
eval for i in $ac_configure_args\; do echo \$i\; done | sed -e "s/$/'/" -e "s/^/'/"   > config.param

# by default the suffix of the  .so lib file is .so
#      it is .dll   under windows
#      it is .dylib under macos X

# suffix of dynamic lib
# Checking wether we can produce a MacIntosh-specific version
# -----------------------------------------------------------
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking wether we are on a MacIntosh" >&5
printf %s "checking wether we are on a MacIntosh... " >&6; }
ff_mac=no
if test `uname` = Darwin;
then
	ff_suffix_dylib="dylib"
	ff_suffix_dylib_a="dylib"
	ff_mac=yes

printf "%s\n" "#define FF_PREFIX_DIR_APPLE \"/Applications/FreeFem++.app/Contents/\"" >>confdefs.h

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_mac" >&5
printf "%s\n" "$ff_mac" >&6; }

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking wether we are on  SunOS" >&5
printf %s "checking wether we are on  SunOS... " >&6; }
ff_sunos=no
if test `uname -s` = SunOS;
then
	ff_sunos=yes
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_sunos" >&5
printf "%s\n" "$ff_sunos" >&6; }

# glut ------------
# ----------------
ff_glut=""
ff_glut_ok=""

# Check whether --with-glut was given.
if test ${with_glut+y}
then :
  withval=$with_glut;
fi

if test "$with_glut" != no -a  -n "$with_glut" ; then
    ff_libs_save="$LIBS"
    LIBS="$LIBS"
      ff_glut="$with_glut";ff_glut_ok=yes
    LIBS="$ff_libs_save"
elif test "$with_glut" = no ; then
    ff_glut_ok="no"
fi

# Checking wether we can produce a Microsoft Windows-specific version
# -------------------------------------------------------------------

# Check whether --enable-cygwindll was given.
if test ${enable_cygwindll+y}
then :
  enableval=$enable_cygwindll;
fi

# Check whether --enable-mingw64 was given.
if test ${enable_mingw64+y}
then :
  enableval=$enable_mingw64;
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking wether we are on Microsoft Windows" >&5
printf %s "checking wether we are on Microsoft Windows... " >&6; }
ff_uname=`uname`
#  flag to build window 32   version   ff_mingw = yes
ff_mingw=no
ff_fpic=yes
case $ff_uname in
    CYGWIN*)
	ff_fpic=no
	#    ff_nocygwin=-mno-cygwin
	GCCNOCYGWIN=$ff_nocygwin
;;
    MINGW*|MSYS_NT*)
        enable_cygwindll=no;;


esac
ff_PURE_WIN32=0
case $ff_uname in
CYGWIN*|MINGW*|MSYS_NT*)
	ff_fpic=no
	ff_suffix_dylib="dll";
	ff_suffix_dylib_a="dll.a";
        ff_win32=yes;
    # echo "ff win 32 --------------------------------------------"
	# FFCS - 8/3/12 - remove -D_MSC_VER under MinGW64 because it forces system calls to be compiled into any object
	# (which creates thousands of duplicate definitions for sytem calls like time()).


	# We need Mingw to avoid Cygwin's extra DLLs
	if test "$enable_cygwindll" != yes
	then
# 	        CHECK_COMPILE_FLAG(C++,-mwindows,CXXFLAGS)

		# FFCS: on Windows, FF crashes when compiling GL/glut.h and the option "--disable-opengl" is not
		# operational because ff_glut_ok is forced to yes here.
		if test $enable_ffcs = yes
		then
	            ff_glut_ok=no
		    ff_glut=""
		    enable_opengl=no
		fi

                ff_mingw=yes
                enable_cygwindll=no;
		ff_pthread="-mthreads"

		# FFCS does not use the Cygwin MinGW compilers any more
		if test $enable_ffcs = no
		then
		    CXXFLAGS="$CXXFLAGS $ff_nocygwin -I/usr/include/mingw"
		    FFLAGS="$FFLAGS $ff_nocygwin"
		    CFLAGS="$CFLAGS $ff_nocygwin -I/usr/include/mingw"
                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int a;
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :

else $as_nop
  ff_nocygwin="";
			    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Sorry $ff_nocygwin optio is wrong try whitout , but try with gcc-3.3" >&5
printf "%s\n" "$as_me: Sorry $ff_nocygwin optio is wrong try whitout , but try with gcc-3.3" >&6;}

fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
		    CXXFLAGS="$CXXFLAGS $ff_nocygwin -I/usr/include/mingw"
		    FFLAGS="$FFLAGS $ff_nocygwin"
		    CFLAGS="$CFLAGS $ff_nocygwin -I/usr/include/mingw"
		    CNOFLAGS="$CNOFLAGS $ff_nocygwin -I/usr/include/mingw"
		fi

		LIBS="$LIBS $ff_nocygwin -mthreads -lws2_32 -lcomdlg32"
		LIBSNOCONSOLE="-mwindows"

		# FFCS uses a specific compiler, so we specify its libraries explicitely
		if test $enable_ffcs = no
		then
		    export PATH="$PATH:`cygpath $MSMPI_BIN`"
		    test -z "$MPIRUN" &&  MPIRUN=`which mpiexe.exe`
		    if test "$enable_fortran" != no -a "$with_flib" != no ;   then
			case "$F77" in
	 		    *gfortran) FLIBS="$ff_nocygwin -lgfortran -lquadmath";;
	 		    *g77) FLIBS="$ff_nocygwin -lg2c";;
			    *)   as_fn_error $? " Sorry no known FLIBS with this $F77  !" "$LINENO" 5 ;;
			esac
		    fi
		fi

		if test -z "$ff_glut" -a  "$ff_glut_ok" != "no" ; then
                    ff_glutname="glut32"
		#  check abort a existing function just to find in glut32.dll exist in the path
		#  because glutInit is not the real symbol on win32 dur dur FH !!!!!!!!!
		    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for abort in -lglut32" >&5
printf %s "checking for abort in -lglut32... " >&6; }
if test ${ac_cv_lib_glut32_abort+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lglut32  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

namespace conftest {
  extern "C" int abort ();
}
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
return conftest::abort ();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ac_cv_lib_glut32_abort=yes
else $as_nop
  ac_cv_lib_glut32_abort=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_glut32_abort" >&5
printf "%s\n" "$ac_cv_lib_glut32_abort" >&6; }
if test "x$ac_cv_lib_glut32_abort" = xyes
then :
  ff_glut="-l$ff_glutname -mthreads -lglu32 -lopengl32"
else $as_nop
  ff_glut=""
fi

		    if test -z "$ff_glut" ; then
			ff_glutname="freeglut"
			if test -x  /usr/bin/pkg-config.exe ; then
			ff_glut="-lglu32 "`/usr/bin/pkg-config.exe --libs --static freeglut`
			else
			ff_glut="-l$ff_glutname -mthreads -lglu32 -lopengl32"
			fi
			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for abort in -lfreeglut" >&5
printf %s "checking for abort in -lfreeglut... " >&6; }
if test ${ac_cv_lib_freeglut_abort+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lfreeglut  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

namespace conftest {
  extern "C" int abort ();
}
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
return conftest::abort ();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ac_cv_lib_freeglut_abort=yes
else $as_nop
  ac_cv_lib_freeglut_abort=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freeglut_abort" >&5
printf "%s\n" "$ac_cv_lib_freeglut_abort" >&6; }
if test "x$ac_cv_lib_freeglut_abort" = xyes
then :
  ff_glut_ok=yes
else $as_nop
  ff_glut=""
fi

		    fi
		fi
         	# Resources for FreeFem++-cs in Microsoft Windows format
	        FFGLUTNAME=$ff_glutname

	        WINDRESOBJ=windres.o

	        LIBSNOCONSOLE=$LIBSNOCONSOLE

            WIN32DLLTARGET=win32-dll-target

		    ff_TEST_FFPP="../../src/bin-win32/FreeFem++.exe"
		    ff_TEST_FFPP_MPI="../../src/bin-win32/FreeFem++-mpi.exe"


printf "%s\n" "#define PURE_WIN32 1" >>confdefs.h

		ff_PURE_WIN32=1
		ff_dynload=yes
	fi


	;;
*) ff_win32=no;;
esac
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_win32" >&5
printf "%s\n" "$ff_win32" >&6; }

if test "$ff_win32" = no
then
	enable_cygwindll=no
fi

# FreeFem++-specific version information
# --------------------------------------

# Version numbering, converted to a floating point value
ff_numver="`echo $VERSION|sed 's/-\(.*\)/+\1.0*0.000001/'`"

printf "%s\n" "#define VersionFreeFem $ff_numver" >>confdefs.h


# Since src/fflib/strversionnumber.cpp is recreated at each build, this
# date is only useful for config-version.h

test "$prefix" = NONE && prefix="$ac_default_prefix"
ff_prefix_dir="${prefix}/lib/ff++/$VERSION"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking prefix dir freefem++  " >&5
printf %s "checking prefix dir freefem++  ... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_prefix_dir" >&5
printf "%s\n" "$ff_prefix_dir" >&6; }

FF_DATE=`date`

printf "%s\n" "#define VersionFreeFemDate \"$FF_DATE\"" >>confdefs.h


printf "%s\n" "#define FF_PREFIX_DIR \"${ff_prefix_dir}\"" >>confdefs.h

ff_prefix_dir=$ff_prefix_dir

ff_prefix=${prefix}


ff_prefix_dir_lib="$ff_prefix_dir/lib"
ff_prefix_dir_data="$datadir/$PACKAGE_NAME"

ff_prefix_dir_include="$ff_prefix_dir/include"
ff_prefix_dir_etc="$ff_prefix_dir/etc"
ff_prefix_dir_lib_mpi="$ff_prefix_dir/lib/mpi"
ff_prefix_dir_example="$ff_prefix_dir_data/$PACKAGE_VERSION"
ff_prefix_dir_lib=$ff_prefix_dir_lib

ff_prefix_dir_include=$ff_prefix_dir_include

ff_prefix_dir_etc=$ff_prefix_dir_etc

ff_prefix_dir_lib_mpi=$ff_prefix_dir_lib_mpi

ff_prefix_dir_example=$ff_prefix_dir_example


# Separate configuration header file for version information, included
# in config-macos9.h

cat << EOF > config-version.h
/* FreeFEM version information for MacOS 9 configuration */
/* File generated by configure.ac */

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "$PACKAGE_STRING"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "$PACKAGE_TARNAME"

/* Define to the version of this package. */
#define PACKAGE_VERSION "$PACKAGE_VERSION"

/* Version number of package */
#define VERSION "$VERSION"

/* FreeFEM build date */
#define VersionFreeFemDate "$FF_DATE"

/* FreeFEM version as a float */
#define VersionFreeFem ($ff_numver)
EOF

# Checking wether to produce a debug version
# ------------------------------------------

# Generic or hardware-dependant optimization
# Checks whether a compiler accepts a given flag
# ----------------------------------------------

# $1 = compiler name
# $2 = flag
# $3 = make macro containing flags for that compiler
# $4 =  exec is true ..
# Note: changes AC_LANG()



# Choosing debugging and/or optimization flags for compilation
# ------------------------------------------------------------
#   get CPU Type
cputype=unknow
if test -x /usr/bin/machine ; then
  cputype=`/usr/bin/machine`
elif test -x /usr/bin/arch ; then
  cputype=`/usr/bin/arch`
fi
cpuintel=no;
case "$cputype" in
i386|i486| x86_64*)  cpuintel=yes;;
*) cpuintel=no;;
esac
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -----   CPU kind: $cputype , intel/amd: $cpuintel " >&5
printf "%s\n" "$as_me:     -----   CPU kind: $cputype , intel/amd: $cpuintel " >&6;}
# Check whether --enable-profiling was given.
if test ${enable_profiling+y}
then :
  enableval=$enable_profiling;
fi

if test "$enable_profiling" = yes
then
	CXXFLAGS="$CXXFLAGS -pg"
	LDFLAGS="$LDFLAGS -pg"
fi

if test "$enable_m64" = yes -a "$enable_m32"
then
  	    as_fn_error 1 " Choose  32 or 64 architecture not the both " "$LINENO" 5;
fi
# Check whether --enable-m64 was given.
if test ${enable_m64+y}
then :
  enableval=$enable_m64;
fi

if test "$enable_m64" = yes
then
	ff_m64=-m64
	ff_ok=no
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts $ff_m64" >&5
printf %s "checking whether the C compiler accepts $ff_m64... " >&6; }
	check_save_flags="$CFLAGS"
	ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

	CFLAGS="$CFLAGS $ff_m64"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		CFLAGS="$check_save_flags"
	fi
	if test -n "ff_ok" ;
         then
	        ff_ok="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


        if test "$ff_ok" = yes ;then  CNOFLAGS="$CFLAGS $ff_m64";fi
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler accepts $ff_m64" >&5
printf %s "checking whether the C++ compiler accepts $ff_m64... " >&6; }
	check_save_flags="$CXXFLAGS"
	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

	CXXFLAGS="$CXXFLAGS $ff_m64"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		CXXFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the Fortran 77 compiler accepts $ff_m64" >&5
printf %s "checking whether the Fortran 77 compiler accepts $ff_m64... " >&6; }
	check_save_flags="$FFLAGS"
	ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

	FFLAGS="$FFLAGS $ff_m64"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat > conftest.$ac_ext <<_ACEOF
       program x
       end
_ACEOF
if ac_fn_f77_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		FFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


#  add -fPIC on on 64 architecture
   if test "$ff_ok" = yes -a "$ff_fpic" != "no" ;then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -fPIC" >&5
printf %s "checking whether the C compiler accepts -fPIC... " >&6; }
	check_save_flags="$CFLAGS"
	ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

	CFLAGS="$CFLAGS -fPIC"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		CFLAGS="$check_save_flags"
	fi
	if test -n "ff_ok" ;
         then
	        ff_ok="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler accepts -fPIC" >&5
printf %s "checking whether the C++ compiler accepts -fPIC... " >&6; }
	check_save_flags="$CXXFLAGS"
	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

	CXXFLAGS="$CXXFLAGS -fPIC"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		CXXFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the Fortran 77 compiler accepts -fPIC" >&5
printf %s "checking whether the Fortran 77 compiler accepts -fPIC... " >&6; }
	check_save_flags="$FFLAGS"
	ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

	FFLAGS="$FFLAGS -fPIC"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat > conftest.$ac_ext <<_ACEOF
       program x
       end
_ACEOF
if ac_fn_f77_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		FFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


  fi

fi
# Check whether --enable-m32 was given.
if test ${enable_m32+y}
then :
  enableval=$enable_m32;
fi

if test "$enable_m32" = yes
then
	ff_m32=-m32
	ff_ok=no
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts $ff_m32" >&5
printf %s "checking whether the C compiler accepts $ff_m32... " >&6; }
	check_save_flags="$CFLAGS"
	ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

	CFLAGS="$CFLAGS $ff_m32"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		CFLAGS="$check_save_flags"
	fi
	if test -n "ff_ok" ;
         then
	        ff_ok="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


        if test "$ff_ok" = yes ;then  CNOFLAGS="$CFLAGS $ff_m32";fi
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts $ff_m32" >&5
printf %s "checking whether the C compiler accepts $ff_m32... " >&6; }
	check_save_flags="$CNOFLAGS"
	ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

	CNOFLAGS="$CNOFLAGS $ff_m32"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		CNOFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler accepts $ff_m32" >&5
printf %s "checking whether the C++ compiler accepts $ff_m32... " >&6; }
	check_save_flags="$CXXFLAGS"
	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

	CXXFLAGS="$CXXFLAGS $ff_m32"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		CXXFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the Fortran 77 compiler accepts $ff_m32" >&5
printf %s "checking whether the Fortran 77 compiler accepts $ff_m32... " >&6; }
	check_save_flags="$FFLAGS"
	ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

	FFLAGS="$FFLAGS $ff_m32"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat > conftest.$ac_ext <<_ACEOF
       program x
       end
_ACEOF
if ac_fn_f77_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		FFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


#  add -fPIC on on 64 architecture
#        CHECK_COMPILE_FLAG(C,-fPIC,CFLAGS)
#	CHECK_COMPILE_FLAG(C++,-fPIC,CXXFLAGS)
#	CHECK_COMPILE_FLAG(Fortran 77,-fPIC,FFLAGS)

fi

# Debug mode (no optimisation)
# ----------------------------

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to generate debugging information" >&5
printf %s "checking whether to generate debugging information... " >&6; }

# Check whether --enable-debug was given.
if test ${enable_debug+y}
then :
  enableval=$enable_debug;
fi

# Check whether --enable-optim was given.
if test ${enable_optim+y}
then :
  enableval=$enable_optim;
fi


if test "$enable_debug" = yes;
then

	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
	CFLAGS="`echo $CFLAGS | sed 's/-O2//g'`"
	FFLAGS="`echo $FFLAGS | sed 's/-O2//g'`"
	CXXFLAGS="`echo $CXXFLAGS | sed 's/-O2//g'`"

else
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }

	# No debugging information in optimized code

	CFLAGS="$CFLAGS -DNDEBUG"
	FFLAGS="$FFLAGS -DNDEBUG"
	CXXFLAGS="$CXXFLAGS -DNDEBUG"
fi

# Hardware-independant optimization
# ---------------------------------

if test "$enable_debug" != yes -a "$enable_optim" != no;
then
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -O3" >&5
printf %s "checking whether the C compiler accepts -O3... " >&6; }
	check_save_flags="$CFLAGS"
	ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

	CFLAGS="$CFLAGS -O3"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		CFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler accepts -O3" >&5
printf %s "checking whether the C++ compiler accepts -O3... " >&6; }
	check_save_flags="$CXXFLAGS"
	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

	CXXFLAGS="$CXXFLAGS -O3"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		CXXFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the Fortran 77 compiler accepts -O3" >&5
printf %s "checking whether the Fortran 77 compiler accepts -O3... " >&6; }
	check_save_flags="$FFLAGS"
	ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

	FFLAGS="$FFLAGS -O3"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat > conftest.$ac_ext <<_ACEOF
       program x
       end
_ACEOF
if ac_fn_f77_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		FFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


fi

# Check whether --enable-generic was given.
if test ${enable_generic+y}
then :
  enableval=$enable_generic;
fi


# FFCS: remove "-mcpu=common" to allow other hardware-dependant values of cpu for PowerPC - thank you Fred (20/02/11)
# FH
    # Generic code
if test  "$enable_generic" = yes
    then
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -mtune=generic" >&5
printf %s "checking whether the C compiler accepts -mtune=generic... " >&6; }
	check_save_flags="$CFLAGS"
	ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

	CFLAGS="$CFLAGS -mtune=generic"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		CFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler accepts -mtune=generic" >&5
printf %s "checking whether the C++ compiler accepts -mtune=generic... " >&6; }
	check_save_flags="$CXXFLAGS"
	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

	CXXFLAGS="$CXXFLAGS -mtune=generic"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		CXXFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the Fortran 77 compiler accepts -mtune=generic" >&5
printf %s "checking whether the Fortran 77 compiler accepts -mtune=generic... " >&6; }
	check_save_flags="$FFLAGS"
	ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

	FFLAGS="$FFLAGS -mtune=generic"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat > conftest.$ac_ext <<_ACEOF
       program x
       end
_ACEOF
if ac_fn_f77_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		FFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


fi


# Hardware-dependant optimization
# -------------------------------

if test "$enable_debug" != yes \
    -a "$enable_optim" != no \
    -a "$enable_generic" != yes
then

# Autoconf always chooses -O2. -O2 in gcc makes some functions
# disappear. This is not ideal for debugging. And when we optimize, we
# do not use -O2 anyway.

CFLAGS="`echo $CFLAGS | sed 's/-O2//g'`"
FFLAGS="`echo $FFLAGS | sed 's/-O2//g'`"
CXXFLAGS="`echo $CXXFLAGS | sed 's/-O2//g'`"

	    if test `grep -e '^flags.*mmx' /proc/cpuinfo|wc -l` -gt 0
		then
		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -mmmx" >&5
printf %s "checking whether the C compiler accepts -mmmx... " >&6; }
	check_save_flags="$CFLAGS"
	ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

	CFLAGS="$CFLAGS -mmmx"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		CFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler accepts -mmmx" >&5
printf %s "checking whether the C++ compiler accepts -mmmx... " >&6; }
	check_save_flags="$CXXFLAGS"
	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

	CXXFLAGS="$CXXFLAGS -mmmx"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		CXXFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the Fortran 77 compiler accepts -mmmx" >&5
printf %s "checking whether the Fortran 77 compiler accepts -mmmx... " >&6; }
	check_save_flags="$FFLAGS"
	ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

	FFLAGS="$FFLAGS -mmmx"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat > conftest.$ac_ext <<_ACEOF
       program x
       end
_ACEOF
if ac_fn_f77_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		FFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


	    fi
	    if test `grep -e '^flags.*avx2' /proc/cpuinfo|wc -l` -gt 0
		then
		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -mavx2" >&5
printf %s "checking whether the C compiler accepts -mavx2... " >&6; }
	check_save_flags="$CFLAGS"
	ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

	CFLAGS="$CFLAGS -mavx2"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		CFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler accepts -mavx2" >&5
printf %s "checking whether the C++ compiler accepts -mavx2... " >&6; }
	check_save_flags="$CXXFLAGS"
	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

	CXXFLAGS="$CXXFLAGS -mavx2"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		CXXFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the Fortran 77 compiler accepts -mavx2" >&5
printf %s "checking whether the Fortran 77 compiler accepts -mavx2... " >&6; }
	check_save_flags="$FFLAGS"
	ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

	FFLAGS="$FFLAGS -mavx2"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat > conftest.$ac_ext <<_ACEOF
       program x
       end
_ACEOF
if ac_fn_f77_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		FFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


        fi
	    if test `grep -e '^flags.*avx\>' /proc/cpuinfo|wc -l` -gt 0
		then
		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -mavx" >&5
printf %s "checking whether the C compiler accepts -mavx... " >&6; }
	check_save_flags="$CFLAGS"
	ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

	CFLAGS="$CFLAGS -mavx"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		CFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler accepts -mavx" >&5
printf %s "checking whether the C++ compiler accepts -mavx... " >&6; }
	check_save_flags="$CXXFLAGS"
	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

	CXXFLAGS="$CXXFLAGS -mavx"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		CXXFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the Fortran 77 compiler accepts -mavx" >&5
printf %s "checking whether the Fortran 77 compiler accepts -mavx... " >&6; }
	check_save_flags="$FFLAGS"
	ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

	FFLAGS="$FFLAGS -mavx"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat > conftest.$ac_ext <<_ACEOF
       program x
       end
_ACEOF
if ac_fn_f77_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		FFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


        fi
	    if test `grep -e '^flags.*sse4_2' /proc/cpuinfo|wc -l` -gt 0
		then
		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -msse4.2" >&5
printf %s "checking whether the C compiler accepts -msse4.2... " >&6; }
	check_save_flags="$CFLAGS"
	ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

	CFLAGS="$CFLAGS -msse4.2"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		CFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler accepts -msse4.2" >&5
printf %s "checking whether the C++ compiler accepts -msse4.2... " >&6; }
	check_save_flags="$CXXFLAGS"
	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

	CXXFLAGS="$CXXFLAGS -msse4.2"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		CXXFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the Fortran 77 compiler accepts -msse4.2" >&5
printf %s "checking whether the Fortran 77 compiler accepts -msse4.2... " >&6; }
	check_save_flags="$FFLAGS"
	ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

	FFLAGS="$FFLAGS -msse4.2"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat > conftest.$ac_ext <<_ACEOF
       program x
       end
_ACEOF
if ac_fn_f77_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		FFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


	    fi
	    if test `grep -e '^flags.*sse2' /proc/cpuinfo|wc -l` -gt 0
	    then
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -msse2" >&5
printf %s "checking whether the C compiler accepts -msse2... " >&6; }
	check_save_flags="$CFLAGS"
	ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

	CFLAGS="$CFLAGS -msse2"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		CFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler accepts -msse2" >&5
printf %s "checking whether the C++ compiler accepts -msse2... " >&6; }
	check_save_flags="$CXXFLAGS"
	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

	CXXFLAGS="$CXXFLAGS -msse2"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		CXXFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the Fortran 77 compiler accepts -msse2" >&5
printf %s "checking whether the Fortran 77 compiler accepts -msse2... " >&6; }
	check_save_flags="$FFLAGS"
	ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

	FFLAGS="$FFLAGS -msse2"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat > conftest.$ac_ext <<_ACEOF
       program x
       end
_ACEOF
if ac_fn_f77_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		FFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


		fi
	    if test `grep -e '^flags.*sse\>' /proc/cpuinfo|wc -l` -gt 0
		then
		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -msse" >&5
printf %s "checking whether the C compiler accepts -msse... " >&6; }
	check_save_flags="$CFLAGS"
	ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

	CFLAGS="$CFLAGS -msse"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		CFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler accepts -msse" >&5
printf %s "checking whether the C++ compiler accepts -msse... " >&6; }
	check_save_flags="$CXXFLAGS"
	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

	CXXFLAGS="$CXXFLAGS -msse"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		CXXFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the Fortran 77 compiler accepts -msse" >&5
printf %s "checking whether the Fortran 77 compiler accepts -msse... " >&6; }
	check_save_flags="$FFLAGS"
	ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

	FFLAGS="$FFLAGS -msse"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat > conftest.$ac_ext <<_ACEOF
       program x
       end
_ACEOF
if ac_fn_f77_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		FFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


	    fi
fi

# Defines a variable containing the optimization type, to be used in
# binary archive names. It may be empty if only generic optimization
# is used.

OPTIM_TYPE=$ff_optim_type

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:      CXXFLAGS =   $CXXFLAGS  " >&5
printf "%s\n" "$as_me:      CXXFLAGS =   $CXXFLAGS  " >&6;}


# [[file:ax_lib_hdf5.m4]]
# ===========================================================================
#       https://www.gnu.org/software/autoconf-archive/ax_lib_hdf5.html
# ===========================================================================
#
# SYNOPSIS
#
#   AX_LIB_HDF5([serial/parallel])
#
# DESCRIPTION
#
#   This macro provides tests of the availability of HDF5 library.
#
#   The optional macro argument should be either 'serial' or 'parallel'. The
#   former only looks for serial HDF5 installations via h5cc. The latter
#   only looks for parallel HDF5 installations via h5pcc. If the optional
#   argument is omitted, serial installations will be preferred over
#   parallel ones.
#
#   The macro adds a --with-hdf5 option accepting one of three values:
#
#     no   - do not check for the HDF5 library.
#     yes  - do check for HDF5 library in standard locations.
#     path - complete path to the HDF5 helper script h5cc or h5pcc.
#
#   If HDF5 is successfully found, this macro calls
#
#     AC_SUBST(HDF5_VERSION)
#     AC_SUBST(HDF5_CC)
#     AC_SUBST(HDF5_CFLAGS)
#     AC_SUBST(HDF5_CPPFLAGS)
#     AC_SUBST(HDF5_LDFLAGS)
#     AC_SUBST(HDF5_LIBS)
#     AC_SUBST(HDF5_FC)
#     AC_SUBST(HDF5_FFLAGS)
#     AC_SUBST(HDF5_FLIBS)
#     AC_SUBST(HDF5_TYPE)
#     AC_DEFINE(HAVE_HDF5)
#
#   and sets with_hdf5="yes".  Additionally, the macro sets
#   with_hdf5_fortran="yes" if a matching Fortran wrapper script is found.
#   Note that Autoconf's Fortran support is not used to perform this check.
#   H5CC and H5FC will contain the appropriate serial or parallel HDF5
#   wrapper script locations.
#
#   If HDF5 is disabled or not found, this macros sets with_hdf5="no" and
#   with_hdf5_fortran="no".
#
#   Your configuration script can test $with_hdf to take any further
#   actions. HDF5_{C,CPP,LD}FLAGS may be used when building with C or C++.
#   HDF5_F{FLAGS,LIBS} should be used when building Fortran applications.
#
#   To use the macro, one would code one of the following in "configure.ac"
#   before AC_OUTPUT:
#
#     1) dnl Check for HDF5 support
#        AX_LIB_HDF5()
#
#     2) dnl Check for serial HDF5 support
#        AX_LIB_HDF5([serial])
#
#     3) dnl Check for parallel HDF5 support
#        AX_LIB_HDF5([parallel])
#
#   One could test $with_hdf5 for the outcome or display it as follows
#
#     echo "HDF5 support:  $with_hdf5"
#
#   You could also for example, override the default CC in "configure.ac" to
#   enforce compilation with the compiler that HDF5 uses:
#
#     AX_LIB_HDF5([parallel])
#     if test "$with_hdf5" = "yes"; then
#             CC="$HDF5_CC"
#     else
#             AC_MSG_ERROR([Unable to find HDF5, we need parallel HDF5.])
#     fi
#
#   The HDF5_TYPE environment variable returns "parallel" or "serial",
#   depending on which type of library is found.
#
# LICENSE
#
#   Copyright (c) 2009 Timothy Brown <tbrown@freeshell.org>
#   Copyright (c) 2010 Rhys Ulerich <rhys.ulerich@gmail.com>
#
#   Copying and distribution of this file, with or without modification, are
#   permitted in any medium without royalty provided the copyright notice
#   and this notice are preserved. This file is offered as-is, without any
#   warranty.

#serial 20




# [[file:ax_lib_gsl.m4]]
# Configure path for the GNU Scientific Library
# Christopher R. Gabriel <cgabriel@linux.it>, April 2000




# This is what autoupdate's m4 run will expand.  It fires the warning
# (with _au_warn_XXX), outputs it into the updated configure.ac (with
# m4_warn), and then outputs the replacement expansion.  We need extra
# quotation around the m4_warn and dnl so they will be written
# unexpanded into the updated configure.ac.


# This is an auxiliary macro that is also run when
# autoupdate runs m4.  It simply calls m4_warning, but
# we need a wrapper so that each warning is emitted only
# once.  We break the quoting in m4_warning's argument in
# order to expand this macro's arguments, not AU_DEFUN's.


# Finally, this is the expansion that is picked up by
# autoconf, causing NAME to expand to NEW-CODE, plus
# (if SILENT is not "silent") a m4_warning telling the
# maintainer to run autoupdate.  We don't issue MESSAGE
# from autoconf, because that's instructions for what
# to do *after* running autoupdate.



# Checking c++11 for HashMatix (Madatory now)
# F.Hecht:
# do not compile all with c++11 version to much
# probleme to day (frev 2015) with g++ 4.8.1
ff_cxx_save=$CXXFLAGS
##  for  bem.cpp  need c++14 for intel compiler
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler accepts -std=gnu++14" >&5
printf %s "checking whether the C++ compiler accepts -std=gnu++14... " >&6; }
	check_save_flags="$CXXFLAGS"
	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

	CXXFLAGS="$CXXFLAGS -std=gnu++14"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		CXXFLAGS="$check_save_flags"
	fi
	if test -n "ff_cxx11" ;
         then
	        ff_cxx11="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


if test "$ff_cxx11" = yes ; then
   CXX11FLAGS="-std=gnu++14";

    if test -z "$ff_where_lib_conf_cxx11"  ; then
	    echo "cxx11 LD $CXX11FLAGS"  >>$ff_where_lib_conf
	    test -n "$CXX11FLAGS" && echo "cxx11 INCLUDE $CXX11FLAGS "  >>$ff_where_lib_conf
            ff_where_lib_conf_cxx11=1
	    ff_where_lib_cxx11="$CXX11FLAGS"
	    ff_where_inc_cxx11="$CXX11FLAGS"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add cxx11 : $CXX11FLAGS ;  $CXX11FLAGS in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add cxx11 : $CXX11FLAGS ;  $CXX11FLAGS in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add cxx11 : $CXX11FLAGS $CXX11FLAGS in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add cxx11 : $CXX11FLAGS $CXX11FLAGS in  $ff_where_lib_conf \"" >&6;}
        fi

else
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler accepts -std=c++14" >&5
printf %s "checking whether the C++ compiler accepts -std=c++14... " >&6; }
	check_save_flags="$CXXFLAGS"
	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

	CXXFLAGS="$CXXFLAGS -std=c++14"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		CXXFLAGS="$check_save_flags"
	fi
	if test -n "ff_cxx11" ;
         then
	        ff_cxx11="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


   if test "$ff_cxx11" = yes ; then
      CXX11FLAGS="-std=c++14";

    if test -z "$ff_where_lib_conf_cxx11"  ; then
	    echo "cxx11 LD $CXX11FLAGS"  >>$ff_where_lib_conf
	    test -n "$CXX11FLAGS" && echo "cxx11 INCLUDE $CXX11FLAGS "  >>$ff_where_lib_conf
            ff_where_lib_conf_cxx11=1
	    ff_where_lib_cxx11="$CXX11FLAGS"
	    ff_where_inc_cxx11="$CXX11FLAGS"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add cxx11 : $CXX11FLAGS ;  $CXX11FLAGS in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add cxx11 : $CXX11FLAGS ;  $CXX11FLAGS in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add cxx11 : $CXX11FLAGS $CXX11FLAGS in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add cxx11 : $CXX11FLAGS $CXX11FLAGS in  $ff_where_lib_conf \"" >&6;}
        fi

   else
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler accepts -std=c++11" >&5
printf %s "checking whether the C++ compiler accepts -std=c++11... " >&6; }
	check_save_flags="$CXXFLAGS"
	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

	CXXFLAGS="$CXXFLAGS -std=c++11"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		CXXFLAGS="$check_save_flags"
	fi
	if test -n "ff_cxx11" ;
         then
	        ff_cxx11="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


      if test "$ff_cxx11" = yes ; then
         CXX11FLAGS="-std=c++11";

    if test -z "$ff_where_lib_conf_cxx11"  ; then
	    echo "cxx11 LD $CXX11FLAGS"  >>$ff_where_lib_conf
	    test -n "$CXX11FLAGS" && echo "cxx11 INCLUDE $CXX11FLAGS "  >>$ff_where_lib_conf
            ff_where_lib_conf_cxx11=1
	    ff_where_lib_cxx11="$CXX11FLAGS"
	    ff_where_inc_cxx11="$CXX11FLAGS"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add cxx11 : $CXX11FLAGS ;  $CXX11FLAGS in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add cxx11 : $CXX11FLAGS ;  $CXX11FLAGS in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add cxx11 : $CXX11FLAGS $CXX11FLAGS in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add cxx11 : $CXX11FLAGS $CXX11FLAGS in  $ff_where_lib_conf \"" >&6;}
        fi

      else
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  fatal error : c++ compiler !  " >&5
printf "%s\n" "$as_me:  fatal error : c++ compiler !  " >&6;};
        as_fn_error $? " Sorry no c++ compiler !" "$LINENO" 5
        as_fn_error 1 " Fatal error no  c++11 or  c++14  " "$LINENO" 5;
      fi
   fi
fi
##CXXFLAGS="$ff_cxx_save"
WITH_CXX11=$ff_cxx11

CXX11FLAGS=$CXX11FLAGS

#end Checking  c++11
# ------------------------------
# compilation flags of FreeFem++
# ------------------------------
#  -DDRAWING  bamg active some drawing facility in bamg (inquire mesh)
#  -DBAMG_LONG_LONG active the use of  long long in bamg
#  -DDEBUG active the  checking in bamg
#  -DNCHECKPTR remove check pointer facility
#  -DCHECK_KN active subscripting of some array
#  -DWITHCHECK of the dynamic type ckecking of the langague (very slow)
#  -DEIGENVALUE  to compile the eigen value part
#  ------------------------------------------------

# FreeFrem++-specific optimizations -fpascal-strings


if test "$enable_debug" = yes;
then
	CXXFLAGS="$CXXFLAGS  -DBAMG_LONG_LONG -DCHECK_KN"
	if test "$ff_mac" = yes;
	then
		CXXFLAGS="$CXXFLAGS -fno-inline  -fexceptions"
	fi
else
	CXXFLAGS="$CXXFLAGS -DBAMG_LONG_LONG  -DNCHECKPTR"
	if test "$ff_mac" = yes;
	then
		CXXFLAGS="$CXXFLAGS "
	fi
fi

#whether or not to add a suffix to the package name
#--------------------------------------------------


# Check whether --with-suffix was given.
if test ${with_suffix+y}
then :
  withval=$with_suffix;
fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking suffix to add to package name" >&5
printf %s "checking suffix to add to package name... " >&6; }
ff_suffix=
if test "$with_suffix" = yes -o "$with_suffix" = no -o "$with_suffix" = ""
then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
printf "%s\n" "none" >&6; }
else
  ff_suffix="-$with_suffix"
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_suffix" >&5
printf "%s\n" "$ff_suffix" >&6; }
fi
ADD_PACKAGE_NAME=$ff_suffix





# Checking that OpenGL is accessible
# ----------------------------------

ff_gl_ok=no
ff_glx_ok=no

ff_libs="$LIBS"

# Check whether --with-flib was given.
if test ${with_flib+y}
then :
  withval=$with_flib;
fi

# Check whether --enable-opengl was given.
if test ${enable_opengl+y}
then :
  enableval=$enable_opengl;
fi


# echo "  .... LIBS = $LIBS .... "
if test x$enable_opengl != xno; then
# GL libraries seem to depend on some dlopen capabilities
if test "$enable_static" != yes -a "$ff_glut_ok" != yes
then
	# If we cannot find gl.h, no OpenGL version can be produced
           for ac_header in OpenGL/gl.h
do :
  ac_fn_cxx_check_header_compile "$LINENO" "OpenGL/gl.h" "ac_cv_header_OpenGL_gl_h" "$ac_includes_default"
if test "x$ac_cv_header_OpenGL_gl_h" = xyes
then :
  printf "%s\n" "#define HAVE_OPENGL_GL_H 1" >>confdefs.h
 ff_gl_ok=yes

else $as_nop
  ff_gl_ok=no

fi

done


    if test "$ff_gl_ok" = no
    then
	       for ac_header in GL/gl.h
do :
  ac_fn_cxx_check_header_compile "$LINENO" "GL/gl.h" "ac_cv_header_GL_gl_h" "$ac_includes_default"
if test "x$ac_cv_header_GL_gl_h" = xyes
then :
  printf "%s\n" "#define HAVE_GL_GL_H 1" >>confdefs.h
 ff_gl_ok=yes

else $as_nop
  ff_gl_ok=no

fi

done
    fi
           for ac_header in GLUT/glut.h
do :
  ac_fn_cxx_check_header_compile "$LINENO" "GLUT/glut.h" "ac_cv_header_GLUT_glut_h" "$ac_includes_default"
if test "x$ac_cv_header_GLUT_glut_h" = xyes
then :
  printf "%s\n" "#define HAVE_GLUT_GLUT_H 1" >>confdefs.h
 ff_glut_ok=yes
else $as_nop
  ff_glut_ok=no
fi

done

    if test "$ff_glut_ok" = no
    then
	       for ac_header in GL/glut.h
do :
  ac_fn_cxx_check_header_compile "$LINENO" "GL/glut.h" "ac_cv_header_GL_glut_h" "$ac_includes_default"
if test "x$ac_cv_header_GL_glut_h" = xyes
then :
  printf "%s\n" "#define HAVE_GL_GLUT_H 1" >>confdefs.h
 ff_glut_ok=yes
else $as_nop
  ff_glut_ok=no
fi

done
    fi

# GLUT .....
    if test "$ff_glut_ok" =	yes
    then
	for glut in \
	    "-framework GLUT -framework OpenGL -framework Cocoa" \
	    "-lglut -lGLU -lGL"
	do
	    ff_glut="$glut"
	    ff_libs1="$LIBS"
     	    LIBS="$LIBS $ff_glut"
	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

namespace conftest {
  extern "C" int glutInit ();
}
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
return conftest::glutInit ();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_glut_ok=yes
	        LIBS="$ff_libs1"
		break
else $as_nop
  ff_glut_ok=next
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext;
	    LIBS="$ff_libs1"
	done
    fi


fi
fi
LIBSPTHREAD=$ff_pthread

FF_ZLIB=$ff_zlib

# ALH - 16/9/13 - at the moment the requirements for medit (glut) are not compatible with FFCS so medit is
# only compiled with FF.

if test $enable_ffcs = no
then
    if test "$ff_glut_ok" = yes
    then
	LIBSGLUT=$ff_glut

	if test -n  "$ff_pthread" ; then
	    ff_ffglutprog="ffglut${EXEEXT}"

printf "%s\n" "#define PROG_FFGLUT \"$ff_ffglutprog\"" >>confdefs.h

	fi
	ff_meditprog="ffmedit${EXEEXT}"
    fi
fi


# Check whether --with-suffix was given.
if test ${with_suffix+y}
then :
  withval=$with_suffix;
fi

if test "$with_suffix" = yes
then
  with_suffix=""
elif test "$with_suffix" = no -o -z "$with_suffix"
then
  with_suffix=""
else
  with_suffix="-$with_suffix"
fi
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking add suffix $with_suffix " >&5
printf %s "checking add suffix $with_suffix ... " >&6; }
  ADD_PACKAGE_NAME=$with_suffix

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }


# Checking wether we can produce a parallel version
# -------------------------------------------------

if test $enable_ffcs = no
then
    # FF case  conf with PETSC or after
    ff_mpi=no
else
    # FFCS - use the same MPI configuration choices as FFCS
    if test -z "$MPICXX"
    then
	ff_mpi=no
    else
	ff_mpi=yes
	MPICXX=$MPICXX

	MPICC=$MPICC

	MPIFC=$MPIFC

	MPIPROG="FreeFem++-mpi${EXEEXT}"

	MPI_INCLUDE="-I $MPI_INC_DIR"

	MPI_INC_DIR=$MPI_INC_DIR

	MPI_LIB_DIRS=""

	MPI_LIB=$MPI_LIB

	MPI_LIBC=""

	MPI_LIBFC=""


        # these values should not be empty otherwise
        # plugin/seq/ff-get-dep will think that they are not
        # defined

    if test -z "$ff_where_lib_conf_mpi"  ; then
	    echo "mpi LD -DDUMMY"  >>$ff_where_lib_conf
	    test -n "-I$MPI_INC_DIR" && echo "mpi INCLUDE -I$MPI_INC_DIR "  >>$ff_where_lib_conf
            ff_where_lib_conf_mpi=1
	    ff_where_lib_mpi="-DDUMMY"
	    ff_where_inc_mpi="-I$MPI_INC_DIR"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add mpi : -DDUMMY ;  -I$MPI_INC_DIR in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add mpi : -DDUMMY ;  -I$MPI_INC_DIR in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add mpi : -DDUMMY -I$MPI_INC_DIR in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add mpi : -DDUMMY -I$MPI_INC_DIR in  $ff_where_lib_conf \"" >&6;}
        fi


        # mpifc and mpif77 libraries should always be specified
        # because FF never calls the Fortran MPI compiler. It always
        # uses mpicxx in [[file:plugin/seq/ff-c++]]. The
        # resulting Fortran libraries (eg Mumps) would compile even
        # without the proper Fortran libs, but they would not load
        # properly.

        # under Win32, libmpi_f77.a is not the right name and FFCS
        # mingw/mpicxx adds the right libraries by itself

        # With mpich2 Debian wheezy 32 bits, libmpi_f77.a is not available (request from Cico, 14/10/13)

	if test -f /usr/lib/openmpi/lib/libmpi_f77.a
	then

    if test -z "$ff_where_lib_conf_mpifc"  ; then
	    echo "mpifc LD -lmpi_f77"  >>$ff_where_lib_conf
	    test -n "" && echo "mpifc INCLUDE  "  >>$ff_where_lib_conf
            ff_where_lib_conf_mpifc=1
	    ff_where_lib_mpifc="-lmpi_f77"
	    ff_where_inc_mpifc=""
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add mpifc : -lmpi_f77 ;   in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add mpifc : -lmpi_f77 ;   in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add mpifc : -lmpi_f77  in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add mpifc : -lmpi_f77  in  $ff_where_lib_conf \"" >&6;}
        fi


    if test -z "$ff_where_lib_conf_mpif77"  ; then
	    echo "mpif77 LD -lmpi_f77"  >>$ff_where_lib_conf
	    test -n "" && echo "mpif77 INCLUDE  "  >>$ff_where_lib_conf
            ff_where_lib_conf_mpif77=1
	    ff_where_lib_mpif77="-lmpi_f77"
	    ff_where_inc_mpif77=""
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add mpif77 : -lmpi_f77 ;   in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add mpif77 : -lmpi_f77 ;   in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add mpif77 : -lmpi_f77  in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add mpif77 : -lmpi_f77  in  $ff_where_lib_conf \"" >&6;}
        fi

	else

    if test -z "$ff_where_lib_conf_mpifc"  ; then
	    echo "mpifc LD -DDUMMY"  >>$ff_where_lib_conf
	    test -n "" && echo "mpifc INCLUDE  "  >>$ff_where_lib_conf
            ff_where_lib_conf_mpifc=1
	    ff_where_lib_mpifc="-DDUMMY"
	    ff_where_inc_mpifc=""
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add mpifc : -DDUMMY ;   in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add mpifc : -DDUMMY ;   in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add mpifc : -DDUMMY  in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add mpifc : -DDUMMY  in  $ff_where_lib_conf \"" >&6;}
        fi


    if test -z "$ff_where_lib_conf_mpif77"  ; then
	    echo "mpif77 LD -DDUMMY"  >>$ff_where_lib_conf
	    test -n "" && echo "mpif77 INCLUDE  "  >>$ff_where_lib_conf
            ff_where_lib_conf_mpif77=1
	    ff_where_lib_mpif77="-DDUMMY"
	    ff_where_inc_mpif77=""
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add mpif77 : -DDUMMY ;   in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add mpif77 : -DDUMMY ;   in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add mpif77 : -DDUMMY  in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add mpif77 : -DDUMMY  in  $ff_where_lib_conf \"" >&6;}
        fi

	fi

        # FFCS - MPI_DOUBLE_COMPLEX kept from original FF configure script
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking MPI_DOUBLE_COMPLEX" >&5
printf %s "checking MPI_DOUBLE_COMPLEX... " >&6; }
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <mpi.h>
			MPI_Datatype xxxx=MPI_DOUBLE_COMPLEX;

_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
  ff_mpi_double_complex=yes
else $as_nop
  ff_mpi_double_complex=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_mpi_double_complex" >&5
printf "%s\n" "$ff_mpi_double_complex" >&6; }
	if test "$ff_mpi_double_complex" = yes  ; then

printf "%s\n" "#define HAVE_MPI_DOUBLE_COMPLEX 1" >>confdefs.h

	fi
    fi
fi

# Looking for useful configuration utilities
# ------------------------------------------

# Check whether --enable-summary was given.
if test ${enable_summary+y}
then :
  enableval=$enable_summary;
fi


# Check whether --enable-download was given.
if test ${enable_download+y}
then :
  enableval=$enable_download;
fi

## PETSc

# Check whether --with-petsc was given.
if test ${with_petsc+y}
then :
  withval=$with_petsc;
fi


# Check whether --with-prefix_petsc was given.
if test ${with_prefix_petsc+y}
then :
  withval=$with_prefix_petsc;
fi

if test -z "${prefix_petsc}"; then prefix_petsc="${prefix}/ff-petsc"; fi
FF_prefix_petsc="$prefix_petsc"

FF_prefix_petsc_real="$prefix_petsc_real"

FF_prefix_petsc_complex="$prefix_petsc_complex"

FF_generic_petsc="$enable_generic"

# /usr/local/petsc/conf/petscvariables
#/usr/local/ff++/petsc/lib/petsc/conf/petscvariables
ff_petsc_ok=no
ff_slepc_ok=no
if test "$with_petsc" != no; then
    for d in "$with_petsc" "${prefix_petsc}/r/lib" /usr/local/ff++/petsc/lib  /usr /usr/local /opt/usr  /opt/local /usr/lib/petsc ;do
	for dd in "" "/petsc/conf/petscvariables" "/lib/petsc/conf/petscvariables" ; do
	    ffconfpetsc="$d$dd"
		ffconfslepc="$d/slepc/conf/slepcvariables"

		# echo " petsc ... $ffconfpetsc"
	    if test -f "$ffconfpetsc" ; then
		if test  "$ff_petsc_ok" = no ; then
		    PETSC_PREFIXDIR=`awk -F' *= *' '"PREFIXDIR"==$1 {print $2}' "$ffconfpetsc"`
		    PETSC_SCALAR=`awk -F' *= *' '"PETSC_SCALAR"==$1 {print $2}' "$ffconfpetsc"`
		    PETSC_MPIRUN=`awk -F' *= *' '"MPIEXEC"==$1 {print $2}' "$ffconfpetsc"`
		    PETSC_MPIRUN=`echo "$PETSC_MPIRUN" | awk '{gsub(" --oversubscribe", ""); print}'`	#remove --oversubscribe
		    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  find real ( $PETSC_SCALAR )  petsc in $ffconfpetsc" >&5
printf "%s\n" "$as_me:  find real ( $PETSC_SCALAR )  petsc in $ffconfpetsc" >&6;};
            if test "$ff_mpi" != yes; then
		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:  choose MPI from petsc  : $PETSC_MPIRUN " >&5
printf "%s\n" "$as_me:  choose MPI from petsc  : $PETSC_MPIRUN " >&6;};
                MPIRUN=`echo $PETSC_MPIRUN`
                MPICC=`awk -F' *= *' '"CC"==$1 {print $2}' "$ffconfpetsc"`
                MPICXX=`awk -F' *= *' '"CXX"==$1 {print $2}' "$ffconfpetsc"`
                MPIFC=`awk -F' *= *' '"FC"==$1 {print $2}' "$ffconfpetsc"`
case $ff_uname in
CYGWIN*|MINGW*|MSYS_NT*)
                MPICC=$MPICC" "`awk -F' *= *' '"MPI_INCLUDE"==$1 {print $2}' "$ffconfpetsc"`
                MPICXX=$MPICXX" "`awk -F' *= *' '"MPI_INCLUDE"==$1 {print $2}' "$ffconfpetsc"`
                MPIFC=$MPIFC" "`awk -F' *= *' '"MPI_INCLUDE"==$1 {print $2}' "$ffconfpetsc"`
esac
                # Checking wether we can produce a parallel version
# -------------------------------------------------

ff_save_path="$PATH"
# We need to choose between mpich, openmpi  and lam for the Debian package

# Check whether --with-mpipath was given.
if test ${with_mpipath+y}
then :
  withval=$with_mpipath;
fi


# Check whether --with-mpilibs was given.
if test ${with_mpilibs+y}
then :
  withval=$with_mpilibs;
fi


# Check whether --with-mpilibsc was given.
if test ${with_mpilibsc+y}
then :
  withval=$with_mpilibsc;
fi


# Check whether --with-mpiinc was given.
if test ${with_mpiinc+y}
then :
  withval=$with_mpiinc;
fi


# Check whether --with-mpi was given.
if test ${with_mpi+y}
then :
  withval=$with_mpi;
fi

if test "$with_mpi" != no ; then
#if test "$with_mpi" != no ; then
#AX_MPI(with_mpi=yes, with_mpi=no)
#fi

# Default is mpic++
ff_mpi_suffix="";
if test "$with_mpi" = yes -o -z "$with_mpi"
then
   ff_mpicxx=mpic++
else
  case "$with_mpi" in
 lam|mpich|openmpi)   ff_mpi_suffix=.$with_mpi;ff_mpicxx=mpic++.$with_mpi;;
 *)  ff_mpicxx="$with_mpi" ;;
 esac
fi

if test -n "$with_mpiinc"  -a "$with_mpiinc" != no ; then
  if test  "$with_mpi" = 'no' ; then with_mpi='yes'; fi
  ff_MPI_INCLUDE="$with_mpiinc"
fi
if test -n "$with_mpilibs" -a "$with_mpilibs" != no ; then
    ff_MPI_LIB="$with_mpilibs"
    ff_MPI_LIBC="$with_mpilibs"
    ff_MPI_LIBFC="$with_mpilibs"
    MPICXX="$CXX $ff_MPI_INCLUDE"
    MPIFC="$FC  $ff_MPI_INCLUDE"
    MPICC="$CC  $ff_MPI_INCLUDE"
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:    ---  set  all MPI compile to compiler:   $MPICC, $MPIFC, $MPICC " >&5
printf "%s\n" "$as_me:    ---  set  all MPI compile to compiler:   $MPICC, $MPIFC, $MPICC " >&6;}
fi

if test -n "$with_mpilibsc" -a "$with_mpilibsc" != no ; then
 ff_MPI_LIBC="$with_mpilibsc"
fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPIRUN" >&5
printf %s "checking for MPIRUN... " >&6; }

if test -z "$MPIRUN" ; then
  if test -n "$MSMPI_BIN" -a -x "$MSMPI_BIN/mpiexec.exe" ;  then
     MPIRUN="$MSMPI_BIN"\mpiexec.exe
  else
    for ac_prog in mpiexec mpirun mpiexec.exe
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_MPIRUN+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case $MPIRUN in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_MPIRUN="$MPIRUN" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_MPIRUN="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
MPIRUN=$ac_cv_path_MPIRUN
if test -n "$MPIRUN"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIRUN" >&5
printf "%s\n" "$MPIRUN" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$MPIRUN" && break
done
test -n "$MPIRUN" || MPIRUN="no"

  fi
  if test "$MPIRUN" = no
    then
		 ff_mpi=no
	fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIRUN" >&5
printf "%s\n" "$MPIRUN" >&6; }
if test "ff_mpi" != "no" ; then
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPIRUN option: " >&5
printf %s "checking for MPIRUN option: ... " >&6; }
 ff_mpi_option=""
 ff_okkk=`"$MPIRUN"  -np 2 --oversubscribe echo ff__okkk 2>/dev/null| grep ff__okkk |wc -l`
 if test "$ff_okkk" -eq 2 ; then ff_mpi_option="--oversubscribe" ; fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_mpi_option" >&5
printf "%s\n" "$ff_mpi_option" >&6; }
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mpipath " >&5
printf %s "checking for mpipath ... " >&6; }

if test "$with_mpi" != no -a ! -d  "$with_mpipath" -a "$MPIRUN" != no ; then
#   if "$MPIRUN" != no ; tehn
    with_mpipath=`$as_dirname -- "$MPIRUN" ||
$as_expr X"$MPIRUN" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$MPIRUN" : 'X\(//\)[^/]' \| \
	 X"$MPIRUN" : 'X\(//\)$' \| \
	 X"$MPIRUN" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"$MPIRUN" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
    with_mpipath=`$as_dirname -- "$with_mpipath" ||
$as_expr X"$with_mpipath" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$with_mpipath" : 'X\(//\)[^/]' \| \
	 X"$with_mpipath" : 'X\(//\)$' \| \
	 X"$with_mpipath" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"$with_mpipath" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
#    echo " ***** with_mpipath $with_mpipath \n"

#    else
#    for i in '/c/Program Files (x86)/MPICH2' '/c/Program Files/MPICH2' 'c:\Program Files (x86)\MPICH2' 'c:\Program Files\MPICH2' ; do
#	test -d "$i" &&  with_mpipath="$i" && break
#    done
#    fi
fi
#echo "****  with_mpipath  '$with_mpipath' $MPIRUN *****"
case "$MPIRUN" in
 */sgi/mpt/*)
	ff_MPI_INCLUDE_DIR=
	ff_MPI_LIB_DIR=
        test -f "$with_mpipath/include/mpif.h" &&  ff_MPI_INCLUDE_DIR="$with_mpipath/include"
        test -f "$with_mpipath/lib/libmpi.so" &&  ff_MPI_LIB_DIR="$with_mpipath/lib"
        if test -n "$ff_MPI_INCLUDE_DIR" -a -n "$ff_MPI_LIB_DIR" ; then
            ff_MPI_INCLUDE="-I'$ff_MPI_INCLUDE_DIR' "
            with_mpiinc="$ff_MPI_INCLUDE"
            ff_MPI_LIBC="-L'$ff_MPI_LIB_DIR' -lmpi"
            ff_MPI_LIB="-L'$ff_MPI_LIB_DIR' -lmpi++ -lmpi"
            ff_MPI_LIBFC="-L'$ff_MPI_LIB_DIR'  -lmpi"
	    ff_mpitype=sgi
            test -z "$MPICXX" && MPICXX="$CXX $ff_MPI_INCLUDE"
            test -z "$MPIFC"  && MPIFC="$FC  $ff_MPI_INCLUDE"
            test -z "$MPICC"  && MPICC="$CC  $ff_MPI_INCLUDE"
#	    echo " *** MPI sgi ..... "
        fi
	;;
esac


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_mpi_path" >&5
printf "%s\n" "$ff_mpi_path" >&6; }






ff_save_cxx="$CXX"
ff_save_libs="$LIBS"


if test "$with_mpi" != no
then
	ff_mpi_path=`$as_dirname -- "$MPIRUN" ||
$as_expr X"$MPIRUN" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$MPIRUN" : 'X\(//\)[^/]' \| \
	 X"$MPIRUN" : 'X\(//\)$' \| \
	 X"$MPIRUN" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"$MPIRUN" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
		case "$ff_mpi_path" in
	    .|"") ff_mpi_path="$PATH";ff_defmpicxx="$ff_mpicxx";;
	    *) ff_mpi_path="$ff_mpi_path";ff_defmpicxx=`expr "//$ff_mpicxx" : '.*/\(.*\)'`;;
	    	esac

	if test -z "$MPICXX" ; then
	    for ac_prog in $ff_defmpicxx mpic++$ff_mpi_suffix mpicxx$ff_mpi_suffix mpiCC$ff_mpi_suffix mpCC hcp mpxlC mpxlC_r cmpic++
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_MPICXX+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case $MPICXX in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_MPICXX="$MPICXX" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $ff_mpi_path
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_MPICXX="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
MPICXX=$ac_cv_path_MPICXX
if test -n "$MPICXX"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPICXX" >&5
printf "%s\n" "$MPICXX" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$MPICXX" && break
done
test -n "$MPICXX" || MPICXX="no"

	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPICXX" >&5
printf %s "checking for MPICXX... " >&6; }
	fi
	ff_mpicxx="eval $MPICXX"
	CXX=$ff_mpicxx
	LIBS="$LIBS $ff_MPI_LIB"
	test -z "$ff_mpi" && ff_mpi=yes
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <mpi.h>
#include <stdio.h>
int main(int argc,char **argv){
  char name[BUFSIZ];
  int length;

  MPI_Init(&argc, &argv);
  MPI_Get_processor_name(name, &length);
  printf("%s: hello world\n", name);
  MPI_Finalize();
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_mpi=yes
else $as_nop
  ff_mpi=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_mpi" >&5
printf "%s\n" "$ff_mpi" >&6; }

	# Also check that mpirun is there. If it isn't, then MPI is
	# not fully installed.


	if test "$ff_mpi" = yes;
	then

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking MPI_DOUBLE_COMPLEX" >&5
printf %s "checking MPI_DOUBLE_COMPLEX... " >&6; }

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <mpi.h>
MPI_Datatype xxxx=MPI_DOUBLE_COMPLEX;

_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
  ff_mpi_double_complex=yes
else $as_nop
  ff_mpi_double_complex=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_mpi_double_complex" >&5
printf "%s\n" "$ff_mpi_double_complex" >&6; }
if test "$ff_mpi_double_complex" = yes  ; then

printf "%s\n" "#define HAVE_MPI_DOUBLE_COMPLEX 1" >>confdefs.h

fi


	  echo "MPI CC $ff_mpi" >config_LIB_INFO

		# We do not AC_DEFINE any special flag for parallel
		# computation here, because it must only be set when the
 		# parallel program is compiled (see src/mpi/Makfile.am)
		ff_mpiprog="FreeFem++-mpi${EXEEXT}"
   		  MPIPROG="$ff_mpiprog"

   		  MPISCRIPT="ff-mpirun"

   		  MPIRUN="$MPIRUN"

                  MPICXX=$MPICXX

	else
	        MPICXX=$ff_save_cxx

	fi

	if test "$ff_mpi" = yes;
	then
	  if test "$enable_fortran" != no
	  then


	      if test -z "$MPIFC" ; then
		  for ac_prog in mpif90$ff_mpi_suffix mpxlf95_r mpxlf90_r mpxlf95 mpxlf90 mpf90 cmpif90c
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_MPIFC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case $MPIFC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_MPIFC="$MPIFC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $ff_mpi_path
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_MPIFC="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
MPIFC=$ac_cv_path_MPIFC
if test -n "$MPIFC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIFC" >&5
printf "%s\n" "$MPIFC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$MPIFC" && break
done
test -n "$MPIFC" || MPIFC=""""

	      fi

	  fi

#	echo " ********************ffmpi= '$ff_mpi' *************   "
	ff_MPI_INCLUDE="$with_mpiinc"
	if test -z "$ff_mpitype" ; then
           test -n "$MPICXX" && ff_mpishow=`$MPICXX -show` 2>/dev/null
           test -n "$MPICC" && ff_mpicshow=`$MPICC -show` 2>/dev/null
           test -n "$MPIFC" && ff_mpifcshow=`$MPIFC -show` 2>/dev/null
	   if test "$with_mpiinc" = no -o -z "$with_mpiinc" ; then
	      ff_MPI_INCLUDE=`echo $ff_mpishow|tr ' ' '\n' | sed '1 d'| grep -E '^[-/][^WLlOgpf]|^-Wp,'|tr '\n' ' '`
	      ff_mpi_idir=`echo $ff_mpishow|tr ' ' '\n'| grep -E '^-I'|sed s/^-I//|tr '\n' ' '`' /usr/include'
	    else
	      ff_mpi_idir=`echo $ff_MPI_INCLUDE|tr ' ' '\n'| grep -E '^-I'|sed s/^-I//|tr '\n' ' '`' /usr/include'
	    fi
	    if test "$with_mpilibs" = no -o -z "$with_mpilibs" ; then
		ff_MPI_LIB_DIRS=""
		ff_MPI_LIB=`echo $ff_mpishow|tr ' ' '\n'| grep -E '^-[Llp]|^-Wl,'|tr '\n' ' '`
		ff_MPI_LIBC=`echo $ff_mpicshow|tr ' ' '\n'| grep -E '^-[Llp]|^-Wl,'|tr '\n' ' '`
		ff_MPI_LIBFC=`echo $ff_mpifcshow|tr ' ' '\n'| grep -E '^-[Llp]|^-Wl,'|grep -v 'commons,use_dylibs' |tr '\n' ' '`
            else
	      ff_MPI_LIB="$with_mpilibs"
	      ff_MPI_LIBC="$with_mpilibs"
	      ff_MPI_LIBFC="$with_mpilibs"
	    fi
	    ff_mpi_ldir=`echo $ff_MPI_LIB|tr ' ' '\n'| grep -E '^-[Llp]|^-Wl,'|sed -e 's/^-[Llp]//' -e 's/^-Wl,//'  |tr '\n' ' '`' /usr/lib']

	    if  test -z "$ff_MPI_INCLUDE_DIR" ; then
		for i in $ff_mpi_idir; do
		    if test -f "$i/mpi.h" -a -z "$ff_MPI_INCLUDE_DIR"  ;then
			ff_MPI_INCLUDE_DIR=$i
		    fi
		done
	    fi
	    for i in $ff_mpi_ldir; do
	      if test -d $i ; then
		ff_tmp=`ls $i/libmpi.*|head -1`
		if test  -f "$ff_tmp"  -a -z "$ff_MPI_LIB_DIRS"  ;then
		    ff_MPI_LIB_DIRS=$i
		fi
	      fi
	    done
	fi
	MPICXX=$MPICXX


	if test -z "$MPICC" ; then
	    for ac_prog in mpicc$ff_mpi_suffix hcc mpcc mpcc_r mpxlc cmpicc
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_MPICC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case $MPICC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_MPICC="$MPICC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $ff_mpi_path
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_MPICC="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
MPICC=$ac_cv_path_MPICC
if test -n "$MPICC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPICC" >&5
printf "%s\n" "$MPICC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$MPICC" && break
done
test -n "$MPICC" || MPICC=""""

	fi
	MPICC=$MPICC


	if test ! -f "$ff_MPI_INCLUDE_DIR/mpif.h"  ; then
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  MPI without fortran no file \"$ff_MPI_INCLUDE_DIR/mpif.h\"  " >&5
printf "%s\n" "$as_me:  MPI without fortran no file \"$ff_MPI_INCLUDE_DIR/mpif.h\"  " >&6;}
	else
	    if test -n "$MPIFC" ; then

    if test -z "$ff_where_lib_conf_mpifc"  ; then
	    echo "mpifc LD $ff_MPI_LIBFC"  >>$ff_where_lib_conf
	    test -n "$ff_MPI_INCLUDE" && echo "mpifc INCLUDE $ff_MPI_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_mpifc=1
	    ff_where_lib_mpifc="$ff_MPI_LIBFC"
	    ff_where_inc_mpifc="$ff_MPI_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add mpifc : $ff_MPI_LIBFC ;  $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add mpifc : $ff_MPI_LIBFC ;  $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add mpifc : $ff_MPI_LIBFC $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add mpifc : $ff_MPI_LIBFC $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi


    if test -z "$ff_where_lib_conf_mpif77"  ; then
	    echo "mpif77 LD $ff_MPI_LIBFC"  >>$ff_where_lib_conf
	    test -n "$ff_MPI_INCLUDE" && echo "mpif77 INCLUDE $ff_MPI_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_mpif77=1
	    ff_where_lib_mpif77="$ff_MPI_LIBFC"
	    ff_where_inc_mpif77="$ff_MPI_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add mpif77 : $ff_MPI_LIBFC ;  $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add mpif77 : $ff_MPI_LIBFC ;  $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add mpif77 : $ff_MPI_LIBFC $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add mpif77 : $ff_MPI_LIBFC $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

	    fi
  	fi
	if test -n "$MPICXX" ; then

    if test -z "$ff_where_lib_conf_mpi"  ; then
	    echo "mpi LD $ff_MPI_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_MPI_INCLUDE" && echo "mpi INCLUDE $ff_MPI_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_mpi=1
	    ff_where_lib_mpi="$ff_MPI_LIB"
	    ff_where_inc_mpi="$ff_MPI_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add mpi : $ff_MPI_LIB ;  $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add mpi : $ff_MPI_LIB ;  $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add mpi : $ff_MPI_LIB $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add mpi : $ff_MPI_LIB $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

	fi
	MPI_INC_DIR=$ff_MPI_INCLUDE_DIR

	MPI_INCLUDE=$ff_MPI_INCLUDE

	MPI_LIB_DIRS=$ff_MPI_LIB_DIRS

	MPI_LIB=$ff_MPI_LIB

	MPI_LIBC=$ff_MPI_LIBC

	MPI_LIBFC=$ff_MPI_LIBFC

	MPI_RUN_OPTION=$ff_mpi_option

        SKIP_TESTS_MPI="no"

	fi
	CXX="$ff_save_cxx"
	LIBS="$ff_save_libs"
fi
fi
##  clean on MPI variable if not MPI ...
if test "$ff_mpi" != yes ; then

	  MPIRUN=""

	  MPICC=""

	  MPICXX=""

	  MPIFC=""

	  MPI_INCLUDE=""

	  MPI_LIB_DIRS=""

	  MPI_LIB=""

	  MPI_LIBC=""

	  MPI_LIBFC=""

          SKIP_TESTS_MPI="yes"

	  ff_mpi=no
fi

# Local Variables:
# mode:shell-script
# ispell-local-dictionary:"british"
# coding:utf-8
# End:

            fi
            if test "$ff_mpi" = yes; then
                    WPETSC_MPIRUN=`which "$PETSC_MPIRUN"`
                    WMPIRUN=`which "$MPIRUN"`
		    test  "$PETSC_SCALAR" = "real" && test "$ff_win32" = yes -o  "$PETSC_MPIRUN" = "$MPIRUN" ||  cmp -s "$WPETSC_MPIRUN" "$WMPIRUN"
		    if test "$?"  -eq 0 ; then
	                FF_conf_petsc_real="$ffconfpetsc"

		        FF_prefix_petsc_real="$PETSC_PREFIXDIR"

		        # PETSC_WITH_EXTERNAL_LIB,PETSC_CC_INCLUDES

	    ff_PETSC_EXTERNAL_LIB_BASIC=`awk -F'=' '"PETSC_EXTERNAL_LIB_BASIC "==$1 {print $2}' $ffconfpetsc`
	    ff_PETSC_LIB_BASIC=`awk -F'=' '"PETSC_LIB_BASIC "==$1 {print $2}' $ffconfpetsc`
	    ff_PETSC_PREFIXDIR=`awk -F' ' '"PREFIXDIR"==$1 {print $3}' $ffconfpetsc`
	    ff_PETSC_WITH_EXTERNAL_LIB="-Wl,-rpath,$ff_PETSC_PREFIXDIR/lib -L$ff_PETSC_PREFIXDIR/lib $ff_PETSC_LIB_BASIC $ff_PETSC_EXTERNAL_LIB_BASIC"
	    ff_PETSC_CC_INCLUDES=`awk -F'=' '"PETSC_CC_INCLUDES "==$1 {print $2}' $ffconfpetsc`
	   if test -n "$ff_PETSC_WITH_EXTERNAL_LIB"; then
			    ff_petsc_ok=yes;

    if test -z "$ff_where_lib_conf_petsc"  ; then
	    echo "petsc LD $ff_PETSC_WITH_EXTERNAL_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_PETSC_CC_INCLUDES" && echo "petsc INCLUDE $ff_PETSC_CC_INCLUDES "  >>$ff_where_lib_conf
            ff_where_lib_conf_petsc=1
	    ff_where_lib_petsc="$ff_PETSC_WITH_EXTERNAL_LIB"
	    ff_where_inc_petsc="$ff_PETSC_CC_INCLUDES"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add petsc : $ff_PETSC_WITH_EXTERNAL_LIB ;  $ff_PETSC_CC_INCLUDES in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add petsc : $ff_PETSC_WITH_EXTERNAL_LIB ;  $ff_PETSC_CC_INCLUDES in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add petsc : $ff_PETSC_WITH_EXTERNAL_LIB $ff_PETSC_CC_INCLUDES in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add petsc : $ff_PETSC_WITH_EXTERNAL_LIB $ff_PETSC_CC_INCLUDES in  $ff_where_lib_conf \"" >&6;}
        fi

			    TOOL_COMPILE_petsc=""

	  fi



	    ff_PARMETIS_LIB=`awk -F'=' '"PARMETIS_LIB "==$1 {print $2}' $ffconfpetsc`
	    ff_PARMETIS_INCLUDE=`awk -F'=' '"PARMETIS_INCLUDE "==$1 {print $2}' $ffconfpetsc`
	   if test -n "$ff_PARMETIS_LIB"; then
			    ff_parmetis_ok=yes;


    if test -z "$ff_where_lib_conf_parmetis"  ; then
	    echo "parmetis LD $ff_PARMETIS_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_PARMETIS_INCLUDE" && echo "parmetis INCLUDE $ff_PARMETIS_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_parmetis=1
	    ff_where_lib_parmetis="$ff_PARMETIS_LIB"
	    ff_where_inc_parmetis="$ff_PARMETIS_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add parmetis : $ff_PARMETIS_LIB ;  $ff_PARMETIS_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add parmetis : $ff_PARMETIS_LIB ;  $ff_PARMETIS_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add parmetis : $ff_PARMETIS_LIB $ff_PARMETIS_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add parmetis : $ff_PARMETIS_LIB $ff_PARMETIS_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

			    TOOL_COMPILE_parmetis=""

	  fi



	    ff_METIS_LIB=`awk -F'=' '"METIS_LIB "==$1 {print $2}' $ffconfpetsc`
	    ff_METIS_INCLUDE=`awk -F'=' '"METIS_INCLUDE "==$1 {print $2}' $ffconfpetsc`
	   if test -n "$ff_METIS_LIB"; then
			    ff_metis_ok=yes;


    if test -z "$ff_where_lib_conf_metis"  ; then
	    echo "metis LD $ff_METIS_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_METIS_INCLUDE" && echo "metis INCLUDE $ff_METIS_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_metis=1
	    ff_where_lib_metis="$ff_METIS_LIB"
	    ff_where_inc_metis="$ff_METIS_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add metis : $ff_METIS_LIB ;  $ff_METIS_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add metis : $ff_METIS_LIB ;  $ff_METIS_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add metis : $ff_METIS_LIB $ff_METIS_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add metis : $ff_METIS_LIB $ff_METIS_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

			    TOOL_COMPILE_metis=""

	  fi



	    ff_PTSCOTCH_LIB=`awk -F'=' '"PTSCOTCH_LIB "==$1 {print $2}' $ffconfpetsc`
	    ff_PTSCOTCH_INCLUDE=`awk -F'=' '"PTSCOTCH_INCLUDE "==$1 {print $2}' $ffconfpetsc`
	   if test -n "$ff_PTSCOTCH_LIB"; then
			    ff_ptscotch_ok=yes;


    if test -z "$ff_where_lib_conf_ptscotch"  ; then
	    echo "ptscotch LD $ff_PTSCOTCH_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_PTSCOTCH_INCLUDE" && echo "ptscotch INCLUDE $ff_PTSCOTCH_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_ptscotch=1
	    ff_where_lib_ptscotch="$ff_PTSCOTCH_LIB"
	    ff_where_inc_ptscotch="$ff_PTSCOTCH_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add ptscotch : $ff_PTSCOTCH_LIB ;  $ff_PTSCOTCH_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add ptscotch : $ff_PTSCOTCH_LIB ;  $ff_PTSCOTCH_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add ptscotch : $ff_PTSCOTCH_LIB $ff_PTSCOTCH_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add ptscotch : $ff_PTSCOTCH_LIB $ff_PTSCOTCH_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

			    TOOL_COMPILE_ptscotch=""

	  fi


                        ff_SCOTCH_INCLUDE=$ff_PTSCOTCH_INCLUDE
                        ff_SCOTCH_LIB=`echo $ff_PTSCOTCH_LIB | sed -e 's/[^ ]*ptscotch[^ ]*//g' | sed -e 's/[^ ]*ptes[^ ]*//g'`
                        if test -n "$ff_SCOTCH_LIB"; then
                          ff_scotch_ok=yes;

    if test -z "$ff_where_lib_conf_scotch"  ; then
	    echo "scotch LD $ff_SCOTCH_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_SCOTCH_INCLUDE" && echo "scotch INCLUDE $ff_SCOTCH_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_scotch=1
	    ff_where_lib_scotch="$ff_SCOTCH_LIB"
	    ff_where_inc_scotch="$ff_SCOTCH_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add scotch : $ff_SCOTCH_LIB ;  $ff_SCOTCH_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add scotch : $ff_SCOTCH_LIB ;  $ff_SCOTCH_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add scotch : $ff_SCOTCH_LIB $ff_SCOTCH_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add scotch : $ff_SCOTCH_LIB $ff_SCOTCH_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

                          TOOL_COMPILE_scotch=""

                        fi

	    ff_MUMPS_LIB=`awk -F'=' '"MUMPS_LIB "==$1 {print $2}' $ffconfpetsc`
	    ff_MUMPS_INCLUDE=`awk -F'=' '"MUMPS_INCLUDE "==$1 {print $2}' $ffconfpetsc`
	   if test -n "$ff_MUMPS_LIB"; then
			    ff_mumps_ok=yes;


    if test -z "$ff_where_lib_conf_mumps"  ; then
	    echo "mumps LD $ff_MUMPS_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_MUMPS_INCLUDE" && echo "mumps INCLUDE $ff_MUMPS_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_mumps=1
	    ff_where_lib_mumps="$ff_MUMPS_LIB"
	    ff_where_inc_mumps="$ff_MUMPS_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add mumps : $ff_MUMPS_LIB ;  $ff_MUMPS_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add mumps : $ff_MUMPS_LIB ;  $ff_MUMPS_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add mumps : $ff_MUMPS_LIB $ff_MUMPS_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add mumps : $ff_MUMPS_LIB $ff_MUMPS_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

			    TOOL_COMPILE_mumps=""

	  fi


                        if test -n "$ff_MUMPS_LIB"; then
                            sed -E 's/mumps LD(.*)-lzmumps /mumps LD\1/g;s/mumps LD(.*)ldmumps/mumps LD\1ldmumps -lzmumps/g' $ff_where_lib_conf > plugin/seq/WHERE_LIBRARY-download
                            mv plugin/seq/WHERE_LIBRARY-download $ff_where_lib_conf
                            sed -E 's/mumps LD(.*)-lcmumps /mumps LD\1/g;s/mumps LD(.*)lsmumps/mumps LD\1lsmumps -lcmumps/g' $ff_where_lib_conf > plugin/seq/WHERE_LIBRARY-download
                            mv plugin/seq/WHERE_LIBRARY-download $ff_where_lib_conf
                        fi

	    ff_TETGEN_LIB=`awk -F'=' '"TETGEN_LIB "==$1 {print $2}' $ffconfpetsc`
	    ff_TETGEN_INCLUDE=`awk -F'=' '"TETGEN_INCLUDE "==$1 {print $2}' $ffconfpetsc`
	   if test -n "$ff_TETGEN_LIB"; then
			    ff_tetgen_ok=yes;


    if test -z "$ff_where_lib_conf_tetgen"  ; then
	    echo "tetgen LD $ff_TETGEN_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_TETGEN_INCLUDE" && echo "tetgen INCLUDE $ff_TETGEN_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_tetgen=1
	    ff_where_lib_tetgen="$ff_TETGEN_LIB"
	    ff_where_inc_tetgen="$ff_TETGEN_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add tetgen : $ff_TETGEN_LIB ;  $ff_TETGEN_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add tetgen : $ff_TETGEN_LIB ;  $ff_TETGEN_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add tetgen : $ff_TETGEN_LIB $ff_TETGEN_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add tetgen : $ff_TETGEN_LIB $ff_TETGEN_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

			    TOOL_COMPILE_tetgen=""

	  fi



	    ff_HPDDM_LIB=`awk -F'=' '"HPDDM_LIB "==$1 {print $2}' $ffconfpetsc`
	    ff_HPDDM_INCLUDE=`awk -F'=' '"HPDDM_INCLUDE "==$1 {print $2}' $ffconfpetsc`
	   if test -n "$ff_HPDDM_LIB"; then
			    ff_hpddm_ok=yes;


    if test -z "$ff_where_lib_conf_hpddm"  ; then
	    echo "hpddm LD $ff_HPDDM_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_HPDDM_INCLUDE" && echo "hpddm INCLUDE $ff_HPDDM_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_hpddm=1
	    ff_where_lib_hpddm="$ff_HPDDM_LIB"
	    ff_where_inc_hpddm="$ff_HPDDM_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add hpddm : $ff_HPDDM_LIB ;  $ff_HPDDM_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add hpddm : $ff_HPDDM_LIB ;  $ff_HPDDM_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add hpddm : $ff_HPDDM_LIB $ff_HPDDM_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add hpddm : $ff_HPDDM_LIB $ff_HPDDM_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

			    TOOL_COMPILE_hpddm=""

	  fi



	    ff_SUPERLU_LIB=`awk -F'=' '"SUPERLU_LIB "==$1 {print $2}' $ffconfpetsc`
	    ff_SUPERLU_INCLUDE=`awk -F'=' '"SUPERLU_INCLUDE "==$1 {print $2}' $ffconfpetsc`
	   if test -n "$ff_SUPERLU_LIB"; then
			    ff_superlu_ok=yes;


    if test -z "$ff_where_lib_conf_superlu"  ; then
	    echo "superlu LD $ff_SUPERLU_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_SUPERLU_INCLUDE" && echo "superlu INCLUDE $ff_SUPERLU_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_superlu=1
	    ff_where_lib_superlu="$ff_SUPERLU_LIB"
	    ff_where_inc_superlu="$ff_SUPERLU_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add superlu : $ff_SUPERLU_LIB ;  $ff_SUPERLU_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add superlu : $ff_SUPERLU_LIB ;  $ff_SUPERLU_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add superlu : $ff_SUPERLU_LIB $ff_SUPERLU_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add superlu : $ff_SUPERLU_LIB $ff_SUPERLU_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

			    TOOL_COMPILE_superlu=""

	  fi



	    ff_MMG_LIB=`awk -F'=' '"MMG_LIB "==$1 {print $2}' $ffconfpetsc`
	    ff_MMG_INCLUDE=`awk -F'=' '"MMG_INCLUDE "==$1 {print $2}' $ffconfpetsc`
	   if test -n "$ff_MMG_LIB"; then
			    ff_mmg_ok=yes;


    if test -z "$ff_where_lib_conf_mmg"  ; then
	    echo "mmg LD $ff_MMG_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_MMG_INCLUDE" && echo "mmg INCLUDE $ff_MMG_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_mmg=1
	    ff_where_lib_mmg="$ff_MMG_LIB"
	    ff_where_inc_mmg="$ff_MMG_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add mmg : $ff_MMG_LIB ;  $ff_MMG_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add mmg : $ff_MMG_LIB ;  $ff_MMG_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add mmg : $ff_MMG_LIB $ff_MMG_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add mmg : $ff_MMG_LIB $ff_MMG_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

			    TOOL_COMPILE_mmg=""

	  fi



	    ff_PARMMG_LIB=`awk -F'=' '"PARMMG_LIB "==$1 {print $2}' $ffconfpetsc`
	    ff_PARMMG_INCLUDE=`awk -F'=' '"PARMMG_INCLUDE "==$1 {print $2}' $ffconfpetsc`
	   if test -n "$ff_PARMMG_LIB"; then
			    ff_parmmg_ok=yes;


    if test -z "$ff_where_lib_conf_parmmg"  ; then
	    echo "parmmg LD $ff_PARMMG_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_PARMMG_INCLUDE" && echo "parmmg INCLUDE $ff_PARMMG_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_parmmg=1
	    ff_where_lib_parmmg="$ff_PARMMG_LIB"
	    ff_where_inc_parmmg="$ff_PARMMG_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add parmmg : $ff_PARMMG_LIB ;  $ff_PARMMG_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add parmmg : $ff_PARMMG_LIB ;  $ff_PARMMG_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add parmmg : $ff_PARMMG_LIB $ff_PARMMG_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add parmmg : $ff_PARMMG_LIB $ff_PARMMG_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

			    TOOL_COMPILE_parmmg=""

	  fi



	    ff_SCALAPACK_LIB=`awk -F'=' '"SCALAPACK_LIB "==$1 {print $2}' $ffconfpetsc`
	    ff_SCALAPACK_INCLUDE=`awk -F'=' '"SCALAPACK_INCLUDE "==$1 {print $2}' $ffconfpetsc`
	   if test -n "$ff_SCALAPACK_LIB"; then
			    ff_scalapack_ok=yes;


    if test -z "$ff_where_lib_conf_scalapack"  ; then
	    echo "scalapack LD $ff_SCALAPACK_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_SCALAPACK_INCLUDE" && echo "scalapack INCLUDE $ff_SCALAPACK_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_scalapack=1
	    ff_where_lib_scalapack="$ff_SCALAPACK_LIB"
	    ff_where_inc_scalapack="$ff_SCALAPACK_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add scalapack : $ff_SCALAPACK_LIB ;  $ff_SCALAPACK_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add scalapack : $ff_SCALAPACK_LIB ;  $ff_SCALAPACK_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add scalapack : $ff_SCALAPACK_LIB $ff_SCALAPACK_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add scalapack : $ff_SCALAPACK_LIB $ff_SCALAPACK_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

			    TOOL_COMPILE_scalapack=""

	  fi



	    ff_SUITESPARSE_LIB=`awk -F'=' '"SUITESPARSE_LIB "==$1 {print $2}' $ffconfpetsc`
	    ff_SUITESPARSE_INCLUDE=`awk -F'=' '"SUITESPARSE_INCLUDE "==$1 {print $2}' $ffconfpetsc`
	   if test -n "$ff_SUITESPARSE_LIB"; then
			    ff_suitesparse_ok=yes;
			    ff_SUITESPARSE_LIB="$ff_SUITESPARSE_LIB $ff_METIS_LIB";
			    echo " **** add $ff_METIS_LIB to ff_SUITESPARSE_LIB ******"

    if test -z "$ff_where_lib_conf_suitesparse"  ; then
	    echo "suitesparse LD $ff_SUITESPARSE_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_SUITESPARSE_INCLUDE" && echo "suitesparse INCLUDE $ff_SUITESPARSE_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_suitesparse=1
	    ff_where_lib_suitesparse="$ff_SUITESPARSE_LIB"
	    ff_where_inc_suitesparse="$ff_SUITESPARSE_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add suitesparse : $ff_SUITESPARSE_LIB ;  $ff_SUITESPARSE_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add suitesparse : $ff_SUITESPARSE_LIB ;  $ff_SUITESPARSE_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add suitesparse : $ff_SUITESPARSE_LIB $ff_SUITESPARSE_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add suitesparse : $ff_SUITESPARSE_LIB $ff_SUITESPARSE_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

			    TOOL_COMPILE_suitesparse=""

	  fi



	    ff_BLASLAPACK_LIB=`awk -F'=' '"BLASLAPACK_LIB "==$1 {print $2}' $ffconfpetsc`
	    ff_BLASLAPACK_INCLUDE=`awk -F'=' '"BLASLAPACK_INCLUDE "==$1 {print $2}' $ffconfpetsc`
	   if test -n "$ff_BLASLAPACK_LIB"; then
			    ff_blaslapack_ok=yes;


    if test -z "$ff_where_lib_conf_blaslapack"  ; then
	    echo "blaslapack LD $ff_BLASLAPACK_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_BLASLAPACK_INCLUDE" && echo "blaslapack INCLUDE $ff_BLASLAPACK_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_blaslapack=1
	    ff_where_lib_blaslapack="$ff_BLASLAPACK_LIB"
	    ff_where_inc_blaslapack="$ff_BLASLAPACK_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add blaslapack : $ff_BLASLAPACK_LIB ;  $ff_BLASLAPACK_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add blaslapack : $ff_BLASLAPACK_LIB ;  $ff_BLASLAPACK_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add blaslapack : $ff_BLASLAPACK_LIB $ff_BLASLAPACK_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add blaslapack : $ff_BLASLAPACK_LIB $ff_BLASLAPACK_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

			    TOOL_COMPILE_blaslapack=""

	  fi


            if test -n "$ff_BLASLAPACK_LIB"; then
                ff_where_lib_blaslapack="`echo $ff_BLASLAPACK_LIB | sed -e 's/[^ ]*scalapack[^ ]*//g' | sed -e 's/[^ ]*blacs[^ ]*//g'`"
            fi
                        if test -f $d/libslepc.$ff_suffix_dylib -o -f $d/libslepc.a ; then
			   ff_slepc_ok=yes
                           ff_SLEPC_LIB="-Wl,-rpath,$d -L$d -lslepc"

    if test -z "$ff_where_lib_conf_slepc"  ; then
	    echo "slepc LD $ff_SLEPC_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_where_inc_petsc" && echo "slepc INCLUDE $ff_where_inc_petsc "  >>$ff_where_lib_conf
            ff_where_lib_conf_slepc=1
	    ff_where_lib_slepc="$ff_SLEPC_LIB"
	    ff_where_inc_slepc="$ff_where_inc_petsc"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add slepc : $ff_SLEPC_LIB ;  $ff_where_inc_petsc in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add slepc : $ff_SLEPC_LIB ;  $ff_where_inc_petsc in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add slepc : $ff_SLEPC_LIB $ff_where_inc_petsc in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add slepc : $ff_SLEPC_LIB $ff_where_inc_petsc in  $ff_where_lib_conf \"" >&6;}
        fi

                        if test -f $d/libarpack.$ff_suffix_dylib -o -f $d/libarpack.a ; then
                            ff_arpack_ok=yes
                            ff_arpack_libs="-Wl,-rpath,$d -L$d -larpack"

    if test -z "$ff_where_lib_conf_arpack"  ; then
	    echo "arpack LD $ff_arpack_libs"  >>$ff_where_lib_conf
	    test -n "" && echo "arpack INCLUDE  "  >>$ff_where_lib_conf
            ff_where_lib_conf_arpack=1
	    ff_where_lib_arpack="$ff_arpack_libs"
	    ff_where_inc_arpack=""
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add arpack : $ff_arpack_libs ;   in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add arpack : $ff_arpack_libs ;   in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add arpack : $ff_arpack_libs  in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add arpack : $ff_arpack_libs  in  $ff_where_lib_conf \"" >&6;}
        fi

                        fi
		        fi
            if test "$ff_slepc_ok" != yes ;   then

# Check whether --with-slepc_include was given.
if test ${with_slepc_include+y}
then :
  withval=$with_slepc_include;
fi


# Check whether --with-slepc_ldflags was given.
if test ${with_slepc_ldflags+y}
then :
  withval=$with_slepc_ldflags;
fi

                if test "$with_slepc_include" != "" || test "$with_slepc_ldflags" != ""
                then
                    # some directives have been specified, use them instead of downloading

    if test -z "$ff_where_lib_conf_slepc"  ; then
	    echo "slepc LD $with_slepc_ldflags"  >>$ff_where_lib_conf
	    test -n "$with_slepc_include" && echo "slepc INCLUDE $with_slepc_include "  >>$ff_where_lib_conf
            ff_where_lib_conf_slepc=1
	    ff_where_lib_slepc="$with_slepc_ldflags"
	    ff_where_inc_slepc="$with_slepc_include"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add slepc : $with_slepc_ldflags ;  $with_slepc_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add slepc : $with_slepc_ldflags ;  $with_slepc_include in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add slepc : $with_slepc_ldflags $with_slepc_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add slepc : $with_slepc_ldflags $with_slepc_include in  $ff_where_lib_conf \"" >&6;}
        fi

                    ff_slepc_ok=yes
                fi
            fi
		    else
			 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \" Warning PETSC MPI and FF++ MPI not the same: $PETSC_MPIRUN != $MPIRUN or $PETSC_SCALAR != real .\" " >&5
printf "%s\n" "$as_me: \" Warning PETSC MPI and FF++ MPI not the same: $PETSC_MPIRUN != $MPIRUN or $PETSC_SCALAR != real .\" " >&6;};
		    fi
        fi
		fi
	    else
		ffconfpetsc="";
	    fi
	done
    done
fi

if test "$ff_petsc_ok" != no ;   then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  with petsc  $ff_petsc_ok,  with slepc $ff_slepc_ok " >&5
printf "%s\n" "$as_me:  with petsc  $ff_petsc_ok,  with slepc $ff_slepc_ok " >&6;}
else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  without petsc, slepc  ***** " >&5
printf "%s\n" "$as_me:  without petsc, slepc  ***** " >&6;}
fi

## PETSc complex

# Check whether --with-petsc_complex was given.
if test ${with_petsc_complex+y}
then :
  withval=$with_petsc_complex;
fi

ff_petsccomplex_ok=no
ff_slepccomplex_ok=no
if test "$with_petsc_complex" != no; then
    for d in "$with_petsc_complex" "${prefix_petsc}/c/lib" /usr/local/ff++/petsc/c/lib /usr/lib/petsc ;do
	for dd in "" "/petsc/conf/petscvariables" "/lib/petsc/conf/petscvariables" ; do
	    ffconfpetscc="$d$dd"
	    if test -f "$ffconfpetscc" -a  "$ff_petsccomplex_ok" = no ; then
		    PETSC_COMPLEX_SCALAR=`awk -F' *= *' '"PETSC_SCALAR"==$1 {print $2}' "$ffconfpetscc"`
		    PETSC_COMPLEX_MPIRUN=`awk -F' *= *' '"MPIEXEC"==$1 {print $2}' "$ffconfpetscc"`
		    PETSC_COMPLEX_PREFIXDIR=`awk -F' *= *' '"PREFIXDIR"==$1 {print $2}' "$ffconfpetscc"`

			PETSC_COMPLEX_MPIRUN=`echo "$PETSC_COMPLEX_MPIRUN" | awk '{print $1}'`	#remove --oversubscribe
			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:  find complex ($PETSC_COMPLEX_SCALAR) petsc in $ffconfpetscc" >&5
printf "%s\n" "$as_me:  find complex ($PETSC_COMPLEX_SCALAR) petsc in $ffconfpetscc" >&6;};
            if test "$ff_mpi" != yes; then
                MPIRUN=`echo $PETSC_COMPLEX_MPIRUN`
                MPICC=`awk -F' *= *' '"CC"==$1 {print $2}' "$ffconfpetscc"`
                MPICXX=`awk -F' *= *' '"CXX"==$1 {print $2}' "$ffconfpetscc"`
                MPIFC=`awk -F' *= *' '"FC"==$1 {print $2}' "$ffconfpetscc"`
case $ff_uname in
CYGWIN*|MINGW*|MSYS_NT*)
                MPICC=$MPICC" "`awk -F' *= *' '"MPI_INCLUDE"==$1 {print $2}' "$ffconfpetscc"`
                MPICXX=$MPICXX" "`awk -F' *= *' '"MPI_INCLUDE"==$1 {print $2}' "$ffconfpetscc"`
                MPIFC=$MPIFC" "`awk -F' *= *' '"MPI_INCLUDE"==$1 {print $2}' "$ffconfpetscc"`
esac
                # Checking wether we can produce a parallel version
# -------------------------------------------------

ff_save_path="$PATH"
# We need to choose between mpich, openmpi  and lam for the Debian package

# Check whether --with-mpipath was given.
if test ${with_mpipath+y}
then :
  withval=$with_mpipath;
fi


# Check whether --with-mpilibs was given.
if test ${with_mpilibs+y}
then :
  withval=$with_mpilibs;
fi


# Check whether --with-mpilibsc was given.
if test ${with_mpilibsc+y}
then :
  withval=$with_mpilibsc;
fi


# Check whether --with-mpiinc was given.
if test ${with_mpiinc+y}
then :
  withval=$with_mpiinc;
fi


# Check whether --with-mpi was given.
if test ${with_mpi+y}
then :
  withval=$with_mpi;
fi

if test "$with_mpi" != no ; then
#if test "$with_mpi" != no ; then
#AX_MPI(with_mpi=yes, with_mpi=no)
#fi

# Default is mpic++
ff_mpi_suffix="";
if test "$with_mpi" = yes -o -z "$with_mpi"
then
   ff_mpicxx=mpic++
else
  case "$with_mpi" in
 lam|mpich|openmpi)   ff_mpi_suffix=.$with_mpi;ff_mpicxx=mpic++.$with_mpi;;
 *)  ff_mpicxx="$with_mpi" ;;
 esac
fi

if test -n "$with_mpiinc"  -a "$with_mpiinc" != no ; then
  if test  "$with_mpi" = 'no' ; then with_mpi='yes'; fi
  ff_MPI_INCLUDE="$with_mpiinc"
fi
if test -n "$with_mpilibs" -a "$with_mpilibs" != no ; then
    ff_MPI_LIB="$with_mpilibs"
    ff_MPI_LIBC="$with_mpilibs"
    ff_MPI_LIBFC="$with_mpilibs"
    MPICXX="$CXX $ff_MPI_INCLUDE"
    MPIFC="$FC  $ff_MPI_INCLUDE"
    MPICC="$CC  $ff_MPI_INCLUDE"
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:    ---  set  all MPI compile to compiler:   $MPICC, $MPIFC, $MPICC " >&5
printf "%s\n" "$as_me:    ---  set  all MPI compile to compiler:   $MPICC, $MPIFC, $MPICC " >&6;}
fi

if test -n "$with_mpilibsc" -a "$with_mpilibsc" != no ; then
 ff_MPI_LIBC="$with_mpilibsc"
fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPIRUN" >&5
printf %s "checking for MPIRUN... " >&6; }

if test -z "$MPIRUN" ; then
  if test -n "$MSMPI_BIN" -a -x "$MSMPI_BIN/mpiexec.exe" ;  then
     MPIRUN="$MSMPI_BIN"\mpiexec.exe
  else
    for ac_prog in mpiexec mpirun mpiexec.exe
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_MPIRUN+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case $MPIRUN in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_MPIRUN="$MPIRUN" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_MPIRUN="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
MPIRUN=$ac_cv_path_MPIRUN
if test -n "$MPIRUN"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIRUN" >&5
printf "%s\n" "$MPIRUN" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$MPIRUN" && break
done
test -n "$MPIRUN" || MPIRUN="no"

  fi
  if test "$MPIRUN" = no
    then
		 ff_mpi=no
	fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIRUN" >&5
printf "%s\n" "$MPIRUN" >&6; }
if test "ff_mpi" != "no" ; then
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPIRUN option: " >&5
printf %s "checking for MPIRUN option: ... " >&6; }
 ff_mpi_option=""
 ff_okkk=`"$MPIRUN"  -np 2 --oversubscribe echo ff__okkk 2>/dev/null| grep ff__okkk |wc -l`
 if test "$ff_okkk" -eq 2 ; then ff_mpi_option="--oversubscribe" ; fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_mpi_option" >&5
printf "%s\n" "$ff_mpi_option" >&6; }
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mpipath " >&5
printf %s "checking for mpipath ... " >&6; }

if test "$with_mpi" != no -a ! -d  "$with_mpipath" -a "$MPIRUN" != no ; then
#   if "$MPIRUN" != no ; tehn
    with_mpipath=`$as_dirname -- "$MPIRUN" ||
$as_expr X"$MPIRUN" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$MPIRUN" : 'X\(//\)[^/]' \| \
	 X"$MPIRUN" : 'X\(//\)$' \| \
	 X"$MPIRUN" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"$MPIRUN" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
    with_mpipath=`$as_dirname -- "$with_mpipath" ||
$as_expr X"$with_mpipath" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$with_mpipath" : 'X\(//\)[^/]' \| \
	 X"$with_mpipath" : 'X\(//\)$' \| \
	 X"$with_mpipath" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"$with_mpipath" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
#    echo " ***** with_mpipath $with_mpipath \n"

#    else
#    for i in '/c/Program Files (x86)/MPICH2' '/c/Program Files/MPICH2' 'c:\Program Files (x86)\MPICH2' 'c:\Program Files\MPICH2' ; do
#	test -d "$i" &&  with_mpipath="$i" && break
#    done
#    fi
fi
#echo "****  with_mpipath  '$with_mpipath' $MPIRUN *****"
case "$MPIRUN" in
 */sgi/mpt/*)
	ff_MPI_INCLUDE_DIR=
	ff_MPI_LIB_DIR=
        test -f "$with_mpipath/include/mpif.h" &&  ff_MPI_INCLUDE_DIR="$with_mpipath/include"
        test -f "$with_mpipath/lib/libmpi.so" &&  ff_MPI_LIB_DIR="$with_mpipath/lib"
        if test -n "$ff_MPI_INCLUDE_DIR" -a -n "$ff_MPI_LIB_DIR" ; then
            ff_MPI_INCLUDE="-I'$ff_MPI_INCLUDE_DIR' "
            with_mpiinc="$ff_MPI_INCLUDE"
            ff_MPI_LIBC="-L'$ff_MPI_LIB_DIR' -lmpi"
            ff_MPI_LIB="-L'$ff_MPI_LIB_DIR' -lmpi++ -lmpi"
            ff_MPI_LIBFC="-L'$ff_MPI_LIB_DIR'  -lmpi"
	    ff_mpitype=sgi
            test -z "$MPICXX" && MPICXX="$CXX $ff_MPI_INCLUDE"
            test -z "$MPIFC"  && MPIFC="$FC  $ff_MPI_INCLUDE"
            test -z "$MPICC"  && MPICC="$CC  $ff_MPI_INCLUDE"
#	    echo " *** MPI sgi ..... "
        fi
	;;
esac


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_mpi_path" >&5
printf "%s\n" "$ff_mpi_path" >&6; }






ff_save_cxx="$CXX"
ff_save_libs="$LIBS"


if test "$with_mpi" != no
then
	ff_mpi_path=`$as_dirname -- "$MPIRUN" ||
$as_expr X"$MPIRUN" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$MPIRUN" : 'X\(//\)[^/]' \| \
	 X"$MPIRUN" : 'X\(//\)$' \| \
	 X"$MPIRUN" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"$MPIRUN" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
		case "$ff_mpi_path" in
	    .|"") ff_mpi_path="$PATH";ff_defmpicxx="$ff_mpicxx";;
	    *) ff_mpi_path="$ff_mpi_path";ff_defmpicxx=`expr "//$ff_mpicxx" : '.*/\(.*\)'`;;
	    	esac

	if test -z "$MPICXX" ; then
	    for ac_prog in $ff_defmpicxx mpic++$ff_mpi_suffix mpicxx$ff_mpi_suffix mpiCC$ff_mpi_suffix mpCC hcp mpxlC mpxlC_r cmpic++
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_MPICXX+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case $MPICXX in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_MPICXX="$MPICXX" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $ff_mpi_path
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_MPICXX="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
MPICXX=$ac_cv_path_MPICXX
if test -n "$MPICXX"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPICXX" >&5
printf "%s\n" "$MPICXX" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$MPICXX" && break
done
test -n "$MPICXX" || MPICXX="no"

	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPICXX" >&5
printf %s "checking for MPICXX... " >&6; }
	fi
	ff_mpicxx="eval $MPICXX"
	CXX=$ff_mpicxx
	LIBS="$LIBS $ff_MPI_LIB"
	test -z "$ff_mpi" && ff_mpi=yes
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <mpi.h>
#include <stdio.h>
int main(int argc,char **argv){
  char name[BUFSIZ];
  int length;

  MPI_Init(&argc, &argv);
  MPI_Get_processor_name(name, &length);
  printf("%s: hello world\n", name);
  MPI_Finalize();
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_mpi=yes
else $as_nop
  ff_mpi=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_mpi" >&5
printf "%s\n" "$ff_mpi" >&6; }

	# Also check that mpirun is there. If it isn't, then MPI is
	# not fully installed.


	if test "$ff_mpi" = yes;
	then

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking MPI_DOUBLE_COMPLEX" >&5
printf %s "checking MPI_DOUBLE_COMPLEX... " >&6; }

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <mpi.h>
MPI_Datatype xxxx=MPI_DOUBLE_COMPLEX;

_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
  ff_mpi_double_complex=yes
else $as_nop
  ff_mpi_double_complex=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_mpi_double_complex" >&5
printf "%s\n" "$ff_mpi_double_complex" >&6; }
if test "$ff_mpi_double_complex" = yes  ; then

printf "%s\n" "#define HAVE_MPI_DOUBLE_COMPLEX 1" >>confdefs.h

fi


	  echo "MPI CC $ff_mpi" >config_LIB_INFO

		# We do not AC_DEFINE any special flag for parallel
		# computation here, because it must only be set when the
 		# parallel program is compiled (see src/mpi/Makfile.am)
		ff_mpiprog="FreeFem++-mpi${EXEEXT}"
   		  MPIPROG="$ff_mpiprog"

   		  MPISCRIPT="ff-mpirun"

   		  MPIRUN="$MPIRUN"

                  MPICXX=$MPICXX

	else
	        MPICXX=$ff_save_cxx

	fi

	if test "$ff_mpi" = yes;
	then
	  if test "$enable_fortran" != no
	  then


	      if test -z "$MPIFC" ; then
		  for ac_prog in mpif90$ff_mpi_suffix mpxlf95_r mpxlf90_r mpxlf95 mpxlf90 mpf90 cmpif90c
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_MPIFC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case $MPIFC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_MPIFC="$MPIFC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $ff_mpi_path
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_MPIFC="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
MPIFC=$ac_cv_path_MPIFC
if test -n "$MPIFC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIFC" >&5
printf "%s\n" "$MPIFC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$MPIFC" && break
done
test -n "$MPIFC" || MPIFC=""""

	      fi

	  fi

#	echo " ********************ffmpi= '$ff_mpi' *************   "
	ff_MPI_INCLUDE="$with_mpiinc"
	if test -z "$ff_mpitype" ; then
           test -n "$MPICXX" && ff_mpishow=`$MPICXX -show` 2>/dev/null
           test -n "$MPICC" && ff_mpicshow=`$MPICC -show` 2>/dev/null
           test -n "$MPIFC" && ff_mpifcshow=`$MPIFC -show` 2>/dev/null
	   if test "$with_mpiinc" = no -o -z "$with_mpiinc" ; then
	      ff_MPI_INCLUDE=`echo $ff_mpishow|tr ' ' '\n' | sed '1 d'| grep -E '^[-/][^WLlOgpf]|^-Wp,'|tr '\n' ' '`
	      ff_mpi_idir=`echo $ff_mpishow|tr ' ' '\n'| grep -E '^-I'|sed s/^-I//|tr '\n' ' '`' /usr/include'
	    else
	      ff_mpi_idir=`echo $ff_MPI_INCLUDE|tr ' ' '\n'| grep -E '^-I'|sed s/^-I//|tr '\n' ' '`' /usr/include'
	    fi
	    if test "$with_mpilibs" = no -o -z "$with_mpilibs" ; then
		ff_MPI_LIB_DIRS=""
		ff_MPI_LIB=`echo $ff_mpishow|tr ' ' '\n'| grep -E '^-[Llp]|^-Wl,'|tr '\n' ' '`
		ff_MPI_LIBC=`echo $ff_mpicshow|tr ' ' '\n'| grep -E '^-[Llp]|^-Wl,'|tr '\n' ' '`
		ff_MPI_LIBFC=`echo $ff_mpifcshow|tr ' ' '\n'| grep -E '^-[Llp]|^-Wl,'|grep -v 'commons,use_dylibs' |tr '\n' ' '`
            else
	      ff_MPI_LIB="$with_mpilibs"
	      ff_MPI_LIBC="$with_mpilibs"
	      ff_MPI_LIBFC="$with_mpilibs"
	    fi
	    ff_mpi_ldir=`echo $ff_MPI_LIB|tr ' ' '\n'| grep -E '^-[Llp]|^-Wl,'|sed -e 's/^-[Llp]//' -e 's/^-Wl,//'  |tr '\n' ' '`' /usr/lib']

	    if  test -z "$ff_MPI_INCLUDE_DIR" ; then
		for i in $ff_mpi_idir; do
		    if test -f "$i/mpi.h" -a -z "$ff_MPI_INCLUDE_DIR"  ;then
			ff_MPI_INCLUDE_DIR=$i
		    fi
		done
	    fi
	    for i in $ff_mpi_ldir; do
	      if test -d $i ; then
		ff_tmp=`ls $i/libmpi.*|head -1`
		if test  -f "$ff_tmp"  -a -z "$ff_MPI_LIB_DIRS"  ;then
		    ff_MPI_LIB_DIRS=$i
		fi
	      fi
	    done
	fi
	MPICXX=$MPICXX


	if test -z "$MPICC" ; then
	    for ac_prog in mpicc$ff_mpi_suffix hcc mpcc mpcc_r mpxlc cmpicc
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_MPICC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case $MPICC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_MPICC="$MPICC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $ff_mpi_path
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_MPICC="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
MPICC=$ac_cv_path_MPICC
if test -n "$MPICC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPICC" >&5
printf "%s\n" "$MPICC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$MPICC" && break
done
test -n "$MPICC" || MPICC=""""

	fi
	MPICC=$MPICC


	if test ! -f "$ff_MPI_INCLUDE_DIR/mpif.h"  ; then
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  MPI without fortran no file \"$ff_MPI_INCLUDE_DIR/mpif.h\"  " >&5
printf "%s\n" "$as_me:  MPI without fortran no file \"$ff_MPI_INCLUDE_DIR/mpif.h\"  " >&6;}
	else
	    if test -n "$MPIFC" ; then

    if test -z "$ff_where_lib_conf_mpifc"  ; then
	    echo "mpifc LD $ff_MPI_LIBFC"  >>$ff_where_lib_conf
	    test -n "$ff_MPI_INCLUDE" && echo "mpifc INCLUDE $ff_MPI_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_mpifc=1
	    ff_where_lib_mpifc="$ff_MPI_LIBFC"
	    ff_where_inc_mpifc="$ff_MPI_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add mpifc : $ff_MPI_LIBFC ;  $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add mpifc : $ff_MPI_LIBFC ;  $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add mpifc : $ff_MPI_LIBFC $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add mpifc : $ff_MPI_LIBFC $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi


    if test -z "$ff_where_lib_conf_mpif77"  ; then
	    echo "mpif77 LD $ff_MPI_LIBFC"  >>$ff_where_lib_conf
	    test -n "$ff_MPI_INCLUDE" && echo "mpif77 INCLUDE $ff_MPI_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_mpif77=1
	    ff_where_lib_mpif77="$ff_MPI_LIBFC"
	    ff_where_inc_mpif77="$ff_MPI_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add mpif77 : $ff_MPI_LIBFC ;  $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add mpif77 : $ff_MPI_LIBFC ;  $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add mpif77 : $ff_MPI_LIBFC $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add mpif77 : $ff_MPI_LIBFC $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

	    fi
  	fi
	if test -n "$MPICXX" ; then

    if test -z "$ff_where_lib_conf_mpi"  ; then
	    echo "mpi LD $ff_MPI_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_MPI_INCLUDE" && echo "mpi INCLUDE $ff_MPI_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_mpi=1
	    ff_where_lib_mpi="$ff_MPI_LIB"
	    ff_where_inc_mpi="$ff_MPI_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add mpi : $ff_MPI_LIB ;  $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add mpi : $ff_MPI_LIB ;  $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add mpi : $ff_MPI_LIB $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add mpi : $ff_MPI_LIB $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

	fi
	MPI_INC_DIR=$ff_MPI_INCLUDE_DIR

	MPI_INCLUDE=$ff_MPI_INCLUDE

	MPI_LIB_DIRS=$ff_MPI_LIB_DIRS

	MPI_LIB=$ff_MPI_LIB

	MPI_LIBC=$ff_MPI_LIBC

	MPI_LIBFC=$ff_MPI_LIBFC

	MPI_RUN_OPTION=$ff_mpi_option

        SKIP_TESTS_MPI="no"

	fi
	CXX="$ff_save_cxx"
	LIBS="$ff_save_libs"
fi
fi
##  clean on MPI variable if not MPI ...
if test "$ff_mpi" != yes ; then

	  MPIRUN=""

	  MPICC=""

	  MPICXX=""

	  MPIFC=""

	  MPI_INCLUDE=""

	  MPI_LIB_DIRS=""

	  MPI_LIB=""

	  MPI_LIBC=""

	  MPI_LIBFC=""

          SKIP_TESTS_MPI="yes"

	  ff_mpi=no
fi

# Local Variables:
# mode:shell-script
# ispell-local-dictionary:"british"
# coding:utf-8
# End:

            fi
            if test "$ff_mpi" = yes; then
		    test  "$PETSC_COMPLEX_SCALAR" = "complex" &&  test  "$ff_win32" = yes -o  "$PETSC_COMPLEX_MPIRUN" = "$MPIRUN" ||  cmp -s `which "$PETSC_COMPLEX_MPIRUN"` `which "$MPIRUN"`
		   	if test "$?"  -eq 0 ; then
            FF_prefix_petsc_complex="$PETSC_COMPLEX_PREFIXDIR"

            FF_conf_petsc_complex="$ffconfpetscc"


            # PETSC_WITH_EXTERNAL_LIB,PETSC_CC_INCLUDES

	    ff_PETSC_EXTERNAL_LIB_BASIC=`awk -F'=' '"PETSC_EXTERNAL_LIB_BASIC "==$1 {print $2}' $ffconfpetscc`
	    ff_PETSC_LIB_BASIC=`awk -F'=' '"PETSC_LIB_BASIC "==$1 {print $2}' $ffconfpetscc`
	    ff_PETSC_PREFIXDIR=`awk -F' ' '"PREFIXDIR"==$1 {print $3}' $ffconfpetscc`
	    ff_PETSC_WITH_EXTERNAL_LIB="-Wl,-rpath,$ff_PETSC_PREFIXDIR/lib -L$ff_PETSC_PREFIXDIR/lib $ff_PETSC_LIB_BASIC $ff_PETSC_EXTERNAL_LIB_BASIC"
	    ff_PETSC_CC_INCLUDES=`awk -F'=' '"PETSC_CC_INCLUDES "==$1 {print $2}' $ffconfpetscc`
	   if test -n "$ff_PETSC_WITH_EXTERNAL_LIB"; then
			    ff_petsccomplex_ok=yes;

    if test -z "$ff_where_lib_conf_petsccomplex"  ; then
	    echo "petsccomplex LD $ff_PETSC_WITH_EXTERNAL_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_PETSC_CC_INCLUDES" && echo "petsccomplex INCLUDE $ff_PETSC_CC_INCLUDES "  >>$ff_where_lib_conf
            ff_where_lib_conf_petsccomplex=1
	    ff_where_lib_petsccomplex="$ff_PETSC_WITH_EXTERNAL_LIB"
	    ff_where_inc_petsccomplex="$ff_PETSC_CC_INCLUDES"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add petsccomplex : $ff_PETSC_WITH_EXTERNAL_LIB ;  $ff_PETSC_CC_INCLUDES in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add petsccomplex : $ff_PETSC_WITH_EXTERNAL_LIB ;  $ff_PETSC_CC_INCLUDES in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add petsccomplex : $ff_PETSC_WITH_EXTERNAL_LIB $ff_PETSC_CC_INCLUDES in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add petsccomplex : $ff_PETSC_WITH_EXTERNAL_LIB $ff_PETSC_CC_INCLUDES in  $ff_where_lib_conf \"" >&6;}
        fi

			    TOOL_COMPILE_petsccomplex=""

	  fi



	    ff_PARMETIS_LIB=`awk -F'=' '"PARMETIS_LIB "==$1 {print $2}' $ffconfpetscc`
	    ff_PARMETIS_INCLUDE=`awk -F'=' '"PARMETIS_INCLUDE "==$1 {print $2}' $ffconfpetscc`
	   if test -n "$ff_PARMETIS_LIB"; then
			    ff_parmetis_ok=yes;


    if test -z "$ff_where_lib_conf_parmetis"  ; then
	    echo "parmetis LD $ff_PARMETIS_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_PARMETIS_INCLUDE" && echo "parmetis INCLUDE $ff_PARMETIS_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_parmetis=1
	    ff_where_lib_parmetis="$ff_PARMETIS_LIB"
	    ff_where_inc_parmetis="$ff_PARMETIS_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add parmetis : $ff_PARMETIS_LIB ;  $ff_PARMETIS_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add parmetis : $ff_PARMETIS_LIB ;  $ff_PARMETIS_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add parmetis : $ff_PARMETIS_LIB $ff_PARMETIS_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add parmetis : $ff_PARMETIS_LIB $ff_PARMETIS_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

			    TOOL_COMPILE_parmetis=""

	  fi



	    ff_METIS_LIB=`awk -F'=' '"METIS_LIB "==$1 {print $2}' $ffconfpetscc`
	    ff_METIS_INCLUDE=`awk -F'=' '"METIS_INCLUDE "==$1 {print $2}' $ffconfpetscc`
	   if test -n "$ff_METIS_LIB"; then
			    ff_metis_ok=yes;


    if test -z "$ff_where_lib_conf_metis"  ; then
	    echo "metis LD $ff_METIS_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_METIS_INCLUDE" && echo "metis INCLUDE $ff_METIS_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_metis=1
	    ff_where_lib_metis="$ff_METIS_LIB"
	    ff_where_inc_metis="$ff_METIS_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add metis : $ff_METIS_LIB ;  $ff_METIS_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add metis : $ff_METIS_LIB ;  $ff_METIS_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add metis : $ff_METIS_LIB $ff_METIS_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add metis : $ff_METIS_LIB $ff_METIS_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

			    TOOL_COMPILE_metis=""

	  fi



	    ff_PTSCOTCH_LIB=`awk -F'=' '"PTSCOTCH_LIB "==$1 {print $2}' $ffconfpetscc`
	    ff_PTSCOTCH_INCLUDE=`awk -F'=' '"PTSCOTCH_INCLUDE "==$1 {print $2}' $ffconfpetscc`
	   if test -n "$ff_PTSCOTCH_LIB"; then
			    ff_ptscotch_ok=yes;


    if test -z "$ff_where_lib_conf_ptscotch"  ; then
	    echo "ptscotch LD $ff_PTSCOTCH_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_PTSCOTCH_INCLUDE" && echo "ptscotch INCLUDE $ff_PTSCOTCH_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_ptscotch=1
	    ff_where_lib_ptscotch="$ff_PTSCOTCH_LIB"
	    ff_where_inc_ptscotch="$ff_PTSCOTCH_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add ptscotch : $ff_PTSCOTCH_LIB ;  $ff_PTSCOTCH_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add ptscotch : $ff_PTSCOTCH_LIB ;  $ff_PTSCOTCH_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add ptscotch : $ff_PTSCOTCH_LIB $ff_PTSCOTCH_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add ptscotch : $ff_PTSCOTCH_LIB $ff_PTSCOTCH_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

			    TOOL_COMPILE_ptscotch=""

	  fi


            ff_SCOTCH_INCLUDE=$ff_PTSCOTCH_INCLUDE
            ff_SCOTCH_LIB=`echo $ff_PTSCOTCH_LIB | sed -e 's/[^ ]*ptscotch[^ ]*//g' | sed -e 's/[^ ]*ptes[^ ]*//g'`
            if test -n "$ff_SCOTCH_LIB"; then
                ff_scotch_ok=yes;

    if test -z "$ff_where_lib_conf_scotch"  ; then
	    echo "scotch LD $ff_SCOTCH_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_SCOTCH_INCLUDE" && echo "scotch INCLUDE $ff_SCOTCH_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_scotch=1
	    ff_where_lib_scotch="$ff_SCOTCH_LIB"
	    ff_where_inc_scotch="$ff_SCOTCH_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add scotch : $ff_SCOTCH_LIB ;  $ff_SCOTCH_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add scotch : $ff_SCOTCH_LIB ;  $ff_SCOTCH_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add scotch : $ff_SCOTCH_LIB $ff_SCOTCH_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add scotch : $ff_SCOTCH_LIB $ff_SCOTCH_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

                TOOL_COMPILE_scotch=""

            fi

	    ff_MUMPS_LIB=`awk -F'=' '"MUMPS_LIB "==$1 {print $2}' $ffconfpetscc`
	    ff_MUMPS_INCLUDE=`awk -F'=' '"MUMPS_INCLUDE "==$1 {print $2}' $ffconfpetscc`
	   if test -n "$ff_MUMPS_LIB"; then
			    ff_mumps_ok=yes;


    if test -z "$ff_where_lib_conf_mumps"  ; then
	    echo "mumps LD $ff_MUMPS_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_MUMPS_INCLUDE" && echo "mumps INCLUDE $ff_MUMPS_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_mumps=1
	    ff_where_lib_mumps="$ff_MUMPS_LIB"
	    ff_where_inc_mumps="$ff_MUMPS_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add mumps : $ff_MUMPS_LIB ;  $ff_MUMPS_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add mumps : $ff_MUMPS_LIB ;  $ff_MUMPS_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add mumps : $ff_MUMPS_LIB $ff_MUMPS_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add mumps : $ff_MUMPS_LIB $ff_MUMPS_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

			    TOOL_COMPILE_mumps=""

	  fi


            if test -n "$ff_MUMPS_LIB"; then
                sed -E 's/mumps LD(.*)-lzmumps /mumps LD\1/g;s/mumps LD(.*)ldmumps/mumps LD\1ldmumps -lzmumps/g' $ff_where_lib_conf > plugin/seq/WHERE_LIBRARY-download
                mv plugin/seq/WHERE_LIBRARY-download $ff_where_lib_conf
                sed -E 's/mumps LD(.*)-lcmumps /mumps LD\1/g;s/mumps LD(.*)lsmumps/mumps LD\1lsmumps -lcmumps/g' $ff_where_lib_conf > plugin/seq/WHERE_LIBRARY-download
                mv plugin/seq/WHERE_LIBRARY-download $ff_where_lib_conf
            fi

	    ff_TETGEN_LIB=`awk -F'=' '"TETGEN_LIB "==$1 {print $2}' $ffconfpetscc`
	    ff_TETGEN_INCLUDE=`awk -F'=' '"TETGEN_INCLUDE "==$1 {print $2}' $ffconfpetscc`
	   if test -n "$ff_TETGEN_LIB"; then
			    ff_tetgen_ok=yes;


    if test -z "$ff_where_lib_conf_tetgen"  ; then
	    echo "tetgen LD $ff_TETGEN_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_TETGEN_INCLUDE" && echo "tetgen INCLUDE $ff_TETGEN_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_tetgen=1
	    ff_where_lib_tetgen="$ff_TETGEN_LIB"
	    ff_where_inc_tetgen="$ff_TETGEN_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add tetgen : $ff_TETGEN_LIB ;  $ff_TETGEN_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add tetgen : $ff_TETGEN_LIB ;  $ff_TETGEN_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add tetgen : $ff_TETGEN_LIB $ff_TETGEN_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add tetgen : $ff_TETGEN_LIB $ff_TETGEN_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

			    TOOL_COMPILE_tetgen=""

	  fi



	    ff_HPDDM_LIB=`awk -F'=' '"HPDDM_LIB "==$1 {print $2}' $ffconfpetscc`
	    ff_HPDDM_INCLUDE=`awk -F'=' '"HPDDM_INCLUDE "==$1 {print $2}' $ffconfpetscc`
	   if test -n "$ff_HPDDM_LIB"; then
			    ff_hpddm_ok=yes;


    if test -z "$ff_where_lib_conf_hpddm"  ; then
	    echo "hpddm LD $ff_HPDDM_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_HPDDM_INCLUDE" && echo "hpddm INCLUDE $ff_HPDDM_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_hpddm=1
	    ff_where_lib_hpddm="$ff_HPDDM_LIB"
	    ff_where_inc_hpddm="$ff_HPDDM_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add hpddm : $ff_HPDDM_LIB ;  $ff_HPDDM_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add hpddm : $ff_HPDDM_LIB ;  $ff_HPDDM_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add hpddm : $ff_HPDDM_LIB $ff_HPDDM_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add hpddm : $ff_HPDDM_LIB $ff_HPDDM_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

			    TOOL_COMPILE_hpddm=""

	  fi



	    ff_HTOOL_LIB=`awk -F'=' '"HTOOL_LIB "==$1 {print $2}' $ffconfpetscc`
	    ff_HTOOL_INCLUDE=`awk -F'=' '"HTOOL_INCLUDE "==$1 {print $2}' $ffconfpetscc`
	   if test -n "$ff_HTOOL_LIB"; then
			    ff_htool_ok=yes;


    if test -z "$ff_where_lib_conf_htool"  ; then
	    echo "htool LD $ff_HTOOL_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_HTOOL_INCLUDE" && echo "htool INCLUDE $ff_HTOOL_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_htool=1
	    ff_where_lib_htool="$ff_HTOOL_LIB"
	    ff_where_inc_htool="$ff_HTOOL_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add htool : $ff_HTOOL_LIB ;  $ff_HTOOL_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add htool : $ff_HTOOL_LIB ;  $ff_HTOOL_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add htool : $ff_HTOOL_LIB $ff_HTOOL_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add htool : $ff_HTOOL_LIB $ff_HTOOL_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

			    TOOL_COMPILE_htool=""

	  fi



	    ff_SUPERLU_LIB=`awk -F'=' '"SUPERLU_LIB "==$1 {print $2}' $ffconfpetscc`
	    ff_SUPERLU_INCLUDE=`awk -F'=' '"SUPERLU_INCLUDE "==$1 {print $2}' $ffconfpetscc`
	   if test -n "$ff_SUPERLU_LIB"; then
			    ff_superlu_ok=yes;


    if test -z "$ff_where_lib_conf_superlu"  ; then
	    echo "superlu LD $ff_SUPERLU_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_SUPERLU_INCLUDE" && echo "superlu INCLUDE $ff_SUPERLU_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_superlu=1
	    ff_where_lib_superlu="$ff_SUPERLU_LIB"
	    ff_where_inc_superlu="$ff_SUPERLU_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add superlu : $ff_SUPERLU_LIB ;  $ff_SUPERLU_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add superlu : $ff_SUPERLU_LIB ;  $ff_SUPERLU_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add superlu : $ff_SUPERLU_LIB $ff_SUPERLU_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add superlu : $ff_SUPERLU_LIB $ff_SUPERLU_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

			    TOOL_COMPILE_superlu=""

	  fi



	    ff_MMG_LIB=`awk -F'=' '"MMG_LIB "==$1 {print $2}' $ffconfpetscc`
	    ff_MMG_INCLUDE=`awk -F'=' '"MMG_INCLUDE "==$1 {print $2}' $ffconfpetscc`
	   if test -n "$ff_MMG_LIB"; then
			    ff_mmg_ok=yes;


    if test -z "$ff_where_lib_conf_mmg"  ; then
	    echo "mmg LD $ff_MMG_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_MMG_INCLUDE" && echo "mmg INCLUDE $ff_MMG_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_mmg=1
	    ff_where_lib_mmg="$ff_MMG_LIB"
	    ff_where_inc_mmg="$ff_MMG_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add mmg : $ff_MMG_LIB ;  $ff_MMG_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add mmg : $ff_MMG_LIB ;  $ff_MMG_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add mmg : $ff_MMG_LIB $ff_MMG_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add mmg : $ff_MMG_LIB $ff_MMG_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

			    TOOL_COMPILE_mmg=""

	  fi



	    ff_PARMMG_LIB=`awk -F'=' '"PARMMG_LIB "==$1 {print $2}' $ffconfpetscc`
	    ff_PARMMG_INCLUDE=`awk -F'=' '"PARMMG_INCLUDE "==$1 {print $2}' $ffconfpetscc`
	   if test -n "$ff_PARMMG_LIB"; then
			    ff_parmmg_ok=yes;


    if test -z "$ff_where_lib_conf_parmmg"  ; then
	    echo "parmmg LD $ff_PARMMG_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_PARMMG_INCLUDE" && echo "parmmg INCLUDE $ff_PARMMG_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_parmmg=1
	    ff_where_lib_parmmg="$ff_PARMMG_LIB"
	    ff_where_inc_parmmg="$ff_PARMMG_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add parmmg : $ff_PARMMG_LIB ;  $ff_PARMMG_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add parmmg : $ff_PARMMG_LIB ;  $ff_PARMMG_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add parmmg : $ff_PARMMG_LIB $ff_PARMMG_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add parmmg : $ff_PARMMG_LIB $ff_PARMMG_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

			    TOOL_COMPILE_parmmg=""

	  fi



	    ff_SCALAPACK_LIB=`awk -F'=' '"SCALAPACK_LIB "==$1 {print $2}' $ffconfpetscc`
	    ff_SCALAPACK_INCLUDE=`awk -F'=' '"SCALAPACK_INCLUDE "==$1 {print $2}' $ffconfpetscc`
	   if test -n "$ff_SCALAPACK_LIB"; then
			    ff_scalapack_ok=yes;


    if test -z "$ff_where_lib_conf_scalapack"  ; then
	    echo "scalapack LD $ff_SCALAPACK_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_SCALAPACK_INCLUDE" && echo "scalapack INCLUDE $ff_SCALAPACK_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_scalapack=1
	    ff_where_lib_scalapack="$ff_SCALAPACK_LIB"
	    ff_where_inc_scalapack="$ff_SCALAPACK_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add scalapack : $ff_SCALAPACK_LIB ;  $ff_SCALAPACK_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add scalapack : $ff_SCALAPACK_LIB ;  $ff_SCALAPACK_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add scalapack : $ff_SCALAPACK_LIB $ff_SCALAPACK_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add scalapack : $ff_SCALAPACK_LIB $ff_SCALAPACK_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

			    TOOL_COMPILE_scalapack=""

	  fi



	    ff_SUITESPARSE_LIB=`awk -F'=' '"SUITESPARSE_LIB "==$1 {print $2}' $ffconfpetscc`
	    ff_SUITESPARSE_INCLUDE=`awk -F'=' '"SUITESPARSE_INCLUDE "==$1 {print $2}' $ffconfpetscc`
	   if test -n "$ff_SUITESPARSE_LIB"; then
			    ff_suitesparse_ok=yes;


    if test -z "$ff_where_lib_conf_suitesparse"  ; then
	    echo "suitesparse LD $ff_SUITESPARSE_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_SUITESPARSE_INCLUDE" && echo "suitesparse INCLUDE $ff_SUITESPARSE_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_suitesparse=1
	    ff_where_lib_suitesparse="$ff_SUITESPARSE_LIB"
	    ff_where_inc_suitesparse="$ff_SUITESPARSE_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add suitesparse : $ff_SUITESPARSE_LIB ;  $ff_SUITESPARSE_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add suitesparse : $ff_SUITESPARSE_LIB ;  $ff_SUITESPARSE_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add suitesparse : $ff_SUITESPARSE_LIB $ff_SUITESPARSE_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add suitesparse : $ff_SUITESPARSE_LIB $ff_SUITESPARSE_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

			    TOOL_COMPILE_suitesparse=""

	  fi


            if test -z "$ff_BLASLAPACK_LIB"; then

	    ff_BLASLAPACK_LIB=`awk -F'=' '"BLASLAPACK_LIB "==$1 {print $2}' $ffconfpetscc`
	    ff_BLASLAPACK_INCLUDE=`awk -F'=' '"BLASLAPACK_INCLUDE "==$1 {print $2}' $ffconfpetscc`
	   if test -n "$ff_BLASLAPACK_LIB"; then
			    ff_blaslapack_ok=yes;


    if test -z "$ff_where_lib_conf_blaslapack"  ; then
	    echo "blaslapack LD $ff_BLASLAPACK_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_BLASLAPACK_INCLUDE" && echo "blaslapack INCLUDE $ff_BLASLAPACK_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_blaslapack=1
	    ff_where_lib_blaslapack="$ff_BLASLAPACK_LIB"
	    ff_where_inc_blaslapack="$ff_BLASLAPACK_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add blaslapack : $ff_BLASLAPACK_LIB ;  $ff_BLASLAPACK_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add blaslapack : $ff_BLASLAPACK_LIB ;  $ff_BLASLAPACK_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add blaslapack : $ff_BLASLAPACK_LIB $ff_BLASLAPACK_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add blaslapack : $ff_BLASLAPACK_LIB $ff_BLASLAPACK_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

			    TOOL_COMPILE_blaslapack=""

	  fi


            if test -n "$ff_BLASLAPACK_LIB"; then
                ff_where_lib_blaslapack="`echo $ff_BLASLAPACK_LIB | sed -e 's/[^ ]*scalapack[^ ]*//g' | sed -e 's/[^ ]*blacs[^ ]*//g'`"
            fi
            fi
            if test -f $d/libslepc.$ff_suffix_dylib -o -f $d/libslepc.a ; then
				   ff_slepccomplex_ok=yes
                   ff_SLEPCCOMPLEX_LIB="-Wl,-rpath,$d -L$d -lslepc"

    if test -z "$ff_where_lib_conf_slepccomplex"  ; then
	    echo "slepccomplex LD $ff_SLEPCCOMPLEX_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_where_inc_petsccomplex" && echo "slepccomplex INCLUDE $ff_where_inc_petsccomplex "  >>$ff_where_lib_conf
            ff_where_lib_conf_slepccomplex=1
	    ff_where_lib_slepccomplex="$ff_SLEPCCOMPLEX_LIB"
	    ff_where_inc_slepccomplex="$ff_where_inc_petsccomplex"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add slepccomplex : $ff_SLEPCCOMPLEX_LIB ;  $ff_where_inc_petsccomplex in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add slepccomplex : $ff_SLEPCCOMPLEX_LIB ;  $ff_where_inc_petsccomplex in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add slepccomplex : $ff_SLEPCCOMPLEX_LIB $ff_where_inc_petsccomplex in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add slepccomplex : $ff_SLEPCCOMPLEX_LIB $ff_where_inc_petsccomplex in  $ff_where_lib_conf \"" >&6;}
        fi

                   if test -z "$ff_arpack_ok"; then
                       if test -f $d/libarpack.$ff_suffix_dylib -o -f $d/libarpack.a ; then
                           ff_arpack_ok=yes
                           ff_arpack_libs="-Wl,-rpath,$d -L$d -larpack"

    if test -z "$ff_where_lib_conf_arpack"  ; then
	    echo "arpack LD $ff_arpack_libs"  >>$ff_where_lib_conf
	    test -n "" && echo "arpack INCLUDE  "  >>$ff_where_lib_conf
            ff_where_lib_conf_arpack=1
	    ff_where_lib_arpack="$ff_arpack_libs"
	    ff_where_inc_arpack=""
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add arpack : $ff_arpack_libs ;   in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add arpack : $ff_arpack_libs ;   in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add arpack : $ff_arpack_libs  in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add arpack : $ff_arpack_libs  in  $ff_where_lib_conf \"" >&6;}
        fi

                       fi
                   fi
			fi
            if test "$ff_slepccomplex_ok" != yes ;   then

# Check whether --with-slepccomplex_include was given.
if test ${with_slepccomplex_include+y}
then :
  withval=$with_slepccomplex_include;
fi


# Check whether --with-slepccomplex_ldflags was given.
if test ${with_slepccomplex_ldflags+y}
then :
  withval=$with_slepccomplex_ldflags;
fi

                if test "$with_slepccomplex_include" != "" || test "$with_slepccomplex_ldflags" != ""
                then
                    # some directives have been specified, use them instead of downloading

    if test -z "$ff_where_lib_conf_slepccomplex"  ; then
	    echo "slepccomplex LD $with_slepccomplex_ldflags"  >>$ff_where_lib_conf
	    test -n "$with_slepccomplex_include" && echo "slepccomplex INCLUDE $with_slepccomplex_include "  >>$ff_where_lib_conf
            ff_where_lib_conf_slepccomplex=1
	    ff_where_lib_slepccomplex="$with_slepccomplex_ldflags"
	    ff_where_inc_slepccomplex="$with_slepccomplex_include"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add slepccomplex : $with_slepccomplex_ldflags ;  $with_slepccomplex_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add slepccomplex : $with_slepccomplex_ldflags ;  $with_slepccomplex_include in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add slepccomplex : $with_slepccomplex_ldflags $with_slepccomplex_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add slepccomplex : $with_slepccomplex_ldflags $with_slepccomplex_include in  $ff_where_lib_conf \"" >&6;}
        fi

                    ff_slepccomplex_ok=yes
                fi
            fi
			else
			 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \" Warning PETSC complex MPI and FF++ MPI not the same: $PETSC_COMPLEX_MPIRUN != $MPIRUN or $PETSC_COMPLEX_SCALAR != complex .\" " >&5
printf "%s\n" "$as_me: \" Warning PETSC complex MPI and FF++ MPI not the same: $PETSC_COMPLEX_MPIRUN != $MPIRUN or $PETSC_COMPLEX_SCALAR != complex .\" " >&6;};
		    fi
            fi
		fi
	done
    done
fi


if test "$ff_petsccomplex_ok" != no ;   then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  with petsc complex  $ff_petsccomplex_ok, with slepc complex $ff_slepccomplex_ok " >&5
printf "%s\n" "$as_me:  with petsc complex  $ff_petsccomplex_ok, with slepc complex $ff_slepccomplex_ok " >&6;}
else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  without petsc complex ***** " >&5
printf "%s\n" "$as_me:  without petsc complex ***** " >&6;}
fi
##  slepc

### end petsc ....
#  chech MPI after petsc ...
if test "$ff_mpi" != yes; then
  # Checking wether we can produce a parallel version
# -------------------------------------------------

ff_save_path="$PATH"
# We need to choose between mpich, openmpi  and lam for the Debian package

# Check whether --with-mpipath was given.
if test ${with_mpipath+y}
then :
  withval=$with_mpipath;
fi


# Check whether --with-mpilibs was given.
if test ${with_mpilibs+y}
then :
  withval=$with_mpilibs;
fi


# Check whether --with-mpilibsc was given.
if test ${with_mpilibsc+y}
then :
  withval=$with_mpilibsc;
fi


# Check whether --with-mpiinc was given.
if test ${with_mpiinc+y}
then :
  withval=$with_mpiinc;
fi


# Check whether --with-mpi was given.
if test ${with_mpi+y}
then :
  withval=$with_mpi;
fi

if test "$with_mpi" != no ; then
#if test "$with_mpi" != no ; then
#AX_MPI(with_mpi=yes, with_mpi=no)
#fi

# Default is mpic++
ff_mpi_suffix="";
if test "$with_mpi" = yes -o -z "$with_mpi"
then
   ff_mpicxx=mpic++
else
  case "$with_mpi" in
 lam|mpich|openmpi)   ff_mpi_suffix=.$with_mpi;ff_mpicxx=mpic++.$with_mpi;;
 *)  ff_mpicxx="$with_mpi" ;;
 esac
fi

if test -n "$with_mpiinc"  -a "$with_mpiinc" != no ; then
  if test  "$with_mpi" = 'no' ; then with_mpi='yes'; fi
  ff_MPI_INCLUDE="$with_mpiinc"
fi
if test -n "$with_mpilibs" -a "$with_mpilibs" != no ; then
    ff_MPI_LIB="$with_mpilibs"
    ff_MPI_LIBC="$with_mpilibs"
    ff_MPI_LIBFC="$with_mpilibs"
    MPICXX="$CXX $ff_MPI_INCLUDE"
    MPIFC="$FC  $ff_MPI_INCLUDE"
    MPICC="$CC  $ff_MPI_INCLUDE"
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:    ---  set  all MPI compile to compiler:   $MPICC, $MPIFC, $MPICC " >&5
printf "%s\n" "$as_me:    ---  set  all MPI compile to compiler:   $MPICC, $MPIFC, $MPICC " >&6;}
fi

if test -n "$with_mpilibsc" -a "$with_mpilibsc" != no ; then
 ff_MPI_LIBC="$with_mpilibsc"
fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPIRUN" >&5
printf %s "checking for MPIRUN... " >&6; }

if test -z "$MPIRUN" ; then
  if test -n "$MSMPI_BIN" -a -x "$MSMPI_BIN/mpiexec.exe" ;  then
     MPIRUN="$MSMPI_BIN"\mpiexec.exe
  else
    for ac_prog in mpiexec mpirun mpiexec.exe
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_MPIRUN+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case $MPIRUN in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_MPIRUN="$MPIRUN" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_MPIRUN="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
MPIRUN=$ac_cv_path_MPIRUN
if test -n "$MPIRUN"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIRUN" >&5
printf "%s\n" "$MPIRUN" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$MPIRUN" && break
done
test -n "$MPIRUN" || MPIRUN="no"

  fi
  if test "$MPIRUN" = no
    then
		 ff_mpi=no
	fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIRUN" >&5
printf "%s\n" "$MPIRUN" >&6; }
if test "ff_mpi" != "no" ; then
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPIRUN option: " >&5
printf %s "checking for MPIRUN option: ... " >&6; }
 ff_mpi_option=""
 ff_okkk=`"$MPIRUN"  -np 2 --oversubscribe echo ff__okkk 2>/dev/null| grep ff__okkk |wc -l`
 if test "$ff_okkk" -eq 2 ; then ff_mpi_option="--oversubscribe" ; fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_mpi_option" >&5
printf "%s\n" "$ff_mpi_option" >&6; }
fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mpipath " >&5
printf %s "checking for mpipath ... " >&6; }

if test "$with_mpi" != no -a ! -d  "$with_mpipath" -a "$MPIRUN" != no ; then
#   if "$MPIRUN" != no ; tehn
    with_mpipath=`$as_dirname -- "$MPIRUN" ||
$as_expr X"$MPIRUN" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$MPIRUN" : 'X\(//\)[^/]' \| \
	 X"$MPIRUN" : 'X\(//\)$' \| \
	 X"$MPIRUN" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"$MPIRUN" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
    with_mpipath=`$as_dirname -- "$with_mpipath" ||
$as_expr X"$with_mpipath" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$with_mpipath" : 'X\(//\)[^/]' \| \
	 X"$with_mpipath" : 'X\(//\)$' \| \
	 X"$with_mpipath" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"$with_mpipath" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
#    echo " ***** with_mpipath $with_mpipath \n"

#    else
#    for i in '/c/Program Files (x86)/MPICH2' '/c/Program Files/MPICH2' 'c:\Program Files (x86)\MPICH2' 'c:\Program Files\MPICH2' ; do
#	test -d "$i" &&  with_mpipath="$i" && break
#    done
#    fi
fi
#echo "****  with_mpipath  '$with_mpipath' $MPIRUN *****"
case "$MPIRUN" in
 */sgi/mpt/*)
	ff_MPI_INCLUDE_DIR=
	ff_MPI_LIB_DIR=
        test -f "$with_mpipath/include/mpif.h" &&  ff_MPI_INCLUDE_DIR="$with_mpipath/include"
        test -f "$with_mpipath/lib/libmpi.so" &&  ff_MPI_LIB_DIR="$with_mpipath/lib"
        if test -n "$ff_MPI_INCLUDE_DIR" -a -n "$ff_MPI_LIB_DIR" ; then
            ff_MPI_INCLUDE="-I'$ff_MPI_INCLUDE_DIR' "
            with_mpiinc="$ff_MPI_INCLUDE"
            ff_MPI_LIBC="-L'$ff_MPI_LIB_DIR' -lmpi"
            ff_MPI_LIB="-L'$ff_MPI_LIB_DIR' -lmpi++ -lmpi"
            ff_MPI_LIBFC="-L'$ff_MPI_LIB_DIR'  -lmpi"
	    ff_mpitype=sgi
            test -z "$MPICXX" && MPICXX="$CXX $ff_MPI_INCLUDE"
            test -z "$MPIFC"  && MPIFC="$FC  $ff_MPI_INCLUDE"
            test -z "$MPICC"  && MPICC="$CC  $ff_MPI_INCLUDE"
#	    echo " *** MPI sgi ..... "
        fi
	;;
esac


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_mpi_path" >&5
printf "%s\n" "$ff_mpi_path" >&6; }






ff_save_cxx="$CXX"
ff_save_libs="$LIBS"


if test "$with_mpi" != no
then
	ff_mpi_path=`$as_dirname -- "$MPIRUN" ||
$as_expr X"$MPIRUN" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$MPIRUN" : 'X\(//\)[^/]' \| \
	 X"$MPIRUN" : 'X\(//\)$' \| \
	 X"$MPIRUN" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"$MPIRUN" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
		case "$ff_mpi_path" in
	    .|"") ff_mpi_path="$PATH";ff_defmpicxx="$ff_mpicxx";;
	    *) ff_mpi_path="$ff_mpi_path";ff_defmpicxx=`expr "//$ff_mpicxx" : '.*/\(.*\)'`;;
	    	esac

	if test -z "$MPICXX" ; then
	    for ac_prog in $ff_defmpicxx mpic++$ff_mpi_suffix mpicxx$ff_mpi_suffix mpiCC$ff_mpi_suffix mpCC hcp mpxlC mpxlC_r cmpic++
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_MPICXX+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case $MPICXX in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_MPICXX="$MPICXX" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $ff_mpi_path
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_MPICXX="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
MPICXX=$ac_cv_path_MPICXX
if test -n "$MPICXX"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPICXX" >&5
printf "%s\n" "$MPICXX" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$MPICXX" && break
done
test -n "$MPICXX" || MPICXX="no"

	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MPICXX" >&5
printf %s "checking for MPICXX... " >&6; }
	fi
	ff_mpicxx="eval $MPICXX"
	CXX=$ff_mpicxx
	LIBS="$LIBS $ff_MPI_LIB"
	test -z "$ff_mpi" && ff_mpi=yes
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <mpi.h>
#include <stdio.h>
int main(int argc,char **argv){
  char name[BUFSIZ];
  int length;

  MPI_Init(&argc, &argv);
  MPI_Get_processor_name(name, &length);
  printf("%s: hello world\n", name);
  MPI_Finalize();
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_mpi=yes
else $as_nop
  ff_mpi=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_mpi" >&5
printf "%s\n" "$ff_mpi" >&6; }

	# Also check that mpirun is there. If it isn't, then MPI is
	# not fully installed.


	if test "$ff_mpi" = yes;
	then

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking MPI_DOUBLE_COMPLEX" >&5
printf %s "checking MPI_DOUBLE_COMPLEX... " >&6; }

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <mpi.h>
MPI_Datatype xxxx=MPI_DOUBLE_COMPLEX;

_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
  ff_mpi_double_complex=yes
else $as_nop
  ff_mpi_double_complex=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_mpi_double_complex" >&5
printf "%s\n" "$ff_mpi_double_complex" >&6; }
if test "$ff_mpi_double_complex" = yes  ; then

printf "%s\n" "#define HAVE_MPI_DOUBLE_COMPLEX 1" >>confdefs.h

fi


	  echo "MPI CC $ff_mpi" >config_LIB_INFO

		# We do not AC_DEFINE any special flag for parallel
		# computation here, because it must only be set when the
 		# parallel program is compiled (see src/mpi/Makfile.am)
		ff_mpiprog="FreeFem++-mpi${EXEEXT}"
   		  MPIPROG="$ff_mpiprog"

   		  MPISCRIPT="ff-mpirun"

   		  MPIRUN="$MPIRUN"

                  MPICXX=$MPICXX

	else
	        MPICXX=$ff_save_cxx

	fi

	if test "$ff_mpi" = yes;
	then
	  if test "$enable_fortran" != no
	  then


	      if test -z "$MPIFC" ; then
		  for ac_prog in mpif90$ff_mpi_suffix mpxlf95_r mpxlf90_r mpxlf95 mpxlf90 mpf90 cmpif90c
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_MPIFC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case $MPIFC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_MPIFC="$MPIFC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $ff_mpi_path
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_MPIFC="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
MPIFC=$ac_cv_path_MPIFC
if test -n "$MPIFC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPIFC" >&5
printf "%s\n" "$MPIFC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$MPIFC" && break
done
test -n "$MPIFC" || MPIFC=""""

	      fi

	  fi

#	echo " ********************ffmpi= '$ff_mpi' *************   "
	ff_MPI_INCLUDE="$with_mpiinc"
	if test -z "$ff_mpitype" ; then
           test -n "$MPICXX" && ff_mpishow=`$MPICXX -show` 2>/dev/null
           test -n "$MPICC" && ff_mpicshow=`$MPICC -show` 2>/dev/null
           test -n "$MPIFC" && ff_mpifcshow=`$MPIFC -show` 2>/dev/null
	   if test "$with_mpiinc" = no -o -z "$with_mpiinc" ; then
	      ff_MPI_INCLUDE=`echo $ff_mpishow|tr ' ' '\n' | sed '1 d'| grep -E '^[-/][^WLlOgpf]|^-Wp,'|tr '\n' ' '`
	      ff_mpi_idir=`echo $ff_mpishow|tr ' ' '\n'| grep -E '^-I'|sed s/^-I//|tr '\n' ' '`' /usr/include'
	    else
	      ff_mpi_idir=`echo $ff_MPI_INCLUDE|tr ' ' '\n'| grep -E '^-I'|sed s/^-I//|tr '\n' ' '`' /usr/include'
	    fi
	    if test "$with_mpilibs" = no -o -z "$with_mpilibs" ; then
		ff_MPI_LIB_DIRS=""
		ff_MPI_LIB=`echo $ff_mpishow|tr ' ' '\n'| grep -E '^-[Llp]|^-Wl,'|tr '\n' ' '`
		ff_MPI_LIBC=`echo $ff_mpicshow|tr ' ' '\n'| grep -E '^-[Llp]|^-Wl,'|tr '\n' ' '`
		ff_MPI_LIBFC=`echo $ff_mpifcshow|tr ' ' '\n'| grep -E '^-[Llp]|^-Wl,'|grep -v 'commons,use_dylibs' |tr '\n' ' '`
            else
	      ff_MPI_LIB="$with_mpilibs"
	      ff_MPI_LIBC="$with_mpilibs"
	      ff_MPI_LIBFC="$with_mpilibs"
	    fi
	    ff_mpi_ldir=`echo $ff_MPI_LIB|tr ' ' '\n'| grep -E '^-[Llp]|^-Wl,'|sed -e 's/^-[Llp]//' -e 's/^-Wl,//'  |tr '\n' ' '`' /usr/lib']

	    if  test -z "$ff_MPI_INCLUDE_DIR" ; then
		for i in $ff_mpi_idir; do
		    if test -f "$i/mpi.h" -a -z "$ff_MPI_INCLUDE_DIR"  ;then
			ff_MPI_INCLUDE_DIR=$i
		    fi
		done
	    fi
	    for i in $ff_mpi_ldir; do
	      if test -d $i ; then
		ff_tmp=`ls $i/libmpi.*|head -1`
		if test  -f "$ff_tmp"  -a -z "$ff_MPI_LIB_DIRS"  ;then
		    ff_MPI_LIB_DIRS=$i
		fi
	      fi
	    done
	fi
	MPICXX=$MPICXX


	if test -z "$MPICC" ; then
	    for ac_prog in mpicc$ff_mpi_suffix hcc mpcc mpcc_r mpxlc cmpicc
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_MPICC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case $MPICC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_MPICC="$MPICC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $ff_mpi_path
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_MPICC="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
MPICC=$ac_cv_path_MPICC
if test -n "$MPICC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MPICC" >&5
printf "%s\n" "$MPICC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$MPICC" && break
done
test -n "$MPICC" || MPICC=""""

	fi
	MPICC=$MPICC


	if test ! -f "$ff_MPI_INCLUDE_DIR/mpif.h"  ; then
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  MPI without fortran no file \"$ff_MPI_INCLUDE_DIR/mpif.h\"  " >&5
printf "%s\n" "$as_me:  MPI without fortran no file \"$ff_MPI_INCLUDE_DIR/mpif.h\"  " >&6;}
	else
	    if test -n "$MPIFC" ; then

    if test -z "$ff_where_lib_conf_mpifc"  ; then
	    echo "mpifc LD $ff_MPI_LIBFC"  >>$ff_where_lib_conf
	    test -n "$ff_MPI_INCLUDE" && echo "mpifc INCLUDE $ff_MPI_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_mpifc=1
	    ff_where_lib_mpifc="$ff_MPI_LIBFC"
	    ff_where_inc_mpifc="$ff_MPI_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add mpifc : $ff_MPI_LIBFC ;  $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add mpifc : $ff_MPI_LIBFC ;  $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add mpifc : $ff_MPI_LIBFC $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add mpifc : $ff_MPI_LIBFC $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi


    if test -z "$ff_where_lib_conf_mpif77"  ; then
	    echo "mpif77 LD $ff_MPI_LIBFC"  >>$ff_where_lib_conf
	    test -n "$ff_MPI_INCLUDE" && echo "mpif77 INCLUDE $ff_MPI_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_mpif77=1
	    ff_where_lib_mpif77="$ff_MPI_LIBFC"
	    ff_where_inc_mpif77="$ff_MPI_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add mpif77 : $ff_MPI_LIBFC ;  $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add mpif77 : $ff_MPI_LIBFC ;  $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add mpif77 : $ff_MPI_LIBFC $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add mpif77 : $ff_MPI_LIBFC $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

	    fi
  	fi
	if test -n "$MPICXX" ; then

    if test -z "$ff_where_lib_conf_mpi"  ; then
	    echo "mpi LD $ff_MPI_LIB"  >>$ff_where_lib_conf
	    test -n "$ff_MPI_INCLUDE" && echo "mpi INCLUDE $ff_MPI_INCLUDE "  >>$ff_where_lib_conf
            ff_where_lib_conf_mpi=1
	    ff_where_lib_mpi="$ff_MPI_LIB"
	    ff_where_inc_mpi="$ff_MPI_INCLUDE"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add mpi : $ff_MPI_LIB ;  $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add mpi : $ff_MPI_LIB ;  $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add mpi : $ff_MPI_LIB $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add mpi : $ff_MPI_LIB $ff_MPI_INCLUDE in  $ff_where_lib_conf \"" >&6;}
        fi

	fi
	MPI_INC_DIR=$ff_MPI_INCLUDE_DIR

	MPI_INCLUDE=$ff_MPI_INCLUDE

	MPI_LIB_DIRS=$ff_MPI_LIB_DIRS

	MPI_LIB=$ff_MPI_LIB

	MPI_LIBC=$ff_MPI_LIBC

	MPI_LIBFC=$ff_MPI_LIBFC

	MPI_RUN_OPTION=$ff_mpi_option

        SKIP_TESTS_MPI="no"

	fi
	CXX="$ff_save_cxx"
	LIBS="$ff_save_libs"
fi
fi
##  clean on MPI variable if not MPI ...
if test "$ff_mpi" != yes ; then

	  MPIRUN=""

	  MPICC=""

	  MPICXX=""

	  MPIFC=""

	  MPI_INCLUDE=""

	  MPI_LIB_DIRS=""

	  MPI_LIB=""

	  MPI_LIBC=""

	  MPI_LIBFC=""

          SKIP_TESTS_MPI="yes"

	  ff_mpi=no
fi

# Local Variables:
# mode:shell-script
# ispell-local-dictionary:"british"
# coding:utf-8
# End:

fi

# FFCS needs to change some of the FF makefiles to compile without MPI
 if test $ff_mpi = yes; then
  FFCS_MPIOK_TRUE=
  FFCS_MPIOK_FALSE='#'
else
  FFCS_MPIOK_TRUE='#'
  FFCS_MPIOK_FALSE=
fi


#replacing wget with another command
ff_wget_command="wget --no-check-certificate"
ff_wget=no


# Check whether --with-wget was given.
if test ${with_wget+y}
then :
  withval=$with_wget; enable_download=yes
	   ff_wget=yes
	   ff_wget_command="${withval}"
fi


ff_MKL_libpath=yes

# Check whether --with-mkl was given.
if test ${with_mkl+y}
then :
  withval=$with_mkl; ff_mkl_libpath="${withval}"
fi


# if enabling downloads find wget or curl to do download
# ------------------------------------------------------

if test  "$ff_wget" =  no
then
	ff_wget=""
	# Extract the first word of "wget --no-check-certificate", so it can be a program name with args.
set dummy wget --no-check-certificate; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ff_wget+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$ff_wget"; then
  ac_cv_prog_ff_wget="$ff_wget" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ff_wget="yes"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  test -z "$ac_cv_prog_ff_wget" && ac_cv_prog_ff_wget="no"
fi
fi
ff_wget=$ac_cv_prog_ff_wget
if test -n "$ff_wget"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_wget" >&5
printf "%s\n" "$ff_wget" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


fi
if test  "$ff_wget" = no
then
        ff_wget_command="curl --fail -O "
  	ff_curl=""
	# Extract the first word of "curl -O", so it can be a program name with args.
set dummy curl -O; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ff_curl+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$ff_curl"; then
  ac_cv_prog_ff_curl="$ff_curl" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ff_curl="yes"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  test -z "$ac_cv_prog_ff_curl" && ac_cv_prog_ff_curl="no"
fi
fi
ff_curl=$ac_cv_prog_ff_curl
if test -n "$ff_curl"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_curl" >&5
printf "%s\n" "$ff_curl" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


	ff_wget="$ff_curl"
fi

# for automatique compilation of
# lib in download
if test  "$ff_wget" != yes  -a "$enable_download"  = "yes"  ; then
  enable_download=no
  as_fn_error 1 "   enable-download and no wget or curl. " "$LINENO" 5;
fi
if test "$enable_download"  = "yes" ; then
DOWNLOADCOMPILE="compile-pkg install-other"
else
DOWNLOADCOMPILE=
enable_download=no
fi
if test "$enable_download"  = "yes"  ; then
 # Extract the first word of "git", so it can be a program name with args.
set dummy git; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ff_git+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$ff_git"; then
  ac_cv_prog_ff_git="$ff_git" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ff_git="yes"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  test -z "$ac_cv_prog_ff_git" && ac_cv_prog_ff_git="no"
fi
fi
ff_git=$ac_cv_prog_ff_git
if test -n "$ff_git"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_git" >&5
printf "%s\n" "$ff_git" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


 case "$ff_git"  in
 *no*)
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  to install missing package  under debian or ubuntu, try " >&5
printf "%s\n" "$as_me:  to install missing package  under debian or ubuntu, try " >&6;}
     test "$ff_git" = no && { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  sudo apt-get install git" >&5
printf "%s\n" "$as_me:  sudo apt-get install git" >&6;}
     as_fn_error $? " Sorry missing  git command !" "$LINENO" 5;;
 esac
fi

WGET=$ff_wget_command


#  modif FH -----
#  -- looking for cadna
#  the round-off error propagation
# the web site http://www-anp.lip6.fr/cadna/
#  --------------------

# Check whether --with-cadna was given.
if test ${with_cadna+y}
then :
  withval=$with_cadna;
fi

if test "$with_cadna" != no -o -n  "$with_cadna"
    then
    ff_cadna="$with_cadna"
fi
ff_cadna_ok=no
if test "$with_cadna" != no
    then
    ff_libs_old="$LIBS"
    ff_ldflags_old="$LDFLAGS"
    ff_cadna_dir="${curdir}/3rdparty/cadna"
    LDFLAGS="$LDFLAGS -L$ff_cadna_dir"
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for arit_zero in -lcadnafree" >&5
printf %s "checking for arit_zero in -lcadnafree... " >&6; }
if test ${ac_cv_lib_cadnafree_arit_zero+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lcadnafree  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

namespace conftest {
  extern "C" int arit_zero ();
}
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
return conftest::arit_zero ();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ac_cv_lib_cadnafree_arit_zero=yes
else $as_nop
  ac_cv_lib_cadnafree_arit_zero=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cadnafree_arit_zero" >&5
printf "%s\n" "$ac_cv_lib_cadnafree_arit_zero" >&6; }
if test "x$ac_cv_lib_cadnafree_arit_zero" = xyes
then :
  ff_cadna_ok=yes
fi

           for ac_header in ${ff_cadna_dir}/cadnafree.h
do :
  as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"
then :
  cat >>confdefs.h <<_ACEOF
#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
 ff_cadna_h=yes
else $as_nop
  ff_cadna_h=no
fi

done

    LIBS="$ff_libs_old"
    LDFLAGS="$ff_ldflags_old"

    if test "$ff_cadna_ok" = yes  -a "$ff_cadna_h" = yes
	then

printf "%s\n" "#define HAVE_CADNA 1" >>confdefs.h

	CPPFLAGS="$CPPFLAGS -I$ff_cadna_dir"
	LIBS=" -L$ff_cadna_dir -lcadnafree $ff_libs_old"
    else
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:  without cadna ***** " >&5
printf "%s\n" "$as_me:  without cadna ***** " >&6;}
    fi
else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  without cadna ***** " >&5
printf "%s\n" "$as_me:  without cadna ***** " >&6;}
fi

# Looking for FFTW
# ----------------

# ALH - 18/9/13 - deactivates FFTW detection for testing purposes
# Check whether --enable-system_fftw was given.
if test ${enable_system_fftw+y}
then :
  enableval=$enable_system_fftw;
fi

if test "$enable_system_fftw" != no
then

    # ALH - 4/9/13 - avoid recompiling FFTW if a copy was found on the system (request from Helmut Jarausch, 1/8/13)

    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fftw_execute in -lfftw3" >&5
printf %s "checking for fftw_execute in -lfftw3... " >&6; }
if test ${ac_cv_lib_fftw3_fftw_execute+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lfftw3  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

namespace conftest {
  extern "C" int fftw_execute ();
}
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
return conftest::fftw_execute ();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ac_cv_lib_fftw3_fftw_execute=yes
else $as_nop
  ac_cv_lib_fftw3_fftw_execute=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3_fftw_execute" >&5
printf "%s\n" "$ac_cv_lib_fftw3_fftw_execute" >&6; }
if test "x$ac_cv_lib_fftw3_fftw_execute" = xyes
then :
  ff_fftw_ok=yes
fi

           for ac_header in fftw3.h
do :
  ac_fn_cxx_check_header_compile "$LINENO" "fftw3.h" "ac_cv_header_fftw3_h" "$ac_includes_default"
if test "x$ac_cv_header_fftw3_h" = xyes
then :
  printf "%s\n" "#define HAVE_FFTW3_H 1" >>confdefs.h
 ff_fftw_h=yes
else $as_nop
  ff_fftw_h=no
fi

done
fi

if test "$ff_fftw_ok" = yes -a "$ff_fftw_h" = yes
then

    if test -z "$ff_where_lib_conf_fftw3"  ; then
	    echo "fftw3 LD -lfftw3"  >>$ff_where_lib_conf
	    test -n "" && echo "fftw3 INCLUDE  "  >>$ff_where_lib_conf
            ff_where_lib_conf_fftw3=1
	    ff_where_lib_fftw3="-lfftw3"
	    ff_where_inc_fftw3=""
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add fftw3 : -lfftw3 ;   in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add fftw3 : -lfftw3 ;   in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add fftw3 : -lfftw3  in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add fftw3 : -lfftw3  in  $ff_where_lib_conf \"" >&6;}
        fi

else
    # Check whether --enable-download-fftw was given.
if test ${enable_download_fftw+y}
then :
  enableval=$enable_download_fftw;
fi

    if test "$enable_download_fftw" != no -a "$enable_download" = yes
    then
        ff_DOWNLOAD_FFTW=fftw
    fi
fi

# used in [[file:3rdparty/fftw/Makefile.am::DOWNLOAD_FFTW]]

DOWNLOAD_FFTW=$ff_DOWNLOAD_FFTW




# Looking for the BLAS
# --------------------

ff_blas_ok=no
ff_blas_inc=""

# ALH - 18/9/13 - give the option to deactivate system blas for testing purposes
# Check whether --enable-system-blas was given.
if test ${enable_system_blas+y}
then :
  enableval=$enable_system_blas;
fi

if test "$ff_where_lib_conf_blaslapack" = 1  ; then
  echo " use BLAS/Lapack of petsc "
#  echo "  lib: $ff_where_lib_blaslapack inc: $ff_where_inc_blaslapack"
	    ff_blas_ok=yes
	    ff_lapack_ok=yes
	    ff_blas_libs="$ff_where_lib_blaslapack"
	    ff_lapack_lib=
	    ff_blas_inc="$ff_where_inc_blaslapack"

    if test -z "$ff_where_lib_conf_lapack"  ; then
	    echo "lapack LD $ff_mkl_lapack"  >>$ff_where_lib_conf
	    test -n "$ff_blas_inc" && echo "lapack INCLUDE $ff_blas_inc "  >>$ff_where_lib_conf
            ff_where_lib_conf_lapack=1
	    ff_where_lib_lapack="$ff_mkl_lapack"
	    ff_where_inc_lapack="$ff_blas_inc"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add lapack : $ff_mkl_lapack ;  $ff_blas_inc in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add lapack : $ff_mkl_lapack ;  $ff_blas_inc in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add lapack : $ff_mkl_lapack $ff_blas_inc in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add lapack : $ff_mkl_lapack $ff_blas_inc in  $ff_where_lib_conf \"" >&6;}
        fi


    if test -z "$ff_where_lib_conf_blas"  ; then
	    echo "blas LD $ff_blas_libs"  >>$ff_where_lib_conf
	    test -n "$ff_blas_inc" && echo "blas INCLUDE $ff_blas_inc "  >>$ff_where_lib_conf
            ff_where_lib_conf_blas=1
	    ff_where_lib_blas="$ff_blas_libs"
	    ff_where_inc_blas="$ff_blas_inc"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add blas : $ff_blas_libs ;  $ff_blas_inc in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add blas : $ff_blas_libs ;  $ff_blas_inc in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add blas : $ff_blas_libs $ff_blas_inc in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add blas : $ff_blas_libs $ff_blas_inc in  $ff_where_lib_conf \"" >&6;}
        fi

	   { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  BLAS and LAPACK  from  petsc ***** " >&5
printf "%s\n" "$as_me:  BLAS and LAPACK  from  petsc ***** " >&6;}
	   if  echo  "$ff_where_lib_blaslapack"| grep -q  " -lmkl"  ; then
	     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:  MKL  from  petsc ***** " >&5
printf "%s\n" "$as_me:  MKL  from  petsc ***** " >&6;}

    if test -z "$ff_where_lib_conf_mkl"  ; then
	    echo "mkl LD $ff_blas_libs"  >>$ff_where_lib_conf
	    test -n "$ff_blas_inc" && echo "mkl INCLUDE $ff_blas_inc "  >>$ff_where_lib_conf
            ff_where_lib_conf_mkl=1
	    ff_where_lib_mkl="$ff_blas_libs"
	    ff_where_inc_mkl="$ff_blas_inc"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add mkl : $ff_blas_libs ;  $ff_blas_inc in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add mkl : $ff_blas_libs ;  $ff_blas_inc in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add mkl : $ff_blas_libs $ff_blas_inc in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add mkl : $ff_blas_libs $ff_blas_inc in  $ff_where_lib_conf \"" >&6;}
        fi

            ff_mkl_ok=yes
			ff_mkl=yes
	   fi

fi

if test "$enable_system_blas" != no -a "$ff_blas_ok" = no
then

    # User-specified location
    # add MKL  seach dec 2010  FH ....

    ff_mkl_flags=""
    if test "$ff_mkl_libpath" != "not" ; then
	ff_CFLAGS="$CFLAGS"
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -mkl" >&5
printf %s "checking whether the C compiler accepts -mkl... " >&6; }
	check_save_flags="$CFLAGS"
	ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

	CFLAGS="$CFLAGS -mkl"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		CFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


	if test  "$ff_CFLAGS" != "$CFLAGS" ; then
	    ff_ff_mkl_flags="-mkl"
	fi
	CFLAGS="$ff_CFLAGS"
    fi

    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MKL" >&5
printf %s "checking for MKL... " >&6; }
    ff_mkl_root=""
    if test "$ff_mkl_libpath" != "not" -a -z "$ff_mkl_flags" ; then

	if test "$ff_mkl_libpath"  = "yes"  ; then
	    ff_IFS="$IFS"
	    IFS=":"
	    for i in $LD_LIBRARY_PATH:$LIBRARY_PATH ; do
		case $i in
		    */mkl/*) ff_mkl_libpath=$i;;
		esac ;
	    done;
	    IFS="$ff_IFS"
#	else
#	    ff_mkl_libpath=no
	fi

	if test "$ff_mkl_libpath" != "no" -a -d "$ff_mkl_libpath" ; then
	    ff_mkl_root=`expr "//$ff_mkl_libpath" : '//\(.*\)/lib.*'`
	    ff_mkl_arch=`expr "//$ff_mkl_libpath" : '//.*/lib/\(.*\)'`
            ff_mkl_lp=_lp64
            case "$ff_mkl_arch" in
		*64*)  ff_mkl_lp=_lp64
	    esac
            case $F77 in
		*ifort*) ff_mkl_cc=intel;;
		*) ff_mkl_cc=gf;;
            esac
            # bof bof ....
	    case "$MPIRUN" in
		*/sgi/*)         ff_mkl_mpi=_sgimpt;;
		*/intel/*)         ff_mkl_mpi=_intelmpi;;
		*)        ff_mkl_mpi=_openmpi;;
	    esac
#            echo ................  ff_mkl_root = $ff_mkl_root  .. $ff_mkl_arch
	    if test ! -d "$ff_mkl_libpath" ; then
		ff_mkl_libpath="$ff_mkl_root/lib/$ff_mkl_arch"
	    fi
		mkl_l="-Wl,-rpath,$ff_mkl_libpath -L$ff_mkl_libpath"
		mkl_piomp5=$(realpath $ff_mkl_libpath/../../compiler/lib/)
		ff_mkl_inc=$(realpath $ff_mkl_libpath/../include)
		ff_blas_inc="-I$ff_mkl_inc"

		if test -d "$mkl_piomp5" ; then mkl_l="$mkl_l -Wl,-rpath,$mkl_piomp5 -L$mkl_piomp5" ; fi
#		echo " ################### $mkl_l $ff_blas_inc "
	    if test  -f "$ff_mkl_libpath/libmkl_rt.$ff_suffix_dylib" ; then
		 mkl_blas=rt
		 mkl_lapack=rt
		 ff_mkl_mlt="$mkl_l -lmkl_rt -lmkl_intel_thread -lmkl_core  $ff_iomp5 $ff_pthread"
		 ff_mkl_blas="$mkl_l -lmkl_rt -lmkl_sequential -lmkl_core $ff_pthread"
		 ff_mkl_lapack="$ff_mkl_blas"
	    elif test -f "$ff_mkl_libpath/libmkl_lapack.$ff_suffix_dylib" ; then
		 ff_mkl_mlt="$mkl_l -lmkl_${ff_mkl_cc}${ff_mkl_lp} -lmkl_lapack -lmkl_intel${ff_mkl_lp} -lmkl_intel_thread  -lmkl_core -lguide  -lm -lpthread"
		 ff_mkl_blas="$mkl_l -lmkl_${ff_mkl_cc}${ff_mkl_lp} -lmkl_lapack -lmkl_intel${ff_mkl_lp} -lmkl_sequential -lmkl_core -lguide -lm -lpthread"
		 ff_mkl_lapack="$mkl_l -lmkl_lapack"
	    else
		 ff_mkl_mlt="$ff_ldbg $mkl_l  -lmkl_${ff_mkl_cc}${ff_mkl_lp}  -lmkl_intel${ff_mkl_lp}  -lmkl_intel_thread  -lmkl_core -lmkl_intel_thread $ff_iomp5  $ff_ldeg  -lm $ff_pthread"
		 ff_mkl_blas="$ff_ldbg $mkl_l -lmkl_${ff_mkl_cc}${ff_mkl_lp}  -lmkl_intel${ff_mkl_lp} -lmkl_sequential -lmkl_core  -lmkl_sequential $ff_ldeg   -lm $ff_pthread"
		 ff_mkl_lapack="$ff_mkl_blas"
	    fi
	    if test -f "-L$ff_mkl_libpathmkl_scalapack${ff_mkl_lp}" ; then
            ff_mkl_scalapack="$mkl_l -lmkl_blacs${ff_mkl_mpi}${ff_mkl_lp} -lmkl_scalapack${ff_mkl_lp} "
            ff_mkl_blacs="$mkl_l -lmkl_blacs${ff_mkl_mpi}${ff_mkl_lp} -lmkl_scalapack${ff_mkl_lp}"
	    fi
	    ff_blas_ok=yes
	    ff_lapack_ok=yes

	    # <<enable_mkl_mlt>> ALH - 6/11/13 - request from Atsushi Suzuki - the default MKL library must be able to
	    # handle threads when FF is connected to AS' solver. So we need an option to configure FF with the
	    # multithreaded MKL by default.

	    # Check whether --enable-mkl_mlt was given.
if test ${enable_mkl_mlt+y}
then :
  enableval=$enable_mkl_mlt;
fi


	    if test "$enable_mkl_mlt" = yes
	    then
		ff_blas_libs="$ff_mkl_mlt"
	    else
		ff_blas_libs="$ff_mkl_blas"
	    fi

	    ff_blas_inc="-I$ff_mkl_root/include"
	    	    if test "$ff_mkl_mpi" = "_intelmpi" ; then

    if test -z "$ff_where_lib_conf_scalapack"  ; then
	    echo "scalapack LD $ff_mkl_scalapack"  >>$ff_where_lib_conf
	    test -n "$ff_blas_inc" && echo "scalapack INCLUDE $ff_blas_inc "  >>$ff_where_lib_conf
            ff_where_lib_conf_scalapack=1
	    ff_where_lib_scalapack="$ff_mkl_scalapack"
	    ff_where_inc_scalapack="$ff_blas_inc"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add scalapack : $ff_mkl_scalapack ;  $ff_blas_inc in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add scalapack : $ff_mkl_scalapack ;  $ff_blas_inc in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add scalapack : $ff_mkl_scalapack $ff_blas_inc in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add scalapack : $ff_mkl_scalapack $ff_blas_inc in  $ff_where_lib_conf \"" >&6;}
        fi


    if test -z "$ff_where_lib_conf_blacs"  ; then
	    echo "blacs LD $ff_mkl_blacs"  >>$ff_where_lib_conf
	    test -n "$ff_blas_inc" && echo "blacs INCLUDE $ff_blas_inc "  >>$ff_where_lib_conf
            ff_where_lib_conf_blacs=1
	    ff_where_lib_blacs="$ff_mkl_blacs"
	    ff_where_inc_blacs="$ff_blas_inc"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add blacs : $ff_mkl_blacs ;  $ff_blas_inc in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add blacs : $ff_mkl_blacs ;  $ff_blas_inc in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add blacs : $ff_mkl_blacs $ff_blas_inc in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add blacs : $ff_mkl_blacs $ff_blas_inc in  $ff_where_lib_conf \"" >&6;}
        fi

	    else
		ff_warm=" (We do not use MKL scalapack and blacs with sgi MPI),  "
	    fi

    if test -z "$ff_where_lib_conf_lapack"  ; then
	    echo "lapack LD $ff_mkl_lapack"  >>$ff_where_lib_conf
	    test -n "$ff_blas_inc" && echo "lapack INCLUDE $ff_blas_inc "  >>$ff_where_lib_conf
            ff_where_lib_conf_lapack=1
	    ff_where_lib_lapack="$ff_mkl_lapack"
	    ff_where_inc_lapack="$ff_blas_inc"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add lapack : $ff_mkl_lapack ;  $ff_blas_inc in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add lapack : $ff_mkl_lapack ;  $ff_blas_inc in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add lapack : $ff_mkl_lapack $ff_blas_inc in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add lapack : $ff_mkl_lapack $ff_blas_inc in  $ff_where_lib_conf \"" >&6;}
        fi


    if test -z "$ff_where_lib_conf_mkl"  ; then
	    echo "mkl LD $ff_mkl_mlt"  >>$ff_where_lib_conf
	    test -n "$ff_blas_inc" && echo "mkl INCLUDE $ff_blas_inc "  >>$ff_where_lib_conf
            ff_where_lib_conf_mkl=1
	    ff_where_lib_mkl="$ff_mkl_mlt"
	    ff_where_inc_mkl="$ff_blas_inc"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add mkl : $ff_mkl_mlt ;  $ff_blas_inc in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add mkl : $ff_mkl_mlt ;  $ff_blas_inc in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add mkl : $ff_mkl_mlt $ff_blas_inc in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add mkl : $ff_mkl_mlt $ff_blas_inc in  $ff_where_lib_conf \"" >&6;}
        fi

		ff_mkl_ok=yes
		ff_mkl=yes

	else
	    ff_mkl_libpath=no
	fi
    fi


    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result:  $ff_warm  root: $ff_mkl_root , arch: $ff_mkl_arch , $ff_mkl_lp ...  " >&5
printf "%s\n" " $ff_warm  root: $ff_mkl_root , arch: $ff_mkl_arch , $ff_mkl_lp ...  " >&6; }


# Check whether --with-blas was given.
if test ${with_blas+y}
then :
  withval=$with_blas; ff_blas_ok=yes
	ff_blas_libs="${withval}"
fi


    # Specific BLAS library location for FreeBSD
    ff_freebsd_blas="-lf2c -lf77blas -latlas -lgslcblas"
    ff_dll_blas=`which  libopenblas.dll`
    if test -z "$ff_dll_blas" ; then  ff_dll_blas="no"; fi
        #  zmach is in lapack
    # Trying  blas library
    # echo "LIBS =  $LIBS blas --- $ff_blas_ok"
    for iblas in "$ff_dll_blas" \
	"-framework Accelerate" "$ff_mkl_blas" "-lblas"  "-L/usr/lib/atlas -lblas" \
	$ff_freebsd_blas
    do
	if test "$ff_blas_ok" = no -a "$iblas" != "no"
	then
            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for daxpy_ in $iblas" >&5
printf %s "checking for daxpy_ in $iblas... " >&6; }
            ff_save_libs="$LIBS"
            LIBS="$LIBS $iblas"
            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

namespace conftest {
  extern "C" int daxpy_ ();
}
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
return conftest::daxpy_ ();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_blas_ok=yes
		ff_blas_libs="$iblas"
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
            LIBS="$ff_save_libs"
            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_blas_ok" >&5
printf "%s\n" "$ff_blas_ok" >&6; }
	fi
    done

    #cblas_zdotu_sub
    #echo "LIBS = " $LIBS
    ff_cblas_libs=no
    if test "$ff_blas_ok" = yes
    then
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for blas_zdotu_sub in $ff_blas_libs" >&5
printf %s "checking for blas_zdotu_sub in $ff_blas_libs... " >&6; }
	ff_save_libs="$LIBS"
	LIBS="$LIBS $ff_blas_libs $FLIBS"
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

namespace conftest {
  extern "C" int cblas_zdotu_sub ();
}
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
return conftest::cblas_zdotu_sub ();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_cblas_libs=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_cblas_libs" >&5
printf "%s\n" "$ff_cblas_libs" >&6; }
	LIBS="$ff_save_libs"
    fi
fi

# <<OpenBLAS>> ALH - 18/9/13 - option to compile the OpenBLAS moved from the FFCS tree to FF tree

# Check whether --enable-openblas was given.
if test ${enable_openblas+y}
then :
  enableval=$enable_openblas;
fi

if  test "$ff_blas_ok" = no && test "$enable_openblas" != no && test "$enable_download" = yes
then
    # Extract the first word of "git", so it can be a program name with args.
set dummy git; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ff_git+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$ff_git"; then
  ac_cv_prog_ff_git="$ff_git" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ff_git="yes"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  test -z "$ac_cv_prog_ff_git" && ac_cv_prog_ff_git="no"
fi
fi
ff_git=$ac_cv_prog_ff_git
if test -n "$ff_git"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_git" >&5
printf "%s\n" "$ff_git" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Activating the OpenBLAS (deactivate with --disable-openblas)" >&5
printf %s "checking Activating the OpenBLAS (deactivate with --disable-openblas)... " >&6; }
    if test $ff_git = no
    then
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: git not found" >&5
printf "%s\n" "git not found" >&6; }
    else
	ff_download_blas=openblas

	# it is necessary to split the library path into -L and -l otherwise ff/upstream/plugin/seq/ff-c++ will place -lgfortran in
	# LIBS, .../libgoto___.lib in OTHER, and call the compiler with $LIBS before $OTHER, which will fail. But libopenblas.a is placed in
	# the standard directory 3rdparty/lib so the -L option is not required anymore.

	ff_blas_libs="-L${curdir}/3rdparty/lib -lopenblas $LIBS $ff_pthread"
	ff_blas_inc="-I${curdir}/3rdparty/include"

        # skip generic blas compilation and activate OpenBLAS (see [[file:3rdparty/blas/Makefile.am::OpenBLAS]])
	DOWNLOADED_BLAS=""

	COMPILE_OPENBLAS=openblas


	ff_blas_ok=yes
	ff_cblas_h=yes
	ff_cblas_libs=yes

	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
printf "%s\n" "ok" >&6; }
    fi
fi

# If all else fails, download a generic version

if test "$ff_blas_ok" = no -a "$enable_download" = yes -a "$enable_fortran" != no -a "$enable_c" != no
then
    # Extract the first word of "unzip", so it can be a program name with args.
set dummy unzip; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ff_unzip+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$ff_unzip"; then
  ac_cv_prog_ff_unzip="$ff_unzip" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ff_unzip="yes"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  test -z "$ac_cv_prog_ff_unzip" && ac_cv_prog_ff_unzip="no"
fi
fi
ff_unzip=$ac_cv_prog_ff_unzip
if test -n "$ff_unzip"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_unzip" >&5
printf "%s\n" "$ff_unzip" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi



    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BLAS version to download" >&5
printf %s "checking for BLAS version to download... " >&6; }

    # Do not update $LIBS, but create an extra LIB variable, because this lib does not exist yet, and this could make
    # the following tests fail.

    # When compiling a generic version, we do not need an optimized version of the BLAS.

    ff_download_blas=generic
    ff_blas_libs="-L${curdir}/3rdparty/blas -lcblas -lf77blas"
    ff_blas_inc="-I${curdir}/3rdparty/blas/CBLAS/src"

    DOWNLOADED_BLAS="libf77blas.a libcblas.a"

    DOWNLOADED_BLAS_BUILT_SOURCES='BLAS CBLAS $(F77BLAS_SRC) $(CBLAS_SRC)'


    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_download_blas" >&5
printf "%s\n" "$ff_download_blas" >&6; }
    ff_blas_ok=yes
    ff_cblas_h=yes
    ff_cblas_libs=yes
fi

if test -n "$ff_BLASLAPACK_LIB"; then
    BLACSLIBS="$ff_SCALAPACK_LIB $ff_BLASLAPACK_LIB"

else
    BLACSLIBS=$ff_blas_libs

fi
BLASLIBS=$ff_blas_libs

BLASINC=$ff_blas_inc


#looking for cblas.h  FH

if test "$ff_blas_ok" = yes -a -z "$ff_download_blas" -a "$ff_mkl_ok" != yes; then
         for ac_header in cblas.h
do :
  ac_fn_cxx_check_header_compile "$LINENO" "cblas.h" "ac_cv_header_cblas_h" "$ac_includes_default"
if test "x$ac_cv_header_cblas_h" = xyes
then :
  printf "%s\n" "#define HAVE_CBLAS_H 1" >>confdefs.h
 ff_cblas_h=yes
else $as_nop
  ff_cblas_h=no
fi

done
         for ac_header in Accelerate/cblas.h
do :
  ac_fn_cxx_check_header_compile "$LINENO" "Accelerate/cblas.h" "ac_cv_header_Accelerate_cblas_h" "$ac_includes_default"
if test "x$ac_cv_header_Accelerate_cblas_h" = xyes
then :
  printf "%s\n" "#define HAVE_ACCELERATE_CBLAS_H 1" >>confdefs.h
 ff_cblas_h=yes
else $as_nop
  ff_cblas_h=no
fi

done
         for ac_header in atlas/cblas.h
do :
  ac_fn_cxx_check_header_compile "$LINENO" "atlas/cblas.h" "ac_cv_header_atlas_cblas_h" "$ac_includes_default"
if test "x$ac_cv_header_atlas_cblas_h" = xyes
then :
  printf "%s\n" "#define HAVE_ATLAS_CBLAS_H 1" >>confdefs.h
 ff_cblas_h=yes
else $as_nop
  ff_cblas_h=no
fi

done
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cblas_zdotu_sub in -lcblas" >&5
printf %s "checking for cblas_zdotu_sub in -lcblas... " >&6; }
if test ${ac_cv_lib_cblas_cblas_zdotu_sub+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lcblas  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

namespace conftest {
  extern "C" int cblas_zdotu_sub ();
}
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
return conftest::cblas_zdotu_sub ();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ac_cv_lib_cblas_cblas_zdotu_sub=yes
else $as_nop
  ac_cv_lib_cblas_cblas_zdotu_sub=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cblas_cblas_zdotu_sub" >&5
printf "%s\n" "$ac_cv_lib_cblas_cblas_zdotu_sub" >&6; }
if test "x$ac_cv_lib_cblas_cblas_zdotu_sub" = xyes
then :
  LIBS+=-lcblas
fi

fi

# ALH - 18/9/13 - [[file:3rdparty/blas/Makefile.am]] does not update the WHERE mechanism so it always needs to be set up
# here even in the case of a downloaded blas library.


    if test -z "$ff_where_lib_conf_blas"  ; then
	    echo "blas LD $ff_blas_libs"  >>$ff_where_lib_conf
	    test -n "" && echo "blas INCLUDE  "  >>$ff_where_lib_conf
            ff_where_lib_conf_blas=1
	    ff_where_lib_blas="$ff_blas_libs"
	    ff_where_inc_blas=""
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add blas : $ff_blas_libs ;   in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add blas : $ff_blas_libs ;   in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add blas : $ff_blas_libs  in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add blas : $ff_blas_libs  in  $ff_where_lib_conf \"" >&6;}
        fi


# end of BLAS -------------------

# Looking for ARPACK
# ------------------

# We need the following g77 libraries to connect to the Fortran 77
# Arpack.

if test "$ff_blas_ok" = yes;
then
  ff_g2c_lib="$FLIBS"
       if test  -n "$ff_g2c_lib"
       then
           LIBS="$LIBS $ff_g2c_lib"
       else
	  ff_g2c_ok=no
	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for G77_second_0 in -lg2c" >&5
printf %s "checking for G77_second_0 in -lg2c... " >&6; }
if test ${ac_cv_lib_g2c_G77_second_0+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lg2c  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

namespace conftest {
  extern "C" int G77_second_0 ();
}
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
return conftest::G77_second_0 ();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ac_cv_lib_g2c_G77_second_0=yes
else $as_nop
  ac_cv_lib_g2c_G77_second_0=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_g2c_G77_second_0" >&5
printf "%s\n" "$ac_cv_lib_g2c_G77_second_0" >&6; }
if test "x$ac_cv_lib_g2c_G77_second_0" = xyes
then :
  LIBS="$LIBS -lg2c"
		ff_g2c_lib="-lg2c"
		ff_g2c_ok=yes
fi


	  if test "$ff_g2c_ok" = no;
	     then
	        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for G77_second_0 in /sw/lib/libg2c.a" >&5
printf %s "checking for G77_second_0 in /sw/lib/libg2c.a... " >&6; }
		ff_save_libs="$LIBS"
		LIBS="$LIBS -L/sw/lib -lg2c"
		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

namespace conftest {
  extern "C" int G77_second_0 ();
}
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
return conftest::G77_second_0 ();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_g2c_lib="-L/sw/lib -lg2c"
			ff_g2c_ok=yes
else $as_nop
  LIBS="$ff_save_libs"
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_g2c_ok" >&5
printf "%s\n" "$ff_g2c_ok" >&6; }
	  fi
	fi
fi

# Copy the result of g2c investigations into a separate variable
# because BLAS compilation will need it.

G2CLIB=$ff_g2c_lib

#looking of  lapack if no compile the arpack lapack
# warning $$ because the make eat one
ff_lapack_ok=no;
ff_lapack_lib=
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lapack in $LIBS, $ff_blas_libs and -llapack " >&5
printf %s "checking for lapack in $LIBS, $ff_blas_libs and -llapack ... " >&6; }
    if test "$ff_blas_ok" = yes ; then
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

namespace conftest {
  extern "C" int dgeqr2_ ();
}
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
return conftest::dgeqr2_ ();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_lapack_ok=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	if test "$ff_lapack_ok" = no ; then
	    ff_save_libs=$LIBS
	    LIBS="$ff_save_libs $ff_blas_libs"
            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

namespace conftest {
  extern "C" int dgeqr2_ ();
}
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
return conftest::dgeqr2_ ();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_lapack_ok=yes;ff_lapack_lib="$ff_blas_libs"
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	    if test "$ff_lapack_ok" = no ; then
	    LIBS="$ff_save_libs -llapack $ff_blas_libs"
            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

namespace conftest {
  extern "C" int dgeqr2_ ();
}
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
return conftest::dgeqr2_ ();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_lapack_ok=yes
	    ff_lapack_lib="-llapack"
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	    fi
	    LIBS="$ff_save_libs"
	fi
    fi

if test "$ff_lapack_ok" = no; then

# Check whether --with-lapack was given.
if test ${with_lapack+y}
then :
  withval=$with_lapack; ff_lapack_ok=yes
	ff_lapack_lib="${withval}"
	LIBS="$ff_lapack_lib $LIBS"
fi

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_lapack_ok" >&5
printf "%s\n" "$ff_lapack_ok" >&6; }
if test "$ff_lapack_ok" != no ; then
LAPACKLIBS=$ff_lapack_lib

fi

# Lapack configuration for Arpack

ff_lapackdir='$$(LAPACKdir)'
if test "$ff_lapack_ok" = yes
then
    # no compilation of lapack in arpack
    ff_lapackdir=
else
    ff_lapack_lib="-L${curdir}/3rdparty/lib -llapack"
fi

# Arpack itself
# Check whether --enable-download-arpack was given.
if test ${enable_download_arpack+y}
then :
  enableval=$enable_download_arpack;
fi

#echo "****** enable_download_arpack=$enable_download_arpack"

if test -z "$ff_arpack_ok"; then
ff_arpack_ok=no
ff_save_libs="$LIBS"
ff_arpack_libs=
if test "$ff_blas_ok" = yes ;
then
    if test "$enable_download_arpack" != yes ; then
	# User-specified location

# Check whether --with-arpack was given.
if test ${with_arpack+y}
then :
  withval=$with_arpack; ff_arpack_ok=yes
	ff_arpack_libs="${withval}"
fi


	# Default locations
	if test "$ff_arpack_ok" = no;
	then
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dsaupd_ in -larpack" >&5
printf %s "checking for dsaupd_ in -larpack... " >&6; }
if test ${ac_cv_lib_arpack_dsaupd_+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-larpack -llapack $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

namespace conftest {
  extern "C" int dsaupd_ ();
}
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
return conftest::dsaupd_ ();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ac_cv_lib_arpack_dsaupd_=yes
else $as_nop
  ac_cv_lib_arpack_dsaupd_=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_arpack_dsaupd_" >&5
printf "%s\n" "$ac_cv_lib_arpack_dsaupd_" >&6; }
if test "x$ac_cv_lib_arpack_dsaupd_" = xyes
then :
  ff_arpack_libs="-larpack -llapack"
		ff_arpack_ok=yes
fi

	fi

   # Trying to "locate" Arpack
	if test "$ff_arpack_ok" = no -a "$enable_download" != yes ;
	then
            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libarpack with locate" >&5
printf %s "checking for libarpack with locate... " >&6; }
            ff_lib_arpack=`locate libarpack|grep  'libarpack.*.a$'|head -1`
	    LIBS="$ff_lib_arpack $LIBS"
            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

namespace conftest {
  extern "C" int dsaupd_ ();
}
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
return conftest::dsaupd_ ();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_arpack_ok=yes
		ff_arpack_libs="$ff_lib_arpack"
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_arpack_ok" >&5
printf "%s\n" "$ff_arpack_ok" >&6; }
	fi
	if test "$ff_arpack_ok" = yes
	then

    if test -z "$ff_where_lib_conf_arpack"  ; then
	    echo "arpack LD $ff_arpack_libs"  >>$ff_where_lib_conf
	    test -n "" && echo "arpack INCLUDE  "  >>$ff_where_lib_conf
            ff_where_lib_conf_arpack=1
	    ff_where_lib_arpack="$ff_arpack_libs"
	    ff_where_inc_arpack=""
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add arpack : $ff_arpack_libs ;   in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add arpack : $ff_arpack_libs ;   in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add arpack : $ff_arpack_libs  in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add arpack : $ff_arpack_libs  in  $ff_where_lib_conf \"" >&6;}
        fi

	fi
    fi
    # If all else fails, download!
    if test "$enable_fortran" != no -o -z "$enable_fortran"
    then
    if test "$ff_arpack_ok" = no -a "$enable_download" = yes -o "$enable_download_arpack" = yes
    then
	ff_arpack_download=yes
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: using downloaded Arpack" >&5
printf "%s\n" "$as_me: using downloaded Arpack" >&6;}

		# ALH - 6/11/13 - this install goal is the standard goal for all downloaded packages in
		# [[file:3rdparty/common.mak::install]]

	DOWNLOAD_ARPACK=install


	FF_LAPACKdir=$ff_lapackdir

	ARPACKLIB=${curdir}/3rdparty/lib/libarpack.a

	LAPACK_arpack_LIB=${curdir}/3rdparty/lib/liblapack.a


		# Do not update $LIBS, but create an extra LIB variable, because this lib does not exist yet, and this
		# could make the following tests fail.

		# ALH - 30/9/13 - do not use the "-L ${curdir}/3rdparty/lib" directive because it would allow other
		# following -l directives (eg -lumfpack) to pick an old locally compiled library instead of the system
		# ones.

	ff_arpack_libs="${curdir}/3rdparty/lib/libarpack.a $ff_lapack_lib"
	ff_arpack_ok=yes
    fi
    fi
fi
fi
if test  "$ff_arpack_ok" != yes
 then
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -- NO ARPACK --  enable_download : $enable_download , wget: $ff_wget " >&5
printf "%s\n" "$as_me: -- NO ARPACK --  enable_download : $enable_download , wget: $ff_wget " >&6;}
fi

# Do not insert ARPACK libs in $LIBS yet, because they may not exist
# yet, and this could make the following tests fail.

LIBS="$ff_save_libs"

if test "$ff_arpack_ok" = yes;
then
        ARPACKLIBS=$ff_arpack_libs

	EIGENOBJ='eigenvalue.$(OBJEXT)'

printf "%s\n" "#define HAVE_LIBARPACK 1" >>confdefs.h


	# Determines whether to run the eigenvalue tests
else
# all eigen test fails
	SKIP_TESTS_EIGEN=yes

fi
 if test "$ff_arpack_ok" = "yes"; then
  ENABLE_EIGEN_TRUE=
  ENABLE_EIGEN_FALSE='#'
else
  ENABLE_EIGEN_TRUE='#'
  ENABLE_EIGEN_FALSE=
fi




# ALH - 25/9/13 - <<WHERE_lapack>> always run the WHERE LD statement for lapack because some libraries in
# plugin/seq require it (eg [[file:plugin/seq/Element_Mixte.cpp::lapack]]). Request from Fred.


    if test -z "$ff_where_lib_conf_lapack"  ; then
	    echo "lapack LD $ff_lapack_lib"  >>$ff_where_lib_conf
	    test -n "" && echo "lapack INCLUDE  "  >>$ff_where_lib_conf
            ff_where_lib_conf_lapack=1
	    ff_where_lib_lapack="$ff_lapack_lib"
	    ff_where_inc_lapack=""
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add lapack : $ff_lapack_lib ;   in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add lapack : $ff_lapack_lib ;   in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add lapack : $ff_lapack_lib  in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add lapack : $ff_lapack_lib  in  $ff_where_lib_conf \"" >&6;}
        fi


# Looking for UMFPACK
# -------------------
UMFPACK_CPPFLAGS="";
ff_umfpack_incs=""
ff_amd_ok=no
ff_umfpack_ok=no
# echo @@@@@@@@@ ff_where_lib_conf_suitesparse == $ff_where_lib_conf_suitesparse  @@@@
if test "$ff_where_lib_conf_suitesparse" = "1"  ; then
    echo "amd/umfpack/suitesparse  of petsc"
    echo "    lib: $ff_where_lib_suitesparse inc: $ff_where_inc_suitesparse"
    ff_amd_ok=yes
    ff_umfpack_ok=yes
    enable_system_umfpack=no
    ff_umfpack_libs="$ff_where_lib_suitesparse"
    ff_umfpack_incs="$ff_where_inc_suitesparse"

printf "%s\n" "#define HAVE_LIBUMFPACK 1" >>confdefs.h


printf "%s\n" "#define HAVE_LIBCHOLMOD 1" >>confdefs.h

    UMFPACK_CPPFLAGS="$ff_where_inc_suitesparse"

printf "%s\n" "#define HAVE_UMFPACK_H 1" >>confdefs.h

fi
#echo "@@@@@@@"
ff_save_libs="$LIBS"
# Check whether --enable-system_umfpack was given.
if test ${enable_system_umfpack+y}
then :
  enableval=$enable_system_umfpack;
fi

if test "$ff_umfpack_ok"  = no -a "$enable_system_umfpack" != no -a  "$ff_blas_ok" = yes;
then
#    echo "@@@@@@@qqqq"
    # User-specified location

# Check whether --with-amd was given.
if test ${with_amd+y}
then :
  withval=$with_amd; ff_amd_ok=yes
	ff_umfpack_libs="${withval}"
fi



# Check whether --with-umfpack was given.
if test ${with_umfpack+y}
then :
  withval=$with_umfpack; ff_umfpack_ok=yes
        ff_umfpack_libs="${withval} $ff_umfpack_libs"
fi


    if test "${with_umfpack_include+set}" = set; then
      	CPPFLAGS="$CPPFLAGS $with_umfpack_include"
    fi

           for ac_header in umfpack.h umfpack/umfpack.h ufsparse/umfpack.h suitesparse/umfpack.h
do :
  as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"
then :
  cat >>confdefs.h <<_ACEOF
#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
 ff_umfpack_header=yes
	    ff_umfpack_dir=`dirname $ac_header`
	    break
fi

done

    # Somes systems like FreeBSD hide umfpack.h in a directory called UMFPACK (all capitals). This breaks the
    # standard #define produced by autoconf in config.h.in.

    LIBS="$ff_blas_libs $LIBS"
    if test "$ff_umfpack_header" != yes;
    then
	ac_fn_cxx_check_header_compile "$LINENO" "UMFPACK/umfpack.h" "ac_cv_header_UMFPACK_umfpack_h" "$ac_includes_default"
if test "x$ac_cv_header_UMFPACK_umfpack_h" = xyes
then :
  ff_umfpack_header=yes
	    ff_umfpack_dir=UMFPACK

printf "%s\n" "#define HAVE_BIG_UMFPACK_UMFPACK_H 1" >>confdefs.h

fi

    fi

    if test "$ff_amd_ok" = no;
    then
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for amd_info in -lamd" >&5
printf %s "checking for amd_info in -lamd... " >&6; }
if test ${ac_cv_lib_amd_amd_info+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lamd  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

namespace conftest {
  extern "C" int amd_info ();
}
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
return conftest::amd_info ();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ac_cv_lib_amd_amd_info=yes
else $as_nop
  ac_cv_lib_amd_amd_info=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_amd_amd_info" >&5
printf "%s\n" "$ac_cv_lib_amd_amd_info" >&6; }
if test "x$ac_cv_lib_amd_amd_info" = xyes
then :
  ff_umfpack_libs="$ff_umfpack_libs -lamd"
	    ff_amd_ok=yes
fi

    fi

    if test "$ff_umfpack_ok" = no -a "$ff_amd_ok" = yes;
    then

        # ALH - 30/9/13 - other libraries required by Umfpack

	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cholmod_add in -lcholmod" >&5
printf %s "checking for cholmod_add in -lcholmod... " >&6; }
if test ${ac_cv_lib_cholmod_cholmod_add+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lcholmod  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

namespace conftest {
  extern "C" int cholmod_add ();
}
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
return conftest::cholmod_add ();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ac_cv_lib_cholmod_cholmod_add=yes
else $as_nop
  ac_cv_lib_cholmod_cholmod_add=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cholmod_cholmod_add" >&5
printf "%s\n" "$ac_cv_lib_cholmod_cholmod_add" >&6; }
if test "x$ac_cv_lib_cholmod_cholmod_add" = xyes
then :
  ff_umfpack_libs="$ff_umfpack_libs -lcholmod"
fi

	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for colamd_set_defaults in -lcolamd" >&5
printf %s "checking for colamd_set_defaults in -lcolamd... " >&6; }
if test ${ac_cv_lib_colamd_colamd_set_defaults+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lcolamd  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

namespace conftest {
  extern "C" int colamd_set_defaults ();
}
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
return conftest::colamd_set_defaults ();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ac_cv_lib_colamd_colamd_set_defaults=yes
else $as_nop
  ac_cv_lib_colamd_colamd_set_defaults=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_colamd_colamd_set_defaults" >&5
printf "%s\n" "$ac_cv_lib_colamd_colamd_set_defaults" >&6; }
if test "x$ac_cv_lib_colamd_colamd_set_defaults" = xyes
then :
  ff_umfpack_libs="$ff_umfpack_libs -lcolamd"
fi


	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for umf_i_malloc in -lumfpack" >&5
printf %s "checking for umf_i_malloc in -lumfpack... " >&6; }
if test ${ac_cv_lib_umfpack_umf_i_malloc+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lumfpack $ff_umfpack_libs $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

namespace conftest {
  extern "C" int umf_i_malloc ();
}
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
return conftest::umf_i_malloc ();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ac_cv_lib_umfpack_umf_i_malloc=yes
else $as_nop
  ac_cv_lib_umfpack_umf_i_malloc=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_umfpack_umf_i_malloc" >&5
printf "%s\n" "$ac_cv_lib_umfpack_umf_i_malloc" >&6; }
if test "x$ac_cv_lib_umfpack_umf_i_malloc" = xyes
then :
  ff_umfpack_libs="-lumfpack $ff_umfpack_libs"
	    ff_umfpack_ok=yes
fi

    fi

    if test "$ff_umfpack_header" != yes -o "$ff_umfpack_ok" != yes; then
        ff_umfpack_ok=no
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Sorry, we could not find the UMFPACK lib or the UMFPACK headers" >&5
printf "%s\n" "$as_me: WARNING: Sorry, we could not find the UMFPACK lib or the UMFPACK headers" >&2;}
	ff_umfpack_incs=""
	UMFPACK_CPPFLAGS=""
    fi

    if test "$ff_umfpack_ok" = yes -a "$ff_amd_ok" = yes; then
	 if test -n "$ff_umfpack_incs" ; then
	  UMFPACK_CPPFLAGS="$ff_umfpack_incs"
	 fi

printf "%s\n" "#define HAVE_LIBUMFPACK 1" >>confdefs.h

    fi
fi

LIBS="$ff_save_libs"
#echo "@@@@22@@@"
# If all else fails, download!
#  attention no /usr/include in WHERE
if test "$ff_umfpack_ok" = yes -a -n "$ff_umfpack_dir" -a -z "$ff_umfpack_incs"
then
	ff_umfpack_incs="-I/usr/include/$ff_umfpack_dir"
	UMFPACK_CPPFLAGS="$ff_umfpack_incs"
fi
if test "$ff_umfpack_ok" = no -a "$enable_download" = yes -a "$enable_umfpack" != no
then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using downloaded UMFPACK" >&5
printf "%s\n" "$as_me: using downloaded UMFPACK" >&6;}
    DOWNLOAD_UMFPACK="umfpack"

    ff_umfpack_download=yes

    # Do not update $LIBS, but create an extra LIB variable, because this lib does not exist yet, and this could make
    # the following tests fail.

    ff_umfpack_libs="-L${curdir}/3rdparty/lib -lumfpack -lcholmod -lcolamd -lamd -lsuitesparseconfig"
    ff_umfpack_incs="-I${curdir}/3rdparty/include"
	UMFPACK_CPPFLAGS="$ff_umfpack_incs"

printf "%s\n" "#define HAVE_LIBUMFPACK 1" >>confdefs.h

    if test "$ff_win32" = yes; then
  	FF_UMFPACK_CONFIG=-DCBLAS

    fi
    ff_umfpack_ok=yes
fi
UMFPACK_CPPFLAGS=$UMFPACK_CPPFLAGS


# ALH - 17/9/13 - moved UMFPACK configuration settings in wherelib to _after_ configuring the download version because
# [[file:3rdparty/umfpack/Makefile.am]] does not set the WHERE mechanism. Also removed -I/usr/include/$ff_umfpack_dir
# from include options for FFCS because it breaks the MingW64 compilation process.

if test "$ff_umfpack_ok" = yes
then
    if test $enable_ffcs = no
    then

    if test -z "$ff_where_lib_conf_amd"  ; then
	    echo "amd LD $ff_umfpack_libs"  >>$ff_where_lib_conf
	    test -n "$ff_umfpack_incs" && echo "amd INCLUDE $ff_umfpack_incs "  >>$ff_where_lib_conf
            ff_where_lib_conf_amd=1
	    ff_where_lib_amd="$ff_umfpack_libs"
	    ff_where_inc_amd="$ff_umfpack_incs"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add amd : $ff_umfpack_libs ;  $ff_umfpack_incs in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add amd : $ff_umfpack_libs ;  $ff_umfpack_incs in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add amd : $ff_umfpack_libs $ff_umfpack_incs in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add amd : $ff_umfpack_libs $ff_umfpack_incs in  $ff_where_lib_conf \"" >&6;}
        fi


    if test -z "$ff_where_lib_conf_umfpack"  ; then
	    echo "umfpack LD $ff_umfpack_libs"  >>$ff_where_lib_conf
	    test -n "$ff_umfpack_incs" && echo "umfpack INCLUDE $ff_umfpack_incs "  >>$ff_where_lib_conf
            ff_where_lib_conf_umfpack=1
	    ff_where_lib_umfpack="$ff_umfpack_libs"
	    ff_where_inc_umfpack="$ff_umfpack_incs"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add umfpack : $ff_umfpack_libs ;  $ff_umfpack_incs in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add umfpack : $ff_umfpack_libs ;  $ff_umfpack_incs in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add umfpack : $ff_umfpack_libs $ff_umfpack_incs in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add umfpack : $ff_umfpack_libs $ff_umfpack_incs in  $ff_where_lib_conf \"" >&6;}
        fi

    else

    if test -z "$ff_where_lib_conf_amd"  ; then
	    echo "amd LD $ff_umfpack_libs"  >>$ff_where_lib_conf
	    test -n "" && echo "amd INCLUDE  "  >>$ff_where_lib_conf
            ff_where_lib_conf_amd=1
	    ff_where_lib_amd="$ff_umfpack_libs"
	    ff_where_inc_amd=""
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add amd : $ff_umfpack_libs ;   in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add amd : $ff_umfpack_libs ;   in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add amd : $ff_umfpack_libs  in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add amd : $ff_umfpack_libs  in  $ff_where_lib_conf \"" >&6;}
        fi


    if test -z "$ff_where_lib_conf_umfpack"  ; then
	    echo "umfpack LD $ff_umfpack_libs"  >>$ff_where_lib_conf
	    test -n "" && echo "umfpack INCLUDE  "  >>$ff_where_lib_conf
            ff_where_lib_conf_umfpack=1
	    ff_where_lib_umfpack="$ff_umfpack_libs"
	    ff_where_inc_umfpack=""
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add umfpack : $ff_umfpack_libs ;   in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add umfpack : $ff_umfpack_libs ;   in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add umfpack : $ff_umfpack_libs  in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add umfpack : $ff_umfpack_libs  in  $ff_where_lib_conf \"" >&6;}
        fi

    fi

else
#echo "@@@@33@@@@"
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  -- NO UMFPACK (ff_wget = $ff_wget)" >&5
printf "%s\n" "$as_me:  -- NO UMFPACK (ff_wget = $ff_wget)" >&6;}
fi

UMFPACKLIBS=$ff_umfpack_libs


# If times() and sysconf() are not here, UMFPACK should know

if test "$ff_umfpack_ok" = yes
then

  for ac_func in times sysconf
do :
  as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
if eval test \"x\$"$as_ac_var"\" = x"yes"
then :
  cat >>confdefs.h <<_ACEOF
#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
 ff_umfpack_posix_ok=yes
else $as_nop
  ff_umfpack_posix_ok=no
fi

done

    if test "$ff_umfpack_posix_ok" = no
    then
	FF_UMFPACK_CONFIG="-DCBLAS -DNPOSIX"

    fi
fi

# Checking for some functions that may not appear everywhere
#  for libff-mmap-semaphore.c plugin and test ...
# ----------------------------------------------------------
ac_fn_cxx_check_header_compile "$LINENO" "cstddef" "ac_cv_header_cstddef" "$ac_includes_default"
if test "x$ac_cv_header_cstddef" = xyes
then :
  printf "%s\n" "#define HAVE_CSTDDEF 1" >>confdefs.h

fi

ac_fn_cxx_check_header_compile "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default"
if test "x$ac_cv_header_stddef_h" = xyes
then :
  printf "%s\n" "#define HAVE_STDDEF_H 1" >>confdefs.h

fi

       for ac_header in semaphore.h
do :
  ac_fn_cxx_check_header_compile "$LINENO" "semaphore.h" "ac_cv_header_semaphore_h" "$ac_includes_default"
if test "x$ac_cv_header_semaphore_h" = xyes
then :
  printf "%s\n" "#define HAVE_SEMAPHORE_H 1" >>confdefs.h
 ff_sem=1
else $as_nop
  ff_sem=0
fi

done
       for ac_header in sys/mman.h
do :
  ac_fn_cxx_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_mman_h" = xyes
then :
  printf "%s\n" "#define HAVE_SYS_MMAN_H 1" >>confdefs.h
 ff_mmap=1
else $as_nop
  ff_mmap=0
fi

done


if test "$ff_sem" -eq  1 -a  "$ff_mmap" -eq  1 ; then
BIN_ffmaster=ffmaster
else
enable_MMAP=no
BIN_ffmaster=
fi

       for ac_header in regex.h
do :
  ac_fn_cxx_check_header_compile "$LINENO" "regex.h" "ac_cv_header_regex_h" "$ac_includes_default"
if test "x$ac_cv_header_regex_h" = xyes
then :
  printf "%s\n" "#define HAVE_REGEX_H 1" >>confdefs.h
 ff_regex_h=1
else $as_nop
  ff_regex_h=0
fi

done
FF_HAVE_REGEX_H=$ff_regex_h


ac_fn_cxx_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
if test "x$ac_cv_header_unistd_h" = xyes
then :
  printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h

fi

# asinh acosh atanh are not in Mingw yet gettimeofday
ff_malloc_h=""


# Obsolete code to be removed.
if test $ac_cv_header_sys_time_h = yes; then

printf "%s\n" "#define TIME_WITH_SYS_TIME 1" >>confdefs.h

fi
# End of obsolete code.

       for ac_header in malloc.h
do :
  ac_fn_cxx_check_header_compile "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default"
if test "x$ac_cv_header_malloc_h" = xyes
then :
  printf "%s\n" "#define HAVE_MALLOC_H 1" >>confdefs.h
 ff_malloc_h=1
fi

done
FF_MALLOC_H=$ff_malloc_h


ac_fn_cxx_check_func "$LINENO" "asinh" "ac_cv_func_asinh"
if test "x$ac_cv_func_asinh" = xyes
then :
  printf "%s\n" "#define HAVE_ASINH 1" >>confdefs.h

fi
ac_fn_cxx_check_func "$LINENO" "acosh" "ac_cv_func_acosh"
if test "x$ac_cv_func_acosh" = xyes
then :
  printf "%s\n" "#define HAVE_ACOSH 1" >>confdefs.h

fi
ac_fn_cxx_check_func "$LINENO" "atanh" "ac_cv_func_atanh"
if test "x$ac_cv_func_atanh" = xyes
then :
  printf "%s\n" "#define HAVE_ATANH 1" >>confdefs.h

fi
ac_fn_cxx_check_func "$LINENO" "getenv" "ac_cv_func_getenv"
if test "x$ac_cv_func_getenv" = xyes
then :
  printf "%s\n" "#define HAVE_GETENV 1" >>confdefs.h

fi
ac_fn_cxx_check_func "$LINENO" "jn" "ac_cv_func_jn"
if test "x$ac_cv_func_jn" = xyes
then :
  printf "%s\n" "#define HAVE_JN 1" >>confdefs.h

fi
ac_fn_cxx_check_func "$LINENO" "erfc" "ac_cv_func_erfc"
if test "x$ac_cv_func_erfc" = xyes
then :
  printf "%s\n" "#define HAVE_ERFC 1" >>confdefs.h

fi
ac_fn_cxx_check_func "$LINENO" "tgamma" "ac_cv_func_tgamma"
if test "x$ac_cv_func_tgamma" = xyes
then :
  printf "%s\n" "#define HAVE_TGAMMA 1" >>confdefs.h

fi
ac_fn_cxx_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
if test "x$ac_cv_func_gettimeofday" = xyes
then :
  printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h

fi
ac_fn_cxx_check_func "$LINENO" "mallinfo" "ac_cv_func_mallinfo"
if test "x$ac_cv_func_mallinfo" = xyes
then :
  printf "%s\n" "#define HAVE_MALLINFO 1" >>confdefs.h

fi
ac_fn_cxx_check_func "$LINENO" "mstats" "ac_cv_func_mstats"
if test "x$ac_cv_func_mstats" = xyes
then :
  printf "%s\n" "#define HAVE_MSTATS 1" >>confdefs.h

fi

ac_fn_cxx_check_func "$LINENO" "srandomdev" "ac_cv_func_srandomdev"
if test "x$ac_cv_func_srandomdev" = xyes
then :
  printf "%s\n" "#define HAVE_SRANDOMDEV 1" >>confdefs.h

fi




  for ac_func in second_
do :
  ac_fn_cxx_check_func "$LINENO" "second_" "ac_cv_func_second_"
if test "x$ac_cv_func_second_" = xyes
then :
  printf "%s\n" "#define HAVE_SECOND_ 1" >>confdefs.h
 ff_second=""
else $as_nop
  ff_second=second.o
fi

done
FF_SECOND="$ff_second"


# Enable static linking (no shared libraries)
# -------------------------------------------
# Extract the first word of "libtool", so it can be a program name with args.
set dummy libtool; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ff_libtool+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$ff_libtool"; then
  ac_cv_prog_ff_libtool="$ff_libtool" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ff_libtool="yes"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  test -z "$ac_cv_prog_ff_libtool" && ac_cv_prog_ff_libtool="no"
fi
fi
ff_libtool=$ac_cv_prog_ff_libtool
if test -n "$ff_libtool"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_libtool" >&5
printf "%s\n" "$ff_libtool" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


if test  "$ff_mac" = "yes"  -a "$ff_libtool" = yes ; then
  ff_AR="libtool"
  ff_ARFLAGS="-static -o"
  ff_RANLIB="echo"
fi

# Check whether --enable-static was given.
if test ${enable_static+y}
then :
  enableval=$enable_static;
fi

if test "$enable_static" = yes
then
	# Extract the first word of "libtool", so it can be a program name with args.
set dummy libtool; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ff_libtool+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -n "$ff_libtool"; then
  ac_cv_prog_ff_libtool="$ff_libtool" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_prog_ff_libtool="yes"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  test -z "$ac_cv_prog_ff_libtool" && ac_cv_prog_ff_libtool="no"
fi
fi
ff_libtool=$ac_cv_prog_ff_libtool
if test -n "$ff_libtool"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_libtool" >&5
printf "%s\n" "$ff_libtool" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


	if test "$ff_libtool" = yes
	then
		LDFLAGS="$LDFLAGS -all-static"
		STATICTOOL=libtool

	else
		as_fn_error $? "libtool not found" "$LINENO" 5
	fi
fi
#  for compiation of  arpack  use libtool to bluid universal library on MacOs.
AR=$ff_AR

ARFLAGS=$ff_ARFLAGS

RANLIN=$ff_RANLIB



# Dynamic loading of compiled functions
# -------------------------------------

# Not if we don't want shared libraries (non FH  modif FH juin 2005)
if test "$ff_PURE_WIN32" -ne 1 ; then
ff_dynload=no
if test "$enable_static" != yes
then

	# Availability of dlopen(). Use AC_COMPILE rather than
	# AC_CHECK_HEADERS because the latter has problems seeing it (in
	# Cygwin) when it does not compile (in Mingw).

	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlfcn.h" >&5
printf %s "checking for dlfcn.h... " >&6; }
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <dlfcn.h>
_ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
  ff_dynload=yes
else $as_nop
  ff_dynload=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_dynload" >&5
printf "%s\n" "$ff_dynload" >&6; }
fi

# FFCS - -lm missing for ffmedit link stage on Debian Testing
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sin in -lm" >&5
printf %s "checking for sin in -lm... " >&6; }
if test ${ac_cv_lib_m_sin+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lm  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

namespace conftest {
  extern "C" int sin ();
}
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
return conftest::sin ();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ac_cv_lib_m_sin=yes
else $as_nop
  ac_cv_lib_m_sin=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sin" >&5
printf "%s\n" "$ac_cv_lib_m_sin" >&6; }
if test "x$ac_cv_lib_m_sin" = xyes
then :
  printf "%s\n" "#define HAVE_LIBM 1" >>confdefs.h

  LIBS="-lm $LIBS"

fi


# Checks that we also have the corresponding library
if test "$ff_dynload" = yes
then
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlinfo in -ldl" >&5
printf %s "checking for dlinfo in -ldl... " >&6; }
if test ${ac_cv_lib_dl_dlinfo+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

namespace conftest {
  extern "C" int dlinfo ();
}
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
return conftest::dlinfo ();
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ac_cv_lib_dl_dlinfo=yes
else $as_nop
  ac_cv_lib_dl_dlinfo=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlinfo" >&5
printf "%s\n" "$ac_cv_lib_dl_dlinfo" >&6; }
if test "x$ac_cv_lib_dl_dlinfo" = xyes
then :
  printf "%s\n" "#define HAVE_LIBDL 1" >>confdefs.h

  LIBS="-ldl $LIBS"

fi


	# Checks that everythings works ok
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dlopen links ok" >&5
printf %s "checking whether dlopen links ok... " >&6; }
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <dlfcn.h>
int main(int argc,char **argv){
  dlopen("",RTLD_LAZY);
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_dynload=yes
else $as_nop
  ff_dynload=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_dynload" >&5
printf "%s\n" "$ff_dynload" >&6; }
fi
if test "$ff_dynload" = yes
then

printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h

fi
fi  # endif ff_PURE_WIN32 != 1
#  the -rdynamic don't exist on macos and sunOS
if test "$ff_dynload" = yes
then
	# Activate dynamic loading tests (see plugin/seq/Makefile.am)
	LOAD_TESTS=../regtests.sh

	LOAD_COMPILE=load_compile


	# gcc on MacOS does not produce an error with "-rdynamic" but
	# still complains about it.
	if test "$ff_mac" = "no" -a "$ff_win32"  = "no" -a "$ff_sunos"  = "no" ;
	then
		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler accepts -rdynamic" >&5
printf %s "checking whether the C++ compiler accepts -rdynamic... " >&6; }
	check_save_flags="$LDFLAGS"
	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

	LDFLAGS="$LDFLAGS -rdynamic"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		LDFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


	fi
	if test "$ff_fpic" != "no" ; then
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler accepts -fPIC" >&5
printf %s "checking whether the C++ compiler accepts -fPIC... " >&6; }
	check_save_flags="$CXXFLAGS"
	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu

	CXXFLAGS="$CXXFLAGS -fPIC"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		CXXFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -fPIC" >&5
printf %s "checking whether the C compiler accepts -fPIC... " >&6; }
	check_save_flags="$CFLAGS"
	ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

	CFLAGS="$CFLAGS -fPIC"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		CFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -fPIC" >&5
printf %s "checking whether the C compiler accepts -fPIC... " >&6; }
	check_save_flags="$CNOFLAGS"
	ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

	CNOFLAGS="$CNOFLAGS -fPIC"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		CNOFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


	fi
	if test "$enable_fortran" != no ;  then
	if test "$ff_fpic" != "no" ; then

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the Fortran compiler accepts -fPIC" >&5
printf %s "checking whether the Fortran compiler accepts -fPIC... " >&6; }
	check_save_flags="$FFLAGS"
	ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu

	FFLAGS="$FFLAGS -fPIC"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat > conftest.$ac_ext <<_ACEOF
      program main

      end
_ACEOF
if ac_fn_fc_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		FFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


	 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the Fortran compiler accepts -fPIC" >&5
printf %s "checking whether the Fortran compiler accepts -fPIC... " >&6; }
	check_save_flags="$FNOFLAGS"
	ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu

	FNOFLAGS="$FNOFLAGS -fPIC"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat > conftest.$ac_ext <<_ACEOF
      program main

      end
_ACEOF
if ac_fn_fc_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		FNOFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


	 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the Fortran compiler accepts -fPIC" >&5
printf %s "checking whether the Fortran compiler accepts -fPIC... " >&6; }
	check_save_flags="$FCFLAGS"
	ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu

	FCFLAGS="$FCFLAGS -fPIC"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat > conftest.$ac_ext <<_ACEOF
      program main

      end
_ACEOF
if ac_fn_fc_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		FCFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


	 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the Fortran compiler accepts -fPIC" >&5
printf %s "checking whether the Fortran compiler accepts -fPIC... " >&6; }
	check_save_flags="$FCNOFLAGS"
	ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu

	FCNOFLAGS="$FCNOFLAGS -fPIC"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat > conftest.$ac_ext <<_ACEOF
      program main

      end
_ACEOF
if ac_fn_fc_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		FCNOFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


	 fi

	fi
fi
DYLIB_SUFFIX=$ff_suffix_dylib

#  the doc is now in https://github.com/FreeFem/FreeFem-doc-pdf/blob/master/freefem%2B%2Bdoc.pdf
# Checking wether we can generate some documentation
# --------------------------------------------------
case "$F77" in
*gfortran*)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the Fortran 77 compiler accepts -fallow-argument-mismatch" >&5
printf %s "checking whether the Fortran 77 compiler accepts -fallow-argument-mismatch... " >&6; }
	check_save_flags="$FFLAGS"
	ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

	FFLAGS="$FFLAGS -fallow-argument-mismatch"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat > conftest.$ac_ext <<_ACEOF
       program x
       end
_ACEOF
if ac_fn_f77_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		FFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the Fortran compiler accepts -fallow-argument-mismatch" >&5
printf %s "checking whether the Fortran compiler accepts -fallow-argument-mismatch... " >&6; }
	check_save_flags="$FCFLAGS"
	ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu

	FCFLAGS="$FCFLAGS -fallow-argument-mismatch"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat > conftest.$ac_ext <<_ACEOF
      program main

      end
_ACEOF
if ac_fn_fc_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		FCFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


# -fallow-invalid-boz
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the Fortran 77 compiler accepts -fallow-invalid-boz" >&5
printf %s "checking whether the Fortran 77 compiler accepts -fallow-invalid-boz... " >&6; }
	check_save_flags="$FFLAGS"
	ac_ext=f
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_f77_compiler_gnu

	FFLAGS="$FFLAGS -fallow-invalid-boz"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat > conftest.$ac_ext <<_ACEOF
       program x
       end
_ACEOF
if ac_fn_f77_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		FFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the Fortran compiler accepts -fallow-invalid-boz" >&5
printf %s "checking whether the Fortran compiler accepts -fallow-invalid-boz... " >&6; }
	check_save_flags="$FCFLAGS"
	ac_ext=${ac_fc_srcext-f}
ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_fc_compiler_gnu

	FCFLAGS="$FCFLAGS -fallow-invalid-boz"

	# The program needs to contain something for the test source
	# file to be created by autoconf.

	# Some options really need to be linked (not only compiled) to
	# check whether they work.

	cat > conftest.$ac_ext <<_ACEOF
      program main

      end
_ACEOF
if ac_fn_fc_try_link "$LINENO"
then :
  check_flag_ok=yes
else $as_nop
  check_flag_ok=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $check_flag_ok" >&5
printf "%s\n" "$check_flag_ok" >&6; }
	if test "$check_flag_ok" = no;
	then
		FCFLAGS="$check_save_flags"
	fi
	if test -n "" ;
         then
	        ="$check_flag_ok"
	fi

	ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


;;
esac


# PDF documentation building sometimes poses problems because of pdfsync.sty. So we need to be able to disable it.
# FFCS - 9/4/14 - need to disable PDF also during FFCS build (which does not use the resulting PDF).


# Choosing compilation options for the standard version (in src/std)
# ------------------------------------------------------------------

# The "standard" configured version can use win32 (mingw)

if test "$ff_mingw" = yes
then

    # FFCS does not use FreeFem++-std, and Pcrgraph.cpp does not compile under mingwin64
    if test $enable_ffcs = no
    then
	ff_stdprog="FreeFem++-std${EXEEXT}"
	ff_std_graph_obj=Pcrgraph.$OBJEXT
    fi

    # ALH - FFCS - 30/11/8 - I need to get the output from FF for FFCS regression tests
    if test $enable_ffcs = yes
    then
	ff_std_ldflags="-mconsole -mwindows"
    else
	ff_std_ldflags=-mwindows
    fi

	ff_std_libs=
fi
STD_GRAPH_OBJ=$ff_std_graph_obj

STD_LDFLAGS=$ff_std_ldflags


STD_LIBS=$ff_std_libs


# Allow some downloaded tools not to be compiled
# ----------------------------------------------


##  try to see pakage is hon computer  if the FH ZZZZ
## FH to find gsl ...


# Check whether --with-gsl-prefix was given.
if test ${with_gsl_prefix+y}
then :
  withval=$with_gsl_prefix; gsl_prefix="$withval"
else $as_nop
  gsl_prefix=""
fi


# Check whether --with-gsl-exec-prefix was given.
if test ${with_gsl_exec_prefix+y}
then :
  withval=$with_gsl_exec_prefix; gsl_exec_prefix="$withval"
else $as_nop
  gsl_exec_prefix=""
fi

# Check whether --enable-gsltest was given.
if test ${enable_gsltest+y}
then :
  enableval=$enable_gsltest;
else $as_nop
  enable_gsltest=yes
fi


  if test "x${GSL_CONFIG+set}" != xset ; then
     if test "x$gsl_prefix" != x ; then
         GSL_CONFIG="$gsl_prefix/bin/gsl-config"
     fi
     if test "x$gsl_exec_prefix" != x ; then
        GSL_CONFIG="$gsl_exec_prefix/bin/gsl-config"
     fi
  fi

  # Extract the first word of "gsl-config", so it can be a program name with args.
set dummy gsl-config; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_GSL_CONFIG+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case $GSL_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_GSL_CONFIG="$GSL_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_GSL_CONFIG="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  test -z "$ac_cv_path_GSL_CONFIG" && ac_cv_path_GSL_CONFIG="no"
  ;;
esac
fi
GSL_CONFIG=$ac_cv_path_GSL_CONFIG
if test -n "$GSL_CONFIG"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GSL_CONFIG" >&5
printf "%s\n" "$GSL_CONFIG" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  min_gsl_version=1.15
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GSL - version >= $min_gsl_version" >&5
printf %s "checking for GSL - version >= $min_gsl_version... " >&6; }
  no_gsl=""
  if test "$GSL_CONFIG" = "no" ; then
    no_gsl=yes
  else
    GSL_CFLAGS=`$GSL_CONFIG --cflags`
    GSL_LIBS=`$GSL_CONFIG --libs`

    gsl_major_version=`$GSL_CONFIG --version | \
           sed 's/^\([0-9]*\).*/\1/'`
    if test "x${gsl_major_version}" = "x" ; then
       gsl_major_version=0
    fi

    gsl_minor_version=`$GSL_CONFIG --version | \
           sed 's/^\([0-9]*\)\.\{0,1\}\([0-9]*\).*/\2/'`
    if test "x${gsl_minor_version}" = "x" ; then
       gsl_minor_version=0
    fi

    gsl_micro_version=`$GSL_CONFIG --version | \
           sed 's/^\([0-9]*\)\.\{0,1\}\([0-9]*\)\.\{0,1\}\([0-9]*\).*/\3/'`
    if test "x${gsl_micro_version}" = "x" ; then
       gsl_micro_version=0
    fi

    if test "x$enable_gsltest" = "xyes" ; then
      ac_save_CFLAGS="$CFLAGS"
      ac_save_LIBS="$LIBS"
      CFLAGS="$CFLAGS $GSL_CFLAGS"
      LIBS="$LIBS $GSL_LIBS"

      rm -f conf.gsltest
      if test "$cross_compiling" = yes
then :
  echo $ac_n "cross compiling; assumed OK... $ac_c"
else $as_nop
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

char* my_strdup (const char *str);

char*
my_strdup (const char *str)
{
  char *new_str;

  if (str)
    {
      new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
      strcpy (new_str, str);
    }
  else
    new_str = NULL;

  return new_str;
}

int main (void)
{
  int major = 0, minor = 0, micro = 0;
  int n;
  char *tmp_version;

  system ("touch conf.gsltest");

  /* HP/UX 9 (%@#!) writes to sscanf strings */
  tmp_version = my_strdup("$min_gsl_version");

  n = sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) ;

  if (n != 2 && n != 3) {
     printf("%s, bad version string\n", "$min_gsl_version");
     exit(1);
   }

   if (($gsl_major_version > major) ||
      (($gsl_major_version == major) && ($gsl_minor_version > minor)) ||
      (($gsl_major_version == major) && ($gsl_minor_version == minor) && ($gsl_micro_version >= micro)))
     {
       exit(0);
     }
   else
     {
       exit(1);
     }
}


_ACEOF
if ac_fn_cxx_try_run "$LINENO"
then :

else $as_nop
  no_gsl=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

       CFLAGS="$ac_save_CFLAGS"
       LIBS="$ac_save_LIBS"
     fi
  fi
  if test "x$no_gsl" = x ; then
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
     ff_with_gsl=yes
  else
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
     if test "$GSL_CONFIG" = "no" ; then
       echo "*** The gsl-config script installed by GSL could not be found"
       echo "*** If GSL was installed in PREFIX, make sure PREFIX/bin is in"
       echo "*** your path, or set the GSL_CONFIG environment variable to the"
       echo "*** full path to gsl-config."
     else
       if test -f conf.gsltest ; then
        :
       else
          echo "*** Could not run GSL test program, checking why..."
          CFLAGS="$CFLAGS $GSL_CFLAGS"
          LIBS="$LIBS $GSL_LIBS"
          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#include <stdio.h>

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
 return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
   echo "*** The test program compiled, but did not run. This usually means"
          echo "*** that the run-time linker is not finding GSL or finding the wrong"
          echo "*** version of GSL. If it is not finding GSL, you'll need to set your"
          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
          echo "*** is required on your system"
	  echo "***"
          echo "*** If you have an old version installed, it is best to remove it, although"
          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
else $as_nop
   echo "*** The test program failed to compile or link. See the file config.log for the"
          echo "*** exact error that occured. This usually means GSL was incorrectly installed"
          echo "*** or that you have moved GSL since it was installed. In the latter case, you"
          echo "*** may want to edit the gsl-config script: $GSL_CONFIG"
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
          CFLAGS="$ac_save_CFLAGS"
          LIBS="$ac_save_LIBS"
       fi
     fi
#     GSL_CFLAGS=""
#     GSL_LIBS=""
     ff_with_gsl=no
  fi


  rm -f conf.gsltest

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

    if test -z "$ff_where_lib_conf_gsl"  ; then
	    echo "gsl LD $GSL_LIBS"  >>$ff_where_lib_conf
	    test -n "$GSL_CFLAGS" && echo "gsl INCLUDE $GSL_CFLAGS "  >>$ff_where_lib_conf
            ff_where_lib_conf_gsl=1
	    ff_where_lib_gsl="$GSL_LIBS"
	    ff_where_inc_gsl="$GSL_CFLAGS"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add gsl : $GSL_LIBS ;  $GSL_CFLAGS in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add gsl : $GSL_LIBS ;  $GSL_CFLAGS in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add gsl : $GSL_LIBS $GSL_CFLAGS in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add gsl : $GSL_LIBS $GSL_CFLAGS in  $ff_where_lib_conf \"" >&6;}
        fi

fi

  	if test -z "$ff_where_lib_conf_mumps" -a "$enable_download_mumps"  != "yes" ; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking check mumps" >&5
printf %s "checking check mumps... " >&6; }
	ff_save_libs=$LIBS
	LIBS="$LIBS -ldmumps -lzmumps  -lmumps_common  -lpord "
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <dmumps_c.h>
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_WHERE=yes
else $as_nop
  ff_WHERE=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	if test "$ff_WHERE" = "yes" ; then
	    echo "mumps LD -ldmumps -lzmumps  -lmumps_common  -lpord"  >>$ff_where_lib_conf
	    ff_WHERE_INC=`$as_dirname -- "dmumps_c.h" ||
$as_expr X"dmumps_c.h" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"dmumps_c.h" : 'X\(//\)[^/]' \| \
	 X"dmumps_c.h" : 'X\(//\)$' \| \
	 X"dmumps_c.h" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"dmumps_c.h" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
	    case "$ff_WHERE_INC" in
		/*) echo "mumps INCLUDE -I$ff_WHERE_INC"  >>$ff_where_lib_conf ;;
	    esac
            ff_where_lib_conf_mumps=1
	fi
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_WHERE" >&5
printf "%s\n" "$ff_WHERE" >&6; }
        ff_mumps_ok=$ff_WHERE;
	LIBS=$ff_save_libs
	fi
      	if test -z "$ff_where_lib_conf_mumps_seq" -a "$enable_download_mumps_seq"  != "yes" ; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking check mumps_seq" >&5
printf %s "checking check mumps_seq... " >&6; }
	ff_save_libs=$LIBS
	LIBS="$LIBS -ldmumps_seq -lzmumps_seq  -lmumps_common_seq  -lpord_seq -lmpiseq_seq "
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <dmumps_c.h>
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_WHERE=yes
else $as_nop
  ff_WHERE=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	if test "$ff_WHERE" = "yes" ; then
	    echo "mumps_seq LD -ldmumps_seq -lzmumps_seq  -lmumps_common_seq  -lpord_seq -lmpiseq_seq"  >>$ff_where_lib_conf
	    ff_WHERE_INC=`$as_dirname -- "dmumps_c.h" ||
$as_expr X"dmumps_c.h" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"dmumps_c.h" : 'X\(//\)[^/]' \| \
	 X"dmumps_c.h" : 'X\(//\)$' \| \
	 X"dmumps_c.h" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"dmumps_c.h" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
	    case "$ff_WHERE_INC" in
		/*) echo "mumps_seq INCLUDE -I$ff_WHERE_INC"  >>$ff_where_lib_conf ;;
	    esac
            ff_where_lib_conf_mumps_seq=1
	fi
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_WHERE" >&5
printf "%s\n" "$ff_WHERE" >&6; }
        ff_mumps_seq_ok=$ff_WHERE;
	LIBS=$ff_save_libs
	fi
      	if test -z "$ff_where_lib_conf_libseq" -a "$enable_download_libseq"  != "yes" ; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking check libseq" >&5
printf %s "checking check libseq... " >&6; }
	ff_save_libs=$LIBS
	LIBS="$LIBS -lmpiseq_seq "
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <${inc_usr_include}mumps_seq/mpi.h>
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_WHERE=yes
else $as_nop
  ff_WHERE=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	if test "$ff_WHERE" = "yes" ; then
	    echo "libseq LD -lmpiseq_seq"  >>$ff_where_lib_conf
	    ff_WHERE_INC=`$as_dirname -- "${inc_usr_include}mumps_seq/mpi.h" ||
$as_expr X"${inc_usr_include}mumps_seq/mpi.h" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"${inc_usr_include}mumps_seq/mpi.h" : 'X\(//\)[^/]' \| \
	 X"${inc_usr_include}mumps_seq/mpi.h" : 'X\(//\)$' \| \
	 X"${inc_usr_include}mumps_seq/mpi.h" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"${inc_usr_include}mumps_seq/mpi.h" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
	    case "$ff_WHERE_INC" in
		/*) echo "libseq INCLUDE -I$ff_WHERE_INC"  >>$ff_where_lib_conf ;;
	    esac
            ff_where_lib_conf_libseq=1
	fi
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_WHERE" >&5
printf "%s\n" "$ff_WHERE" >&6; }
        ff_libseq_ok=$ff_WHERE;
	LIBS=$ff_save_libs
	fi
      	if test -z "$ff_where_lib_conf_mumps_ptscotch" -a "$enable_download_mumps_ptscotch"  != "yes" ; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking check mumps_ptscotch" >&5
printf %s "checking check mumps_ptscotch... " >&6; }
	ff_save_libs=$LIBS
	LIBS="$LIBS -lpord_ptscotch -lmumps_common_ptscotch -ldmumps_ptscotch -lzmumps_ptscotch -lpord_ptscotch "
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <dmumps_c.h>
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_WHERE=yes
else $as_nop
  ff_WHERE=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	if test "$ff_WHERE" = "yes" ; then
	    echo "mumps_ptscotch LD -lpord_ptscotch -lmumps_common_ptscotch -ldmumps_ptscotch -lzmumps_ptscotch -lpord_ptscotch"  >>$ff_where_lib_conf
	    ff_WHERE_INC=`$as_dirname -- "dmumps_c.h" ||
$as_expr X"dmumps_c.h" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"dmumps_c.h" : 'X\(//\)[^/]' \| \
	 X"dmumps_c.h" : 'X\(//\)$' \| \
	 X"dmumps_c.h" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"dmumps_c.h" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
	    case "$ff_WHERE_INC" in
		/*) echo "mumps_ptscotch INCLUDE -I$ff_WHERE_INC"  >>$ff_where_lib_conf ;;
	    esac
            ff_where_lib_conf_mumps_ptscotch=1
	fi
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_WHERE" >&5
printf "%s\n" "$ff_WHERE" >&6; }
        ff_mumps_ptscotch_ok=$ff_WHERE;
	LIBS=$ff_save_libs
	fi
      	if test -z "$ff_where_lib_conf_mumps_scotch" -a "$enable_download_mumps_scotch"  != "yes" ; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking check mumps_scotch" >&5
printf %s "checking check mumps_scotch... " >&6; }
	ff_save_libs=$LIBS
	LIBS="$LIBS -lpord_scotch -lmumps_common_scotch -ldmumps_scotch -lzmumps_scotch -lpord_scotch "
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <dmumps_c.h>
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_WHERE=yes
else $as_nop
  ff_WHERE=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	if test "$ff_WHERE" = "yes" ; then
	    echo "mumps_scotch LD -lpord_scotch -lmumps_common_scotch -ldmumps_scotch -lzmumps_scotch -lpord_scotch"  >>$ff_where_lib_conf
	    ff_WHERE_INC=`$as_dirname -- "dmumps_c.h" ||
$as_expr X"dmumps_c.h" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"dmumps_c.h" : 'X\(//\)[^/]' \| \
	 X"dmumps_c.h" : 'X\(//\)$' \| \
	 X"dmumps_c.h" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"dmumps_c.h" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
	    case "$ff_WHERE_INC" in
		/*) echo "mumps_scotch INCLUDE -I$ff_WHERE_INC"  >>$ff_where_lib_conf ;;
	    esac
            ff_where_lib_conf_mumps_scotch=1
	fi
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_WHERE" >&5
printf "%s\n" "$ff_WHERE" >&6; }
        ff_mumps_scotch_ok=$ff_WHERE;
	LIBS=$ff_save_libs
	fi
      	if test -z "$ff_where_lib_conf_fftw3" -a "$enable_download_fftw3"  != "yes" ; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking check fftw3" >&5
printf %s "checking check fftw3... " >&6; }
	ff_save_libs=$LIBS
	LIBS="$LIBS -lfftw3 "
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <${inc_usr_include}fftw3.h>
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_WHERE=yes
else $as_nop
  ff_WHERE=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	if test "$ff_WHERE" = "yes" ; then
	    echo "fftw3 LD -lfftw3"  >>$ff_where_lib_conf
	    ff_WHERE_INC=`$as_dirname -- "${inc_usr_include}fftw3.h" ||
$as_expr X"${inc_usr_include}fftw3.h" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"${inc_usr_include}fftw3.h" : 'X\(//\)[^/]' \| \
	 X"${inc_usr_include}fftw3.h" : 'X\(//\)$' \| \
	 X"${inc_usr_include}fftw3.h" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"${inc_usr_include}fftw3.h" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
	    case "$ff_WHERE_INC" in
		/*) echo "fftw3 INCLUDE -I$ff_WHERE_INC"  >>$ff_where_lib_conf ;;
	    esac
            ff_where_lib_conf_fftw3=1
	fi
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_WHERE" >&5
printf "%s\n" "$ff_WHERE" >&6; }
        ff_fftw3_ok=$ff_WHERE;
	LIBS=$ff_save_libs
	fi
      	if test -z "$ff_where_lib_conf_superlu" -a "$enable_download_superlu"  != "yes" ; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking check superlu" >&5
printf %s "checking check superlu... " >&6; }
	ff_save_libs=$LIBS
	LIBS="$LIBS -lsuperlu "
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <${inc_usr_include}superlu/superlu_enum_consts.h>
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_WHERE=yes
else $as_nop
  ff_WHERE=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	if test "$ff_WHERE" = "yes" ; then
	    echo "superlu LD -lsuperlu"  >>$ff_where_lib_conf
	    ff_WHERE_INC=`$as_dirname -- "${inc_usr_include}superlu/superlu_enum_consts.h" ||
$as_expr X"${inc_usr_include}superlu/superlu_enum_consts.h" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"${inc_usr_include}superlu/superlu_enum_consts.h" : 'X\(//\)[^/]' \| \
	 X"${inc_usr_include}superlu/superlu_enum_consts.h" : 'X\(//\)$' \| \
	 X"${inc_usr_include}superlu/superlu_enum_consts.h" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"${inc_usr_include}superlu/superlu_enum_consts.h" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
	    case "$ff_WHERE_INC" in
		/*) echo "superlu INCLUDE -I$ff_WHERE_INC"  >>$ff_where_lib_conf ;;
	    esac
            ff_where_lib_conf_superlu=1
	fi
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_WHERE" >&5
printf "%s\n" "$ff_WHERE" >&6; }
        ff_superlu_ok=$ff_WHERE;
	LIBS=$ff_save_libs
	fi
      	if test -z "$ff_where_lib_conf_blacs" -a "$enable_download_blacs"  != "yes" ; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking check blacs" >&5
printf %s "checking check blacs... " >&6; }
	ff_save_libs=$LIBS
	LIBS="$LIBS  -lblacsCinit$ff_with_mpi	-lblacsF77init$ff_with_mpi	-lblacs$ff_with_mpi "
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_WHERE=yes
else $as_nop
  ff_WHERE=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	if test "$ff_WHERE" = "yes" ; then
	    echo "blacs LD  -lblacsCinit$ff_with_mpi	-lblacsF77init$ff_with_mpi	-lblacs$ff_with_mpi"  >>$ff_where_lib_conf
	    ff_WHERE_INC=`$as_dirname -- "" ||
$as_expr X"" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"" : 'X\(//\)[^/]' \| \
	 X"" : 'X\(//\)$' \| \
	 X"" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
	    case "$ff_WHERE_INC" in
		/*) echo "blacs INCLUDE -I$ff_WHERE_INC"  >>$ff_where_lib_conf ;;
	    esac
            ff_where_lib_conf_blacs=1
	fi
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_WHERE" >&5
printf "%s\n" "$ff_WHERE" >&6; }
        ff_blacs_ok=$ff_WHERE;
	LIBS=$ff_save_libs
	fi
      	if test -z "$ff_where_lib_conf_scalapack" -a "$enable_download_scalapack"  != "yes" ; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking check scalapack" >&5
printf %s "checking check scalapack... " >&6; }
	ff_save_libs=$LIBS
	LIBS="$LIBS -lscalapack$ff_with_mpi "
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_WHERE=yes
else $as_nop
  ff_WHERE=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	if test "$ff_WHERE" = "yes" ; then
	    echo "scalapack LD -lscalapack$ff_with_mpi"  >>$ff_where_lib_conf
	    ff_WHERE_INC=`$as_dirname -- "" ||
$as_expr X"" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"" : 'X\(//\)[^/]' \| \
	 X"" : 'X\(//\)$' \| \
	 X"" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
	    case "$ff_WHERE_INC" in
		/*) echo "scalapack INCLUDE -I$ff_WHERE_INC"  >>$ff_where_lib_conf ;;
	    esac
            ff_where_lib_conf_scalapack=1
	fi
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_WHERE" >&5
printf "%s\n" "$ff_WHERE" >&6; }
        ff_scalapack_ok=$ff_WHERE;
	LIBS=$ff_save_libs
	fi
      	if test -z "$ff_where_lib_conf_scotch" -a "$enable_download_scotch"  != "yes" ; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking check scotch" >&5
printf %s "checking check scotch... " >&6; }
	ff_save_libs=$LIBS
	LIBS="$LIBS -lscotch -lscotcherr "
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <scotch.h>
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_WHERE=yes
else $as_nop
  ff_WHERE=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	if test "$ff_WHERE" = "yes" ; then
	    echo "scotch LD -lscotch -lscotcherr"  >>$ff_where_lib_conf
	    ff_WHERE_INC=`$as_dirname -- "scotch.h" ||
$as_expr X"scotch.h" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"scotch.h" : 'X\(//\)[^/]' \| \
	 X"scotch.h" : 'X\(//\)$' \| \
	 X"scotch.h" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"scotch.h" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
	    case "$ff_WHERE_INC" in
		/*) echo "scotch INCLUDE -I$ff_WHERE_INC"  >>$ff_where_lib_conf ;;
	    esac
            ff_where_lib_conf_scotch=1
	fi
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_WHERE" >&5
printf "%s\n" "$ff_WHERE" >&6; }
        ff_scotch_ok=$ff_WHERE;
	LIBS=$ff_save_libs
	fi
      	if test -z "$ff_where_lib_conf_ptscotch" -a "$enable_download_ptscotch"  != "yes" ; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking check ptscotch" >&5
printf %s "checking check ptscotch... " >&6; }
	ff_save_libs=$LIBS
	LIBS="$LIBS -lptscotch -lptscotcherr "
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <ptscotch.h>
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_WHERE=yes
else $as_nop
  ff_WHERE=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	if test "$ff_WHERE" = "yes" ; then
	    echo "ptscotch LD -lptscotch -lptscotcherr"  >>$ff_where_lib_conf
	    ff_WHERE_INC=`$as_dirname -- "ptscotch.h" ||
$as_expr X"ptscotch.h" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"ptscotch.h" : 'X\(//\)[^/]' \| \
	 X"ptscotch.h" : 'X\(//\)$' \| \
	 X"ptscotch.h" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"ptscotch.h" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
	    case "$ff_WHERE_INC" in
		/*) echo "ptscotch INCLUDE -I$ff_WHERE_INC"  >>$ff_where_lib_conf ;;
	    esac
            ff_where_lib_conf_ptscotch=1
	fi
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_WHERE" >&5
printf "%s\n" "$ff_WHERE" >&6; }
        ff_ptscotch_ok=$ff_WHERE;
	LIBS=$ff_save_libs
	fi
      	if test -z "$ff_where_lib_conf_metis" -a "$enable_download_metis"  != "yes" ; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking check metis" >&5
printf %s "checking check metis... " >&6; }
	ff_save_libs=$LIBS
	LIBS="$LIBS -lmetis "
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <${inc_usr_include}metis/metis.h>
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_WHERE=yes
else $as_nop
  ff_WHERE=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	if test "$ff_WHERE" = "yes" ; then
	    echo "metis LD -lmetis"  >>$ff_where_lib_conf
	    ff_WHERE_INC=`$as_dirname -- "${inc_usr_include}metis/metis.h" ||
$as_expr X"${inc_usr_include}metis/metis.h" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"${inc_usr_include}metis/metis.h" : 'X\(//\)[^/]' \| \
	 X"${inc_usr_include}metis/metis.h" : 'X\(//\)$' \| \
	 X"${inc_usr_include}metis/metis.h" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"${inc_usr_include}metis/metis.h" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
	    case "$ff_WHERE_INC" in
		/*) echo "metis INCLUDE -I$ff_WHERE_INC"  >>$ff_where_lib_conf ;;
	    esac
            ff_where_lib_conf_metis=1
	fi
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_WHERE" >&5
printf "%s\n" "$ff_WHERE" >&6; }
        ff_metis_ok=$ff_WHERE;
	LIBS=$ff_save_libs
	fi
      	if test -z "$ff_where_lib_conf_metis" -a "$enable_download_metis"  != "yes" ; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking check metis" >&5
printf %s "checking check metis... " >&6; }
	ff_save_libs=$LIBS
	LIBS="$LIBS -lmetis "
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <metis.h>
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_WHERE=yes
else $as_nop
  ff_WHERE=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	if test "$ff_WHERE" = "yes" ; then
	    echo "metis LD -lmetis"  >>$ff_where_lib_conf
	    ff_WHERE_INC=`$as_dirname -- "metis.h" ||
$as_expr X"metis.h" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"metis.h" : 'X\(//\)[^/]' \| \
	 X"metis.h" : 'X\(//\)$' \| \
	 X"metis.h" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"metis.h" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
	    case "$ff_WHERE_INC" in
		/*) echo "metis INCLUDE -I$ff_WHERE_INC"  >>$ff_where_lib_conf ;;
	    esac
            ff_where_lib_conf_metis=1
	fi
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_WHERE" >&5
printf "%s\n" "$ff_WHERE" >&6; }
        ff_metis_ok=$ff_WHERE;
	LIBS=$ff_save_libs
	fi
      	if test -z "$ff_where_lib_conf_parmetis" -a "$enable_download_parmetis"  != "yes" ; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking check parmetis" >&5
printf %s "checking check parmetis... " >&6; }
	ff_save_libs=$LIBS
	LIBS="$LIBS -lparmetis -lmetis "
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_WHERE=yes
else $as_nop
  ff_WHERE=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	if test "$ff_WHERE" = "yes" ; then
	    echo "parmetis LD -lparmetis -lmetis"  >>$ff_where_lib_conf
	    ff_WHERE_INC=`$as_dirname -- "" ||
$as_expr X"" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"" : 'X\(//\)[^/]' \| \
	 X"" : 'X\(//\)$' \| \
	 X"" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
	    case "$ff_WHERE_INC" in
		/*) echo "parmetis INCLUDE -I$ff_WHERE_INC"  >>$ff_where_lib_conf ;;
	    esac
            ff_where_lib_conf_parmetis=1
	fi
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_WHERE" >&5
printf "%s\n" "$ff_WHERE" >&6; }
        ff_parmetis_ok=$ff_WHERE;
	LIBS=$ff_save_libs
	fi
      	if test -z "$ff_where_lib_conf_freeyams" -a "$enable_download_freeyams"  != "yes" ; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking check freeyams" >&5
printf %s "checking check freeyams... " >&6; }
	ff_save_libs=$LIBS
	LIBS="$LIBS -lfreeyams "
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <freeyamslib.h>
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_WHERE=yes
else $as_nop
  ff_WHERE=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	if test "$ff_WHERE" = "yes" ; then
	    echo "freeyams LD -lfreeyams"  >>$ff_where_lib_conf
	    ff_WHERE_INC=`$as_dirname -- "freeyamslib.h" ||
$as_expr X"freeyamslib.h" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"freeyamslib.h" : 'X\(//\)[^/]' \| \
	 X"freeyamslib.h" : 'X\(//\)$' \| \
	 X"freeyamslib.h" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"freeyamslib.h" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
	    case "$ff_WHERE_INC" in
		/*) echo "freeyams INCLUDE -I$ff_WHERE_INC"  >>$ff_where_lib_conf ;;
	    esac
            ff_where_lib_conf_freeyams=1
	fi
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_WHERE" >&5
printf "%s\n" "$ff_WHERE" >&6; }
        ff_freeyams_ok=$ff_WHERE;
	LIBS=$ff_save_libs
	fi
      	if test -z "$ff_where_lib_conf_mmg3d" -a "$enable_download_mmg3d"  != "yes" ; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking check mmg3d" >&5
printf %s "checking check mmg3d... " >&6; }
	ff_save_libs=$LIBS
	LIBS="$LIBS -lmmg3d-v4 "
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <libmmg3d.h>
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_WHERE=yes
else $as_nop
  ff_WHERE=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	if test "$ff_WHERE" = "yes" ; then
	    echo "mmg3d LD -lmmg3d-v4"  >>$ff_where_lib_conf
	    ff_WHERE_INC=`$as_dirname -- "libmmg3d.h" ||
$as_expr X"libmmg3d.h" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"libmmg3d.h" : 'X\(//\)[^/]' \| \
	 X"libmmg3d.h" : 'X\(//\)$' \| \
	 X"libmmg3d.h" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"libmmg3d.h" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
	    case "$ff_WHERE_INC" in
		/*) echo "mmg3d INCLUDE -I$ff_WHERE_INC"  >>$ff_where_lib_conf ;;
	    esac
            ff_where_lib_conf_mmg3d=1
	fi
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_WHERE" >&5
printf "%s\n" "$ff_WHERE" >&6; }
        ff_mmg3d_ok=$ff_WHERE;
	LIBS=$ff_save_libs
	fi
      	if test -z "$ff_where_lib_conf_mmg" -a "$enable_download_mmg"  != "yes" ; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking check mmg" >&5
printf %s "checking check mmg... " >&6; }
	ff_save_libs=$LIBS
	LIBS="$LIBS -lmmg "
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <libmmg.h>
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_WHERE=yes
else $as_nop
  ff_WHERE=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	if test "$ff_WHERE" = "yes" ; then
	    echo "mmg LD -lmmg"  >>$ff_where_lib_conf
	    ff_WHERE_INC=`$as_dirname -- "libmmg.h" ||
$as_expr X"libmmg.h" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"libmmg.h" : 'X\(//\)[^/]' \| \
	 X"libmmg.h" : 'X\(//\)$' \| \
	 X"libmmg.h" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"libmmg.h" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
	    case "$ff_WHERE_INC" in
		/*) echo "mmg INCLUDE -I$ff_WHERE_INC"  >>$ff_where_lib_conf ;;
	    esac
            ff_where_lib_conf_mmg=1
	fi
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_WHERE" >&5
printf "%s\n" "$ff_WHERE" >&6; }
        ff_mmg_ok=$ff_WHERE;
	LIBS=$ff_save_libs
	fi
      	if test -z "$ff_where_lib_conf_zlib" -a "$enable_download_zlib"  != "yes" ; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking check zlib" >&5
printf %s "checking check zlib... " >&6; }
	ff_save_libs=$LIBS
	LIBS="$LIBS -lz "
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <zlib.h>
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_WHERE=yes
else $as_nop
  ff_WHERE=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	if test "$ff_WHERE" = "yes" ; then
	    echo "zlib LD -lz"  >>$ff_where_lib_conf
	    ff_WHERE_INC=`$as_dirname -- "zlib.h" ||
$as_expr X"zlib.h" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"zlib.h" : 'X\(//\)[^/]' \| \
	 X"zlib.h" : 'X\(//\)$' \| \
	 X"zlib.h" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"zlib.h" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
	    case "$ff_WHERE_INC" in
		/*) echo "zlib INCLUDE -I$ff_WHERE_INC"  >>$ff_where_lib_conf ;;
	    esac
            ff_where_lib_conf_zlib=1
	fi
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_WHERE" >&5
printf "%s\n" "$ff_WHERE" >&6; }
        ff_zlib_ok=$ff_WHERE;
	LIBS=$ff_save_libs
	fi
      	if test -z "$ff_where_lib_conf_parmmg" -a "$enable_download_parmmg"  != "yes" ; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking check parmmg" >&5
printf %s "checking check parmmg... " >&6; }
	ff_save_libs=$LIBS
	LIBS="$LIBS -lparmmg "
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <libparmmg.h>
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_WHERE=yes
else $as_nop
  ff_WHERE=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	if test "$ff_WHERE" = "yes" ; then
	    echo "parmmg LD -lparmmg"  >>$ff_where_lib_conf
	    ff_WHERE_INC=`$as_dirname -- "libparmmg.h" ||
$as_expr X"libparmmg.h" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"libparmmg.h" : 'X\(//\)[^/]' \| \
	 X"libparmmg.h" : 'X\(//\)$' \| \
	 X"libparmmg.h" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"libparmmg.h" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
	    case "$ff_WHERE_INC" in
		/*) echo "parmmg INCLUDE -I$ff_WHERE_INC"  >>$ff_where_lib_conf ;;
	    esac
            ff_where_lib_conf_parmmg=1
	fi
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_WHERE" >&5
printf "%s\n" "$ff_WHERE" >&6; }
        ff_parmmg_ok=$ff_WHERE;
	LIBS=$ff_save_libs
	fi
      	if test -z "$ff_where_lib_conf_mshmet" -a "$enable_download_mshmet"  != "yes" ; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking check mshmet" >&5
printf %s "checking check mshmet... " >&6; }
	ff_save_libs=$LIBS
	LIBS="$LIBS -lmshmet "
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <mshmetlib.h>
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_WHERE=yes
else $as_nop
  ff_WHERE=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	if test "$ff_WHERE" = "yes" ; then
	    echo "mshmet LD -lmshmet"  >>$ff_where_lib_conf
	    ff_WHERE_INC=`$as_dirname -- "mshmetlib.h" ||
$as_expr X"mshmetlib.h" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"mshmetlib.h" : 'X\(//\)[^/]' \| \
	 X"mshmetlib.h" : 'X\(//\)$' \| \
	 X"mshmetlib.h" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"mshmetlib.h" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
	    case "$ff_WHERE_INC" in
		/*) echo "mshmet INCLUDE -I$ff_WHERE_INC"  >>$ff_where_lib_conf ;;
	    esac
            ff_where_lib_conf_mshmet=1
	fi
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_WHERE" >&5
printf "%s\n" "$ff_WHERE" >&6; }
        ff_mshmet_ok=$ff_WHERE;
	LIBS=$ff_save_libs
	fi
      	if test -z "$ff_where_lib_conf_tetgen" -a "$enable_download_tetgen"  != "yes" ; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking check tetgen" >&5
printf %s "checking check tetgen... " >&6; }
	ff_save_libs=$LIBS
	LIBS="$LIBS -ltet "
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <tetgen.h>
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_WHERE=yes
else $as_nop
  ff_WHERE=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	if test "$ff_WHERE" = "yes" ; then
	    echo "tetgen LD -ltet"  >>$ff_where_lib_conf
	    ff_WHERE_INC=`$as_dirname -- "tetgen.h" ||
$as_expr X"tetgen.h" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"tetgen.h" : 'X\(//\)[^/]' \| \
	 X"tetgen.h" : 'X\(//\)$' \| \
	 X"tetgen.h" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"tetgen.h" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
	    case "$ff_WHERE_INC" in
		/*) echo "tetgen INCLUDE -I$ff_WHERE_INC"  >>$ff_where_lib_conf ;;
	    esac
            ff_where_lib_conf_tetgen=1
	fi
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_WHERE" >&5
printf "%s\n" "$ff_WHERE" >&6; }
        ff_tetgen_ok=$ff_WHERE;
	LIBS=$ff_save_libs
	fi
      	if test -z "$ff_where_lib_conf_ipopt" -a "$enable_download_ipopt"  != "yes" ; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking check ipopt" >&5
printf %s "checking check ipopt... " >&6; }
	ff_save_libs=$LIBS
	LIBS="$LIBS  -lipopt "
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <${inc_usr_include}coin/IpTNLP.hpp>
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_WHERE=yes
else $as_nop
  ff_WHERE=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	if test "$ff_WHERE" = "yes" ; then
	    echo "ipopt LD  -lipopt"  >>$ff_where_lib_conf
	    ff_WHERE_INC=`$as_dirname -- "${inc_usr_include}coin/IpTNLP.hpp" ||
$as_expr X"${inc_usr_include}coin/IpTNLP.hpp" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"${inc_usr_include}coin/IpTNLP.hpp" : 'X\(//\)[^/]' \| \
	 X"${inc_usr_include}coin/IpTNLP.hpp" : 'X\(//\)$' \| \
	 X"${inc_usr_include}coin/IpTNLP.hpp" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"${inc_usr_include}coin/IpTNLP.hpp" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
	    case "$ff_WHERE_INC" in
		/*) echo "ipopt INCLUDE -I$ff_WHERE_INC"  >>$ff_where_lib_conf ;;
	    esac
            ff_where_lib_conf_ipopt=1
	fi
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_WHERE" >&5
printf "%s\n" "$ff_WHERE" >&6; }
        ff_ipopt_ok=$ff_WHERE;
	LIBS=$ff_save_libs
	fi
      	if test -z "$ff_where_lib_conf_nlopt" -a "$enable_download_nlopt"  != "yes" ; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking check nlopt" >&5
printf %s "checking check nlopt... " >&6; }
	ff_save_libs=$LIBS
	LIBS="$LIBS  -lnlopt

    "
	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <nlopt.hpp>
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{

  ;
  return 0;
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"
then :
  ff_WHERE=yes
else $as_nop
  ff_WHERE=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
	if test "$ff_WHERE" = "yes" ; then
	    echo "nlopt LD  -lnlopt"  >>$ff_where_lib_conf
	    ff_WHERE_INC=`$as_dirname -- "nlopt.hpp" ||
$as_expr X"nlopt.hpp" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"nlopt.hpp" : 'X\(//\)[^/]' \| \
	 X"nlopt.hpp" : 'X\(//\)$' \| \
	 X"nlopt.hpp" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"nlopt.hpp" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
	    case "$ff_WHERE_INC" in
		/*) echo "nlopt INCLUDE -I$ff_WHERE_INC"  >>$ff_where_lib_conf ;;
	    esac
            ff_where_lib_conf_nlopt=1
	fi
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_WHERE" >&5
printf "%s\n" "$ff_WHERE" >&6; }
        ff_nlopt_ok=$ff_WHERE;
	LIBS=$ff_save_libs
	fi

## before try

# Check whether --enable-tetgen was given.
if test ${enable_tetgen+y}
then :
  enableval=$enable_tetgen;
fi

    if test "$enable_tetgen" = "no"
    then
        TOOL_COMPILE_tetgen=""

        TOOL_DYLIB_tetgen=""

		ff_uncompile_plugin+=" "tetgen.$DYLIB_SUFFIX
		ff_unlib_plugin+=" tetgen"
    elif  test   "$ff_tetgen_ok" = "yes" ; then
        TOOL_DYLIB_tetgen=tetgen.$DYLIB_SUFFIX

        enable_tetgen_download=no
    else
	   if test "$enable_download" != "yes" -a "$enable_download_tetgen" != "yes" ; then
	    TOOL_COMPILE_tetgen=""

		ff_uncompile_plugin+=" "tetgen.$DYLIB_SUFFIX
		ff_unlib_plugin+=" tetgen"
        TOOL_DYLIB_tetgen=""

	   else
        if test "$ff_wget" = yes -a "$enable_download_tetgen" = "yes" -a "$DOWNLOADCOMPILE" = "" ; then
            DOWNLOADCOMPILE="compile-pkg install-other"
        fi
        TOOL_COMPILE_tetgen=tetgen

        TOOL_DYLIB_tetgen=tetgen.$DYLIB_SUFFIX

		ff_download_lib="tetgen $ff_download_lib"
	    enable_tetgen_download=yes
	   fi
     fi

    # Also allow to disable the download of one tool if it is already locally installed



# Check whether --with-tetgen_include was given.
if test ${with_tetgen_include+y}
then :
  withval=$with_tetgen_include;
fi


# Check whether --with-tetgen_ldflags was given.
if test ${with_tetgen_ldflags+y}
then :
  withval=$with_tetgen_ldflags;
fi

	# Check whether --enable-download-tetgen was given.
if test ${enable_download_tetgen+y}
then :
  enableval=$enable_download_tetgen;
fi


    if test "$with_tetgen_include" != "" || test "$with_tetgen_ldflags" != ""
    then

	# some directives have been specified, use them instead of downloading


    if test -z "$ff_where_lib_conf_tetgen"  ; then
	    echo "tetgen LD $with_tetgen_ldflags"  >>$ff_where_lib_conf
	    test -n "$with_tetgen_include" && echo "tetgen INCLUDE $with_tetgen_include "  >>$ff_where_lib_conf
            ff_where_lib_conf_tetgen=1
	    ff_where_lib_tetgen="$with_tetgen_ldflags"
	    ff_where_inc_tetgen="$with_tetgen_include"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add tetgen : $with_tetgen_ldflags ;  $with_tetgen_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add tetgen : $with_tetgen_ldflags ;  $with_tetgen_include in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add tetgen : $with_tetgen_ldflags $with_tetgen_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add tetgen : $with_tetgen_ldflags $with_tetgen_include in  $ff_where_lib_conf \"" >&6;}
        fi

        TOOL_COMPILE_tetgen=""

	enable_tetgen_download=no
    fi


# Check whether --enable-lapack was given.
if test ${enable_lapack+y}
then :
  enableval=$enable_lapack;
fi

    if test "$enable_lapack" = "no"
    then
        TOOL_COMPILE_lapack=""

        TOOL_DYLIB_lapack=""

		ff_uncompile_plugin+=" "lapack.$DYLIB_SUFFIX
		ff_unlib_plugin+=" lapack"
    elif  test   "$ff_lapack_ok" = "yes" ; then
        TOOL_DYLIB_lapack=lapack.$DYLIB_SUFFIX

        enable_lapack_download=no
    else
	   if test "$enable_download" != "yes" -a "$enable_download_lapack" != "yes" ; then
	    TOOL_COMPILE_lapack=""

		ff_uncompile_plugin+=" "lapack.$DYLIB_SUFFIX
		ff_unlib_plugin+=" lapack"
        TOOL_DYLIB_lapack=""

	   else
        if test "$ff_wget" = yes -a "$enable_download_lapack" = "yes" -a "$DOWNLOADCOMPILE" = "" ; then
            DOWNLOADCOMPILE="compile-pkg install-other"
        fi
        TOOL_COMPILE_lapack=lapack

        TOOL_DYLIB_lapack=lapack.$DYLIB_SUFFIX

		ff_download_lib="lapack $ff_download_lib"
	    enable_lapack_download=yes
	   fi
     fi

    # Also allow to disable the download of one tool if it is already locally installed



# Check whether --with-lapack_include was given.
if test ${with_lapack_include+y}
then :
  withval=$with_lapack_include;
fi


# Check whether --with-lapack_ldflags was given.
if test ${with_lapack_ldflags+y}
then :
  withval=$with_lapack_ldflags;
fi

	# Check whether --enable-download-lapack was given.
if test ${enable_download_lapack+y}
then :
  enableval=$enable_download_lapack;
fi


    if test "$with_lapack_include" != "" || test "$with_lapack_ldflags" != ""
    then

	# some directives have been specified, use them instead of downloading


    if test -z "$ff_where_lib_conf_lapack"  ; then
	    echo "lapack LD $with_lapack_ldflags"  >>$ff_where_lib_conf
	    test -n "$with_lapack_include" && echo "lapack INCLUDE $with_lapack_include "  >>$ff_where_lib_conf
            ff_where_lib_conf_lapack=1
	    ff_where_lib_lapack="$with_lapack_ldflags"
	    ff_where_inc_lapack="$with_lapack_include"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add lapack : $with_lapack_ldflags ;  $with_lapack_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add lapack : $with_lapack_ldflags ;  $with_lapack_include in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add lapack : $with_lapack_ldflags $with_lapack_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add lapack : $with_lapack_ldflags $with_lapack_include in  $ff_where_lib_conf \"" >&6;}
        fi

        TOOL_COMPILE_lapack=""

	enable_lapack_download=no
    fi


# Check whether --enable-metis was given.
if test ${enable_metis+y}
then :
  enableval=$enable_metis;
fi

    if test "$enable_metis" = "no"
    then
        TOOL_COMPILE_metis=""

        TOOL_DYLIB_metis=""

		ff_uncompile_plugin+=" "metis.$DYLIB_SUFFIX
		ff_unlib_plugin+=" metis"
    elif  test   "$ff_metis_ok" = "yes" ; then
        TOOL_DYLIB_metis=metis.$DYLIB_SUFFIX

        enable_metis_download=no
    else
	   if test "$enable_download" != "yes" -a "$enable_download_metis" != "yes" ; then
	    TOOL_COMPILE_metis=""

		ff_uncompile_plugin+=" "metis.$DYLIB_SUFFIX
		ff_unlib_plugin+=" metis"
        TOOL_DYLIB_metis=""

	   else
        if test "$ff_wget" = yes -a "$enable_download_metis" = "yes" -a "$DOWNLOADCOMPILE" = "" ; then
            DOWNLOADCOMPILE="compile-pkg install-other"
        fi
        TOOL_COMPILE_metis=metis

        TOOL_DYLIB_metis=metis.$DYLIB_SUFFIX

		ff_download_lib="metis $ff_download_lib"
	    enable_metis_download=yes
	   fi
     fi

    # Also allow to disable the download of one tool if it is already locally installed



# Check whether --with-metis_include was given.
if test ${with_metis_include+y}
then :
  withval=$with_metis_include;
fi


# Check whether --with-metis_ldflags was given.
if test ${with_metis_ldflags+y}
then :
  withval=$with_metis_ldflags;
fi

	# Check whether --enable-download-metis was given.
if test ${enable_download_metis+y}
then :
  enableval=$enable_download_metis;
fi


    if test "$with_metis_include" != "" || test "$with_metis_ldflags" != ""
    then

	# some directives have been specified, use them instead of downloading


    if test -z "$ff_where_lib_conf_metis"  ; then
	    echo "metis LD $with_metis_ldflags"  >>$ff_where_lib_conf
	    test -n "$with_metis_include" && echo "metis INCLUDE $with_metis_include "  >>$ff_where_lib_conf
            ff_where_lib_conf_metis=1
	    ff_where_lib_metis="$with_metis_ldflags"
	    ff_where_inc_metis="$with_metis_include"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add metis : $with_metis_ldflags ;  $with_metis_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add metis : $with_metis_ldflags ;  $with_metis_include in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add metis : $with_metis_ldflags $with_metis_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add metis : $with_metis_ldflags $with_metis_include in  $ff_where_lib_conf \"" >&6;}
        fi

        TOOL_COMPILE_metis=""

	enable_metis_download=no
    fi


# Check whether --enable-parmetis was given.
if test ${enable_parmetis+y}
then :
  enableval=$enable_parmetis;
fi

    if test "$enable_parmetis" = "no"
    then
        TOOL_COMPILE_parmetis=""

        TOOL_DYLIB_parmetis=""

		ff_uncompile_plugin+=" "parmetis.$DYLIB_SUFFIX
		ff_unlib_plugin+=" parmetis"
    elif  test   "$ff_parmetis_ok" = "yes" ; then
        TOOL_DYLIB_parmetis=parmetis.$DYLIB_SUFFIX

        enable_parmetis_download=no
    else
	   if test "$enable_download" != "yes" -a "$enable_download_parmetis" != "yes" ; then
	    TOOL_COMPILE_parmetis=""

		ff_uncompile_plugin+=" "parmetis.$DYLIB_SUFFIX
		ff_unlib_plugin+=" parmetis"
        TOOL_DYLIB_parmetis=""

	   else
        if test "$ff_wget" = yes -a "$enable_download_parmetis" = "yes" -a "$DOWNLOADCOMPILE" = "" ; then
            DOWNLOADCOMPILE="compile-pkg install-other"
        fi
        TOOL_COMPILE_parmetis=parmetis

        TOOL_DYLIB_parmetis=parmetis.$DYLIB_SUFFIX

		ff_download_lib="parmetis $ff_download_lib"
	    enable_parmetis_download=yes
	   fi
     fi

    # Also allow to disable the download of one tool if it is already locally installed



# Check whether --with-parmetis_include was given.
if test ${with_parmetis_include+y}
then :
  withval=$with_parmetis_include;
fi


# Check whether --with-parmetis_ldflags was given.
if test ${with_parmetis_ldflags+y}
then :
  withval=$with_parmetis_ldflags;
fi

	# Check whether --enable-download-parmetis was given.
if test ${enable_download_parmetis+y}
then :
  enableval=$enable_download_parmetis;
fi


    if test "$with_parmetis_include" != "" || test "$with_parmetis_ldflags" != ""
    then

	# some directives have been specified, use them instead of downloading


    if test -z "$ff_where_lib_conf_parmetis"  ; then
	    echo "parmetis LD $with_parmetis_ldflags"  >>$ff_where_lib_conf
	    test -n "$with_parmetis_include" && echo "parmetis INCLUDE $with_parmetis_include "  >>$ff_where_lib_conf
            ff_where_lib_conf_parmetis=1
	    ff_where_lib_parmetis="$with_parmetis_ldflags"
	    ff_where_inc_parmetis="$with_parmetis_include"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add parmetis : $with_parmetis_ldflags ;  $with_parmetis_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add parmetis : $with_parmetis_ldflags ;  $with_parmetis_include in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add parmetis : $with_parmetis_ldflags $with_parmetis_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add parmetis : $with_parmetis_ldflags $with_parmetis_include in  $ff_where_lib_conf \"" >&6;}
        fi

        TOOL_COMPILE_parmetis=""

	enable_parmetis_download=no
    fi


# Check whether --enable-mmg3d was given.
if test ${enable_mmg3d+y}
then :
  enableval=$enable_mmg3d;
fi

    if test "$enable_mmg3d" = "no"
    then
        TOOL_COMPILE_mmg3d=""

        TOOL_DYLIB_mmg3d=""

		ff_uncompile_plugin+=" "mmg3d-v4.0.$DYLIB_SUFFIX
		ff_unlib_plugin+=" mmg3d"
    elif  test   "$ff_mmg3d_ok" = "yes" ; then
        TOOL_DYLIB_mmg3d=mmg3d-v4.0.$DYLIB_SUFFIX

        enable_mmg3d_download=no
    else
	   if test "$enable_download" != "yes" -a "$enable_download_mmg3d" != "yes" ; then
	    TOOL_COMPILE_mmg3d=""

		ff_uncompile_plugin+=" "mmg3d-v4.0.$DYLIB_SUFFIX
		ff_unlib_plugin+=" mmg3d"
        TOOL_DYLIB_mmg3d=""

	   else
        if test "$ff_wget" = yes -a "$enable_download_mmg3d" = "yes" -a "$DOWNLOADCOMPILE" = "" ; then
            DOWNLOADCOMPILE="compile-pkg install-other"
        fi
        TOOL_COMPILE_mmg3d=mmg3d

        TOOL_DYLIB_mmg3d=mmg3d-v4.0.$DYLIB_SUFFIX

		ff_download_lib="mmg3d $ff_download_lib"
	    enable_mmg3d_download=yes
	   fi
     fi

    # Also allow to disable the download of one tool if it is already locally installed



# Check whether --with-mmg3d_include was given.
if test ${with_mmg3d_include+y}
then :
  withval=$with_mmg3d_include;
fi


# Check whether --with-mmg3d_ldflags was given.
if test ${with_mmg3d_ldflags+y}
then :
  withval=$with_mmg3d_ldflags;
fi

	# Check whether --enable-download-mmg3d was given.
if test ${enable_download_mmg3d+y}
then :
  enableval=$enable_download_mmg3d;
fi


    if test "$with_mmg3d_include" != "" || test "$with_mmg3d_ldflags" != ""
    then

	# some directives have been specified, use them instead of downloading


    if test -z "$ff_where_lib_conf_mmg3d"  ; then
	    echo "mmg3d LD $with_mmg3d_ldflags"  >>$ff_where_lib_conf
	    test -n "$with_mmg3d_include" && echo "mmg3d INCLUDE $with_mmg3d_include "  >>$ff_where_lib_conf
            ff_where_lib_conf_mmg3d=1
	    ff_where_lib_mmg3d="$with_mmg3d_ldflags"
	    ff_where_inc_mmg3d="$with_mmg3d_include"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add mmg3d : $with_mmg3d_ldflags ;  $with_mmg3d_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add mmg3d : $with_mmg3d_ldflags ;  $with_mmg3d_include in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add mmg3d : $with_mmg3d_ldflags $with_mmg3d_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add mmg3d : $with_mmg3d_ldflags $with_mmg3d_include in  $ff_where_lib_conf \"" >&6;}
        fi

        TOOL_COMPILE_mmg3d=""

	enable_mmg3d_download=no
    fi


if test "$ff_cmake" = yes -o \( "$ff_mmg_ok" = yes -a -z "$TOOL_COMPILE_mmg" \); then
     # Check whether --enable-mmg was given.
if test ${enable_mmg+y}
then :
  enableval=$enable_mmg;
fi

    if test "$enable_mmg" = "no"
    then
        TOOL_COMPILE_mmg=""

        TOOL_DYLIB_mmg=""

		ff_uncompile_plugin+=" "mmg.$DYLIB_SUFFIX
		ff_unlib_plugin+=" mmg"
    elif  test   "$ff_mmg_ok" = "yes" ; then
        TOOL_DYLIB_mmg=mmg.$DYLIB_SUFFIX

        enable_mmg_download=no
    else
	   if test "$enable_download" != "yes" -a "$enable_download_mmg" != "yes" ; then
	    TOOL_COMPILE_mmg=""

		ff_uncompile_plugin+=" "mmg.$DYLIB_SUFFIX
		ff_unlib_plugin+=" mmg"
        TOOL_DYLIB_mmg=""

	   else
        if test "$ff_wget" = yes -a "$enable_download_mmg" = "yes" -a "$DOWNLOADCOMPILE" = "" ; then
            DOWNLOADCOMPILE="compile-pkg install-other"
        fi
        TOOL_COMPILE_mmg=mmg

        TOOL_DYLIB_mmg=mmg.$DYLIB_SUFFIX

		ff_download_lib="mmg $ff_download_lib"
	    enable_mmg_download=yes
	   fi
     fi

    # Also allow to disable the download of one tool if it is already locally installed



# Check whether --with-mmg_include was given.
if test ${with_mmg_include+y}
then :
  withval=$with_mmg_include;
fi


# Check whether --with-mmg_ldflags was given.
if test ${with_mmg_ldflags+y}
then :
  withval=$with_mmg_ldflags;
fi

	# Check whether --enable-download-mmg was given.
if test ${enable_download_mmg+y}
then :
  enableval=$enable_download_mmg;
fi


    if test "$with_mmg_include" != "" || test "$with_mmg_ldflags" != ""
    then

	# some directives have been specified, use them instead of downloading


    if test -z "$ff_where_lib_conf_mmg"  ; then
	    echo "mmg LD $with_mmg_ldflags"  >>$ff_where_lib_conf
	    test -n "$with_mmg_include" && echo "mmg INCLUDE $with_mmg_include "  >>$ff_where_lib_conf
            ff_where_lib_conf_mmg=1
	    ff_where_lib_mmg="$with_mmg_ldflags"
	    ff_where_inc_mmg="$with_mmg_include"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add mmg : $with_mmg_ldflags ;  $with_mmg_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add mmg : $with_mmg_ldflags ;  $with_mmg_include in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add mmg : $with_mmg_ldflags $with_mmg_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add mmg : $with_mmg_ldflags $with_mmg_include in  $ff_where_lib_conf \"" >&6;}
        fi

        TOOL_COMPILE_mmg=""

	enable_mmg_download=no
    fi


fi
if test "$ff_cmake" = yes -o \( "$ff_parmmg_ok" = yes -a -z "$TOOL_COMPILE_parmmg" \); then
     # Check whether --enable-parmmg was given.
if test ${enable_parmmg+y}
then :
  enableval=$enable_parmmg;
fi

    if test "$enable_parmmg" = "no"
    then
        TOOL_COMPILE_parmmg=""

        TOOL_DYLIB_parmmg=""

		ff_uncompile_plugin+=" "parmmg.$DYLIB_SUFFIX
		ff_unlib_plugin+=" parmmg"
    elif  test   "$ff_parmmg_ok" = "yes" ; then
        TOOL_DYLIB_parmmg=parmmg.$DYLIB_SUFFIX

        enable_parmmg_download=no
    else
	   if test "$enable_download" != "yes" -a "$enable_download_parmmg" != "yes" ; then
	    TOOL_COMPILE_parmmg=""

		ff_uncompile_plugin+=" "parmmg.$DYLIB_SUFFIX
		ff_unlib_plugin+=" parmmg"
        TOOL_DYLIB_parmmg=""

	   else
        if test "$ff_wget" = yes -a "$enable_download_parmmg" = "yes" -a "$DOWNLOADCOMPILE" = "" ; then
            DOWNLOADCOMPILE="compile-pkg install-other"
        fi
        TOOL_COMPILE_parmmg=parmmg

        TOOL_DYLIB_parmmg=parmmg.$DYLIB_SUFFIX

		ff_download_lib="parmmg $ff_download_lib"
	    enable_parmmg_download=yes
	   fi
     fi

    # Also allow to disable the download of one tool if it is already locally installed



# Check whether --with-parmmg_include was given.
if test ${with_parmmg_include+y}
then :
  withval=$with_parmmg_include;
fi


# Check whether --with-parmmg_ldflags was given.
if test ${with_parmmg_ldflags+y}
then :
  withval=$with_parmmg_ldflags;
fi

	# Check whether --enable-download-parmmg was given.
if test ${enable_download_parmmg+y}
then :
  enableval=$enable_download_parmmg;
fi


    if test "$with_parmmg_include" != "" || test "$with_parmmg_ldflags" != ""
    then

	# some directives have been specified, use them instead of downloading


    if test -z "$ff_where_lib_conf_parmmg"  ; then
	    echo "parmmg LD $with_parmmg_ldflags"  >>$ff_where_lib_conf
	    test -n "$with_parmmg_include" && echo "parmmg INCLUDE $with_parmmg_include "  >>$ff_where_lib_conf
            ff_where_lib_conf_parmmg=1
	    ff_where_lib_parmmg="$with_parmmg_ldflags"
	    ff_where_inc_parmmg="$with_parmmg_include"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add parmmg : $with_parmmg_ldflags ;  $with_parmmg_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add parmmg : $with_parmmg_ldflags ;  $with_parmmg_include in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add parmmg : $with_parmmg_ldflags $with_parmmg_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add parmmg : $with_parmmg_ldflags $with_parmmg_include in  $ff_where_lib_conf \"" >&6;}
        fi

        TOOL_COMPILE_parmmg=""

	enable_parmmg_download=no
    fi


fi
# Check whether --enable-mshmet was given.
if test ${enable_mshmet+y}
then :
  enableval=$enable_mshmet;
fi

    if test "$enable_mshmet" = "no"
    then
        TOOL_COMPILE_mshmet=""

        TOOL_DYLIB_mshmet=""

		ff_uncompile_plugin+=" ""mshmet.$DYLIB_SUFFIX aniso.$DYLIB_SUFFIX"
		ff_unlib_plugin+=" mshmet"
    elif  test   "$ff_mshmet_ok" = "yes" ; then
        TOOL_DYLIB_mshmet="mshmet.$DYLIB_SUFFIX aniso.$DYLIB_SUFFIX"

        enable_mshmet_download=no
    else
	   if test "$enable_download" != "yes" -a "$enable_download_mshmet" != "yes" ; then
	    TOOL_COMPILE_mshmet=""

		ff_uncompile_plugin+=" ""mshmet.$DYLIB_SUFFIX aniso.$DYLIB_SUFFIX"
		ff_unlib_plugin+=" mshmet"
        TOOL_DYLIB_mshmet=""

	   else
        if test "$ff_wget" = yes -a "$enable_download_mshmet" = "yes" -a "$DOWNLOADCOMPILE" = "" ; then
            DOWNLOADCOMPILE="compile-pkg install-other"
        fi
        TOOL_COMPILE_mshmet=mshmet

        TOOL_DYLIB_mshmet="mshmet.$DYLIB_SUFFIX aniso.$DYLIB_SUFFIX"

		ff_download_lib="mshmet $ff_download_lib"
	    enable_mshmet_download=yes
	   fi
     fi

    # Also allow to disable the download of one tool if it is already locally installed



# Check whether --with-mshmet_include was given.
if test ${with_mshmet_include+y}
then :
  withval=$with_mshmet_include;
fi


# Check whether --with-mshmet_ldflags was given.
if test ${with_mshmet_ldflags+y}
then :
  withval=$with_mshmet_ldflags;
fi

	# Check whether --enable-download-mshmet was given.
if test ${enable_download_mshmet+y}
then :
  enableval=$enable_download_mshmet;
fi


    if test "$with_mshmet_include" != "" || test "$with_mshmet_ldflags" != ""
    then

	# some directives have been specified, use them instead of downloading


    if test -z "$ff_where_lib_conf_mshmet"  ; then
	    echo "mshmet LD $with_mshmet_ldflags"  >>$ff_where_lib_conf
	    test -n "$with_mshmet_include" && echo "mshmet INCLUDE $with_mshmet_include "  >>$ff_where_lib_conf
            ff_where_lib_conf_mshmet=1
	    ff_where_lib_mshmet="$with_mshmet_ldflags"
	    ff_where_inc_mshmet="$with_mshmet_include"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add mshmet : $with_mshmet_ldflags ;  $with_mshmet_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add mshmet : $with_mshmet_ldflags ;  $with_mshmet_include in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add mshmet : $with_mshmet_ldflags $with_mshmet_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add mshmet : $with_mshmet_ldflags $with_mshmet_include in  $ff_where_lib_conf \"" >&6;}
        fi

        TOOL_COMPILE_mshmet=""

	enable_mshmet_download=no
    fi


# Check whether --enable-gmm was given.
if test ${enable_gmm+y}
then :
  enableval=$enable_gmm;
fi

    if test "$enable_gmm" = "no"
    then
        TOOL_COMPILE_gmm=""

        TOOL_DYLIB_gmm=""

		ff_uncompile_plugin+=" "ilut.$DYLIB_SUFFIX
		ff_unlib_plugin+=" gmm"
    elif  test   "$ff_gmm_ok" = "yes" ; then
        TOOL_DYLIB_gmm=ilut.$DYLIB_SUFFIX

        enable_gmm_download=no
    else
	   if test "$enable_download" != "yes" -a "$enable_download_gmm" != "yes" ; then
	    TOOL_COMPILE_gmm=""

		ff_uncompile_plugin+=" "ilut.$DYLIB_SUFFIX
		ff_unlib_plugin+=" gmm"
        TOOL_DYLIB_gmm=""

	   else
        if test "$ff_wget" = yes -a "$enable_download_gmm" = "yes" -a "$DOWNLOADCOMPILE" = "" ; then
            DOWNLOADCOMPILE="compile-pkg install-other"
        fi
        TOOL_COMPILE_gmm=gmm

        TOOL_DYLIB_gmm=ilut.$DYLIB_SUFFIX



	   fi
     fi

    # Also allow to disable the download of one tool if it is already locally installed



# Check whether --with-gmm_include was given.
if test ${with_gmm_include+y}
then :
  withval=$with_gmm_include;
fi


# Check whether --with-gmm_ldflags was given.
if test ${with_gmm_ldflags+y}
then :
  withval=$with_gmm_ldflags;
fi

	# Check whether --enable-download-gmm was given.
if test ${enable_download_gmm+y}
then :
  enableval=$enable_download_gmm;
fi


    if test "$with_gmm_include" != "" || test "$with_gmm_ldflags" != ""
    then

	# some directives have been specified, use them instead of downloading


    if test -z "$ff_where_lib_conf_gmm"  ; then
	    echo "gmm LD $with_gmm_ldflags"  >>$ff_where_lib_conf
	    test -n "$with_gmm_include" && echo "gmm INCLUDE $with_gmm_include "  >>$ff_where_lib_conf
            ff_where_lib_conf_gmm=1
	    ff_where_lib_gmm="$with_gmm_ldflags"
	    ff_where_inc_gmm="$with_gmm_include"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add gmm : $with_gmm_ldflags ;  $with_gmm_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add gmm : $with_gmm_ldflags ;  $with_gmm_include in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add gmm : $with_gmm_ldflags $with_gmm_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add gmm : $with_gmm_ldflags $with_gmm_include in  $ff_where_lib_conf \"" >&6;}
        fi

        TOOL_COMPILE_gmm=""

	enable_gmm_download=no
    fi


if test "$enable_fortran" != no -o -z "$enable_fortran"; then
# Check whether --enable-ipopt was given.
if test ${enable_ipopt+y}
then :
  enableval=$enable_ipopt;
fi

    if test "$enable_ipopt" = "no"
    then
        TOOL_COMPILE_ipopt=""

        TOOL_DYLIB_ipopt=""

		ff_uncompile_plugin+=" "ff-Ipopt.$DYLIB_SUFFIX
		ff_unlib_plugin+=" ipopt"
    elif  test   "$ff_ipopt_ok" = "yes" ; then
        TOOL_DYLIB_ipopt=ff-Ipopt.$DYLIB_SUFFIX

        enable_ipopt_download=no
    else
	   if test "$enable_download" != "yes" -a "$enable_download_ipopt" != "yes" ; then
	    TOOL_COMPILE_ipopt=""

		ff_uncompile_plugin+=" "ff-Ipopt.$DYLIB_SUFFIX
		ff_unlib_plugin+=" ipopt"
        TOOL_DYLIB_ipopt=""

	   else
        if test "$ff_wget" = yes -a "$enable_download_ipopt" = "yes" -a "$DOWNLOADCOMPILE" = "" ; then
            DOWNLOADCOMPILE="compile-pkg install-other"
        fi
        TOOL_COMPILE_ipopt=ipopt

        TOOL_DYLIB_ipopt=ff-Ipopt.$DYLIB_SUFFIX

		ff_download_lib="ipopt $ff_download_lib"
	    enable_ipopt_download=yes
	   fi
     fi

    # Also allow to disable the download of one tool if it is already locally installed



# Check whether --with-ipopt_include was given.
if test ${with_ipopt_include+y}
then :
  withval=$with_ipopt_include;
fi


# Check whether --with-ipopt_ldflags was given.
if test ${with_ipopt_ldflags+y}
then :
  withval=$with_ipopt_ldflags;
fi

	# Check whether --enable-download-ipopt was given.
if test ${enable_download_ipopt+y}
then :
  enableval=$enable_download_ipopt;
fi


    if test "$with_ipopt_include" != "" || test "$with_ipopt_ldflags" != ""
    then

	# some directives have been specified, use them instead of downloading


    if test -z "$ff_where_lib_conf_ipopt"  ; then
	    echo "ipopt LD $with_ipopt_ldflags"  >>$ff_where_lib_conf
	    test -n "$with_ipopt_include" && echo "ipopt INCLUDE $with_ipopt_include "  >>$ff_where_lib_conf
            ff_where_lib_conf_ipopt=1
	    ff_where_lib_ipopt="$with_ipopt_ldflags"
	    ff_where_inc_ipopt="$with_ipopt_include"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add ipopt : $with_ipopt_ldflags ;  $with_ipopt_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add ipopt : $with_ipopt_ldflags ;  $with_ipopt_include in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add ipopt : $with_ipopt_ldflags $with_ipopt_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add ipopt : $with_ipopt_ldflags $with_ipopt_include in  $ff_where_lib_conf \"" >&6;}
        fi

        TOOL_COMPILE_ipopt=""

	enable_ipopt_download=no
    fi


# Check whether --enable-scalapack was given.
if test ${enable_scalapack+y}
then :
  enableval=$enable_scalapack;
fi

    if test "$enable_scalapack" = "no"
    then
        TOOL_COMPILE_scalapack=""

        TOOL_DYLIB_scalapack=""

		ff_uncompile_plugin+=" ""MUMPS.$DYLIB_SUFFIX MUMPS_mpi.$DYLIB_SUFFIX"
		ff_unlib_plugin+=" scalapack"
    elif  test   "$ff_scalapack_ok" = "yes" ; then
        TOOL_DYLIB_scalapack="MUMPS.$DYLIB_SUFFIX MUMPS_mpi.$DYLIB_SUFFIX"

        enable_scalapack_download=no
    else
	   if test "$enable_download" != "yes" -a "$enable_download_scalapack" != "yes" ; then
	    TOOL_COMPILE_scalapack=""

		ff_uncompile_plugin+=" ""MUMPS.$DYLIB_SUFFIX MUMPS_mpi.$DYLIB_SUFFIX"
		ff_unlib_plugin+=" scalapack"
        TOOL_DYLIB_scalapack=""

	   else
        if test "$ff_wget" = yes -a "$enable_download_scalapack" = "yes" -a "$DOWNLOADCOMPILE" = "" ; then
            DOWNLOADCOMPILE="compile-pkg install-other"
        fi
        TOOL_COMPILE_scalapack=scalapack

        TOOL_DYLIB_scalapack="MUMPS.$DYLIB_SUFFIX MUMPS_mpi.$DYLIB_SUFFIX"

		ff_download_lib="scalapack $ff_download_lib"
	    enable_scalapack_download=yes
	   fi
     fi

    # Also allow to disable the download of one tool if it is already locally installed



# Check whether --with-scalapack_include was given.
if test ${with_scalapack_include+y}
then :
  withval=$with_scalapack_include;
fi


# Check whether --with-scalapack_ldflags was given.
if test ${with_scalapack_ldflags+y}
then :
  withval=$with_scalapack_ldflags;
fi

	# Check whether --enable-download-scalapack was given.
if test ${enable_download_scalapack+y}
then :
  enableval=$enable_download_scalapack;
fi


    if test "$with_scalapack_include" != "" || test "$with_scalapack_ldflags" != ""
    then

	# some directives have been specified, use them instead of downloading


    if test -z "$ff_where_lib_conf_scalapack"  ; then
	    echo "scalapack LD $with_scalapack_ldflags"  >>$ff_where_lib_conf
	    test -n "$with_scalapack_include" && echo "scalapack INCLUDE $with_scalapack_include "  >>$ff_where_lib_conf
            ff_where_lib_conf_scalapack=1
	    ff_where_lib_scalapack="$with_scalapack_ldflags"
	    ff_where_inc_scalapack="$with_scalapack_include"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add scalapack : $with_scalapack_ldflags ;  $with_scalapack_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add scalapack : $with_scalapack_ldflags ;  $with_scalapack_include in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add scalapack : $with_scalapack_ldflags $with_scalapack_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add scalapack : $with_scalapack_ldflags $with_scalapack_include in  $ff_where_lib_conf \"" >&6;}
        fi

        TOOL_COMPILE_scalapack=""

	enable_scalapack_download=no
    fi


# Check whether --enable-mumps was given.
if test ${enable_mumps+y}
then :
  enableval=$enable_mumps;
fi

    if test "$enable_mumps" = "no"
    then
        TOOL_COMPILE_mumps=""

        TOOL_DYLIB_mumps=""

		ff_uncompile_plugin+=" ""MUMPS.$DYLIB_SUFFIX MUMPS_mpi.$DYLIB_SUFFIX"
		ff_unlib_plugin+=" mumps"
    elif  test   "$ff_mumps_ok" = "yes" ; then
        TOOL_DYLIB_mumps="MUMPS.$DYLIB_SUFFIX MUMPS_mpi.$DYLIB_SUFFIX"

        enable_mumps_download=no
    else
	   if test "$enable_download" != "yes" -a "$enable_download_mumps" != "yes" ; then
	    TOOL_COMPILE_mumps=""

		ff_uncompile_plugin+=" ""MUMPS.$DYLIB_SUFFIX MUMPS_mpi.$DYLIB_SUFFIX"
		ff_unlib_plugin+=" mumps"
        TOOL_DYLIB_mumps=""

	   else
        if test "$ff_wget" = yes -a "$enable_download_mumps" = "yes" -a "$DOWNLOADCOMPILE" = "" ; then
            DOWNLOADCOMPILE="compile-pkg install-other"
        fi
        TOOL_COMPILE_mumps=mumps

        TOOL_DYLIB_mumps="MUMPS.$DYLIB_SUFFIX MUMPS_mpi.$DYLIB_SUFFIX"

		ff_download_lib="mumps $ff_download_lib"
	    enable_mumps_download=yes
	   fi
     fi

    # Also allow to disable the download of one tool if it is already locally installed



# Check whether --with-mumps_include was given.
if test ${with_mumps_include+y}
then :
  withval=$with_mumps_include;
fi


# Check whether --with-mumps_ldflags was given.
if test ${with_mumps_ldflags+y}
then :
  withval=$with_mumps_ldflags;
fi

	# Check whether --enable-download-mumps was given.
if test ${enable_download_mumps+y}
then :
  enableval=$enable_download_mumps;
fi


    if test "$with_mumps_include" != "" || test "$with_mumps_ldflags" != ""
    then

	# some directives have been specified, use them instead of downloading


    if test -z "$ff_where_lib_conf_mumps"  ; then
	    echo "mumps LD $with_mumps_ldflags"  >>$ff_where_lib_conf
	    test -n "$with_mumps_include" && echo "mumps INCLUDE $with_mumps_include "  >>$ff_where_lib_conf
            ff_where_lib_conf_mumps=1
	    ff_where_lib_mumps="$with_mumps_ldflags"
	    ff_where_inc_mumps="$with_mumps_include"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add mumps : $with_mumps_ldflags ;  $with_mumps_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add mumps : $with_mumps_ldflags ;  $with_mumps_include in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add mumps : $with_mumps_ldflags $with_mumps_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add mumps : $with_mumps_ldflags $with_mumps_include in  $ff_where_lib_conf \"" >&6;}
        fi

        TOOL_COMPILE_mumps=""

	enable_mumps_download=no
    fi


# Check whether --enable-mumps_seq was given.
if test ${enable_mumps_seq+y}
then :
  enableval=$enable_mumps_seq;
fi

    if test "$enable_mumps_seq" = "no"
    then
        TOOL_COMPILE_mumps_seq=""

        TOOL_DYLIB_mumps_seq=""

		ff_uncompile_plugin+=" ""MUMPS_seq.$DYLIB_SUFFIX MUMPS.$DYLIB_SUFFIX"
		ff_unlib_plugin+=" mumps_seq"
    elif  test   "$ff_mumps_seq_ok" = "yes" ; then
        TOOL_DYLIB_mumps_seq="MUMPS_seq.$DYLIB_SUFFIX MUMPS.$DYLIB_SUFFIX"

        enable_mumps_seq_download=no
    else
	   if test "$enable_download" != "yes" -a "$enable_download_mumps_seq" != "yes" ; then
	    TOOL_COMPILE_mumps_seq=""

		ff_uncompile_plugin+=" ""MUMPS_seq.$DYLIB_SUFFIX MUMPS.$DYLIB_SUFFIX"
		ff_unlib_plugin+=" mumps_seq"
        TOOL_DYLIB_mumps_seq=""

	   else
        if test "$ff_wget" = yes -a "$enable_download_mumps_seq" = "yes" -a "$DOWNLOADCOMPILE" = "" ; then
            DOWNLOADCOMPILE="compile-pkg install-other"
        fi
        TOOL_COMPILE_mumps_seq=mumps-seq

        TOOL_DYLIB_mumps_seq="MUMPS_seq.$DYLIB_SUFFIX MUMPS.$DYLIB_SUFFIX"

		ff_download_lib="mumps_seq $ff_download_lib"
	    enable_mumps_seq_download=yes
	   fi
     fi

    # Also allow to disable the download of one tool if it is already locally installed



# Check whether --with-mumps_seq_include was given.
if test ${with_mumps_seq_include+y}
then :
  withval=$with_mumps_seq_include;
fi


# Check whether --with-mumps_seq_ldflags was given.
if test ${with_mumps_seq_ldflags+y}
then :
  withval=$with_mumps_seq_ldflags;
fi

	# Check whether --enable-download-mumps_seq was given.
if test ${enable_download_mumps_seq+y}
then :
  enableval=$enable_download_mumps_seq;
fi


    if test "$with_mumps_seq_include" != "" || test "$with_mumps_seq_ldflags" != ""
    then

	# some directives have been specified, use them instead of downloading


    if test -z "$ff_where_lib_conf_mumps_seq"  ; then
	    echo "mumps_seq LD $with_mumps_seq_ldflags"  >>$ff_where_lib_conf
	    test -n "$with_mumps_seq_include" && echo "mumps_seq INCLUDE $with_mumps_seq_include "  >>$ff_where_lib_conf
            ff_where_lib_conf_mumps_seq=1
	    ff_where_lib_mumps_seq="$with_mumps_seq_ldflags"
	    ff_where_inc_mumps_seq="$with_mumps_seq_include"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add mumps_seq : $with_mumps_seq_ldflags ;  $with_mumps_seq_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add mumps_seq : $with_mumps_seq_ldflags ;  $with_mumps_seq_include in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add mumps_seq : $with_mumps_seq_ldflags $with_mumps_seq_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add mumps_seq : $with_mumps_seq_ldflags $with_mumps_seq_include in  $ff_where_lib_conf \"" >&6;}
        fi

        TOOL_COMPILE_mumps_seq=""

	enable_mumps_seq_download=no
    fi


TOOL_DYLIB_ffnewuoa=ffnewuoa.$DYLIB_SUFFIX

else

	# Check whether --enable-ipopt was given.
if test ${enable_ipopt+y}
then :
  enableval=$enable_ipopt;
fi

    if test "$enable_ipopt" = "no" -o "$enable_ipopt" = ""
    then
	    enable_ipopt=no
        TOOL_COMPILE_ipopt=""

        TOOL_DYLIB_ipopt=""

    elif  test   "$ff_ipopt_ok" = "yes" ; then
        TOOL_DYLIB_ipopt=ff-Ipopt.$DYLIB_SUFFIX

        enable_ipopt_download=no
    else
        TOOL_COMPILE_ipopt=ipopt

        TOOL_DYLIB_ipopt=ff-Ipopt.$DYLIB_SUFFIX

		ff_download_lib="ipopt $ff_download_lib"
	    enable_ipopt_download=yes
    fi

    # Also allow to disable the download of one tool if it is already locally installed



# Check whether --with-ipopt_include was given.
if test ${with_ipopt_include+y}
then :
  withval=$with_ipopt_include;
fi


# Check whether --with-ipopt_ldflags was given.
if test ${with_ipopt_ldflags+y}
then :
  withval=$with_ipopt_ldflags;
fi

	# Check whether --enable-download-ipopt was given.
if test ${enable_download_ipopt+y}
then :
  enableval=$enable_download_ipopt;
fi


    if test "$with_ipopt_include" != "" || test "$with_ipopt_ldflags" != ""
    then

	# some directives have been specified, use them instead of downloading


    if test -z "$ff_where_lib_conf_ipopt"  ; then
	    echo "ipopt LD $with_ipopt_ldflags"  >>$ff_where_lib_conf
	    test -n "$with_ipopt_include" && echo "ipopt INCLUDE $with_ipopt_include "  >>$ff_where_lib_conf
            ff_where_lib_conf_ipopt=1
	    ff_where_lib_ipopt="$with_ipopt_ldflags"
	    ff_where_inc_ipopt="$with_ipopt_include"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add ipopt : $with_ipopt_ldflags ;  $with_ipopt_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add ipopt : $with_ipopt_ldflags ;  $with_ipopt_include in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add ipopt : $with_ipopt_ldflags $with_ipopt_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add ipopt : $with_ipopt_ldflags $with_ipopt_include in  $ff_where_lib_conf \"" >&6;}
        fi

        TOOL_COMPILE_ipopt=""

	enable_ipopt_download=no
    fi



	# Check whether --enable-scalapack was given.
if test ${enable_scalapack+y}
then :
  enableval=$enable_scalapack;
fi

    if test "$enable_scalapack" = "no" -o "$enable_scalapack" = ""
    then
	    enable_scalapack=no
        TOOL_COMPILE_scalapack=""

        TOOL_DYLIB_scalapack=""

    elif  test   "$ff_scalapack_ok" = "yes" ; then
        TOOL_DYLIB_scalapack="MUMPS.$DYLIB_SUFFIX MUMPS_mpi.$DYLIB_SUFFIX"

        enable_scalapack_download=no
    else
        TOOL_COMPILE_scalapack=scalapack

        TOOL_DYLIB_scalapack="MUMPS.$DYLIB_SUFFIX MUMPS_mpi.$DYLIB_SUFFIX"

		ff_download_lib="scalapack $ff_download_lib"
	    enable_scalapack_download=yes
    fi

    # Also allow to disable the download of one tool if it is already locally installed



# Check whether --with-scalapack_include was given.
if test ${with_scalapack_include+y}
then :
  withval=$with_scalapack_include;
fi


# Check whether --with-scalapack_ldflags was given.
if test ${with_scalapack_ldflags+y}
then :
  withval=$with_scalapack_ldflags;
fi

	# Check whether --enable-download-scalapack was given.
if test ${enable_download_scalapack+y}
then :
  enableval=$enable_download_scalapack;
fi


    if test "$with_scalapack_include" != "" || test "$with_scalapack_ldflags" != ""
    then

	# some directives have been specified, use them instead of downloading


    if test -z "$ff_where_lib_conf_scalapack"  ; then
	    echo "scalapack LD $with_scalapack_ldflags"  >>$ff_where_lib_conf
	    test -n "$with_scalapack_include" && echo "scalapack INCLUDE $with_scalapack_include "  >>$ff_where_lib_conf
            ff_where_lib_conf_scalapack=1
	    ff_where_lib_scalapack="$with_scalapack_ldflags"
	    ff_where_inc_scalapack="$with_scalapack_include"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add scalapack : $with_scalapack_ldflags ;  $with_scalapack_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add scalapack : $with_scalapack_ldflags ;  $with_scalapack_include in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add scalapack : $with_scalapack_ldflags $with_scalapack_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add scalapack : $with_scalapack_ldflags $with_scalapack_include in  $ff_where_lib_conf \"" >&6;}
        fi

        TOOL_COMPILE_scalapack=""

	enable_scalapack_download=no
    fi



	# Check whether --enable-mumps was given.
if test ${enable_mumps+y}
then :
  enableval=$enable_mumps;
fi

    if test "$enable_mumps" = "no" -o "$enable_mumps" = ""
    then
	    enable_mumps=no
        TOOL_COMPILE_mumps=""

        TOOL_DYLIB_mumps=""

    elif  test   "$ff_mumps_ok" = "yes" ; then
        TOOL_DYLIB_mumps="MUMPS.$DYLIB_SUFFIX MUMPS_mpi.$DYLIB_SUFFIX"

        enable_mumps_download=no
    else
        TOOL_COMPILE_mumps=mumps

        TOOL_DYLIB_mumps="MUMPS.$DYLIB_SUFFIX MUMPS_mpi.$DYLIB_SUFFIX"

		ff_download_lib="mumps $ff_download_lib"
	    enable_mumps_download=yes
    fi

    # Also allow to disable the download of one tool if it is already locally installed



# Check whether --with-mumps_include was given.
if test ${with_mumps_include+y}
then :
  withval=$with_mumps_include;
fi


# Check whether --with-mumps_ldflags was given.
if test ${with_mumps_ldflags+y}
then :
  withval=$with_mumps_ldflags;
fi

	# Check whether --enable-download-mumps was given.
if test ${enable_download_mumps+y}
then :
  enableval=$enable_download_mumps;
fi


    if test "$with_mumps_include" != "" || test "$with_mumps_ldflags" != ""
    then

	# some directives have been specified, use them instead of downloading


    if test -z "$ff_where_lib_conf_mumps"  ; then
	    echo "mumps LD $with_mumps_ldflags"  >>$ff_where_lib_conf
	    test -n "$with_mumps_include" && echo "mumps INCLUDE $with_mumps_include "  >>$ff_where_lib_conf
            ff_where_lib_conf_mumps=1
	    ff_where_lib_mumps="$with_mumps_ldflags"
	    ff_where_inc_mumps="$with_mumps_include"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add mumps : $with_mumps_ldflags ;  $with_mumps_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add mumps : $with_mumps_ldflags ;  $with_mumps_include in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add mumps : $with_mumps_ldflags $with_mumps_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add mumps : $with_mumps_ldflags $with_mumps_include in  $ff_where_lib_conf \"" >&6;}
        fi

        TOOL_COMPILE_mumps=""

	enable_mumps_download=no
    fi



	# Check whether --enable-mumps_seq was given.
if test ${enable_mumps_seq+y}
then :
  enableval=$enable_mumps_seq;
fi

    if test "$enable_mumps_seq" = "no" -o "$enable_mumps_seq" = ""
    then
	    enable_mumps_seq=no
        TOOL_COMPILE_mumps_seq=""

        TOOL_DYLIB_mumps_seq=""

    elif  test   "$ff_mumps_seq_ok" = "yes" ; then
        TOOL_DYLIB_mumps_seq="MUMPS_seq.$DYLIB_SUFFIX MUMPS.$DYLIB_SUFFIX"

        enable_mumps_seq_download=no
    else
        TOOL_COMPILE_mumps_seq=mumps-seq

        TOOL_DYLIB_mumps_seq="MUMPS_seq.$DYLIB_SUFFIX MUMPS.$DYLIB_SUFFIX"

		ff_download_lib="mumps_seq $ff_download_lib"
	    enable_mumps_seq_download=yes
    fi

    # Also allow to disable the download of one tool if it is already locally installed



# Check whether --with-mumps_seq_include was given.
if test ${with_mumps_seq_include+y}
then :
  withval=$with_mumps_seq_include;
fi


# Check whether --with-mumps_seq_ldflags was given.
if test ${with_mumps_seq_ldflags+y}
then :
  withval=$with_mumps_seq_ldflags;
fi

	# Check whether --enable-download-mumps_seq was given.
if test ${enable_download_mumps_seq+y}
then :
  enableval=$enable_download_mumps_seq;
fi


    if test "$with_mumps_seq_include" != "" || test "$with_mumps_seq_ldflags" != ""
    then

	# some directives have been specified, use them instead of downloading


    if test -z "$ff_where_lib_conf_mumps_seq"  ; then
	    echo "mumps_seq LD $with_mumps_seq_ldflags"  >>$ff_where_lib_conf
	    test -n "$with_mumps_seq_include" && echo "mumps_seq INCLUDE $with_mumps_seq_include "  >>$ff_where_lib_conf
            ff_where_lib_conf_mumps_seq=1
	    ff_where_lib_mumps_seq="$with_mumps_seq_ldflags"
	    ff_where_inc_mumps_seq="$with_mumps_seq_include"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add mumps_seq : $with_mumps_seq_ldflags ;  $with_mumps_seq_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add mumps_seq : $with_mumps_seq_ldflags ;  $with_mumps_seq_include in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add mumps_seq : $with_mumps_seq_ldflags $with_mumps_seq_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add mumps_seq : $with_mumps_seq_ldflags $with_mumps_seq_include in  $ff_where_lib_conf \"" >&6;}
        fi

        TOOL_COMPILE_mumps_seq=""

	enable_mumps_seq_download=no
    fi


TOOL_DYLIB_ffnewuoa=""

ff_uncompile_plugin+=" ffnewuoa"
fi
# Check whether --enable-nlopt was given.
if test ${enable_nlopt+y}
then :
  enableval=$enable_nlopt;
fi

    if test "$enable_nlopt" = "no"
    then
        TOOL_COMPILE_nlopt=""

        TOOL_DYLIB_nlopt=""

		ff_uncompile_plugin+=" "ff-NLopt.$DYLIB_SUFFIX
		ff_unlib_plugin+=" nlopt"
    elif  test   "$ff_nlopt_ok" = "yes" ; then
        TOOL_DYLIB_nlopt=ff-NLopt.$DYLIB_SUFFIX

        enable_nlopt_download=no
    else
	   if test "$enable_download" != "yes" -a "$enable_download_nlopt" != "yes" ; then
	    TOOL_COMPILE_nlopt=""

		ff_uncompile_plugin+=" "ff-NLopt.$DYLIB_SUFFIX
		ff_unlib_plugin+=" nlopt"
        TOOL_DYLIB_nlopt=""

	   else
        if test "$ff_wget" = yes -a "$enable_download_nlopt" = "yes" -a "$DOWNLOADCOMPILE" = "" ; then
            DOWNLOADCOMPILE="compile-pkg install-other"
        fi
        TOOL_COMPILE_nlopt=nlopt

        TOOL_DYLIB_nlopt=ff-NLopt.$DYLIB_SUFFIX

		ff_download_lib="nlopt $ff_download_lib"
	    enable_nlopt_download=yes
	   fi
     fi

    # Also allow to disable the download of one tool if it is already locally installed



# Check whether --with-nlopt_include was given.
if test ${with_nlopt_include+y}
then :
  withval=$with_nlopt_include;
fi


# Check whether --with-nlopt_ldflags was given.
if test ${with_nlopt_ldflags+y}
then :
  withval=$with_nlopt_ldflags;
fi

	# Check whether --enable-download-nlopt was given.
if test ${enable_download_nlopt+y}
then :
  enableval=$enable_download_nlopt;
fi


    if test "$with_nlopt_include" != "" || test "$with_nlopt_ldflags" != ""
    then

	# some directives have been specified, use them instead of downloading


    if test -z "$ff_where_lib_conf_nlopt"  ; then
	    echo "nlopt LD $with_nlopt_ldflags"  >>$ff_where_lib_conf
	    test -n "$with_nlopt_include" && echo "nlopt INCLUDE $with_nlopt_include "  >>$ff_where_lib_conf
            ff_where_lib_conf_nlopt=1
	    ff_where_lib_nlopt="$with_nlopt_ldflags"
	    ff_where_inc_nlopt="$with_nlopt_include"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add nlopt : $with_nlopt_ldflags ;  $with_nlopt_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add nlopt : $with_nlopt_ldflags ;  $with_nlopt_include in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add nlopt : $with_nlopt_ldflags $with_nlopt_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add nlopt : $with_nlopt_ldflags $with_nlopt_include in  $ff_where_lib_conf \"" >&6;}
        fi

        TOOL_COMPILE_nlopt=""

	enable_nlopt_download=no
    fi



# Check whether --enable-scotch was given.
if test ${enable_scotch+y}
then :
  enableval=$enable_scotch;
fi

    if test "$enable_scotch" = "no"
    then
        TOOL_COMPILE_scotch=""

        TOOL_DYLIB_scotch=""

		ff_uncompile_plugin+=" "scotch.$DYLIB_SUFFIX
		ff_unlib_plugin+=" scotch"
    elif  test   "$ff_scotch_ok" = "yes" ; then
        TOOL_DYLIB_scotch=scotch.$DYLIB_SUFFIX

        enable_scotch_download=no
    else
	   if test "$enable_download" != "yes" -a "$enable_download_scotch" != "yes" ; then
	    TOOL_COMPILE_scotch=""

		ff_uncompile_plugin+=" "scotch.$DYLIB_SUFFIX
		ff_unlib_plugin+=" scotch"
        TOOL_DYLIB_scotch=""

	   else
        if test "$ff_wget" = yes -a "$enable_download_scotch" = "yes" -a "$DOWNLOADCOMPILE" = "" ; then
            DOWNLOADCOMPILE="compile-pkg install-other"
        fi
        TOOL_COMPILE_scotch=scotch

        TOOL_DYLIB_scotch=scotch.$DYLIB_SUFFIX

		ff_download_lib="scotch $ff_download_lib"
	    enable_scotch_download=yes
	   fi
     fi

    # Also allow to disable the download of one tool if it is already locally installed



# Check whether --with-scotch_include was given.
if test ${with_scotch_include+y}
then :
  withval=$with_scotch_include;
fi


# Check whether --with-scotch_ldflags was given.
if test ${with_scotch_ldflags+y}
then :
  withval=$with_scotch_ldflags;
fi

	# Check whether --enable-download-scotch was given.
if test ${enable_download_scotch+y}
then :
  enableval=$enable_download_scotch;
fi


    if test "$with_scotch_include" != "" || test "$with_scotch_ldflags" != ""
    then

	# some directives have been specified, use them instead of downloading


    if test -z "$ff_where_lib_conf_scotch"  ; then
	    echo "scotch LD $with_scotch_ldflags"  >>$ff_where_lib_conf
	    test -n "$with_scotch_include" && echo "scotch INCLUDE $with_scotch_include "  >>$ff_where_lib_conf
            ff_where_lib_conf_scotch=1
	    ff_where_lib_scotch="$with_scotch_ldflags"
	    ff_where_inc_scotch="$with_scotch_include"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add scotch : $with_scotch_ldflags ;  $with_scotch_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add scotch : $with_scotch_ldflags ;  $with_scotch_include in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add scotch : $with_scotch_ldflags $with_scotch_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add scotch : $with_scotch_ldflags $with_scotch_include in  $ff_where_lib_conf \"" >&6;}
        fi

        TOOL_COMPILE_scotch=""

	enable_scotch_download=no
    fi


# Check whether --enable-superlu was given.
if test ${enable_superlu+y}
then :
  enableval=$enable_superlu;
fi

    if test "$enable_superlu" = "no"
    then
        TOOL_COMPILE_superlu=""

        TOOL_DYLIB_superlu=""

		ff_uncompile_plugin+=" "SuperLu.$DYLIB_SUFFIX
		ff_unlib_plugin+=" superlu"
    elif  test   "$ff_superlu_ok" = "yes" ; then
        TOOL_DYLIB_superlu=SuperLu.$DYLIB_SUFFIX

        enable_superlu_download=no
    else
	   if test "$enable_download" != "yes" -a "$enable_download_superlu" != "yes" ; then
	    TOOL_COMPILE_superlu=""

		ff_uncompile_plugin+=" "SuperLu.$DYLIB_SUFFIX
		ff_unlib_plugin+=" superlu"
        TOOL_DYLIB_superlu=""

	   else
        if test "$ff_wget" = yes -a "$enable_download_superlu" = "yes" -a "$DOWNLOADCOMPILE" = "" ; then
            DOWNLOADCOMPILE="compile-pkg install-other"
        fi
        TOOL_COMPILE_superlu=superlu

        TOOL_DYLIB_superlu=SuperLu.$DYLIB_SUFFIX

		ff_download_lib="superlu $ff_download_lib"
	    enable_superlu_download=yes
	   fi
     fi

    # Also allow to disable the download of one tool if it is already locally installed



# Check whether --with-superlu_include was given.
if test ${with_superlu_include+y}
then :
  withval=$with_superlu_include;
fi


# Check whether --with-superlu_ldflags was given.
if test ${with_superlu_ldflags+y}
then :
  withval=$with_superlu_ldflags;
fi

	# Check whether --enable-download-superlu was given.
if test ${enable_download_superlu+y}
then :
  enableval=$enable_download_superlu;
fi


    if test "$with_superlu_include" != "" || test "$with_superlu_ldflags" != ""
    then

	# some directives have been specified, use them instead of downloading


    if test -z "$ff_where_lib_conf_superlu"  ; then
	    echo "superlu LD $with_superlu_ldflags"  >>$ff_where_lib_conf
	    test -n "$with_superlu_include" && echo "superlu INCLUDE $with_superlu_include "  >>$ff_where_lib_conf
            ff_where_lib_conf_superlu=1
	    ff_where_lib_superlu="$with_superlu_ldflags"
	    ff_where_inc_superlu="$with_superlu_include"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add superlu : $with_superlu_ldflags ;  $with_superlu_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add superlu : $with_superlu_ldflags ;  $with_superlu_include in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add superlu : $with_superlu_ldflags $with_superlu_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add superlu : $with_superlu_ldflags $with_superlu_include in  $ff_where_lib_conf \"" >&6;}
        fi

        TOOL_COMPILE_superlu=""

	enable_superlu_download=no
    fi


# Check whether --enable-umfpack was given.
if test ${enable_umfpack+y}
then :
  enableval=$enable_umfpack;
fi

    if test "$enable_umfpack" = "no"
    then
        TOOL_COMPILE_umfpack=""

        TOOL_DYLIB_umfpack=""

		ff_uncompile_plugin+=" "UMFPACK64.$DYLIB_SUFFIX
		ff_unlib_plugin+=" umfpack"
    elif  test   "$ff_umfpack_ok" = "yes" ; then
        TOOL_DYLIB_umfpack=UMFPACK64.$DYLIB_SUFFIX

        enable_umfpack_download=no
    else
	   if test "$enable_download" != "yes" -a "$enable_download_umfpack" != "yes" ; then
	    TOOL_COMPILE_umfpack=""

		ff_uncompile_plugin+=" "UMFPACK64.$DYLIB_SUFFIX
		ff_unlib_plugin+=" umfpack"
        TOOL_DYLIB_umfpack=""

	   else
        if test "$ff_wget" = yes -a "$enable_download_umfpack" = "yes" -a "$DOWNLOADCOMPILE" = "" ; then
            DOWNLOADCOMPILE="compile-pkg install-other"
        fi
        TOOL_COMPILE_umfpack=umfpack

        TOOL_DYLIB_umfpack=UMFPACK64.$DYLIB_SUFFIX

		ff_download_lib="umfpack $ff_download_lib"
	    enable_umfpack_download=yes
	   fi
     fi

    # Also allow to disable the download of one tool if it is already locally installed



# Check whether --with-umfpack_include was given.
if test ${with_umfpack_include+y}
then :
  withval=$with_umfpack_include;
fi


# Check whether --with-umfpack_ldflags was given.
if test ${with_umfpack_ldflags+y}
then :
  withval=$with_umfpack_ldflags;
fi

	# Check whether --enable-download-umfpack was given.
if test ${enable_download_umfpack+y}
then :
  enableval=$enable_download_umfpack;
fi


    if test "$with_umfpack_include" != "" || test "$with_umfpack_ldflags" != ""
    then

	# some directives have been specified, use them instead of downloading


    if test -z "$ff_where_lib_conf_umfpack"  ; then
	    echo "umfpack LD $with_umfpack_ldflags"  >>$ff_where_lib_conf
	    test -n "$with_umfpack_include" && echo "umfpack INCLUDE $with_umfpack_include "  >>$ff_where_lib_conf
            ff_where_lib_conf_umfpack=1
	    ff_where_lib_umfpack="$with_umfpack_ldflags"
	    ff_where_inc_umfpack="$with_umfpack_include"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add umfpack : $with_umfpack_ldflags ;  $with_umfpack_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add umfpack : $with_umfpack_ldflags ;  $with_umfpack_include in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add umfpack : $with_umfpack_ldflags $with_umfpack_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add umfpack : $with_umfpack_ldflags $with_umfpack_include in  $ff_where_lib_conf \"" >&6;}
        fi

        TOOL_COMPILE_umfpack=""

	enable_umfpack_download=no
    fi


# Check whether --enable-yams was given.
if test ${enable_yams+y}
then :
  enableval=$enable_yams;
fi

    if test "$enable_yams" = "no"
    then
        TOOL_COMPILE_yams=""

        TOOL_DYLIB_yams=""

		ff_uncompile_plugin+=" "freeyams.$DYLIB_SUFFIX
		ff_unlib_plugin+=" yams"
    elif  test   "$ff_yams_ok" = "yes" ; then
        TOOL_DYLIB_yams=freeyams.$DYLIB_SUFFIX

        enable_yams_download=no
    else
	   if test "$enable_download" != "yes" -a "$enable_download_yams" != "yes" ; then
	    TOOL_COMPILE_yams=""

		ff_uncompile_plugin+=" "freeyams.$DYLIB_SUFFIX
		ff_unlib_plugin+=" yams"
        TOOL_DYLIB_yams=""

	   else
        if test "$ff_wget" = yes -a "$enable_download_yams" = "yes" -a "$DOWNLOADCOMPILE" = "" ; then
            DOWNLOADCOMPILE="compile-pkg install-other"
        fi
        TOOL_COMPILE_yams=yams

        TOOL_DYLIB_yams=freeyams.$DYLIB_SUFFIX

		ff_download_lib="yams $ff_download_lib"
	    enable_yams_download=yes
	   fi
     fi

    # Also allow to disable the download of one tool if it is already locally installed



# Check whether --with-yams_include was given.
if test ${with_yams_include+y}
then :
  withval=$with_yams_include;
fi


# Check whether --with-yams_ldflags was given.
if test ${with_yams_ldflags+y}
then :
  withval=$with_yams_ldflags;
fi

	# Check whether --enable-download-yams was given.
if test ${enable_download_yams+y}
then :
  enableval=$enable_download_yams;
fi


    if test "$with_yams_include" != "" || test "$with_yams_ldflags" != ""
    then

	# some directives have been specified, use them instead of downloading


    if test -z "$ff_where_lib_conf_yams"  ; then
	    echo "yams LD $with_yams_ldflags"  >>$ff_where_lib_conf
	    test -n "$with_yams_include" && echo "yams INCLUDE $with_yams_include "  >>$ff_where_lib_conf
            ff_where_lib_conf_yams=1
	    ff_where_lib_yams="$with_yams_ldflags"
	    ff_where_inc_yams="$with_yams_include"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add yams : $with_yams_ldflags ;  $with_yams_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add yams : $with_yams_ldflags ;  $with_yams_include in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add yams : $with_yams_ldflags $with_yams_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add yams : $with_yams_ldflags $with_yams_include in  $ff_where_lib_conf \"" >&6;}
        fi

        TOOL_COMPILE_yams=""

	enable_yams_download=no
    fi


# Check whether --enable-pipe was given.
if test ${enable_pipe+y}
then :
  enableval=$enable_pipe;
fi

    if test "$enable_pipe" = "no"
    then
        TOOL_COMPILE_pipe=""

        TOOL_DYLIB_pipe=""

		ff_uncompile_plugin+=" "pipe.$DYLIB_SUFFIX
		ff_unlib_plugin+=" pipe"
    elif  test   "$ff_pipe_ok" = "yes" ; then
        TOOL_DYLIB_pipe=pipe.$DYLIB_SUFFIX

        enable_pipe_download=no
    else
	   if test "$enable_download" != "yes" -a "$enable_download_pipe" != "yes" ; then
	    TOOL_COMPILE_pipe=""

		ff_uncompile_plugin+=" "pipe.$DYLIB_SUFFIX
		ff_unlib_plugin+=" pipe"
        TOOL_DYLIB_pipe=""

	   else
        if test "$ff_wget" = yes -a "$enable_download_pipe" = "yes" -a "$DOWNLOADCOMPILE" = "" ; then
            DOWNLOADCOMPILE="compile-pkg install-other"
        fi
        TOOL_COMPILE_pipe=pipe

        TOOL_DYLIB_pipe=pipe.$DYLIB_SUFFIX



	   fi
     fi

    # Also allow to disable the download of one tool if it is already locally installed



# Check whether --with-pipe_include was given.
if test ${with_pipe_include+y}
then :
  withval=$with_pipe_include;
fi


# Check whether --with-pipe_ldflags was given.
if test ${with_pipe_ldflags+y}
then :
  withval=$with_pipe_ldflags;
fi

	# Check whether --enable-download-pipe was given.
if test ${enable_download_pipe+y}
then :
  enableval=$enable_download_pipe;
fi


    if test "$with_pipe_include" != "" || test "$with_pipe_ldflags" != ""
    then

	# some directives have been specified, use them instead of downloading


    if test -z "$ff_where_lib_conf_pipe"  ; then
	    echo "pipe LD $with_pipe_ldflags"  >>$ff_where_lib_conf
	    test -n "$with_pipe_include" && echo "pipe INCLUDE $with_pipe_include "  >>$ff_where_lib_conf
            ff_where_lib_conf_pipe=1
	    ff_where_lib_pipe="$with_pipe_ldflags"
	    ff_where_inc_pipe="$with_pipe_include"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add pipe : $with_pipe_ldflags ;  $with_pipe_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add pipe : $with_pipe_ldflags ;  $with_pipe_include in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add pipe : $with_pipe_ldflags $with_pipe_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add pipe : $with_pipe_ldflags $with_pipe_include in  $ff_where_lib_conf \"" >&6;}
        fi

        TOOL_COMPILE_pipe=""

	enable_pipe_download=no
    fi


BIN_ffmaster="$BIN_ffmaster"


if test "$ff_win32" = "yes" ; then
# Check whether --enable-libpthread_google was given.
if test ${enable_libpthread_google+y}
then :
  enableval=$enable_libpthread_google;
fi

    if test "$enable_libpthread_google" = "no"
    then
        TOOL_COMPILE_libpthread_google=""

        TOOL_DYLIB_libpthread_google=""

		ff_uncompile_plugin+=" "ff-mmap-semaphore.$DYLIB_SUFFIX
		ff_unlib_plugin+=" libpthread_google"
    elif  test   "$ff_libpthread_google_ok" = "yes" ; then
        TOOL_DYLIB_libpthread_google=ff-mmap-semaphore.$DYLIB_SUFFIX

        enable_libpthread_google_download=no
    else
	   if test "$enable_download" != "yes" -a "$enable_download_libpthread_google" != "yes" ; then
	    TOOL_COMPILE_libpthread_google=""

		ff_uncompile_plugin+=" "ff-mmap-semaphore.$DYLIB_SUFFIX
		ff_unlib_plugin+=" libpthread_google"
        TOOL_DYLIB_libpthread_google=""

	   else
        if test "$ff_wget" = yes -a "$enable_download_libpthread_google" = "yes" -a "$DOWNLOADCOMPILE" = "" ; then
            DOWNLOADCOMPILE="compile-pkg install-other"
        fi
        TOOL_COMPILE_libpthread_google=libpthread-google

        TOOL_DYLIB_libpthread_google=ff-mmap-semaphore.$DYLIB_SUFFIX

		ff_download_lib="libpthread_google $ff_download_lib"
	    enable_libpthread_google_download=yes
	   fi
     fi

    # Also allow to disable the download of one tool if it is already locally installed



# Check whether --with-libpthread_google_include was given.
if test ${with_libpthread_google_include+y}
then :
  withval=$with_libpthread_google_include;
fi


# Check whether --with-libpthread_google_ldflags was given.
if test ${with_libpthread_google_ldflags+y}
then :
  withval=$with_libpthread_google_ldflags;
fi

	# Check whether --enable-download-libpthread_google was given.
if test ${enable_download_libpthread_google+y}
then :
  enableval=$enable_download_libpthread_google;
fi


    if test "$with_libpthread_google_include" != "" || test "$with_libpthread_google_ldflags" != ""
    then

	# some directives have been specified, use them instead of downloading


    if test -z "$ff_where_lib_conf_libpthread_google"  ; then
	    echo "libpthread_google LD $with_libpthread_google_ldflags"  >>$ff_where_lib_conf
	    test -n "$with_libpthread_google_include" && echo "libpthread_google INCLUDE $with_libpthread_google_include "  >>$ff_where_lib_conf
            ff_where_lib_conf_libpthread_google=1
	    ff_where_lib_libpthread_google="$with_libpthread_google_ldflags"
	    ff_where_inc_libpthread_google="$with_libpthread_google_include"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add libpthread_google : $with_libpthread_google_ldflags ;  $with_libpthread_google_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add libpthread_google : $with_libpthread_google_ldflags ;  $with_libpthread_google_include in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add libpthread_google : $with_libpthread_google_ldflags $with_libpthread_google_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add libpthread_google : $with_libpthread_google_ldflags $with_libpthread_google_include in  $ff_where_lib_conf \"" >&6;}
        fi

        TOOL_COMPILE_libpthread_google=""

	enable_libpthread_google_download=no
    fi


else
# Check whether --enable-MMAP was given.
if test ${enable_MMAP+y}
then :
  enableval=$enable_MMAP;
fi

    if test "$enable_MMAP" = "no"
    then
        TOOL_COMPILE_MMAP=""

        TOOL_DYLIB_MMAP=""

		ff_uncompile_plugin+=" "ff-mmap-semaphore.$DYLIB_SUFFIX
		ff_unlib_plugin+=" MMAP"
    elif  test   "$ff_MMAP_ok" = "yes" ; then
        TOOL_DYLIB_MMAP=ff-mmap-semaphore.$DYLIB_SUFFIX

        enable_MMAP_download=no
    else
	   if test "$enable_download" != "yes" -a "$enable_download_MMAP" != "yes" ; then
	    TOOL_COMPILE_MMAP=""

		ff_uncompile_plugin+=" "ff-mmap-semaphore.$DYLIB_SUFFIX
		ff_unlib_plugin+=" MMAP"
        TOOL_DYLIB_MMAP=""

	   else
        if test "$ff_wget" = yes -a "$enable_download_MMAP" = "yes" -a "$DOWNLOADCOMPILE" = "" ; then
            DOWNLOADCOMPILE="compile-pkg install-other"
        fi
        TOOL_COMPILE_MMAP=MMAP

        TOOL_DYLIB_MMAP=ff-mmap-semaphore.$DYLIB_SUFFIX



	   fi
     fi

    # Also allow to disable the download of one tool if it is already locally installed



# Check whether --with-MMAP_include was given.
if test ${with_MMAP_include+y}
then :
  withval=$with_MMAP_include;
fi


# Check whether --with-MMAP_ldflags was given.
if test ${with_MMAP_ldflags+y}
then :
  withval=$with_MMAP_ldflags;
fi

	# Check whether --enable-download-MMAP was given.
if test ${enable_download_MMAP+y}
then :
  enableval=$enable_download_MMAP;
fi


    if test "$with_MMAP_include" != "" || test "$with_MMAP_ldflags" != ""
    then

	# some directives have been specified, use them instead of downloading


    if test -z "$ff_where_lib_conf_MMAP"  ; then
	    echo "MMAP LD $with_MMAP_ldflags"  >>$ff_where_lib_conf
	    test -n "$with_MMAP_include" && echo "MMAP INCLUDE $with_MMAP_include "  >>$ff_where_lib_conf
            ff_where_lib_conf_MMAP=1
	    ff_where_lib_MMAP="$with_MMAP_ldflags"
	    ff_where_inc_MMAP="$with_MMAP_include"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add MMAP : $with_MMAP_ldflags ;  $with_MMAP_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add MMAP : $with_MMAP_ldflags ;  $with_MMAP_include in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add MMAP : $with_MMAP_ldflags $with_MMAP_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add MMAP : $with_MMAP_ldflags $with_MMAP_include in  $ff_where_lib_conf \"" >&6;}
        fi

        TOOL_COMPILE_MMAP=""

	enable_MMAP_download=no
    fi


fi

ff_pthread_google=$ff_pthread
if test "$enable_libpthread_google_download" = "yes" ; then
    ff_pthread_google="-I${curdir}/3rdparty/include -L${curdir}/3rdparty/lib -lpthread-google"
fi
LIB_PTHREAD_GOOGLE=$ff_pthread_google


# FFCS - MUMPS_seq has a different Win32 compiler setup from FFCS, so we need to add some extra parameters

if test "$OS" = Windows_NT
then
    CFLAGS="$CFLAGS -DWITHOUT_PTHREAD -DAdd_"

    # we also need to satisfy ff-c++ that the pthread are not a blocking point
    if test -n "$ff_pthread"  ; then

    if test -z "$ff_where_lib_conf_pthread"  ; then
	    echo "pthread LD """  >>$ff_where_lib_conf
	    test -n "" && echo "pthread INCLUDE  "  >>$ff_where_lib_conf
            ff_where_lib_conf_pthread=1
	    ff_where_lib_pthread=""""
	    ff_where_inc_pthread=""
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add pthread : \"\" ;   in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add pthread : \"\" ;   in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add pthread : \"\"  in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add pthread : \"\"  in  $ff_where_lib_conf \"" >&6;}
        fi

    fi
# ALH  MPI  "-fno-range-check" on Windows, but this options fails on MacOS 10.8.  Add no-range-check for Windows
# for hexadecimal parameter constants like:
# [[file:c:/cygwin/home/alh/ffcs/rel/mingw/mpif.h::PARAMETER MPI_SHORT_INT z 8c000003]]
#
    NO_RANGE_CHECK=-fno-range-check

fi


# ALH - 4/9/13 - request from Helmut Jarausch - allow to change Scotch include path
if test "$with_scotch_include" = ""
then
    with_scotch_include=$ac_pwd/3rdparty/include/scotch
fi
SCOTCH_INCLUDE=$with_scotch_include


# Find out kernel and libc versions
# ---------------------------------

if test "$ff_win32" != yes -a "$ff_mac" != yes
then
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking kernel version" >&5
printf %s "checking kernel version... " >&6; }
	ff_kernel_version=`cat /proc/version|perl -e '<STDIN>=~/(\d+\.\d+\.\d+)/;print $1;'`
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_kernel_version" >&5
printf "%s\n" "$ff_kernel_version" >&6; }
	KERNEL_VERSION=$ff_kernel_version


	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking libc version" >&5
printf %s "checking libc version... " >&6; }
	ff_libc_version=`ldd /bin/sh | awk '/libc/{print $3}' | xargs readlink | sed -e 's/\.so$//'`
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ff_libc_version" >&5
printf "%s\n" "$ff_libc_version" >&6; }
	LIBC_VERSION=$ff_libc_version

fi
#  def variable pour les makefiles

# creating all makefiles
# ----------------------

ff_bamgprog="bamg${EXEEXT} cvmsh2${EXEEXT}"

CNOFLAGS=$CNOFLAGS
 FNOFLAGS=$FNOFLAGS

# The final list of executable programs

MEDITPROG=$ff_meditprog

FFGLUTPROG=$ff_ffglutprog

BAMGPROG=$ff_bamgprog

STDPROG=$ff_stdprog

ff_progs="FreeFem++-nw $ff_bamgprog  $ff_mpiprog $ff_meditprog $ff_ffglutprog"

TEST_FFPP=$ff_TEST_FFPP

TEST_FFPP_MPI=$ff_TEST_FFPP_MPI

TEST_FFPPMPI="../../src/mpi/ff-mpirun"


ff_with_mpi=-openmpi;

ff_blacs="-lblacsCinit$ff_with_mpi     -lblacsF77init$ff_with_mpi      -lblacs$ff_with_mpi"
ff_scalapack=-lscalapack

# change MKL interface ...
test -n "$ff_mkl_blacs" && ff_blacs="$ff_mkl_blacs"
test -n "$ff_mkl_scalapack" && ff_scalapack="$ff_mkl_scalapack"
test -n "$ff_mkl_root" && ff_winc="$ff_mkl_root/include/mkl_blas.h"

# FFCS - 27/10/11 - Some extra conditionals for things that do not work on certain systems (eg MPI libraries under
# Windows)

##  search of HDF5 ....
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
printf %s "checking for a sed that does not truncate output... " >&6; }
if test ${ac_cv_path_SED+y}
then :
  printf %s "(cached) " >&6
else $as_nop
            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
     for ac_i in 1 2 3 4 5 6 7; do
       ac_script="$ac_script$as_nl$ac_script"
     done
     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
     { ac_script=; unset ac_script;}
     if test -z "$SED"; then
  ac_path_SED_found=false
  # Loop through the user's path and test for each of PROGNAME-LIST
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_prog in sed gsed
   do
    for ac_exec_ext in '' $ac_executable_extensions; do
      ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
      as_fn_executable_p "$ac_path_SED" || continue
# Check for GNU ac_path_SED and select it if it is found.
  # Check for GNU $ac_path_SED
case `"$ac_path_SED" --version 2>&1` in
*GNU*)
  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
*)
  ac_count=0
  printf %s 0123456789 >"conftest.in"
  while :
  do
    cat "conftest.in" "conftest.in" >"conftest.tmp"
    mv "conftest.tmp" "conftest.in"
    cp "conftest.in" "conftest.nl"
    printf "%s\n" '' >> "conftest.nl"
    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
    as_fn_arith $ac_count + 1 && ac_count=$as_val
    if test $ac_count -gt ${ac_path_SED_max-0}; then
      # Best one so far, save it but keep looking for a better one
      ac_cv_path_SED="$ac_path_SED"
      ac_path_SED_max=$ac_count
    fi
    # 10*(2^10) chars as input seems more than enough
    test $ac_count -gt 10 && break
  done
  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac

      $ac_path_SED_found && break 3
    done
  done
  done
IFS=$as_save_IFS
  if test -z "$ac_cv_path_SED"; then
    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
  fi
else
  ac_cv_path_SED=$SED
fi

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
printf "%s\n" "$ac_cv_path_SED" >&6; }
 SED="$ac_cv_path_SED"
  rm -f conftest.sed

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
printf %s "checking for grep that handles long lines and -e... " >&6; }
if test ${ac_cv_path_GREP+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  if test -z "$GREP"; then
  ac_path_GREP_found=false
  # Loop through the user's path and test for each of PROGNAME-LIST
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_prog in grep ggrep
   do
    for ac_exec_ext in '' $ac_executable_extensions; do
      ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
      as_fn_executable_p "$ac_path_GREP" || continue
# Check for GNU ac_path_GREP and select it if it is found.
  # Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
*GNU*)
  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
*)
  ac_count=0
  printf %s 0123456789 >"conftest.in"
  while :
  do
    cat "conftest.in" "conftest.in" >"conftest.tmp"
    mv "conftest.tmp" "conftest.in"
    cp "conftest.in" "conftest.nl"
    printf "%s\n" 'GREP' >> "conftest.nl"
    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
    as_fn_arith $ac_count + 1 && ac_count=$as_val
    if test $ac_count -gt ${ac_path_GREP_max-0}; then
      # Best one so far, save it but keep looking for a better one
      ac_cv_path_GREP="$ac_path_GREP"
      ac_path_GREP_max=$ac_count
    fi
    # 10*(2^10) chars as input seems more than enough
    test $ac_count -gt 10 && break
  done
  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac

      $ac_path_GREP_found && break 3
    done
  done
  done
IFS=$as_save_IFS
  if test -z "$ac_cv_path_GREP"; then
    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
  fi
else
  ac_cv_path_GREP=$GREP
fi

fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
printf "%s\n" "$ac_cv_path_GREP" >&6; }
 GREP="$ac_cv_path_GREP"








if   test "" = ""        ; then
    : # Recognized value
elif test "" = "serial"  ; then
    : # Recognized value
elif test "" = "parallel"; then
    : # Recognized value
else
    as_fn_error $? "
Unrecognized value for AX_LIB_HDF5 within configure.ac.
If supplied, argument 1 must be either 'serial' or 'parallel'.
" "$LINENO" 5
fi


# Check whether --with-hdf5 was given.
if test ${with_hdf5+y}
then :
  withval=$with_hdf5; if test "$withval" = "no"; then
     with_hdf5="no"
   elif test "$withval" = "yes"; then
     with_hdf5="yes"
   else
     with_hdf5="yes"
     H5CC="$withval"
   fi
else $as_nop
  with_hdf5="yes"

fi


HDF5_CC=""
HDF5_VERSION=""
HDF5_CFLAGS=""
HDF5_CPPFLAGS=""
HDF5_LDFLAGS=""
HDF5_LIBS=""
HDF5_FC=""
HDF5_FFLAGS=""
HDF5_FLIBS=""
HDF5_TYPE=""

if test "$with_hdf5" = "yes"; then
    if test -z "$H5CC"; then
                for ac_prog in h5cc h5pcc
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_path_H5CC+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  case $H5CC in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_H5CC="$H5CC" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
    ac_cv_path_H5CC="$as_dir$ac_word$ac_exec_ext"
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS

  ;;
esac
fi
H5CC=$ac_cv_path_H5CC
if test -n "$H5CC"; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $H5CC" >&5
printf "%s\n" "$H5CC" >&6; }
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
fi


  test -n "$H5CC" && break
done

    else
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Using provided HDF5 C wrapper" >&5
printf %s "checking Using provided HDF5 C wrapper... " >&6; }
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $H5CC" >&5
printf "%s\n" "$H5CC" >&6; }
    fi
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HDF5 type" >&5
printf %s "checking for HDF5 type... " >&6; }
    case $H5CC in #(
  *h5pcc) :
    HDF5_TYPE=parallel ;; #(
  *h5cc) :
    HDF5_TYPE=serial ;; #(
  *) :
    HDF5_TYPE=neither ;;
esac
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HDF5_TYPE" >&5
printf "%s\n" "$HDF5_TYPE" >&6; }
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for HDF5 libraries" >&5
printf %s "checking for HDF5 libraries... " >&6; }
    if test ! -f "$H5CC" || test ! -x "$H5CC"; then
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING:
Unable to locate HDF5 compilation helper scripts 'h5cc' or 'h5pcc'.
Please specify --with-hdf5=<LOCATION> as the full path to h5cc or h5pcc.
HDF5 support is being disabled (equivalent to --with-hdf5=no).
" >&5
printf "%s\n" "$as_me: WARNING:
Unable to locate HDF5 compilation helper scripts 'h5cc' or 'h5pcc'.
Please specify --with-hdf5=<LOCATION> as the full path to h5cc or h5pcc.
HDF5 support is being disabled (equivalent to --with-hdf5=no).
" >&2;}
        with_hdf5="no"
        with_hdf5_fortran="no"
    else
                HDF5_SHOW=$(eval $H5CC -show)

                HDF5_CC=$(eval $H5CC -show | head -n 1 | $AWK '{print $1}')
        if test "$HDF5_CC" = "ccache"; then
            HDF5_CC=$(eval $H5CC -show | head -n 1 | $AWK '{print $2}')
        fi


                HDF5_VERSION=$(eval $H5CC -showconfig | $GREP 'HDF5 Version:' \
            | $AWK '{print $3}')

                                                                                HDF5_tmp_flags=$(eval $H5CC -showconfig \
            | $GREP 'FLAGS\|Extra libraries:' \
            | $AWK -F: '{printf("%s "), $2}' )

                HDF5_tmp_inst=$(eval $H5CC -showconfig \
            | $GREP 'Installation point:' \
            | $AWK '{print $NF}' )

                HDF5_CPPFLAGS="-I${HDF5_tmp_inst}/include"

                for arg in $HDF5_SHOW $HDF5_tmp_flags ; do
          case "$arg" in
            -I*) echo $HDF5_CPPFLAGS | $GREP -e "$arg" 2>&1 >/dev/null \
                  || HDF5_CPPFLAGS="$HDF5_CPPFLAGS $arg"
              ;;
            -L*) echo $HDF5_LDFLAGS | $GREP -e "$arg" 2>&1 >/dev/null \
                  || HDF5_LDFLAGS="$HDF5_LDFLAGS $arg"
              ;;
            -l*) echo $HDF5_LIBS | $GREP -e "$arg" 2>&1 >/dev/null \
                  || HDF5_LIBS="$HDF5_LIBS $arg"
              ;;
          esac
        done

        HDF5_LIBS="-lhdf5 $HDF5_LIBS"
        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes (version $HDF5_VERSION)" >&5
printf "%s\n" "yes (version $HDF5_VERSION)" >&6; }

                ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu

        ax_lib_hdf5_save_CC=$CC
        ax_lib_hdf5_save_CPPFLAGS=$CPPFLAGS
        ax_lib_hdf5_save_LIBS=$LIBS
        ax_lib_hdf5_save_LDFLAGS=$LDFLAGS
        CC=$HDF5_CC
        CPPFLAGS=$HDF5_CPPFLAGS
        LIBS=$HDF5_LIBS
        LDFLAGS=$HDF5_LDFLAGS
        ac_fn_c_check_header_compile "$LINENO" "hdf5.h" "ac_cv_header_hdf5_h" "$ac_includes_default"
if test "x$ac_cv_header_hdf5_h" = xyes
then :
  ac_cv_hadf5_h=yes
else $as_nop
  ac_cv_hadf5_h=no
fi

        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for H5Fcreate in -lhdf5" >&5
printf %s "checking for H5Fcreate in -lhdf5... " >&6; }
if test ${ac_cv_lib_hdf5_H5Fcreate+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lhdf5  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
char H5Fcreate ();
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
return H5Fcreate ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_hdf5_H5Fcreate=yes
else $as_nop
  ac_cv_lib_hdf5_H5Fcreate=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hdf5_H5Fcreate" >&5
printf "%s\n" "$ac_cv_lib_hdf5_H5Fcreate" >&6; }
if test "x$ac_cv_lib_hdf5_H5Fcreate" = xyes
then :
  ac_cv_libhdf5=yes
else $as_nop
  ac_cv_libhdf5=no
fi

        if test "$ac_cv_hadf5_h" = "no" && test "$ac_cv_libhdf5" = "no" ; then
          { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Unable to compile HDF5 test program" >&5
printf "%s\n" "$as_me: WARNING: Unable to compile HDF5 test program" >&2;}
        fi
        		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for H5PTcreate in -lhdf5_hl" >&5
printf %s "checking for H5PTcreate in -lhdf5_hl... " >&6; }
if test ${ac_cv_lib_hdf5_hl_H5PTcreate+y}
then :
  printf %s "(cached) " >&6
else $as_nop
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lhdf5_hl  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
char H5PTcreate ();
#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

#endif
int
main (void)
{
return H5PTcreate ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
  ac_cv_lib_hdf5_hl_H5PTcreate=yes
else $as_nop
  ac_cv_lib_hdf5_hl_H5PTcreate=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hdf5_hl_H5PTcreate" >&5
printf "%s\n" "$ac_cv_lib_hdf5_hl_H5PTcreate" >&6; }
if test "x$ac_cv_lib_hdf5_hl_H5PTcreate" = xyes
then :
  HDF5_LIBS="-lhdf5_hl $HDF5_LIBS"
fi


        CC=$ax_lib_hdf5_save_CC
        CPPFLAGS=$ax_lib_hdf5_save_CPPFLAGS
        LIBS=$ax_lib_hdf5_save_LIBS
        LDFLAGS=$ax_lib_hdf5_save_LDFLAGS
        ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu


        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for matching HDF5 Fortran wrapper" >&5
printf %s "checking for matching HDF5 Fortran wrapper... " >&6; }
                H5FC=$(eval echo -n $H5CC | $SED -n 's/cc$/fc/p')
        if test -x "$H5FC"; then
            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $H5FC" >&5
printf "%s\n" "$H5FC" >&6; }
            with_hdf5_fortran="yes"


                        for arg in `$H5FC -show`
            do
              case "$arg" in #(
                -I*) echo $HDF5_FFLAGS | $GREP -e "$arg" >/dev/null \
                      || HDF5_FFLAGS="$HDF5_FFLAGS $arg"
                  ;;#(
                -L*) echo $HDF5_FFLAGS | $GREP -e "$arg" >/dev/null \
                      || HDF5_FFLAGS="$HDF5_FFLAGS $arg"
                                                               echo $HDF5_FFLAGS | $GREP -e "-I${arg#-L}" >/dev/null \
                      || HDF5_FFLAGS="$HDF5_FFLAGS -I${arg#-L}"
                  ;;
              esac
            done

                        for arg in $HDF5_LIBS
            do
              case "$arg" in #(
                -lhdf5_hl) HDF5_FLIBS="$HDF5_FLIBS -lhdf5hl_fortran $arg"
                  ;; #(
                -lhdf5)    HDF5_FLIBS="$HDF5_FLIBS -lhdf5_fortran $arg"
                  ;; #(
                *) HDF5_FLIBS="$HDF5_FLIBS $arg"
                  ;;
              esac
            done
        else
            { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
            with_hdf5_fortran="no"
        fi












printf "%s\n" "#define HAVE_HDF5 1" >>confdefs.h

    fi
fi

if test "$with_hdf5" = "yes"; then
  ff_save_cppflags="$CPPFLAGS";
  CPPFLAGS="$CPPFLAGS $HDF5_CPPFLAGS"
  ac_fn_cxx_check_header_compile "$LINENO" "H5Cpp.h" "ac_cv_header_H5Cpp_h" "$ac_includes_default"
if test "x$ac_cv_header_H5Cpp_h" = xyes
then :

else $as_nop
  with_hdf5=no
fi

  CPPFLAGS="$ff_save_cppflags"
  if test "$with_hdf5" = "yes"; then

    if test -z "$ff_where_lib_conf_hdf5"  ; then
	    echo "hdf5 LD $HDF5_LDFLAGS  $HDF5_LIBS"  >>$ff_where_lib_conf
	    test -n "$HDF5_CPPFLAGS" && echo "hdf5 INCLUDE $HDF5_CPPFLAGS "  >>$ff_where_lib_conf
            ff_where_lib_conf_hdf5=1
	    ff_where_lib_hdf5="$HDF5_LDFLAGS  $HDF5_LIBS"
	    ff_where_inc_hdf5="$HDF5_CPPFLAGS"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add hdf5 : $HDF5_LDFLAGS  $HDF5_LIBS ;  $HDF5_CPPFLAGS in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add hdf5 : $HDF5_LDFLAGS  $HDF5_LIBS ;  $HDF5_CPPFLAGS in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add hdf5 : $HDF5_LDFLAGS  $HDF5_LIBS $HDF5_CPPFLAGS in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add hdf5 : $HDF5_LDFLAGS  $HDF5_LIBS $HDF5_CPPFLAGS in  $ff_where_lib_conf \"" >&6;}
        fi

  LIBS="$LIBS $HDF5_LDFLAGS  $HDF5_LIBS"
  # hack, if enable_download=no
  TOOL_COMPILE_iohdf5=iohdf5

  TOOL_DYLIB_iohdf5=iohdf5.$DYLIB_SUFFIX



  fi
else
  enable_iohdf5=no
fi
#TOOL_DISABLE(iohdf5,iohdf5.$DYLIB_SUFFIX,,nodownload)


 if test "$OS" = Windows_NT; then
  FFCS_WINDOWS_TRUE=
  FFCS_WINDOWS_FALSE='#'
else
  FFCS_WINDOWS_TRUE='#'
  FFCS_WINDOWS_FALSE=
fi


#  remove gsl if not find ... FH
# correction FH .. 18/12/2013.
# ALH - 7/1/14 - not able to compile gsl with FFCS on Windows
if test "$enable_ffcs" != yes
then
    if test  "$ff_where_lib_conf_gsl" = 1  -a  "$enable_gsl" != "no" ; then enable_gsl=yes; fi;
fi

# hack, if enable_download=no
if test "$ff_with_gsl" = "yes"; then
  TOOL_COMPILE_gsl=gsl

  TOOL_DYLIB_gsl=gsl.$DYLIB_SUFFIX



else
  enable_gsl=no
fi

# Check whether --enable-NewSolver was given.
if test ${enable_NewSolver+y}
then :
  enableval=$enable_NewSolver;
fi

    if test "$enable_NewSolver" = "no"
    then
        TOOL_COMPILE_NewSolver=""

        TOOL_DYLIB_NewSolver=""

		ff_uncompile_plugin+=" ""NewSolver.$DYLIB_SUFFIX"
		ff_unlib_plugin+=" NewSolver"
    elif  test   "$ff_NewSolver_ok" = "yes" ; then
        TOOL_DYLIB_NewSolver="NewSolver.$DYLIB_SUFFIX"

        enable_NewSolver_download=no
    else
	   if test "$enable_download" != "yes" -a "$enable_download_NewSolver" != "yes" ; then
	    TOOL_COMPILE_NewSolver=""

		ff_uncompile_plugin+=" ""NewSolver.$DYLIB_SUFFIX"
		ff_unlib_plugin+=" NewSolver"
        TOOL_DYLIB_NewSolver=""

	   else
        if test "$ff_wget" = yes -a "$enable_download_NewSolver" = "yes" -a "$DOWNLOADCOMPILE" = "" ; then
            DOWNLOADCOMPILE="compile-pkg install-other"
        fi
        TOOL_COMPILE_NewSolver=NewSolver

        TOOL_DYLIB_NewSolver="NewSolver.$DYLIB_SUFFIX"



	   fi
     fi

    # Also allow to disable the download of one tool if it is already locally installed



# Check whether --with-NewSolver_include was given.
if test ${with_NewSolver_include+y}
then :
  withval=$with_NewSolver_include;
fi


# Check whether --with-NewSolver_ldflags was given.
if test ${with_NewSolver_ldflags+y}
then :
  withval=$with_NewSolver_ldflags;
fi

	# Check whether --enable-download-NewSolver was given.
if test ${enable_download_NewSolver+y}
then :
  enableval=$enable_download_NewSolver;
fi


    if test "$with_NewSolver_include" != "" || test "$with_NewSolver_ldflags" != ""
    then

	# some directives have been specified, use them instead of downloading


    if test -z "$ff_where_lib_conf_NewSolver"  ; then
	    echo "NewSolver LD $with_NewSolver_ldflags"  >>$ff_where_lib_conf
	    test -n "$with_NewSolver_include" && echo "NewSolver INCLUDE $with_NewSolver_include "  >>$ff_where_lib_conf
            ff_where_lib_conf_NewSolver=1
	    ff_where_lib_NewSolver="$with_NewSolver_ldflags"
	    ff_where_inc_NewSolver="$with_NewSolver_include"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add NewSolver : $with_NewSolver_ldflags ;  $with_NewSolver_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add NewSolver : $with_NewSolver_ldflags ;  $with_NewSolver_include in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add NewSolver : $with_NewSolver_ldflags $with_NewSolver_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add NewSolver : $with_NewSolver_ldflags $with_NewSolver_include in  $ff_where_lib_conf \"" >&6;}
        fi

        TOOL_COMPILE_NewSolver=""

	enable_NewSolver_download=no
    fi


# Check whether --enable-mkl was given.
if test ${enable_mkl+y}
then :
  enableval=$enable_mkl;
fi

    if test "$enable_mkl" = "no"
    then
        TOOL_COMPILE_mkl=""

        TOOL_DYLIB_mkl=""

		ff_uncompile_plugin+=" ""PARDISO.$DYLIB_SUFFIX"
		ff_unlib_plugin+=" mkl"
    elif  test   "$ff_mkl_ok" = "yes" ; then
        TOOL_DYLIB_mkl="PARDISO.$DYLIB_SUFFIX"

        enable_mkl_download=no
    else
	   if test "$enable_download" != "yes" -a "$enable_download_mkl" != "yes" ; then
	    TOOL_COMPILE_mkl=""

		ff_uncompile_plugin+=" ""PARDISO.$DYLIB_SUFFIX"
		ff_unlib_plugin+=" mkl"
        TOOL_DYLIB_mkl=""

	   else
        if test "$ff_wget" = yes -a "$enable_download_mkl" = "yes" -a "$DOWNLOADCOMPILE" = "" ; then
            DOWNLOADCOMPILE="compile-pkg install-other"
        fi
        TOOL_COMPILE_mkl=mkl

        TOOL_DYLIB_mkl="PARDISO.$DYLIB_SUFFIX"



	   fi
     fi

    # Also allow to disable the download of one tool if it is already locally installed



# Check whether --with-mkl_include was given.
if test ${with_mkl_include+y}
then :
  withval=$with_mkl_include;
fi


# Check whether --with-mkl_ldflags was given.
if test ${with_mkl_ldflags+y}
then :
  withval=$with_mkl_ldflags;
fi

	# Check whether --enable-download-mkl was given.
if test ${enable_download_mkl+y}
then :
  enableval=$enable_download_mkl;
fi


    if test "$with_mkl_include" != "" || test "$with_mkl_ldflags" != ""
    then

	# some directives have been specified, use them instead of downloading


    if test -z "$ff_where_lib_conf_mkl"  ; then
	    echo "mkl LD $with_mkl_ldflags"  >>$ff_where_lib_conf
	    test -n "$with_mkl_include" && echo "mkl INCLUDE $with_mkl_include "  >>$ff_where_lib_conf
            ff_where_lib_conf_mkl=1
	    ff_where_lib_mkl="$with_mkl_ldflags"
	    ff_where_inc_mkl="$with_mkl_include"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add mkl : $with_mkl_ldflags ;  $with_mkl_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add mkl : $with_mkl_ldflags ;  $with_mkl_include in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add mkl : $with_mkl_ldflags $with_mkl_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add mkl : $with_mkl_ldflags $with_mkl_include in  $ff_where_lib_conf \"" >&6;}
        fi

        TOOL_COMPILE_mkl=""

	enable_mkl_download=no
    fi



FF_LIBS=$LIBS

LIBS=
# echo "debug cxxx11: $ff_cxx11 mpi: $ff_mpi petsc: $ff_petsc_ok "
test "$enable_download" != "yes" -a "$enable_download_hpddm" != "yes" -a \( "$enable_hpddm" != "yes" -o "$ff_hpddm_ok" != "yes" \) && enable_hpddm=no
test "$enable_download" != "yes" -a "$enable_download_htool" != "yes" -a \( "$enable_htool" != "yes" -o "$ff_htool_ok" != "yes" \) && enable_htool=no

test "$enable_download" != "yes" -a "$enable_bemtool" != yes && enable_bemtool=no
test "$enable_download" != "yes" -a "$enable_boost" != yes && enable_boost=no

test \( \( "$enable_download" = "yes" -o "$enable_download_hpddm" = "yes" \) -a "$enable_hpddm" != "no" \) -o "$ff_hpddm_ok" = "yes" && enable_hpddm=yes
test \( \( "$enable_download" = "yes" -o "$enable_download_htool" = "yes" \) -a "$enable_htool" != "no" \) -o "$ff_htool_ok" = "yes" && enable_htool=yes

test "$enable_download" = yes  -a "$enable_bemtool" != no && enable_bemtool=yes
test "$enable_download" = yes -a "$enable_boost" != no && enable_boost=yes

test "$ff_cxx11" != yes -o  "$ff_mpi" != yes  -o \( "$ff_umfpack_ok" != "yes" -a "$ff_mumps_ok" != "yes" \) &&  enable_hpddm=no
test "$ff_cxx11" != yes -o  "$ff_mpi" != yes   &&  enable_htool=no
test "$ff_cxx11" != yes -o  "$ff_mpi" != yes  -o \( "$enable_bemtool" != "yes" -a "$enable_boost" != "yes" \) &&  enable_bemtool=no

FF_PETSC_DYLIB=""
if test "$ff_petsc_ok" != no ;   then
FF_PETSC_DYLIB="PETSc.$DYLIB_SUFFIX function-PETSc.$DYLIB_SUFFIX"
fi
if test "$ff_petsccomplex_ok" != no ;   then
FF_PETSC_DYLIB="$FF_PETSC_DYLIB PETSc-complex.$DYLIB_SUFFIX"
fi
if test "$ff_slepccomplex_ok" != no ;   then
FF_PETSC_DYLIB="$FF_PETSC_DYLIB SLEPc-complex.$DYLIB_SUFFIX"
fi
if test "$ff_slepc_ok" != no ;   then
FF_PETSC_DYLIB="$FF_PETSC_DYLIB SLEPc.$DYLIB_SUFFIX"
fi

##echo @@@@@@@@@@@@ $ff_petsc_ok @@ "hpddm.$DYLIB_SUFFIX $FF_PETCS_DYLIB"
# Check whether --enable-hpddm was given.
if test ${enable_hpddm+y}
then :
  enableval=$enable_hpddm;
fi

    if test "$enable_hpddm" = "no"
    then
        TOOL_COMPILE_hpddm=""

        TOOL_DYLIB_hpddm=""

		ff_uncompile_plugin+=" ""hpddm.$DYLIB_SUFFIX hpddm_substructuring.$DYLIB_SUFFIX $FF_PETSC_DYLIB"
		ff_unlib_plugin+=" hpddm"
    elif  test   "$ff_hpddm_ok" = "yes" ; then
        TOOL_DYLIB_hpddm="hpddm.$DYLIB_SUFFIX hpddm_substructuring.$DYLIB_SUFFIX $FF_PETSC_DYLIB"

        enable_hpddm_download=no
    else
	   if test "$enable_download" != "yes" -a "$enable_download_hpddm" != "yes" ; then
	    TOOL_COMPILE_hpddm=""

		ff_uncompile_plugin+=" ""hpddm.$DYLIB_SUFFIX hpddm_substructuring.$DYLIB_SUFFIX $FF_PETSC_DYLIB"
		ff_unlib_plugin+=" hpddm"
        TOOL_DYLIB_hpddm=""

	   else
        if test "$ff_wget" = yes -a "$enable_download_hpddm" = "yes" -a "$DOWNLOADCOMPILE" = "" ; then
            DOWNLOADCOMPILE="compile-pkg install-other"
        fi
        TOOL_COMPILE_hpddm=hpddm

        TOOL_DYLIB_hpddm="hpddm.$DYLIB_SUFFIX hpddm_substructuring.$DYLIB_SUFFIX $FF_PETSC_DYLIB"

		ff_download_lib="hpddm $ff_download_lib"
	    enable_hpddm_download=yes
	   fi
     fi

    # Also allow to disable the download of one tool if it is already locally installed



# Check whether --with-hpddm_include was given.
if test ${with_hpddm_include+y}
then :
  withval=$with_hpddm_include;
fi


# Check whether --with-hpddm_ldflags was given.
if test ${with_hpddm_ldflags+y}
then :
  withval=$with_hpddm_ldflags;
fi

	# Check whether --enable-download-hpddm was given.
if test ${enable_download_hpddm+y}
then :
  enableval=$enable_download_hpddm;
fi


    if test "$with_hpddm_include" != "" || test "$with_hpddm_ldflags" != ""
    then

	# some directives have been specified, use them instead of downloading


    if test -z "$ff_where_lib_conf_hpddm"  ; then
	    echo "hpddm LD $with_hpddm_ldflags"  >>$ff_where_lib_conf
	    test -n "$with_hpddm_include" && echo "hpddm INCLUDE $with_hpddm_include "  >>$ff_where_lib_conf
            ff_where_lib_conf_hpddm=1
	    ff_where_lib_hpddm="$with_hpddm_ldflags"
	    ff_where_inc_hpddm="$with_hpddm_include"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add hpddm : $with_hpddm_ldflags ;  $with_hpddm_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add hpddm : $with_hpddm_ldflags ;  $with_hpddm_include in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add hpddm : $with_hpddm_ldflags $with_hpddm_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add hpddm : $with_hpddm_ldflags $with_hpddm_include in  $ff_where_lib_conf \"" >&6;}
        fi

        TOOL_COMPILE_hpddm=""

	enable_hpddm_download=no
    fi


# Check whether --enable-bemtool was given.
if test ${enable_bemtool+y}
then :
  enableval=$enable_bemtool;
fi

    if test "$enable_bemtool" = "no"
    then
        TOOL_COMPILE_bemtool=""

        TOOL_DYLIB_bemtool=""

		ff_uncompile_plugin+=" ""bem.$DYLIB_SUFFIX RadiativeTransfer_htool.$DYLIB_SUFFIX"
		ff_unlib_plugin+=" bemtool"
    elif  test   "$ff_bemtool_ok" = "yes" ; then
        TOOL_DYLIB_bemtool="bem.$DYLIB_SUFFIX RadiativeTransfer_htool.$DYLIB_SUFFIX"

        enable_bemtool_download=no
    else
	   if test "$enable_download" != "yes" -a "$enable_download_bemtool" != "yes" ; then
	    TOOL_COMPILE_bemtool=""

		ff_uncompile_plugin+=" ""bem.$DYLIB_SUFFIX RadiativeTransfer_htool.$DYLIB_SUFFIX"
		ff_unlib_plugin+=" bemtool"
        TOOL_DYLIB_bemtool=""

	   else
        if test "$ff_wget" = yes -a "$enable_download_bemtool" = "yes" -a "$DOWNLOADCOMPILE" = "" ; then
            DOWNLOADCOMPILE="compile-pkg install-other"
        fi
        TOOL_COMPILE_bemtool=bemtool

        TOOL_DYLIB_bemtool="bem.$DYLIB_SUFFIX RadiativeTransfer_htool.$DYLIB_SUFFIX"

		ff_download_lib="bemtool $ff_download_lib"
	    enable_bemtool_download=yes
	   fi
     fi

    # Also allow to disable the download of one tool if it is already locally installed



# Check whether --with-bemtool_include was given.
if test ${with_bemtool_include+y}
then :
  withval=$with_bemtool_include;
fi


# Check whether --with-bemtool_ldflags was given.
if test ${with_bemtool_ldflags+y}
then :
  withval=$with_bemtool_ldflags;
fi

	# Check whether --enable-download-bemtool was given.
if test ${enable_download_bemtool+y}
then :
  enableval=$enable_download_bemtool;
fi


    if test "$with_bemtool_include" != "" || test "$with_bemtool_ldflags" != ""
    then

	# some directives have been specified, use them instead of downloading


    if test -z "$ff_where_lib_conf_bemtool"  ; then
	    echo "bemtool LD $with_bemtool_ldflags"  >>$ff_where_lib_conf
	    test -n "$with_bemtool_include" && echo "bemtool INCLUDE $with_bemtool_include "  >>$ff_where_lib_conf
            ff_where_lib_conf_bemtool=1
	    ff_where_lib_bemtool="$with_bemtool_ldflags"
	    ff_where_inc_bemtool="$with_bemtool_include"
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     ++ add bemtool : $with_bemtool_ldflags ;  $with_bemtool_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     ++ add bemtool : $with_bemtool_ldflags ;  $with_bemtool_include in  $ff_where_lib_conf \"" >&6;}
	else
	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:     -- do not add bemtool : $with_bemtool_ldflags $with_bemtool_include in  $ff_where_lib_conf \"" >&5
printf "%s\n" "$as_me:     -- do not add bemtool : $with_bemtool_ldflags $with_bemtool_include in  $ff_where_lib_conf \"" >&6;}
        fi

        TOOL_COMPILE_bemtool=""

	enable_bemtool_download=no
    fi


if test -n "$TOOL_COMPILE_bemtool" -a -z "$ff_HTOOL_INCLUDE"; then
  TOOL_COMPILE_htool="htool"
fi
ff_inc_htool=$ff_HTOOL_INCLUDE
if test -n "$TOOL_COMPILE_htool"; then
	# install htool
	ff_inc_htool='-I$(abs_top_builddir)/3rdparty/include/htool/include'
fi
if test -n "$ff_inc_htool"; then
    ff_inc_htool="$ff_inc_htool -DWITH_bemtool -DWITH_htool"
fi
if test -z "$TOOL_COMPILE_bemtool"; then
    enable_bemtool=no
    ff_inc_htool=""
fi
HTOOL_INCLUDE_DIR=$ff_inc_htool


##
if test "$ff_mkl_ok" = yes ; then

printf "%s\n" "#define HAVE_MKL 1" >>confdefs.h

fi

## Conditional for check
test "$ff_fftw_ok" = yes -o -n "$ff_DOWNLOAD_FFTW" && ff_fftw_=yes || ff_fftw_=no
test "$ff_ipopt_ok" = yes -o -n "$TOOL_COMPILE_ipopt" && ff_ipopt_=yes || ff_ipopt_=no
test "$ff_metis_ok" = yes -o -n "$TOOL_COMPILE_metis" && ff_metis_=yes || ff_metis_=no
test "$ff_mmg_ok" = yes -o -n "$TOOL_COMPILE_mmg" && ff_mmg_=yes || ff_mmg_=no
test "$ff_mshmet_ok" = yes -o -n "$TOOL_COMPILE_mshmet" && ff_mshmet_=yes || ff_mshmet_=no
test "$ff_mumps_ok" = yes -o -n "$TOOL_COMPILE_mumps" && ff_mumps_=yes || ff_mumps_=no
test "$ff_mumps_seq_ok" = yes -o -n "$TOOL_COMPILE_mumps_seq" && ff_mumps_seq_=yes || ff_mumps_seq_=no
test "$ff_parmetis_ok" = yes -o -n "$TOOL_COMPILE_parmetis" && ff_parmetis_=yes || ff_parmetis_=no
test "$ff_scotch_ok" = yes -o -n "$TOOL_COMPILE_scotch" && ff_scotch_=yes || ff_scotch_=no
test "$ff_tetgen_ok" = yes -o -n "$TOOL_COMPILE_tetgen" && ff_tetgen_=yes || ff_tetgen_=no
test "$ff_umfpack_ok" = yes -o -n "$TOOL_COMPILE_umfpack"  && ff_umfpack_=yes || ff_umfpack_=no
test "$ff_parmmg_ok" = yes -o -n "$TOOL_COMPILE_parmmg"  && ff_parmmg_=yes || ff_parmmg_=no

DOWNLOADCOMPILE=$DOWNLOADCOMPILE

 if test "$enable_download" = yes; then
  DOWNLOAD_TRUE=
  DOWNLOAD_FALSE='#'
else
  DOWNLOAD_TRUE='#'
  DOWNLOAD_FALSE=
fi

 if test "$ff_arpack_ok" = yes; then
  ARPACK_TRUE=
  ARPACK_FALSE='#'
else
  ARPACK_TRUE='#'
  ARPACK_FALSE=
fi

 if test "$ff_blacs_ok" = yes; then
  BLACS_TRUE=
  BLACS_FALSE='#'
else
  BLACS_TRUE='#'
  BLACS_FALSE=
fi

 if test "$enable_bemtool" = yes; then
  BEMTOOL_TRUE=
  BEMTOOL_FALSE='#'
else
  BEMTOOL_TRUE='#'
  BEMTOOL_FALSE=
fi

 if test "$enable_boost" = yes; then
  BOOST_TRUE=
  BOOST_FALSE='#'
else
  BOOST_TRUE='#'
  BOOST_FALSE=
fi

 if test "$ff_fftw_" = yes; then
  FFTW3_TRUE=
  FFTW3_FALSE='#'
else
  FFTW3_TRUE='#'
  FFTW3_FALSE=
fi

 if test "$enable_fortran" != no ; then
  FORTRAN_TRUE=
  FORTRAN_FALSE='#'
else
  FORTRAN_TRUE='#'
  FORTRAN_FALSE=
fi

 if test "$ff_freeyams_ok" = yes -o -n "$TOOL_COMPILE_yams"; then
  FREEYAMS_TRUE=
  FREEYAMS_FALSE='#'
else
  FREEYAMS_TRUE='#'
  FREEYAMS_FALSE=
fi

 if test "$enable_gmm" = yes -o -n "$TOOL_COMPILE_gmm"; then
  GMM_TRUE=
  GMM_FALSE='#'
else
  GMM_TRUE='#'
  GMM_FALSE=
fi

 if test "$ff_with_gsl" = yes; then
  GSL_TRUE=
  GSL_FALSE='#'
else
  GSL_TRUE='#'
  GSL_FALSE=
fi

 if test "$with_hdf5" = yes; then
  HDF5_TRUE=
  HDF5_FALSE='#'
else
  HDF5_TRUE='#'
  HDF5_FALSE=
fi

 if test "$enable_htool" = yes; then
  HTOOL_TRUE=
  HTOOL_FALSE='#'
else
  HTOOL_TRUE='#'
  HTOOL_FALSE=
fi

 if test "$enable_hpddm" = yes; then
  HPDDM_TRUE=
  HPDDM_FALSE='#'
else
  HPDDM_TRUE='#'
  HPDDM_FALSE=
fi

 if test "$ff_ipopt_" = yes; then
  IPOPT_TRUE=
  IPOPT_FALSE='#'
else
  IPOPT_TRUE='#'
  IPOPT_FALSE=
fi

 if test "$ff_libseq_ok" = yes; then
  LIBSEQ_TRUE=
  LIBSEQ_FALSE='#'
else
  LIBSEQ_TRUE='#'
  LIBSEQ_FALSE=
fi

 if test "$ff_metis_" = yes; then
  METIS_TRUE=
  METIS_FALSE='#'
else
  METIS_TRUE='#'
  METIS_FALSE=
fi

 if test "$ff_mkl" = yes; then
  MKL_TRUE=
  MKL_FALSE='#'
else
  MKL_TRUE='#'
  MKL_FALSE=
fi

 if test "$ff_mmg3d_ok" = yes -o -n "$TOOL_COMPILE_mmg3d"; then
  MMG3D_TRUE=
  MMG3D_FALSE='#'
else
  MMG3D_TRUE='#'
  MMG3D_FALSE=
fi

 if test "$ff_mmg_" = yes; then
  MMG_TRUE=
  MMG_FALSE='#'
else
  MMG_TRUE='#'
  MMG_FALSE=
fi

 if test "$ff_parmmg_" = yes; then
  PARMMG_TRUE=
  PARMMG_FALSE='#'
else
  PARMMG_TRUE='#'
  PARMMG_FALSE=
fi

 if test "$ff_mpi" = yes; then
  MPI_TRUE=
  MPI_FALSE='#'
else
  MPI_TRUE='#'
  MPI_FALSE=
fi

 if test "$ff_mshmet_" = yes; then
  MSHMET_TRUE=
  MSHMET_FALSE='#'
else
  MSHMET_TRUE='#'
  MSHMET_FALSE=
fi

 if test "$ff_mumps_" = yes; then
  MUMPS_TRUE=
  MUMPS_FALSE='#'
else
  MUMPS_TRUE='#'
  MUMPS_FALSE=
fi

 if test "$ff_mumps_ptscotch_ok" = yes; then
  MUMPS_ptscotch_TRUE=
  MUMPS_ptscotch_FALSE='#'
else
  MUMPS_ptscotch_TRUE='#'
  MUMPS_ptscotch_FALSE=
fi

 if test "$ff_mumps_scotch_ok" = yes; then
  MUMPS_scotch_TRUE=
  MUMPS_scotch_FALSE='#'
else
  MUMPS_scotch_TRUE='#'
  MUMPS_scotch_FALSE=
fi

 if test "$ff_mumps_seq_" = yes; then
  MUMPS_seq_TRUE=
  MUMPS_seq_FALSE='#'
else
  MUMPS_seq_TRUE='#'
  MUMPS_seq_FALSE=
fi

 if test "$ff_nlopt_ok" = yes -o -n "$TOOL_COMPILE_nlopt"; then
  NLOPT_TRUE=
  NLOPT_FALSE='#'
else
  NLOPT_TRUE='#'
  NLOPT_FALSE=
fi

 if test "$ff_parmetis_" = yes; then
  PARMETIS_TRUE=
  PARMETIS_FALSE='#'
else
  PARMETIS_TRUE='#'
  PARMETIS_FALSE=
fi

 if test "$ff_petsc_ok" = yes; then
  PETSC_TRUE=
  PETSC_FALSE='#'
else
  PETSC_TRUE='#'
  PETSC_FALSE=
fi

 if test "$ff_petsccomplex_ok" = yes; then
  PETSCCOMPLEX_TRUE=
  PETSCCOMPLEX_FALSE='#'
else
  PETSCCOMPLEX_TRUE='#'
  PETSCCOMPLEX_FALSE=
fi

 if test -n "$TOOL_COMPILE_pipe"; then
  PIPE_TRUE=
  PIPE_FALSE='#'
else
  PIPE_TRUE='#'
  PIPE_FALSE=
fi

 if test -n "$ff_pthread"; then
  PTHREAD_TRUE=
  PTHREAD_FALSE='#'
else
  PTHREAD_TRUE='#'
  PTHREAD_FALSE=
fi

 if test "$ff_ptscotch_ok" = yes; then
  PTSCOTCH_TRUE=
  PTSCOTCH_FALSE='#'
else
  PTSCOTCH_TRUE='#'
  PTSCOTCH_FALSE=
fi

 if test "$ff_scalapack_ok" = yes; then
  SCALAPACK_TRUE=
  SCALAPACK_FALSE='#'
else
  SCALAPACK_TRUE='#'
  SCALAPACK_FALSE=
fi

 if test "$ff_scotch_" = yes; then
  SCOTCH_TRUE=
  SCOTCH_FALSE='#'
else
  SCOTCH_TRUE='#'
  SCOTCH_FALSE=
fi

 if test "$ff_slepc_ok" = yes; then
  SLEPC_TRUE=
  SLEPC_FALSE='#'
else
  SLEPC_TRUE='#'
  SLEPC_FALSE=
fi

 if test "$ff_slepccomplex_ok" = yes; then
  SLEPCCOMPLEX_TRUE=
  SLEPCCOMPLEX_FALSE='#'
else
  SLEPCCOMPLEX_TRUE='#'
  SLEPCCOMPLEX_FALSE=
fi

 if test "$ff_superlu_ok" = yes; then
  SUPERLU_TRUE=
  SUPERLU_FALSE='#'
else
  SUPERLU_TRUE='#'
  SUPERLU_FALSE=
fi

 if test "$ff_tetgen_" = yes; then
  TETGEN_TRUE=
  TETGEN_FALSE='#'
else
  TETGEN_TRUE='#'
  TETGEN_FALSE=
fi

 if test "$ff_umfpack_" = yes; then
  UMFPACK_TRUE=
  UMFPACK_FALSE='#'
else
  UMFPACK_TRUE='#'
  UMFPACK_FALSE=
fi



##
# All makefiles
ac_config_files="$ac_config_files Makefile 3rdparty/Makefile 3rdparty/blas/Makefile 3rdparty/arpack/Makefile 3rdparty/umfpack/Makefile 3rdparty/fftw/Makefile src/Makefile src/bamglib/Makefile src/Graphics/Makefile src/femlib/Makefile src/Algo/Makefile src/lglib/Makefile src/ffgraphics/Makefile src/ffgraphics/server/Makefile src/ffgraphics/client/Makefile src/fflib/Makefile src/nw/Makefile src/mpi/Makefile src/bamg/Makefile src/libMesh/Makefile src/medit/Makefile src/bin-win32/Makefile plugin/Makefile plugin/seq/Makefile plugin/mpi/Makefile examples/Makefile examples/plugin/Makefile examples/tutorial/Makefile examples/misc/Makefile examples/mpi/Makefile examples/bem/Makefile examples/hpddm/Makefile examples/ffddm/Makefile examples/eigen/Makefile examples/examples/Makefile examples/bug/Makefile examples/3d/Makefile examples/3dSurf/Makefile examples/3dCurve/Makefile"

cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs, see configure's option --config-cache.
# It is not useful on other systems.  If it contains results you don't
# want to keep, you may remove or edit it.
#
# config.status only pays attention to the cache file if you give it
# the --recheck option to rerun configure.
#
# `ac_cv_env_foo' variables (set or unset) will be overridden when
# loading this file, other *unset* `ac_cv_foo' will be assigned the
# following values.

_ACEOF

# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, we kill variables containing newlines.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(
  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
    eval ac_val=\$$ac_var
    case $ac_val in #(
    *${as_nl}*)
      case $ac_var in #(
      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      esac
      case $ac_var in #(
      _ | IFS | as_nl) ;; #(
      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
      *) { eval $ac_var=; unset $ac_var;} ;;
      esac ;;
    esac
  done

  (set) 2>&1 |
    case $as_nl`(ac_space=' '; set) 2>&1` in #(
    *${as_nl}ac_space=\ *)
      # `set' does not quote correctly, so add quotes: double-quote
      # substitution turns \\\\ into \\, and sed turns \\ into \.
      sed -n \
	"s/'/'\\\\''/g;
	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
      ;; #(
    *)
      # `set' quotes correctly as required by POSIX, so do not add quotes.
      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
      ;;
    esac |
    sort
) |
  sed '
     /^ac_cv_env_/b end
     t clear
     :clear
     s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
     t end
     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
     :end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
  if test -w "$cache_file"; then
    if test "x$cache_file" != "x/dev/null"; then
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
      if test ! -f "$cache_file" || test -h "$cache_file"; then
	cat confcache >"$cache_file"
      else
        case $cache_file in #(
        */* | ?:*)
	  mv -f confcache "$cache_file"$$ &&
	  mv -f "$cache_file"$$ "$cache_file" ;; #(
        *)
	  mv -f confcache "$cache_file" ;;
	esac
      fi
    fi
  else
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
  fi
fi
rm -f confcache

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

DEFS=-DHAVE_CONFIG_H

ac_libobjs=
ac_ltlibobjs=
U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
  # 1. Remove the extension, and $U if already installed.
  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
  ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
  #    will be set to the directory where LIBOBJS objects are built.
  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
done
LIBOBJS=$ac_libobjs

LTLIBOBJS=$ac_ltlibobjs


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
printf %s "checking that generated files are newer than configure... " >&6; }
   if test -n "$am_sleep_pid"; then
     # Hide warnings about reused PIDs.
     wait $am_sleep_pid 2>/dev/null
   fi
   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
printf "%s\n" "done" >&6; }
 if test -n "$EXEEXT"; then
  am__EXEEXT_TRUE=
  am__EXEEXT_FALSE='#'
else
  am__EXEEXT_TRUE='#'
  am__EXEEXT_FALSE=
fi

if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
  as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
  as_fn_error $? "conditional \"AMDEP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
  as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ENABLE_FFCS_TRUE}" && test -z "${ENABLE_FFCS_FALSE}"; then
  as_fn_error $? "conditional \"ENABLE_FFCS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${FFCS_MPIOK_TRUE}" && test -z "${FFCS_MPIOK_FALSE}"; then
  as_fn_error $? "conditional \"FFCS_MPIOK\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ENABLE_EIGEN_TRUE}" && test -z "${ENABLE_EIGEN_FALSE}"; then
  as_fn_error $? "conditional \"ENABLE_EIGEN\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${FFCS_WINDOWS_TRUE}" && test -z "${FFCS_WINDOWS_FALSE}"; then
  as_fn_error $? "conditional \"FFCS_WINDOWS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${DOWNLOAD_TRUE}" && test -z "${DOWNLOAD_FALSE}"; then
  as_fn_error $? "conditional \"DOWNLOAD\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ARPACK_TRUE}" && test -z "${ARPACK_FALSE}"; then
  as_fn_error $? "conditional \"ARPACK\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${BLACS_TRUE}" && test -z "${BLACS_FALSE}"; then
  as_fn_error $? "conditional \"BLACS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${BEMTOOL_TRUE}" && test -z "${BEMTOOL_FALSE}"; then
  as_fn_error $? "conditional \"BEMTOOL\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${BOOST_TRUE}" && test -z "${BOOST_FALSE}"; then
  as_fn_error $? "conditional \"BOOST\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${FFTW3_TRUE}" && test -z "${FFTW3_FALSE}"; then
  as_fn_error $? "conditional \"FFTW3\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${FORTRAN_TRUE}" && test -z "${FORTRAN_FALSE}"; then
  as_fn_error $? "conditional \"FORTRAN\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${FREEYAMS_TRUE}" && test -z "${FREEYAMS_FALSE}"; then
  as_fn_error $? "conditional \"FREEYAMS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${GMM_TRUE}" && test -z "${GMM_FALSE}"; then
  as_fn_error $? "conditional \"GMM\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${GSL_TRUE}" && test -z "${GSL_FALSE}"; then
  as_fn_error $? "conditional \"GSL\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${HDF5_TRUE}" && test -z "${HDF5_FALSE}"; then
  as_fn_error $? "conditional \"HDF5\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${HTOOL_TRUE}" && test -z "${HTOOL_FALSE}"; then
  as_fn_error $? "conditional \"HTOOL\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${HPDDM_TRUE}" && test -z "${HPDDM_FALSE}"; then
  as_fn_error $? "conditional \"HPDDM\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${IPOPT_TRUE}" && test -z "${IPOPT_FALSE}"; then
  as_fn_error $? "conditional \"IPOPT\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${LIBSEQ_TRUE}" && test -z "${LIBSEQ_FALSE}"; then
  as_fn_error $? "conditional \"LIBSEQ\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${METIS_TRUE}" && test -z "${METIS_FALSE}"; then
  as_fn_error $? "conditional \"METIS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MKL_TRUE}" && test -z "${MKL_FALSE}"; then
  as_fn_error $? "conditional \"MKL\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MMG3D_TRUE}" && test -z "${MMG3D_FALSE}"; then
  as_fn_error $? "conditional \"MMG3D\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MMG_TRUE}" && test -z "${MMG_FALSE}"; then
  as_fn_error $? "conditional \"MMG\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${PARMMG_TRUE}" && test -z "${PARMMG_FALSE}"; then
  as_fn_error $? "conditional \"PARMMG\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MPI_TRUE}" && test -z "${MPI_FALSE}"; then
  as_fn_error $? "conditional \"MPI\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MSHMET_TRUE}" && test -z "${MSHMET_FALSE}"; then
  as_fn_error $? "conditional \"MSHMET\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MUMPS_TRUE}" && test -z "${MUMPS_FALSE}"; then
  as_fn_error $? "conditional \"MUMPS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MUMPS_ptscotch_TRUE}" && test -z "${MUMPS_ptscotch_FALSE}"; then
  as_fn_error $? "conditional \"MUMPS_ptscotch\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MUMPS_scotch_TRUE}" && test -z "${MUMPS_scotch_FALSE}"; then
  as_fn_error $? "conditional \"MUMPS_scotch\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${MUMPS_seq_TRUE}" && test -z "${MUMPS_seq_FALSE}"; then
  as_fn_error $? "conditional \"MUMPS_seq\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${NLOPT_TRUE}" && test -z "${NLOPT_FALSE}"; then
  as_fn_error $? "conditional \"NLOPT\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${PARMETIS_TRUE}" && test -z "${PARMETIS_FALSE}"; then
  as_fn_error $? "conditional \"PARMETIS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${PETSC_TRUE}" && test -z "${PETSC_FALSE}"; then
  as_fn_error $? "conditional \"PETSC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${PETSCCOMPLEX_TRUE}" && test -z "${PETSCCOMPLEX_FALSE}"; then
  as_fn_error $? "conditional \"PETSCCOMPLEX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${PIPE_TRUE}" && test -z "${PIPE_FALSE}"; then
  as_fn_error $? "conditional \"PIPE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${PTHREAD_TRUE}" && test -z "${PTHREAD_FALSE}"; then
  as_fn_error $? "conditional \"PTHREAD\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${PTSCOTCH_TRUE}" && test -z "${PTSCOTCH_FALSE}"; then
  as_fn_error $? "conditional \"PTSCOTCH\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${SCALAPACK_TRUE}" && test -z "${SCALAPACK_FALSE}"; then
  as_fn_error $? "conditional \"SCALAPACK\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${SCOTCH_TRUE}" && test -z "${SCOTCH_FALSE}"; then
  as_fn_error $? "conditional \"SCOTCH\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${SLEPC_TRUE}" && test -z "${SLEPC_FALSE}"; then
  as_fn_error $? "conditional \"SLEPC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${SLEPCCOMPLEX_TRUE}" && test -z "${SLEPCCOMPLEX_FALSE}"; then
  as_fn_error $? "conditional \"SLEPCCOMPLEX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${SUPERLU_TRUE}" && test -z "${SUPERLU_FALSE}"; then
  as_fn_error $? "conditional \"SUPERLU\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${TETGEN_TRUE}" && test -z "${TETGEN_FALSE}"; then
  as_fn_error $? "conditional \"TETGEN\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${UMFPACK_TRUE}" && test -z "${UMFPACK_FALSE}"; then
  as_fn_error $? "conditional \"UMFPACK\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi

: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
as_write_fail=0
cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
#! $SHELL
# Generated by $as_me.
# Run this file to recreate the current configuration.
# Compiler output produced by configure, useful for debugging
# configure, is in config.log if it exists.

debug=false
ac_cs_recheck=false
ac_cs_silent=false

SHELL=\${CONFIG_SHELL-$SHELL}
export SHELL
_ASEOF
cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
## -------------------- ##
## M4sh Initialization. ##
## -------------------- ##

# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
as_nop=:
if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
then :
  emulate sh
  NULLCMD=:
  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  # is contrary to our usage.  Disable this feature.
  alias -g '${1+"$@"}'='"$@"'
  setopt NO_GLOB_SUBST
else $as_nop
  case `(set -o) 2>/dev/null` in #(
  *posix*) :
    set -o posix ;; #(
  *) :
     ;;
esac
fi



# Reset variables that may have inherited troublesome values from
# the environment.

# IFS needs to be set, to space, tab, and newline, in precisely that order.
# (If _AS_PATH_WALK were called with IFS unset, it would have the
# side effect of setting IFS to empty, thus disabling word splitting.)
# Quoting is to prevent editors from complaining about space-tab.
as_nl='
'
export as_nl
IFS=" ""	$as_nl"

PS1='$ '
PS2='> '
PS4='+ '

# Ensure predictable behavior from utilities with locale-dependent output.
LC_ALL=C
export LC_ALL
LANGUAGE=C
export LANGUAGE

# We cannot yet rely on "unset" to work, but we need these variables
# to be unset--not just set to an empty or harmless value--now, to
# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
# also avoids known problems related to "unset" and subshell syntax
# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
do eval test \${$as_var+y} \
  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done

# Ensure that fds 0, 1, and 2 are open.
if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi

# The user is always right.
if ${PATH_SEPARATOR+false} :; then
  PATH_SEPARATOR=:
  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
      PATH_SEPARATOR=';'
  }
fi


# Find who we are.  Look in the path if we contain no directory separator.
as_myself=
case $0 in #((
  *[\\/]* ) as_myself=$0 ;;
  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  case $as_dir in #(((
    '') as_dir=./ ;;
    */) ;;
    *) as_dir=$as_dir/ ;;
  esac
    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
  done
IFS=$as_save_IFS

     ;;
esac
# We did not find ourselves, most probably we were run as `sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
  as_myself=$0
fi
if test ! -f "$as_myself"; then
  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
  exit 1
fi



# as_fn_error STATUS ERROR [LINENO LOG_FD]
# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
  as_status=$1; test $as_status -eq 0 && as_status=1
  if test "$4"; then
    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
  fi
  printf "%s\n" "$as_me: error: $2" >&2
  as_fn_exit $as_status
} # as_fn_error



# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
as_fn_set_status ()
{
  return $1
} # as_fn_set_status

# as_fn_exit STATUS
# -----------------
# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
as_fn_exit ()
{
  set +e
  as_fn_set_status $1
  exit $1
} # as_fn_exit

# as_fn_unset VAR
# ---------------
# Portably unset VAR.
as_fn_unset ()
{
  { eval $1=; unset $1;}
}
as_unset=as_fn_unset

# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
# advantage of any shell optimizations that allow amortized linear growth over
# repeated appends, instead of the typical quadratic growth present in naive
# implementations.
if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
then :
  eval 'as_fn_append ()
  {
    eval $1+=\$2
  }'
else $as_nop
  as_fn_append ()
  {
    eval $1=\$$1\$2
  }
fi # as_fn_append

# as_fn_arith ARG...
# ------------------
# Perform arithmetic evaluation on the ARGs, and store the result in the
# global $as_val. Take advantage of shells that can avoid forks. The arguments
# must be portable across $(()) and expr.
if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
then :
  eval 'as_fn_arith ()
  {
    as_val=$(( $* ))
  }'
else $as_nop
  as_fn_arith ()
  {
    as_val=`expr "$@" || test $? -eq 1`
  }
fi # as_fn_arith


if expr a : '\(a\)' >/dev/null 2>&1 &&
   test "X`expr 00001 : '.*\(...\)'`" = X001; then
  as_expr=expr
else
  as_expr=false
fi

if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
  as_basename=basename
else
  as_basename=false
fi

if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
  as_dirname=dirname
else
  as_dirname=false
fi

as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
	 X"$0" : 'X\(//\)$' \| \
	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X/"$0" |
    sed '/^.*\/\([^/][^/]*\)\/*$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`

# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits


# Determine whether it's possible to make 'echo' print without a newline.
# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
# for compatibility with existing Makefiles.
ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in #(((((
-n*)
  case `echo 'xy\c'` in
  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
  xy)  ECHO_C='\c';;
  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
       ECHO_T='	';;
  esac;;
*)
  ECHO_N='-n';;
esac

# For backward compatibility with old third-party macros, we provide
# the shell variables $as_echo and $as_echo_n.  New code should use
# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
as_echo='printf %s\n'
as_echo_n='printf %s'

rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
  rm -f conf$$.dir/conf$$.file
else
  rm -f conf$$.dir
  mkdir conf$$.dir 2>/dev/null
fi
if (echo >conf$$.file) 2>/dev/null; then
  if ln -s conf$$.file conf$$ 2>/dev/null; then
    as_ln_s='ln -s'
    # ... but there are two gotchas:
    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
    # In both cases, we have to default to `cp -pR'.
    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
      as_ln_s='cp -pR'
  elif ln conf$$.file conf$$ 2>/dev/null; then
    as_ln_s=ln
  else
    as_ln_s='cp -pR'
  fi
else
  as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null


# as_fn_mkdir_p
# -------------
# Create "$as_dir" as a directory, including parents if necessary.
as_fn_mkdir_p ()
{

  case $as_dir in #(
  -*) as_dir=./$as_dir;;
  esac
  test -d "$as_dir" || eval $as_mkdir_p || {
    as_dirs=
    while :; do
      case $as_dir in #(
      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
      *) as_qdir=$as_dir;;
      esac
      as_dirs="'$as_qdir' $as_dirs"
      as_dir=`$as_dirname -- "$as_dir" ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$as_dir" : 'X\(//\)[^/]' \| \
	 X"$as_dir" : 'X\(//\)$' \| \
	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"$as_dir" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
      test -d "$as_dir" && break
    done
    test -z "$as_dirs" || eval "mkdir $as_dirs"
  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"


} # as_fn_mkdir_p
if mkdir -p . 2>/dev/null; then
  as_mkdir_p='mkdir -p "$as_dir"'
else
  test -d ./-p && rmdir ./-p
  as_mkdir_p=false
fi


# as_fn_executable_p FILE
# -----------------------
# Test if FILE is an executable regular file.
as_fn_executable_p ()
{
  test -f "$1" && test -x "$1"
} # as_fn_executable_p
as_test_x='test -x'
as_executable_p=as_fn_executable_p

# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"

# Sed expression to map a string onto a valid variable name.
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"


exec 6>&1
## ----------------------------------- ##
## Main body of $CONFIG_STATUS script. ##
## ----------------------------------- ##
_ASEOF
test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# Save the log message, to keep $0 and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by FreeFEM $as_me 4.14, which was
generated by GNU Autoconf 2.71.  Invocation command line was

  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  $ $0 $@

on `(hostname || uname -n) 2>/dev/null | sed 1q`
"

_ACEOF

case $ac_config_files in *"
"*) set x $ac_config_files; shift; ac_config_files=$*;;
esac

case $ac_config_headers in *"
"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
esac


cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
config_files="$ac_config_files"
config_headers="$ac_config_headers"
config_commands="$ac_config_commands"

_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ac_cs_usage="\
\`$as_me' instantiates files and other configuration actions
from templates according to the current configuration.  Unless the files
and actions are specified as TAGs, all are instantiated by default.

Usage: $0 [OPTION]... [TAG]...

  -h, --help       print this help, then exit
  -V, --version    print version number and configuration settings, then exit
      --config     print configuration, then exit
  -q, --quiet, --silent
                   do not print progress messages
  -d, --debug      don't remove temporary files
      --recheck    update $as_me by reconfiguring in the same conditions
      --file=FILE[:TEMPLATE]
                   instantiate the configuration file FILE
      --header=FILE[:TEMPLATE]
                   instantiate the configuration header FILE

Configuration files:
$config_files

Configuration headers:
$config_headers

Configuration commands:
$config_commands

Report bugs to <frederic.hecht@sorbonne-universite.fr>."

_ACEOF
ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
FreeFEM config.status 4.14
configured by $0, generated by GNU Autoconf 2.71,
  with options \\"\$ac_cs_config\\"

Copyright (C) 2021 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."

ac_pwd='$ac_pwd'
srcdir='$srcdir'
INSTALL='$INSTALL'
MKDIR_P='$MKDIR_P'
AWK='$AWK'
test -n "\$AWK" || AWK=awk
_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# The default lists apply if the user does not specify any file.
ac_need_defaults=:
while test $# != 0
do
  case $1 in
  --*=?*)
    ac_option=`expr "X$1" : 'X\([^=]*\)='`
    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
    ac_shift=:
    ;;
  --*=)
    ac_option=`expr "X$1" : 'X\([^=]*\)='`
    ac_optarg=
    ac_shift=:
    ;;
  *)
    ac_option=$1
    ac_optarg=$2
    ac_shift=shift
    ;;
  esac

  case $ac_option in
  # Handling of the options.
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    ac_cs_recheck=: ;;
  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
    printf "%s\n" "$ac_cs_version"; exit ;;
  --config | --confi | --conf | --con | --co | --c )
    printf "%s\n" "$ac_cs_config"; exit ;;
  --debug | --debu | --deb | --de | --d | -d )
    debug=: ;;
  --file | --fil | --fi | --f )
    $ac_shift
    case $ac_optarg in
    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
    '') as_fn_error $? "missing file argument" ;;
    esac
    as_fn_append CONFIG_FILES " '$ac_optarg'"
    ac_need_defaults=false;;
  --header | --heade | --head | --hea )
    $ac_shift
    case $ac_optarg in
    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
    esac
    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
    ac_need_defaults=false;;
  --he | --h)
    # Conflict between --help and --header
    as_fn_error $? "ambiguous option: \`$1'
Try \`$0 --help' for more information.";;
  --help | --hel | -h )
    printf "%s\n" "$ac_cs_usage"; exit ;;
  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  | -silent | --silent | --silen | --sile | --sil | --si | --s)
    ac_cs_silent=: ;;

  # This is an error.
  -*) as_fn_error $? "unrecognized option: \`$1'
Try \`$0 --help' for more information." ;;

  *) as_fn_append ac_config_targets " $1"
     ac_need_defaults=false ;;

  esac
  shift
done

ac_configure_extra_args=

if $ac_cs_silent; then
  exec 6>/dev/null
  ac_configure_extra_args="$ac_configure_extra_args --silent"
fi

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
  shift
  \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
  CONFIG_SHELL='$SHELL'
  export CONFIG_SHELL
  exec "\$@"
fi

_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
exec 5>>config.log
{
  echo
  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
  printf "%s\n" "$ac_log"
} >&5

_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
#
# INIT-COMMANDS
#
AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"

_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1

# Handling of arguments.
for ac_config_target in $ac_config_targets
do
  case $ac_config_target in
    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
    "3rdparty/Makefile") CONFIG_FILES="$CONFIG_FILES 3rdparty/Makefile" ;;
    "3rdparty/blas/Makefile") CONFIG_FILES="$CONFIG_FILES 3rdparty/blas/Makefile" ;;
    "3rdparty/arpack/Makefile") CONFIG_FILES="$CONFIG_FILES 3rdparty/arpack/Makefile" ;;
    "3rdparty/umfpack/Makefile") CONFIG_FILES="$CONFIG_FILES 3rdparty/umfpack/Makefile" ;;
    "3rdparty/fftw/Makefile") CONFIG_FILES="$CONFIG_FILES 3rdparty/fftw/Makefile" ;;
    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
    "src/bamglib/Makefile") CONFIG_FILES="$CONFIG_FILES src/bamglib/Makefile" ;;
    "src/Graphics/Makefile") CONFIG_FILES="$CONFIG_FILES src/Graphics/Makefile" ;;
    "src/femlib/Makefile") CONFIG_FILES="$CONFIG_FILES src/femlib/Makefile" ;;
    "src/Algo/Makefile") CONFIG_FILES="$CONFIG_FILES src/Algo/Makefile" ;;
    "src/lglib/Makefile") CONFIG_FILES="$CONFIG_FILES src/lglib/Makefile" ;;
    "src/ffgraphics/Makefile") CONFIG_FILES="$CONFIG_FILES src/ffgraphics/Makefile" ;;
    "src/ffgraphics/server/Makefile") CONFIG_FILES="$CONFIG_FILES src/ffgraphics/server/Makefile" ;;
    "src/ffgraphics/client/Makefile") CONFIG_FILES="$CONFIG_FILES src/ffgraphics/client/Makefile" ;;
    "src/fflib/Makefile") CONFIG_FILES="$CONFIG_FILES src/fflib/Makefile" ;;
    "src/nw/Makefile") CONFIG_FILES="$CONFIG_FILES src/nw/Makefile" ;;
    "src/mpi/Makefile") CONFIG_FILES="$CONFIG_FILES src/mpi/Makefile" ;;
    "src/bamg/Makefile") CONFIG_FILES="$CONFIG_FILES src/bamg/Makefile" ;;
    "src/libMesh/Makefile") CONFIG_FILES="$CONFIG_FILES src/libMesh/Makefile" ;;
    "src/medit/Makefile") CONFIG_FILES="$CONFIG_FILES src/medit/Makefile" ;;
    "src/bin-win32/Makefile") CONFIG_FILES="$CONFIG_FILES src/bin-win32/Makefile" ;;
    "plugin/Makefile") CONFIG_FILES="$CONFIG_FILES plugin/Makefile" ;;
    "plugin/seq/Makefile") CONFIG_FILES="$CONFIG_FILES plugin/seq/Makefile" ;;
    "plugin/mpi/Makefile") CONFIG_FILES="$CONFIG_FILES plugin/mpi/Makefile" ;;
    "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
    "examples/plugin/Makefile") CONFIG_FILES="$CONFIG_FILES examples/plugin/Makefile" ;;
    "examples/tutorial/Makefile") CONFIG_FILES="$CONFIG_FILES examples/tutorial/Makefile" ;;
    "examples/misc/Makefile") CONFIG_FILES="$CONFIG_FILES examples/misc/Makefile" ;;
    "examples/mpi/Makefile") CONFIG_FILES="$CONFIG_FILES examples/mpi/Makefile" ;;
    "examples/bem/Makefile") CONFIG_FILES="$CONFIG_FILES examples/bem/Makefile" ;;
    "examples/hpddm/Makefile") CONFIG_FILES="$CONFIG_FILES examples/hpddm/Makefile" ;;
    "examples/ffddm/Makefile") CONFIG_FILES="$CONFIG_FILES examples/ffddm/Makefile" ;;
    "examples/eigen/Makefile") CONFIG_FILES="$CONFIG_FILES examples/eigen/Makefile" ;;
    "examples/examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/examples/Makefile" ;;
    "examples/bug/Makefile") CONFIG_FILES="$CONFIG_FILES examples/bug/Makefile" ;;
    "examples/3d/Makefile") CONFIG_FILES="$CONFIG_FILES examples/3d/Makefile" ;;
    "examples/3dSurf/Makefile") CONFIG_FILES="$CONFIG_FILES examples/3dSurf/Makefile" ;;
    "examples/3dCurve/Makefile") CONFIG_FILES="$CONFIG_FILES examples/3dCurve/Makefile" ;;

  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
  esac
done


# If the user did not use the arguments to specify the items to instantiate,
# then the envvar interface is used.  Set only those that are not.
# We use the long form for the default assignment because of an extremely
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
  test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
  test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
  test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
fi

# Have a temporary directory for convenience.  Make it in the build tree
# simply because there is no reason against having it here, and in addition,
# creating and moving files from /tmp can sometimes cause problems.
# Hook for its removal unless debugging.
# Note that there is a small window in which the directory will not be cleaned:
# after its creation but before its name has been assigned to `$tmp'.
$debug ||
{
  tmp= ac_tmp=
  trap 'exit_status=$?
  : "${ac_tmp:=$tmp}"
  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
' 0
  trap 'as_fn_exit 1' 1 2 13 15
}
# Create a (secure) tmp directory for tmp files.

{
  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
  test -d "$tmp"
}  ||
{
  tmp=./conf$$-$RANDOM
  (umask 077 && mkdir "$tmp")
} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
ac_tmp=$tmp

# Set up the scripts for CONFIG_FILES section.
# No need to generate them if there are no CONFIG_FILES.
# This happens for instance with `./config.status config.h'.
if test -n "$CONFIG_FILES"; then


ac_cr=`echo X | tr X '\015'`
# On cygwin, bash can eat \r inside `` if the user requested igncr.
# But we know of no other shell where ac_cr would be empty at this
# point, so we can use a bashism as a fallback.
if test "x$ac_cr" = x; then
  eval ac_cr=\$\'\\r\'
fi
ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
  ac_cs_awk_cr='\\r'
else
  ac_cs_awk_cr=$ac_cr
fi

echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
_ACEOF


{
  echo "cat >conf$$subs.awk <<_ACEOF" &&
  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
  echo "_ACEOF"
} >conf$$subs.sh ||
  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
  . ./conf$$subs.sh ||
    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5

  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
  if test $ac_delim_n = $ac_delim_num; then
    break
  elif $ac_last_try; then
    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
  else
    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
  fi
done
rm -f conf$$subs.sh

cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
_ACEOF
sed -n '
h
s/^/S["/; s/!.*/"]=/
p
g
s/^[^!]*!//
:repl
t repl
s/'"$ac_delim"'$//
t delim
:nl
h
s/\(.\{148\}\)..*/\1/
t more1
s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
p
n
b repl
:more1
s/["\\]/\\&/g; s/^/"/; s/$/"\\/
p
g
s/.\{148\}//
t nl
:delim
h
s/\(.\{148\}\)..*/\1/
t more2
s/["\\]/\\&/g; s/^/"/; s/$/"/
p
b
:more2
s/["\\]/\\&/g; s/^/"/; s/$/"\\/
p
g
s/.\{148\}//
t delim
' <conf$$subs.awk | sed '
/^[^""]/{
  N
  s/\n//
}
' >>$CONFIG_STATUS || ac_write_fail=1
rm -f conf$$subs.awk
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
_ACAWK
cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
  for (key in S) S_is_set[key] = 1
  FS = ""

}
{
  line = $ 0
  nfields = split(line, field, "@")
  substed = 0
  len = length(field[1])
  for (i = 2; i < nfields; i++) {
    key = field[i]
    keylen = length(key)
    if (S_is_set[key]) {
      value = S[key]
      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
      len += length(value) + length(field[++i])
      substed = 1
    } else
      len += 1 + keylen
  }

  print line
}

_ACAWK
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
else
  cat
fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
_ACEOF

# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
# trailing colons and then remove the whole line if VPATH becomes empty
# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
h
s///
s/^/:/
s/[	 ]*$/:/
s/:\$(srcdir):/:/g
s/:\${srcdir}:/:/g
s/:@srcdir@:/:/g
s/^:*//
s/:*$//
x
s/\(=[	 ]*\).*/\1/
G
s/\n//
s/^[^=]*=[	 ]*$//
}'
fi

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
fi # test -n "$CONFIG_FILES"

# Set up the scripts for CONFIG_HEADERS section.
# No need to generate them if there are no CONFIG_HEADERS.
# This happens for instance with `./config.status Makefile'.
if test -n "$CONFIG_HEADERS"; then
cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
BEGIN {
_ACEOF

# Transform confdefs.h into an awk script `defines.awk', embedded as
# here-document in config.status, that substitutes the proper values into
# config.h.in to produce config.h.

# Create a delimiter string that does not exist in confdefs.h, to ease
# handling of long lines.
ac_delim='%!_!# '
for ac_last_try in false false :; do
  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
  if test -z "$ac_tt"; then
    break
  elif $ac_last_try; then
    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
  else
    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
  fi
done

# For the awk script, D is an array of macro values keyed by name,
# likewise P contains macro parameters if any.  Preserve backslash
# newline sequences.

ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
sed -n '
s/.\{148\}/&'"$ac_delim"'/g
t rset
:rset
s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
t def
d
:def
s/\\$//
t bsnl
s/["\\]/\\&/g
s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
D["\1"]=" \3"/p
s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
d
:bsnl
s/["\\]/\\&/g
s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
D["\1"]=" \3\\\\\\n"\\/p
t cont
s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
t cont
d
:cont
n
s/.\{148\}/&'"$ac_delim"'/g
t clear
:clear
s/\\$//
t bsnlc
s/["\\]/\\&/g; s/^/"/; s/$/"/p
d
:bsnlc
s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
b cont
' <confdefs.h | sed '
s/'"$ac_delim"'/"\\\
"/g' >>$CONFIG_STATUS || ac_write_fail=1

cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  for (key in D) D_is_set[key] = 1
  FS = ""
}
/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
  line = \$ 0
  split(line, arg, " ")
  if (arg[1] == "#") {
    defundef = arg[2]
    mac1 = arg[3]
  } else {
    defundef = substr(arg[1], 2)
    mac1 = arg[2]
  }
  split(mac1, mac2, "(") #)
  macro = mac2[1]
  prefix = substr(line, 1, index(line, defundef) - 1)
  if (D_is_set[macro]) {
    # Preserve the white space surrounding the "#".
    print prefix "define", macro P[macro] D[macro]
    next
  } else {
    # Replace #undef with comments.  This is necessary, for example,
    # in the case of _POSIX_SOURCE, which is predefined and required
    # on some systems where configure will not decide to define it.
    if (defundef == "undef") {
      print "/*", prefix defundef, macro, "*/"
      next
    }
  }
}
{ print }
_ACAWK
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
fi # test -n "$CONFIG_HEADERS"


eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
shift
for ac_tag
do
  case $ac_tag in
  :[FHLC]) ac_mode=$ac_tag; continue;;
  esac
  case $ac_mode$ac_tag in
  :[FHL]*:*);;
  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
  :[FH]-) ac_tag=-:-;;
  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
  esac
  ac_save_IFS=$IFS
  IFS=:
  set x $ac_tag
  IFS=$ac_save_IFS
  shift
  ac_file=$1
  shift

  case $ac_mode in
  :L) ac_source=$1;;
  :[FH])
    ac_file_inputs=
    for ac_f
    do
      case $ac_f in
      -) ac_f="$ac_tmp/stdin";;
      *) # Look for the file first in the build tree, then in the source tree
	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
	 # because $ac_f cannot contain `:'.
	 test -f "$ac_f" ||
	   case $ac_f in
	   [\\/$]*) false;;
	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
	   esac ||
	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
      esac
      case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
      as_fn_append ac_file_inputs " '$ac_f'"
    done

    # Let's still pretend it is `configure' which instantiates (i.e., don't
    # use $as_me), people would be surprised to read:
    #    /* config.h.  Generated by config.status.  */
    configure_input='Generated from '`
	  printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
	`' by configure.'
    if test x"$ac_file" != x-; then
      configure_input="$ac_file.  $configure_input"
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
printf "%s\n" "$as_me: creating $ac_file" >&6;}
    fi
    # Neutralize special characters interpreted by sed in replacement strings.
    case $configure_input in #(
    *\&* | *\|* | *\\* )
       ac_sed_conf_input=`printf "%s\n" "$configure_input" |
       sed 's/[\\\\&|]/\\\\&/g'`;; #(
    *) ac_sed_conf_input=$configure_input;;
    esac

    case $ac_tag in
    *:-:* | *:-) cat >"$ac_tmp/stdin" \
      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
    esac
    ;;
  esac

  ac_dir=`$as_dirname -- "$ac_file" ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$ac_file" : 'X\(//\)[^/]' \| \
	 X"$ac_file" : 'X\(//\)$' \| \
	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"$ac_file" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
  as_dir="$ac_dir"; as_fn_mkdir_p
  ac_builddir=.

case "$ac_dir" in
.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
*)
  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
  # A ".." for each directory in $ac_dir_suffix.
  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
  case $ac_top_builddir_sub in
  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
  esac ;;
esac
ac_abs_top_builddir=$ac_pwd
ac_abs_builddir=$ac_pwd$ac_dir_suffix
# for backward compatibility:
ac_top_builddir=$ac_top_build_prefix

case $srcdir in
  .)  # We are building in place.
    ac_srcdir=.
    ac_top_srcdir=$ac_top_builddir_sub
    ac_abs_top_srcdir=$ac_pwd ;;
  [\\/]* | ?:[\\/]* )  # Absolute name.
    ac_srcdir=$srcdir$ac_dir_suffix;
    ac_top_srcdir=$srcdir
    ac_abs_top_srcdir=$srcdir ;;
  *) # Relative name.
    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
    ac_top_srcdir=$ac_top_build_prefix$srcdir
    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix


  case $ac_mode in
  :F)
  #
  # CONFIG_FILE
  #

  case $INSTALL in
  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
  esac
  ac_MKDIR_P=$MKDIR_P
  case $MKDIR_P in
  [\\/$]* | ?:[\\/]* ) ;;
  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
  esac
_ACEOF

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# If the template does not know about datarootdir, expand it.
# FIXME: This hack should be removed a few years after 2.60.
ac_datarootdir_hack=; ac_datarootdir_seen=
ac_sed_dataroot='
/datarootdir/ {
  p
  q
}
/@datadir@/p
/@docdir@/p
/@infodir@/p
/@localedir@/p
/@mandir@/p'
case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
*datarootdir*) ac_datarootdir_seen=yes;;
*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  ac_datarootdir_hack='
  s&@datadir@&$datadir&g
  s&@docdir@&$docdir&g
  s&@infodir@&$infodir&g
  s&@localedir@&$localedir&g
  s&@mandir@&$mandir&g
  s&\\\${datarootdir}&$datarootdir&g' ;;
esac
_ACEOF

# Neutralize VPATH when `$srcdir' = `.'.
# Shell code in configure.ac might set extrasub.
# FIXME: do we really want to maintain this feature?
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_sed_extra="$ac_vpsub
$extrasub
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
s|@configure_input@|$ac_sed_conf_input|;t t
s&@top_builddir@&$ac_top_builddir_sub&;t t
s&@top_build_prefix@&$ac_top_build_prefix&;t t
s&@srcdir@&$ac_srcdir&;t t
s&@abs_srcdir@&$ac_abs_srcdir&;t t
s&@top_srcdir@&$ac_top_srcdir&;t t
s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
s&@builddir@&$ac_builddir&;t t
s&@abs_builddir@&$ac_abs_builddir&;t t
s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
s&@INSTALL@&$ac_INSTALL&;t t
s&@MKDIR_P@&$ac_MKDIR_P&;t t
$ac_datarootdir_hack
"
eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5

test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
      "$ac_tmp/out"`; test -z "$ac_out"; } &&
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined.  Please make sure it is defined" >&5
printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined.  Please make sure it is defined" >&2;}

  rm -f "$ac_tmp/stdin"
  case $ac_file in
  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
  esac \
  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
 ;;
  :H)
  #
  # CONFIG_HEADER
  #
  if test x"$ac_file" != x-; then
    {
      printf "%s\n" "/* $configure_input  */" >&1 \
      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
    } >"$ac_tmp/config.h" \
      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
    else
      rm -f "$ac_file"
      mv "$ac_tmp/config.h" "$ac_file" \
	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
    fi
  else
    printf "%s\n" "/* $configure_input  */" >&1 \
      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
      || as_fn_error $? "could not create -" "$LINENO" 5
  fi
# Compute "$ac_file"'s index in $config_headers.
_am_arg="$ac_file"
_am_stamp_count=1
for _am_header in $config_headers :; do
  case $_am_header in
    $_am_arg | $_am_arg:* )
      break ;;
    * )
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  esac
done
echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$_am_arg" : 'X\(//\)[^/]' \| \
	 X"$_am_arg" : 'X\(//\)$' \| \
	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"$_am_arg" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`/stamp-h$_am_stamp_count
 ;;

  :C)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
 ;;
  esac


  case $ac_file$ac_mode in
    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
  # Older Autoconf quotes --file arguments for eval, but not when files
  # are listed without --file.  Let's play safe and only enable the eval
  # if we detect the quoting.
  # TODO: see whether this extra hack can be removed once we start
  # requiring Autoconf 2.70 or later.
  case $CONFIG_FILES in #(
  *\'*) :
    eval set x "$CONFIG_FILES" ;; #(
  *) :
    set x $CONFIG_FILES ;; #(
  *) :
     ;;
esac
  shift
  # Used to flag and report bootstrapping failures.
  am_rc=0
  for am_mf
  do
    # Strip MF so we end up with the name of the file.
    am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
    # Check whether this is an Automake generated Makefile which includes
    # dependency-tracking related rules and includes.
    # Grep'ing the whole file directly is not great: AIX grep has a line
    # limit of 2048, but all sed's we know have understand at least 4000.
    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
      || continue
    am_dirpart=`$as_dirname -- "$am_mf" ||
$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
	 X"$am_mf" : 'X\(//\)[^/]' \| \
	 X"$am_mf" : 'X\(//\)$' \| \
	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X"$am_mf" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)[^/].*/{
	    s//\1/
	    q
	  }
	  /^X\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
    am_filepart=`$as_basename -- "$am_mf" ||
$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
	 X"$am_mf" : 'X\(//\)$' \| \
	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
printf "%s\n" X/"$am_mf" |
    sed '/^.*\/\([^/][^/]*\)\/*$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\/\)$/{
	    s//\1/
	    q
	  }
	  /^X\/\(\/\).*/{
	    s//\1/
	    q
	  }
	  s/.*/./; q'`
    { echo "$as_me:$LINENO: cd "$am_dirpart" \
      && sed -e '/# am--include-marker/d' "$am_filepart" \
        | $MAKE -f - am--depfiles" >&5
   (cd "$am_dirpart" \
      && sed -e '/# am--include-marker/d' "$am_filepart" \
        | $MAKE -f - am--depfiles) >&5 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } || am_rc=$?
  done
  if test $am_rc -ne 0; then
    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "Something went wrong bootstrapping makefile fragments
    for automatic dependency tracking.  If GNU make was not used, consider
    re-running the configure script with MAKE=\"gmake\" (or whatever is
    necessary).  You can also try re-running configure with the
    '--disable-dependency-tracking' option to at least be able to build
    the package (albeit without support for automatic dependency tracking).
See \`config.log' for more details" "$LINENO" 5; }
  fi
  { am_dirpart=; unset am_dirpart;}
  { am_filepart=; unset am_filepart;}
  { am_mf=; unset am_mf;}
  { am_rc=; unset am_rc;}
  rm -f conftest-deps.mk
}
 ;;

  esac
done # for ac_tag


as_fn_exit 0
_ACEOF
ac_clean_files=$ac_clean_files_save

test $ac_write_fail = 0 ||
  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5


# configure is writing to config.log, and then calls config.status.
# config.status does its own redirection, appending to config.log.
# Unfortunately, on DOS this fails, as config.log is still kept open
# by configure, so config.status won't be able to write to it; its
# output is simply discarded.  So we exec the FD to /dev/null,
# effectively closing config.log, so it can be properly (re)opened and
# appended to by config.status.  When coming back to configure, we
# need to make the FD available again.
if test "$no_create" != yes; then
  ac_cs_success=:
  ac_config_status_args=
  test "$silent" = yes &&
    ac_config_status_args="$ac_config_status_args --quiet"
  exec 5>/dev/null
  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
  exec 5>>config.log
  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
  # would make configure fail if this is the last instruction.
  $ac_cs_success || as_fn_exit 1
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   FreeFEM used download: $enable_download " >&5
printf "%s\n" "$as_me:   FreeFEM used download: $enable_download " >&6;}
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   --  Dynamic load facility: $ff_dynload " >&5
printf "%s\n" "$as_me:   --  Dynamic load facility: $ff_dynload " >&6;}
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   --  ARPACK (eigen value): $ff_arpack_ok " >&5
printf "%s\n" "$as_me:   --  ARPACK (eigen value): $ff_arpack_ok " >&6;}
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   --  UMFPACK (sparse solver): $ff_umfpack_ok " >&5
printf "%s\n" "$as_me:   --  UMFPACK (sparse solver): $ff_umfpack_ok " >&6;}
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   --  BLAS: $ff_blas_ok " >&5
printf "%s\n" "$as_me:   --  BLAS: $ff_blas_ok " >&6;}
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   --  with MPI:     $ff_mpi" >&5
printf "%s\n" "$as_me:   --  with MPI:     $ff_mpi" >&6;}
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:     --  with PETSc: $ff_petsc_ok / PETSc complex: $ff_petsccomplex_ok " >&5
printf "%s\n" "$as_me:     --  with PETSc: $ff_petsc_ok / PETSc complex: $ff_petsccomplex_ok " >&6;};
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:     --  with SLEPc: $ff_slepc_ok / SLEPc complex: $ff_slepccomplex_ok " >&5
printf "%s\n" "$as_me:     --  with SLEPc: $ff_slepc_ok / SLEPc complex: $ff_slepccomplex_ok " >&6;};
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:     --  with hpddm: $enable_hpddm " >&5
printf "%s\n" "$as_me:     --  with hpddm: $enable_hpddm " >&6;};
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:     --  with htool: $enable_htool " >&5
printf "%s\n" "$as_me:     --  with htool: $enable_htool " >&6;};
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:     --  with bemtool: $enable_bemtool (need boost: $enable_boost and htool: $enable_htool) " >&5
printf "%s\n" "$as_me:     --  with bemtool: $enable_bemtool (need boost: $enable_boost and htool: $enable_htool) " >&6;};
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   --  without libs: $ff_unlib_plugin " >&5
printf "%s\n" "$as_me:   --  without libs: $ff_unlib_plugin " >&6;};
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   --  without plugins: $ff_uncompile_plugin " >&5
printf "%s\n" "$as_me:   --  without plugins: $ff_uncompile_plugin " >&6;};


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:     progs: $ff_progs " >&5
printf "%s\n" "$as_me:     progs: $ff_progs " >&6;}
if test  "$ff_umfpack_download" = yes -a  -n "$TOOL_COMPILE_umfpack" ;then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:       use of download UMFPACK see  3rdparty/umfpack/SuiteSparse/UMFPACK/README.txt for the License" >&5
printf "%s\n" "$as_me:       use of download UMFPACK see  3rdparty/umfpack/SuiteSparse/UMFPACK/README.txt for the License" >&6;}
fi
if test "$ff_arpack_download" = yes -a  -n "$TOOL_COMPILE_arpack"  ; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:       use of download ARPACK see  3rdparty/arpack/ARPACK/README  no License " >&5
printf "%s\n" "$as_me:       use of download ARPACK see  3rdparty/arpack/ARPACK/README  no License " >&6;}
fi

if test "$enable_download" = yes; then
  if test -n "$ff_DOWNLOAD_FFTW"; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:       use of download fftw   see  3rdparty/fftw/fftw-3.2/COPYRIGHT " >&5
printf "%s\n" "$as_me:       use of download fftw   see  3rdparty/fftw/fftw-3.2/COPYRIGHT " >&6;}
  fi
  if test -n "$TOOL_COMPILE_tetgen"; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:       use of download tetgen  see 3rdparty/tetgen/tetgen1.5.1-beta/LICENSE " >&5
printf "%s\n" "$as_me:       use of download tetgen  see 3rdparty/tetgen/tetgen1.5.1-beta/LICENSE " >&6;}
  fi
  if test -n "$TOOL_COMPILE_yams"; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:       use of download freeyams  see 3rdparty/yams/freeyams.2011.02.22 (suface mesh adaptation)  " >&5
printf "%s\n" "$as_me:       use of download freeyams  see 3rdparty/yams/freeyams.2011.02.22 (suface mesh adaptation)  " >&6;}
  fi
  if test -n "$TOOL_COMPILE_mmg3d"; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:       use of download mmg3d (v4)   see 3rdparty/mmg3d/mmg3d4/LICENCE.txt  " >&5
printf "%s\n" "$as_me:       use of download mmg3d (v4)   see 3rdparty/mmg3d/mmg3d4/LICENCE.txt  " >&6;}
  fi
  if test -n "$TOOL_COMPILE_mmg"; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:       use of download mmg  see 3rdparty/mmg/mmg-sources/LICENSE " >&5
printf "%s\n" "$as_me:       use of download mmg  see 3rdparty/mmg/mmg-sources/LICENSE " >&6;}
  fi
  if test -n "$TOOL_COMPILE_parmmg"; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:       use of download parmmg  see 3rdparty/parmmg/parmmg-sources/LICENSE " >&5
printf "%s\n" "$as_me:       use of download parmmg  see 3rdparty/parmmg/parmmg-sources/LICENSE " >&6;}
  fi
  if test -n "$TOOL_COMPILE_parmetis"; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:       use of download parmetis" >&5
printf "%s\n" "$as_me:       use of download parmetis" >&6;}
  fi

  # ALH - some tools may be activated but not downloaded if a local version is specified (see
  # [[TOOL_PARAMETERS]])

  if test "$enable_superlu_download" = yes; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:       use of download superlu" >&5
printf "%s\n" "$as_me:       use of download superlu" >&6;}
  fi

  if test -n "$MPICC"; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:       try to download: $ff_download_lib" >&5
printf "%s\n" "$as_me:       try to download: $ff_download_lib" >&6;}
  fi

  if test "$enable_boost" = yes; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:       use of download boost        see 3rdparty/boost/LICENSE_1_0.txt  " >&5
printf "%s\n" "$as_me:       use of download boost        see 3rdparty/boost/LICENSE_1_0.txt  " >&6;}
  fi

  if test "$ff_download_blas" = "generic"; then
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:       use of download generic blas and cblas freefem may be slow  " >&5
printf "%s\n" "$as_me:       use of download generic blas and cblas freefem may be slow  " >&6;}
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:       you can try to use the  Kazushige Goto s BLAS at http://www.cs.utexas.edu/users/flame/goto/  " >&5
printf "%s\n" "$as_me:       you can try to use the  Kazushige Goto s BLAS at http://www.cs.utexas.edu/users/flame/goto/  " >&6;}
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:           or at  http://www.tacc.utexas.edu/~kgoto/ for the best BLAS ." >&5
printf "%s\n" "$as_me:           or at  http://www.tacc.utexas.edu/~kgoto/ for the best BLAS ." >&6;}
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}:       or try to 3rdparty/compile the altas blas ." >&5
printf "%s\n" "$as_me:       or try to 3rdparty/compile the altas blas ." >&6;}
  fi

  # ALH - 30/10/13 - (request from FH) all downloads are now part of a separate script ([[file:3rdparty/getall]])
  # which needs to be run before make for the user to specify whether he is ok with each of the package licences.

  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:       Please run \"3rdparty/getall\" to download all necessary packages before running make" >&5
printf "%s\n" "$as_me:       Please run \"3rdparty/getall\" to download all necessary packages before running make" >&6;}
fi

# FFCS does not use glut, so remove this message because it could make the user think that something is broken

if test $enable_ffcs = no
then
    if test "$ff_glut_ok" != yes  ; then
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:      *********************************************** " >&5
printf "%s\n" "$as_me:      *********************************************** " >&6;}
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:      WARNING: you do not have the new grachics tools " >&5
printf "%s\n" "$as_me:      WARNING: you do not have the new grachics tools " >&6;}
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:          because the configure do not find OpenGL, GLUT or pthread  developer stuff " >&5
printf "%s\n" "$as_me:          because the configure do not find OpenGL, GLUT or pthread  developer stuff " >&6;}
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:          read the README to find missing package  " >&5
printf "%s\n" "$as_me:          read the README to find missing package  " >&6;}
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:          F. Hecht  " >&5
printf "%s\n" "$as_me:          F. Hecht  " >&6;}
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:  to install missing package  under debian or ubuntu, try: sudo apt-get install freeglut3-dev " >&5
printf "%s\n" "$as_me:  to install missing package  under debian or ubuntu, try: sudo apt-get install freeglut3-dev " >&6;}
	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:      *********************************************** " >&5
printf "%s\n" "$as_me:      *********************************************** " >&6;}
    fi
fi

if test "$enable_summary" = yes; then
  if test "$enable_fortran" != yes; then
    enable_fortran=no
  fi
  if test "$enable_gmm" != yes; then
    enable_gmm=no
  fi
  if test "$ff_mkl" != yes; then
    ff_mkl=no
  fi
  if test -n "$ff_pthread"; then
    ff_pthread_ok=yes
  else
    ff_pthread_ok=no
  fi


  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  Activated libraries " >&5
printf "%s\n" "$as_me:  Activated libraries " >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - ARPACK: $ff_arpack_ok" >&5
printf "%s\n" "$as_me:  - ARPACK: $ff_arpack_ok" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - BLACS: $ff_blacs_ok" >&5
printf "%s\n" "$as_me:  - BLACS: $ff_blacs_ok" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - BEMTOOL: $enable_bemtool" >&5
printf "%s\n" "$as_me:  - BEMTOOL: $enable_bemtool" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - BOOST: $enable_boost" >&5
printf "%s\n" "$as_me:  - BOOST: $enable_boost" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - FFTW3: $ff_fftw_" >&5
printf "%s\n" "$as_me:  - FFTW3: $ff_fftw_" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - FORTRAN: $enable_fortran" >&5
printf "%s\n" "$as_me:  - FORTRAN: $enable_fortran" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - FREEYAMS: $ff_freeyams_ok" >&5
printf "%s\n" "$as_me:  - FREEYAMS: $ff_freeyams_ok" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - GMM: $enable_gmm" >&5
printf "%s\n" "$as_me:  - GMM: $enable_gmm" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - GSL: $ff_with_gsl" >&5
printf "%s\n" "$as_me:  - GSL: $ff_with_gsl" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - HDF5: $with_hdf5" >&5
printf "%s\n" "$as_me:  - HDF5: $with_hdf5" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - HTOOL: $enable_htool" >&5
printf "%s\n" "$as_me:  - HTOOL: $enable_htool" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - HPDDM: $enable_hpddm" >&5
printf "%s\n" "$as_me:  - HPDDM: $enable_hpddm" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - IPOPT: $ff_ipopt_" >&5
printf "%s\n" "$as_me:  - IPOPT: $ff_ipopt_" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - LIBSEQ: $ff_libseq_ok" >&5
printf "%s\n" "$as_me:  - LIBSEQ: $ff_libseq_ok" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - METIS: $ff_metis_" >&5
printf "%s\n" "$as_me:  - METIS: $ff_metis_" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - MKL: $ff_mkl" >&5
printf "%s\n" "$as_me:  - MKL: $ff_mkl" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - MMG3D: $ff_mmg3d_ok" >&5
printf "%s\n" "$as_me:  - MMG3D: $ff_mmg3d_ok" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - MMG: $ff_mmg_" >&5
printf "%s\n" "$as_me:  - MMG: $ff_mmg_" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - PARMMG: $ff_parmmg_" >&5
printf "%s\n" "$as_me:  - PARMMG: $ff_parmmg_" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - MPI: $ff_mpi" >&5
printf "%s\n" "$as_me:  - MPI: $ff_mpi" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - MSHMET: $ff_mshmet_" >&5
printf "%s\n" "$as_me:  - MSHMET: $ff_mshmet_" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - MUMPS: $ff_mumps_" >&5
printf "%s\n" "$as_me:  - MUMPS: $ff_mumps_" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - MUMPS_ptscotch: $ff_mumps_ptscotch_ok" >&5
printf "%s\n" "$as_me:  - MUMPS_ptscotch: $ff_mumps_ptscotch_ok" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - MUMPS_scotch: $ff_mumps_scotch_ok" >&5
printf "%s\n" "$as_me:  - MUMPS_scotch: $ff_mumps_scotch_ok" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - MUMPS_seq: $ff_mumps_seq_" >&5
printf "%s\n" "$as_me:  - MUMPS_seq: $ff_mumps_seq_" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - NLOPT: $ff_nlopt_ok" >&5
printf "%s\n" "$as_me:  - NLOPT: $ff_nlopt_ok" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - PARMETIS: $ff_parmetis_" >&5
printf "%s\n" "$as_me:  - PARMETIS: $ff_parmetis_" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - PETSC: $ff_petsc_ok" >&5
printf "%s\n" "$as_me:  - PETSC: $ff_petsc_ok" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - PETSCCOMPLEX: $ff_petsccomplex_ok" >&5
printf "%s\n" "$as_me:  - PETSCCOMPLEX: $ff_petsccomplex_ok" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - PTHREAD: $ff_pthread_ok" >&5
printf "%s\n" "$as_me:  - PTHREAD: $ff_pthread_ok" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - PTSCOTCH: $ff_ptscotch_ok" >&5
printf "%s\n" "$as_me:  - PTSCOTCH: $ff_ptscotch_ok" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - SCALAPACK: $ff_scalapack_ok" >&5
printf "%s\n" "$as_me:  - SCALAPACK: $ff_scalapack_ok" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - SCOTCH: $ff_scotch_" >&5
printf "%s\n" "$as_me:  - SCOTCH: $ff_scotch_" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - SLEPC: $ff_slepc_ok" >&5
printf "%s\n" "$as_me:  - SLEPC: $ff_slepc_ok" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - SLEPCCOMPLEX: $ff_slepccomplex_ok" >&5
printf "%s\n" "$as_me:  - SLEPCCOMPLEX: $ff_slepccomplex_ok" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - SUPERLU: $ff_superlu_ok" >&5
printf "%s\n" "$as_me:  - SUPERLU: $ff_superlu_ok" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - TETGEN: $ff_tetgen_" >&5
printf "%s\n" "$as_me:  - TETGEN: $ff_tetgen_" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  - UMFPACK: $ff_umfpack_" >&5
printf "%s\n" "$as_me:  - UMFPACK: $ff_umfpack_" >&6;}
fi
if test "${prefix_petsc}" != no -a   ! \( -d "${prefix_petsc}/real/lib"  -o  -d "${prefix_petsc}/r/lib" \) ; then
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}:  PETSc directories do not exist, to build do:" >&5
printf "%s\n" "$as_me:  PETSc directories do not exist, to build do:" >&6;}
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: cd 3rdparty/ff-petsc && make" >&5
printf "%s\n" "$as_me: cd 3rdparty/ff-petsc && make" >&6;}
fi

