Index: /issm/trunk-jpl/m4/issm_options.m4
===================================================================
--- /issm/trunk-jpl/m4/issm_options.m4	(revision 22537)
+++ /issm/trunk-jpl/m4/issm_options.m4	(revision 22538)
@@ -1302,12 +1302,20 @@
 	dnl }}}
 	dnl scalapack{{{
+
+	dnl Here, either just the directory is provided, or the library, we handle both cases
 	AC_ARG_WITH([scalapack-dir],
 	  AS_HELP_STRING([--with-scalapack-dir=DIR],[scalapack root directory]),
 	  [SCALAPACK_ROOT=$withval],[SCALAPACK_ROOT="no"])
+
+	AC_ARG_WITH([scalapack-lib],
+	  AS_HELP_STRING([--with-scalapack-lib=LIBS],[scalapack libraries to include]),
+	  [SCALAPACKLIB=$withval],[SCALAPACKLIB="no"])
 			  
 	dnl Check whether scalapack is enabled
 	AC_MSG_CHECKING([for scalapack])
 	if test "x$SCALAPACK_ROOT" = "xno" ; then
-		HAVE_SCALAPACK=no
+		if test "x$SCALAPACKLIB" = "xno" ; then
+			HAVE_SCALAPACK=no
+		fi
 	else
 		HAVE_SCALAPACK=yes
@@ -1315,4 +1323,5 @@
 			AC_MSG_ERROR([scalapack directory provided ($SCALAPACK_ROOT) does not exist]);
 		fi
+		SCALAPACKLIB=-L"$SCALAPACK_ROOT/ -lscalapack"
 	fi
 	AC_MSG_RESULT($HAVE_SCALAPACK)
@@ -1320,5 +1329,4 @@
 	dnl scalapack headers and libraries
 	if test "x$HAVE_SCALAPACK" == "xyes"; then
-		SCALAPACKLIB=-L"$SCALAPACK_ROOT/ -lscalapack"
 		AC_DEFINE([_HAVE_SCALAPACK_],[1],[with Scalapack in ISSM src])
 		AC_SUBST([SCALAPACKLIB])
