#!/bin/sh

# @HEADER
# ************************************************************************
# 
#                              Sundance
#                 Copyright (2005) Sandia Corporation
# 
# Copyright (year first published) Sandia Corporation.  Under the terms 
# of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government 
# retains certain rights in this software.
# 
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2.1 of the
# License, or (at your option) any later version.
#  
# This library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#                                                                                 
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA                                                                                
# Questions? Contact Kevin Long (krlong@sandia.gov), 
# Sandia National Laboratories, Livermore, California, USA
# 
# ************************************************************************
# @HEADER

###--with-fiat=$HOME/Projects/FIAT/BUILD \


# Set this to your Trilinos build directory
TRILINOS_BUILD_DIR=/scratch1/bartv/Trilinos/CATA_MPI_Sundance_DEBUG
# bvbw - took out following from the configure line
# --with-install="/usr/bin/install -c -p" \

BUILD_DIR=`pwd`

#reddish.sandia.gov
#PGI 6.0 cross for Red Storm:
module load PrgEnv-pgi
../configure --cache-file=config.cache --host=i686-intel-linux \
--with-gnumake \
--with-libs="-L/dev/null" --enable-mpi --with-mpi-incdir="" \
--with-mpi-libdir="" --with-mpi-libs="" \
CC="cc -tp k8-64 -g -O0" \
CXX="CC -tp k8-64 -g -O0" \
F77="ftn -tp k8-64 -g -O0" \
CPPFLAGS="-DMPICH_SKIP_MPICXX -DNDEBUG" \
CFLAGS="" CXXFLAGS="" FFLAGS="" LDFLAGS=" " \
FLIBS="-lpgf90 -lpgf90_rpm1 -lpgf902 -lpgf90rtl -lpgftnrtl" \
        --with-ar="ar rcv" \
--with-incdirs="-I/usr/include" \
--with-trilinos=$TRILINOS_BUILD_DIR \
--with-trilinos-devel \
--prefix=$BUILD_DIR

