Changeset 11736


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

Added gsl support + relaxed constraints on presence of PETSC to compile.
Also added a fold where we should put all the checks post-m4 configuration.

File:
1 edited

Legend:

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

    r11696 r11736  
    375375        AC_MSG_RESULT($HAVE_ADIC2)
    376376        dnl }}}
     377        dnl gsl{{{1
     378        AC_ARG_WITH([gsl-dir],
     379                          AS_HELP_STRING([--with-gsl-dir = DIR], [gsl root directory.]),
     380                         [GSL_ROOT=$withval],[GSL_ROOT=""])
     381        AC_MSG_CHECKING(for Gsl)
     382       
     383        if test -d "$GSL_ROOT"; then
     384
     385                dnl defaults
     386                HAVE_GSL=yes
     387                GSLINCL="-I$GSL_ROOT/include"
     388                GSLLIB="-L$GSL_ROOT/lib/ -lgsl -lgslcblas -lm"
     389
     390                AC_DEFINE([_HAVE_GSL_],[1],[with gsl in ISSM src])
     391                AC_SUBST([GSLINCL])
     392                AC_SUBST([GSLLIB])
     393
     394        else
     395                HAVE_GSL=no
     396        fi
     397        AM_CONDITIONAL([GSL], [test x$HAVE_GSL = xyes])
     398        AC_MSG_RESULT($HAVE_GSL)
     399        dnl }}}
    377400        dnl rose{{{1
    378401        AC_ARG_WITH([rose-dir],
     
    479502                                                         [mpi include directory, necessary for parallel build]),
    480503                          [MPI_INCLUDE=$withval],[MPI_INCLUDE=""])
    481 
    482         dnl check that --with-mpi-include and --with-mpi-lib have been provided
     504       
    483505        if test -z "$MPILIB" ; then
    484                 if test "$PARALLEL_VALUE" = "yes" ; then
    485                         AC_MSG_ERROR([empty --with-mpi-lib options! MPI is needed to run ISSM in parallel!])
    486                 fi
     506                HAVE_MPI=no
    487507        else
    488508                if test -z "$MPI_INCLUDE" ; then
    489                         if test "$PARALLEL_VALUE" = "yes" ; then
    490                                 AC_MSG_ERROR([empty --with-mpi-include directory! MPI is needed to run ISSM in parallel!])
    491                         fi
     509                        HAVE_MPI=no
    492510                else
    493                         HAVE_MPI=yes
    494511                        MPIINCL=-I"$MPI_INCLUDE/"
    495                        
    496512                        AC_DEFINE([_HAVE_MPI_],[1],[with Mpi in ISSM src])
    497513                        AC_DEFINE([HAVE_MPI],[1],[with Mpi in ISSM src])
     
    11421158        AM_CONDITIONAL([THREED], [test x$HAVE_THREED = xyes])
    11431159        AC_MSG_RESULT($HAVE_THREED)
     1160        dnl }}}
     1161        dnl checks{{{1
     1162        AC_MSG_CHECKING(checking consistency between all libraries)
     1163       
     1164        dnl check that if petsc is requested in parallel, mpi should be specified
     1165        if test "$HAVE_PETSC" = "yes" ; then
     1166                if test "$HAVE_MPI" = "NO";  then
     1167                        AC_MSG_ERROR([petsc requires mpi!]);
     1168                fi
     1169        fi
     1170        AC_MSG_RESULT(done)
    11441171        dnl }}}
    11451172
Note: See TracChangeset for help on using the changeset viewer.