Changeset 15665


Ignore:
Timestamp:
07/31/13 18:02:16 (12 years ago)
Author:
Eric.Larour
Message:

CHG: corrected gsl macro to not error out when gsl is not provided

File:
1 edited

Legend:

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

    r15661 r15665  
    528528        AC_ARG_WITH([gsl-dir],
    529529          AS_HELP_STRING([--with-gsl-dir=DIR], [gsl root directory.]),
    530           [GSL_ROOT=$withval],[GSL_ROOT=""])
     530          [GSL_ROOT=$withval],[GSL_ROOT="no"])
     531
    531532        AC_MSG_CHECKING(for gsl)
    532533       
    533         if test -d "$GSL_ROOT"; then
    534 
    535                 dnl defaults
    536                 HAVE_GSL=yes
    537                 GSLINCL="-I$GSL_ROOT/include"
    538 
    539                 if test "x$HAVE_ATLAS" = "xyes" ; then
    540                         GSLLIB="-dy -L$GSL_ROOT/lib -lgsl -L$ATLAS_ROOT/lib -lcblas -latlas -lm"
     534        if test "x$GSL_ROOT" = "xno" ; then
     535                HAVE_GSL=no
     536        else
     537                if test -d "$GSL_ROOT"; then
     538
     539                        dnl defaults
     540                        HAVE_GSL=yes
     541                        GSLINCL="-I$GSL_ROOT/include"
     542
     543                        if test "x$HAVE_ATLAS" = "xyes" ; then
     544                                GSLLIB="-dy -L$GSL_ROOT/lib -lgsl -L$ATLAS_ROOT/lib -lcblas -latlas -lm"
     545                        else
     546                                GSLLIB="-dy -L$GSL_ROOT/lib -lgsl -lgslcblas -lm"
     547                        fi
     548
     549                        AC_DEFINE([_HAVE_GSL_],[1],[with gsl in ISSM src])
     550                        AC_SUBST([GSLINCL])
     551                        AC_SUBST([GSLLIB])
     552
    541553                else
    542                         GSLLIB="-dy -L$GSL_ROOT/lib -lgsl -lgslcblas -lm"
    543                 fi
    544 
    545                 AC_DEFINE([_HAVE_GSL_],[1],[with gsl in ISSM src])
    546                 AC_SUBST([GSLINCL])
    547                 AC_SUBST([GSLLIB])
    548 
    549         else
    550         AC_MSG_ERROR([gsl directory provided ($GSL_ROOT) does not exist]);
     554                        AC_MSG_ERROR([gsl directory provided ($GSL_ROOT) does not exist]);
     555                fi
    551556        fi
    552557        AM_CONDITIONAL([GSL], [test x$HAVE_GSL = xyes])
Note: See TracChangeset for help on using the changeset viewer.