Changeset 15911


Ignore:
Timestamp:
08/23/13 17:06:55 (12 years ago)
Author:
Eric.Larour
Message:

CHG: added meteoio and snowpack packages

File:
1 edited

Legend:

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

    r15845 r15911  
    610610        if test "x$HAVE_AMPI" == "xyes"; then
    611611                AMPIINCL="-I$AMPI_ROOT/include"
    612                 echo "adolc_root: |$ADOLC_ROOT|"
    613612                if test "x$ADOLC_ROOT" == "xno"; then
    614613                        AC_MSG_ERROR([cannot run adjoinable mpi without adolc]);
     
    14451444        AC_MSG_RESULT(done)
    14461445        dnl }}}
     1446        dnl meteoio{{{
     1447        AC_ARG_WITH([meteoio-dir],
     1448          AS_HELP_STRING([--with-meteoio-dir=DIR], [use meteoio in conjunction with snowpack model.]),
     1449          [METEOIO_ROOT=$withval],[METEOIO_ROOT="no"])
     1450
     1451        dnl Check whether meteoio is enabled
     1452        AC_MSG_CHECKING([for meteoio])
     1453        if test "x$METEOIO_ROOT" = "xno" ; then
     1454                HAVE_METEOIO=no
     1455        else
     1456                HAVE_METEOIO=yes
     1457                if ! test -d "$METEOIO_ROOT"; then
     1458                        AC_MSG_ERROR([meteoio directory provided ($METEOIO_ROOT) does not exist]);
     1459                fi
     1460        fi
     1461        AC_MSG_RESULT($HAVE_METEOIO)
     1462       
     1463        dnl meteoio headers and libraries
     1464        if test "x$HAVE_METEOIO" == "xyes"; then
     1465                METEOIOINCL="-I$METEOIO_ROOT/include"
     1466                METEOIOLIB="-dy -L$METEOIO_ROOT/lib  -lmeteoio "
     1467
     1468                AC_DEFINE([_HAVE_METEOIO_],[1],[with meteoio])
     1469                AC_SUBST([METEOIOINCL])
     1470                AC_SUBST([METEOIOLIB])
     1471        fi
     1472        AM_CONDITIONAL([METEOIO], [test x$HAVE_METEOIO = xyes])
     1473        dnl }}}
     1474        dnl snowpack{{{
     1475        AC_ARG_WITH([snowpack-dir],
     1476          AS_HELP_STRING([--with-snowpack-dir=DIR], [use snowpack for surface mass balance model.]),
     1477          [SNOWPACK_ROOT=$withval],[SNOWPACK_ROOT="no"])
     1478
     1479        dnl Check whether snowpack is enabled
     1480        AC_MSG_CHECKING([for snowpack])
     1481        if test "x$SNOWPACK_ROOT" = "xno" ; then
     1482                HAVE_SNOWPACK=no
     1483        else
     1484                HAVE_SNOWPACK=yes
     1485                if ! test -d "$SNOWPACK_ROOT"; then
     1486                        AC_MSG_ERROR([snowpack directory provided ($SNOWPACK_ROOT) does not exist]);
     1487                fi
     1488        fi
     1489        AC_MSG_RESULT($HAVE_SNOWPACK)
     1490       
     1491        dnl snowpack headers and libraries
     1492        if test "x$HAVE_SNOWPACK" == "xyes"; then
     1493                SNOWPACKINCL="-I$SNOWPACK_ROOT/include"
     1494                SNOWPACKLIB="-dy -L$SNOWPACK_ROOT/lib  -lsnowpack "
     1495
     1496                AC_DEFINE([_HAVE_SNOWPACK_],[1],[with snowpack for surface mass balance model])
     1497                AC_SUBST([SNOWPACKINCL])
     1498                AC_SUBST([SNOWPACKLIB])
     1499        fi
     1500        AM_CONDITIONAL([SNOWPACK], [test x$HAVE_SNOWPACK = xyes])
     1501        dnl }}}
    14471502
    14481503        dnl Capabilities
     
    18781933                        AC_MSG_ERROR([cannot compile kriging.exe under adolc conditions!]);
    18791934                fi
     1935                dnl check that if we run meteoio, we have snowpack also
     1936                  if test "$HAVE_METEOIO" = "yes"  && test "$HAVE_SNOWPACK" = "no" ; then
     1937                        AC_MSG_ERROR([cannot compile MeteoIO package without Snowpack!]);
     1938                fi
     1939                dnl check that if we run snowpack, we have meteoio also
     1940                  if test "$HAVE_METEOIO" = "no"  && test "$HAVE_SNOWPACK" = "yes" ; then
     1941                        AC_MSG_ERROR([cannot compile Snowpack package without MeteoIO!]);
     1942                fi
     1943
     1944
     1945
     1946
    18801947
    18811948
Note: See TracChangeset for help on using the changeset viewer.