Changeset 11696


Ignore:
Timestamp:
03/13/12 20:00:50 (13 years ago)
Author:
Eric.Larour
Message:

More leeway in terms of running without petsc support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/m4/issm_options.m4

    r11680 r11696  
    1919        AC_MSG_CHECKING(for serial compilation)
    2020        AM_CONDITIONAL([NOSERIAL], [test $SERIAL_VALUE = no])
     21        AM_CONDITIONAL([SERIAL], [test $SERIAL_VALUE = yes])
    2122        AC_MSG_RESULT($SERIAL_VALUE)
    2223        dnl }}}
     
    2829        AC_MSG_CHECKING(for parallel compilation)
    2930        AM_CONDITIONAL([NOPARALLEL], [test $PARALLEL_VALUE = no])
     31        AM_CONDITIONAL([PARALLEL], [test $PARALLEL_VALUE = yes])
    3032        AC_MSG_RESULT($PARALLEL_VALUE)
    3133        ISSMEXT=".exe"
     
    505507                                                         [petsc root directory, necessary for parallel build]),
    506508                          [PETSC_ROOT=$withval],[PETSC_ROOT=""])
    507 
    508         if test "$PARALLEL_VALUE" = "yes" ; then
    509                 if test "$PETSC_ROOT" = "" ; then
    510                         AC_MSG_ERROR([missing --with-petsc-dir argument for parallel compilation!])
    511                 fi
    512         fi
    513 
    514         dnl if test "$PARALLEL_VALUE" = "yes" ; then
     509               
     510        dnl Used to be necessary, not anymore.
     511        dnl if test "$PARALLEL_VALUE" = "yes" ; then
     512                dnl if test "$PETSC_ROOT" = "" ; then
     513                        dnl AC_MSG_ERROR([missing --with-petsc-dir argument for parallel compilation!])
     514                dnl fi
     515        dnl fi
     516
     517        if test -d "$PETSC_ROOT"; then
    515518                AC_MSG_CHECKING(for petsc version)
    516519                PETSC_MAJOR=`cat $PETSC_ROOT/include/petscversion.h | grep "#define PETSC_VERSION_MAJOR" | sed 's/#define PETSC_VERSION_MAJOR//' | sed 's/ //g'`
     
    519522                AC_DEFINE_UNQUOTED([_PETSC_MINOR_],$PETSC_MINOR,[ Petsc version minor])
    520523                AC_MSG_RESULT($PETSC_MAJOR.$PETSC_MINOR)
    521         dnl fi
    522        
    523                
     524        fi
     525       
    524526        AC_ARG_WITH([petsc-arch],
    525527                          AS_HELP_STRING([--with-petsc-arch = DIR],
     
    527529                          [PETSC_ARCH=$withval],[PETSC_ARCH=""])
    528530
    529         if test "$PARALLEL_VALUE" = "yes" ; then
    530                 if test "$PETSC_ARCH" = "" ; then
    531                         AC_MSG_ERROR([missing --with-petsc-arch argument for parallel compilation!])
    532                 fi
    533         fi
     531        dnl Used to be necessary, not anymore.
     532        dnl if test "$PARALLEL_VALUE" = "yes" ; then
     533                dnl if test "$PETSC_ARCH" = "" ; then
     534                        dnl AC_MSG_ERROR([missing --with-petsc-arch argument for parallel compilation!])
     535                dnl fi
     536        dnl fi
    534537       
    535538        AC_MSG_CHECKING(for Petsc headers and libraries in $PETSC_ROOT for architecture $PETSC_ARCH)
     
    573576        fi
    574577
    575         if test $HAVE_PETSC = no; then
    576                 AC_MSG_ERROR([could not find petsc. user should specify --with-petsc-dir and --with-petsc-arch options. Petsc is needed to run ISSM!])
    577         else
    578                 AC_MSG_RESULT($HAVE_PETSC)
    579         fi
     578        dnl used to e necessary, not anymore.
     579        dnl if test $HAVE_PETSC = no; then
     580                dnl AC_MSG_ERROR([could not find petsc. user should specify --with-petsc-dir and --with-petsc-arch options. Petsc is needed to run ISSM!])
     581        dnl else
     582        dnl AC_MSG_RESULT($HAVE_PETSC)
     583        dnl fi
     584       
     585        AM_CONDITIONAL([PETSC], [test x$HAVE_PETSC = xyes])
     586        AC_MSG_RESULT($HAVE_PETSC)
    580587        dnl }}}
    581588        dnl tao{{{1
Note: See TracChangeset for help on using the changeset viewer.