#!/bin/sh

# This file is generated by the configure script.

# use debugging code:                         no
# MPI (Message Passing Interface) support:    yes


# C compiler used for build: icc (ICC) 17.0.6 20171215
# --------------------------
# Intel(R) C Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 17.0.6.256 Build 20171215
# Copyright (C) 1985-2018 Intel Corporation.  All rights reserved.
# 
# Edison Design Group C/C++ Front End, version 4.11 (Dec 15 2017 02:29:03)
# Copyright 1988-2016 Edison Design Group, Inc.
# 
# GNU ld version 2.27-34.base.el7

cc=mpicc


# Package Version
#----------------

version="2.0.2"


# Installation directories
#-------------------------

prefix="/ccc/cont005/home/pa4787/moulinec/INTEL_17.0.6.256_OMPI_2.0.4_SKYLAKE/CS_5.3_PRACE_UEABS/code_saturne-5.3_GPU_VERSION_UEABS/arch/Linux"
exec_prefix="${prefix}"
includedir="${prefix}/include"
libdir="${exec_prefix}/lib"

cppflags=""
cflags=""
ldflags=""
libs="  -lm"

build_cppflags="  -DNDEBUG"
build_cflags="-strict-ansi -std=c99 -funsigned-char -Wall -Wcheck -Wshadow -Wpointer-arith -Wmissing-prototypes -Wuninitialized -Wunused -O3 -xCORE-AVX512 -Ofast -qopenmp"
build_ldflags="  -O -qopenmp"
build_libs="  -lm"

mpi_cppflags=""
mpi_cflags=""
mpi_ldflags=""
mpi_libs=""


# Output info depending on command-line options
#----------------------------------------------

if test $# -eq 0; then
  show_help=yes

else
  for opt in $*
  do
    case $opt in
      --prefix)
        output="${output} $prefix"
        ;;
      --exec-prefix)
        if test "$exec_prefix" != "" ; then
          output="${output} $exec_prefix"
        else
          output="${output} $prefix/bin"
        fi
        ;;
      --includedir)
        if test "$includedir" != "" ; then
          output="${output} $includedir"
        else
          output="${output} $prefix/include"
        fi
        ;;
      --version)
        output="${output} $version"
        ;;
      --cppflags)
        echo_cppflags=yes
        ;;
      --cflags)
        echo_cflags=yes
        ;;
      --ldflags)
        echo_ldflags=yes
        ;;
      --libs)
        echo_libs=yes
        ;;
      --cc)
        output="${output} $cc"
        ;;
      -*)
        show_help=yes
        ;;
      *)
        scope=$opt
        ;;
    esac
  done
fi

if test "$show_help" = "yes"; then
  cat <<EOF
Usage: ple-config options scope

Options:
        --prefix            installation path prefix
        --exec-prefix       system-dependent path prefix
        --includedir        C header files path
        --version           library version

        --cppflags          C preprocessor flags (e.g. -D<macro>, ...)
        --cflags            C flags (e.g. -O, -g, ...)
        --ldflags           linker flags (e.g. -g, -L<path>, ...)
        --libs              librairies used (e.g. -l<libname>)

        --cc                C compiler used for build

Scope:
        use (default)       Options required for user code
        build               Options used for build
        mpi
EOF
  exit 1
fi

case "$scope" in
  build)
    cppflags=$build_cppflags
    cflags=$build_cflags
    ldflags=$build_ldflags
    libs=$build_libs
    ;;
  mpi)
    cppflags=$mpi_cppflags
    cflags=$mpi_cflags
    ldflags=$mpi_ldflags
    libs=$mpi_libs
    ;;
esac

if test "$echo_cppflags" = "yes" ; then
  output="${output} $cppflags"
fi
if test "$echo_cflags" = "yes" ; then
  output="${output} $cflags"
fi
if test "$echo_ldflags" = "yes" ; then
  output="${output} $ldflags"
fi
if test "$echo_libs" = "yes" ; then
  output="${output} $libs"
fi

if test "$output" != "" ; then
  echo $output
fi

