Changeset 14171


Ignore:
Timestamp:
12/17/12 08:38:24 (12 years ago)
Author:
Mathieu Morlighem
Message:

CHG: added checks that gfortran and X11 libraries exist + added suggestion from petsc and mpi

File:
1 edited

Legend:

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

    r14088 r14171  
    10451045                dnl check that --with-fortran-lib may have been provided
    10461046                if test -n "$FORTRAN_LIB" ; then
    1047                         FORTRANLIB="$FORTRAN_LIB"
    1048                         AC_DEFINE([_HAVE_FORTRAN_],[1],[with FORTRAN in ISSM src])
    1049                         AC_SUBST([FORTRANLIB])
     1047                        dnl check that library provided EXISTS!
     1048                        if test -f "$FORTRAN_LIB"; then
     1049                                FORTRANLIB="$FORTRAN_LIB"
     1050                                AC_DEFINE([_HAVE_FORTRAN_],[1],[with FORTRAN in ISSM src])
     1051                                AC_SUBST([FORTRANLIB])
     1052                        else
     1053                         if test "x$HAVE_MPI" = "xyes"; then
     1054                                FORTRANLIB=$(mpif77 -print-file-name="libgfortran.a")
     1055                                if test -f "$FORTRANLIB"; then
     1056                                         AC_MSG_ERROR([fortran library provided ($FORTRAN_LIB) does not exist, MPI suggests the following library: $FORTRANLIB]);
     1057                                fi
     1058                         fi
     1059                                AC_MSG_ERROR([frtran library provided ($FORTRAN_LIB$) does not exist!]);
     1060                        fi
    10501061                fi
    10511062                AC_MSG_RESULT(done)
     
    10591070
    10601071        dnl check that --with-graphics-lib may have been provided
     1072       
    10611073        if test -n "$GRAPHICS_LIB" ; then
    1062                 HAVE_GRAPHICS=yes
    1063                 GRAPHICSLIB="$GRAPHICS_LIB"
    1064 
    1065                 AC_DEFINE([_HAVE_GRAPHICS_],[1],[with GRAPHICS in ISSM src])
    1066                 AC_SUBST([GRAPHICSLIB])
     1074                dnl check that library provided EXISTS!
     1075                if test -f "$GRAPHICS_LIB"; then
     1076                        HAVE_GRAPHICS=yes
     1077                        GRAPHICSLIB="$GRAPHICS_LIB"
     1078                        AC_DEFINE([_HAVE_GRAPHICS_],[1],[with GRAPHICS in ISSM src])
     1079                        AC_SUBST([GRAPHICSLIB])
     1080                else
     1081                        if test -f "$PETSC_ROOT/conf/petscvariables"; then
     1082                                GRAPHICSLIB=$(cat $PETSC_ROOT/conf/petscvariables | grep X_LIB)
     1083                                AC_MSG_ERROR([graphics library provided ($GRAPHICS_LIB) does not exist, PETSc suggests the following library: $GRAPHICSLIB]);
     1084                        fi
     1085                        AC_MSG_ERROR([graphics library provided ($GRAPHICS_LIB$) does not exist!]);
     1086                fi
    10671087        fi
    10681088        AC_MSG_RESULT(done)
Note: See TracChangeset for help on using the changeset viewer.