Index: /issm/trunk-jpl/m4/issm_options.m4
===================================================================
--- /issm/trunk-jpl/m4/issm_options.m4	(revision 15910)
+++ /issm/trunk-jpl/m4/issm_options.m4	(revision 15911)
@@ -610,5 +610,4 @@
 	if test "x$HAVE_AMPI" == "xyes"; then
 		AMPIINCL="-I$AMPI_ROOT/include"
-		echo "adolc_root: |$ADOLC_ROOT|"
 		if test "x$ADOLC_ROOT" == "xno"; then
 			AC_MSG_ERROR([cannot run adjoinable mpi without adolc]);
@@ -1445,4 +1444,60 @@
 	AC_MSG_RESULT(done)
 	dnl }}}
+	dnl meteoio{{{
+	AC_ARG_WITH([meteoio-dir],
+	  AS_HELP_STRING([--with-meteoio-dir=DIR], [use meteoio in conjunction with snowpack model.]),
+	  [METEOIO_ROOT=$withval],[METEOIO_ROOT="no"]) 
+
+	dnl Check whether meteoio is enabled
+	AC_MSG_CHECKING([for meteoio])
+	if test "x$METEOIO_ROOT" = "xno" ; then
+		HAVE_METEOIO=no
+	else
+		HAVE_METEOIO=yes
+		if ! test -d "$METEOIO_ROOT"; then
+			AC_MSG_ERROR([meteoio directory provided ($METEOIO_ROOT) does not exist]);
+		fi
+	fi
+	AC_MSG_RESULT($HAVE_METEOIO)
+	
+	dnl meteoio headers and libraries
+	if test "x$HAVE_METEOIO" == "xyes"; then
+		METEOIOINCL="-I$METEOIO_ROOT/include"
+		METEOIOLIB="-dy -L$METEOIO_ROOT/lib  -lmeteoio "
+
+		AC_DEFINE([_HAVE_METEOIO_],[1],[with meteoio])
+		AC_SUBST([METEOIOINCL])
+		AC_SUBST([METEOIOLIB])
+	fi
+	AM_CONDITIONAL([METEOIO], [test x$HAVE_METEOIO = xyes])
+	dnl }}}
+	dnl snowpack{{{
+	AC_ARG_WITH([snowpack-dir],
+	  AS_HELP_STRING([--with-snowpack-dir=DIR], [use snowpack for surface mass balance model.]),
+	  [SNOWPACK_ROOT=$withval],[SNOWPACK_ROOT="no"]) 
+
+	dnl Check whether snowpack is enabled
+	AC_MSG_CHECKING([for snowpack])
+	if test "x$SNOWPACK_ROOT" = "xno" ; then
+		HAVE_SNOWPACK=no
+	else
+		HAVE_SNOWPACK=yes
+		if ! test -d "$SNOWPACK_ROOT"; then
+			AC_MSG_ERROR([snowpack directory provided ($SNOWPACK_ROOT) does not exist]);
+		fi
+	fi
+	AC_MSG_RESULT($HAVE_SNOWPACK)
+	
+	dnl snowpack headers and libraries
+	if test "x$HAVE_SNOWPACK" == "xyes"; then
+		SNOWPACKINCL="-I$SNOWPACK_ROOT/include"
+		SNOWPACKLIB="-dy -L$SNOWPACK_ROOT/lib  -lsnowpack "
+
+		AC_DEFINE([_HAVE_SNOWPACK_],[1],[with snowpack for surface mass balance model])
+		AC_SUBST([SNOWPACKINCL])
+		AC_SUBST([SNOWPACKLIB])
+	fi
+	AM_CONDITIONAL([SNOWPACK], [test x$HAVE_SNOWPACK = xyes])
+	dnl }}}
 
 	dnl Capabilities
@@ -1878,4 +1933,16 @@
 			AC_MSG_ERROR([cannot compile kriging.exe under adolc conditions!]);
 		fi
+		dnl check that if we run meteoio, we have snowpack also
+		  if test "$HAVE_METEOIO" = "yes"  && test "$HAVE_SNOWPACK" = "no" ; then
+			AC_MSG_ERROR([cannot compile MeteoIO package without Snowpack!]);
+		fi
+		dnl check that if we run snowpack, we have meteoio also
+		  if test "$HAVE_METEOIO" = "no"  && test "$HAVE_SNOWPACK" = "yes" ; then
+			AC_MSG_ERROR([cannot compile Snowpack package without MeteoIO!]);
+		fi
+
+
+
+
 
 
