[cig-commits] [commit] rajesh-petsc-schur: Readd PETSc check to configure.ac (3839f49)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Nov 5 19:15:23 PST 2014


Repository : https://github.com/geodynamics/citcoms

On branch  : rajesh-petsc-schur
Link       : https://github.com/geodynamics/citcoms/compare/464e1b32299b15819f93efd98d969cddb84dfe51...f97ae655a50bdbd6dac1923a3471ee4dae178fbd

>---------------------------------------------------------------

commit 3839f495e7ec83619c8a6b2b5d856148b5c1ade9
Author: Eric Heien <emheien at ucdavis.edu>
Date:   Tue Oct 14 12:53:52 2014 -0700

    Readd PETSc check to configure.ac


>---------------------------------------------------------------

3839f495e7ec83619c8a6b2b5d856148b5c1ade9
 configure.ac | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/configure.ac b/configure.ac
index 133b219..70e6a6d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,6 +33,13 @@ AC_CONFIG_MACRO_DIR([m4])
 AM_INIT_AUTOMAKE([foreign])
 
 # 'configure' options
+AC_ARG_WITH([petsc],
+     [AC_HELP_STRING([--with-petsc],
+         [use PETSc library @<:@default=no@:>@])],
+     [want_petsc="$withval"],
+     [want_petsc=no])
+AM_CONDITIONAL([COND_PETSC], [test "$want_petsc" = yes])
+
 CIT_ARG_HDF5([auto])
 AC_ARG_VAR(HC_HOME, [home path to HC program, used by --with-ggrd])
 AC_ARG_WITH([ggrd],
@@ -55,6 +62,12 @@ AC_PROG_CXX([mpicxx mpic++ mpiCC hcp mpCC mpxlC mpxlC_r cmpic++ g++ c++ gpp aCC
 # Checking a system header here so that CPP is always defined
 AC_CHECK_HEADERS([malloc.h])
 
+if test "$want_petsc" = yes; then
+  CIT_PATH_PETSC(3.5.2,[CPPFLAGS="-DUSE_PETSC $CPPFLAGS"],[AC_MSG_ERROR([PETSc 3.5.1 library not found])])
+  CIT_HEADER_PETSC
+  CIT_CHECK_LIB_PETSC
+fi
+
 # We don't need Fortran.
 AC_PROVIDE([AC_PROG_F77])
 AC_PROG_LIBTOOL
@@ -155,6 +168,7 @@ echo -e "\t LDFLAGS: " $LDFLAGS
 echo -e "\t LIBS: " $LIBS
 echo -e "\t with-hdf5: " $want_hdf5
 echo -e "\t with-ggrd: " $want_ggrd
+echo -e "\t with-petsc: " $want_petsc
 echo
 
 dnl end of configure.ac



More information about the CIG-COMMITS mailing list