#!/bin/sh

#petsc 3.2
#mpich 1.4

./configure \
	--prefix=$ISSM_DIR \
	--with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
	--with-matlab-dir=$MATLAB_DIR \
	--with-python-dir=$ISSM_DIR/externalpackages/python/install\
	--with-python-numpy-dir=$ISSM_DIR/externalpackages/python/install/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy\
	--with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
	--with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include  \
	--with-mpi-lib=" $ISSM_DIR/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpl.a " \
	--with-fortran-lib="/usr/local/gfortran/lib/gcc/x86_64-apple-darwin10/4.6.2/libgfortran.a" \
	--with-math-lib="/usr/lib/libm.dylib" \
	--with-graphics-lib="/usr/X11/lib/libX11.dylib" \
	--with-cxxoptflags=" -fno-common -no-cpp-precomp -fexceptions -arch i386 -DMX_COMPAT_32 -O3 -DNDEBUG -w "\
	--with-numthreads=8 \
	--with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install  \
	--with-petsc-arch=$ISSM_ARCH \
	--with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \
	--with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \
	--with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/include/ " \
	--with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \
	--with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \
	--with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ 
