Index: /issm/trunk-jpl/m4/issm_options.m4
===================================================================
--- /issm/trunk-jpl/m4/issm_options.m4	(revision 23705)
+++ /issm/trunk-jpl/m4/issm_options.m4	(revision 23706)
@@ -580,4 +580,8 @@
 	  [PYTHON_ROOT=$withval],[PYTHON_ROOT="no"])
 
+	AC_ARG_WITH([python-version],
+	  AS_HELP_STRING([--with-python-version=DIR], [python forced version.]),
+	  [PYTHON_VERSION=$withval],[PYTHON_VERSION="no"])
+
 	dnl Check whether python is enabled
 	AC_MSG_CHECKING([for python])
@@ -596,10 +600,13 @@
 	dnl python specifics
 	if test "x$HAVE_PYTHON" = "xyes"; then
-		AC_MSG_CHECKING([for python version])
-		dnl Query Python for its version number. Getting [:3] seems to be the
-		dnl best way to do this; it's what "site.py" does in the standard library.
-		PYTHON_VERSION=$($PYTHON_ROOT/bin/python -c "import sys; print sys.version[[:3]]")
-		AC_MSG_RESULT($PYTHON_VERSION)
-
+		if test "x$PYTHON_VERSION" = "xno" ; then
+			AC_MSG_CHECKING([for python version])
+			dnl Query Python for its version number. Getting [:3] seems to be the
+			dnl best way to do this; it's what "site.py" does in the standard library.
+			PYTHON_VERSION=$($PYTHON_ROOT/bin/python -c "import sys; print sys.version[[:3]]")
+			AC_MSG_RESULT($PYTHON_VERSION)
+		else
+			AC_MSG_RESULT([enforced  python version is ]$PYTHON_VERSION)
+		fi
 		dnl recover major
 		PYTHON_MAJOR=${PYTHON_VERSION%.*}
@@ -622,6 +629,9 @@
 		fi
 		AC_MSG_RESULT(found)
-
-		PYTHONLIB="-L$PYTHON_ROOT/lib -lpython$PYTHON_VERSION"
+		if test "x$PYTHON_MAJOR" = "x3"; then
+				PYTHONLIB="-L$PYTHON_ROOT/lib -lpython$PYTHON_VERSION""m"
+		else
+				PYTHONLIB="-L$PYTHON_ROOT/lib -lpython$PYTHON_VERSION"
+		fi
 		PYTHONEXT=.so
 		case "${host_os}" in
@@ -1434,4 +1444,5 @@
 		fi
 		HAVE_SCALAPACK=yes
+		#SCALAPACKLIB=-L"$SCALAPACK_ROOT/ -lscalapack-openmpi"
 		SCALAPACKLIB=-L"$SCALAPACK_ROOT/ -lscalapack"
 	else if test "x$SCALAPACKLIB" != "xno"; then
@@ -1476,5 +1487,6 @@
 		  ;;
 		*linux*)
-		  BLASLAPACKLIB=-L"$BLASLAPACK_ROOT/lib -lflapack -lfblas "
+			BLASLAPACKLIB=-L"$BLASLAPACK_ROOT/lib -lflapack -lfblas
+		  #BLASLAPACKLIB=-L"$BLASLAPACK_ROOT/lib -llapack -lblas "
 		  ;;
 		*darwin*)
@@ -2132,6 +2144,6 @@
 	AC_MSG_RESULT($HAVE_KRIGING)
 	dnl }}}
-	
-	dnl Analyses 
+
+	dnl Analyses
 	AX_ANALYSES_SELECTION
 
