Changeset 23706


Ignore:
Timestamp:
02/11/19 04:09:28 (6 years ago)
Author:
bdef
Message:

NEW:adding a keyword to force python version

File:
1 edited

Legend:

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

    r23611 r23706  
    580580          [PYTHON_ROOT=$withval],[PYTHON_ROOT="no"])
    581581
     582        AC_ARG_WITH([python-version],
     583          AS_HELP_STRING([--with-python-version=DIR], [python forced version.]),
     584          [PYTHON_VERSION=$withval],[PYTHON_VERSION="no"])
     585
    582586        dnl Check whether python is enabled
    583587        AC_MSG_CHECKING([for python])
     
    596600        dnl python specifics
    597601        if test "x$HAVE_PYTHON" = "xyes"; then
    598                 AC_MSG_CHECKING([for python version])
    599                 dnl Query Python for its version number. Getting [:3] seems to be the
    600                 dnl best way to do this; it's what "site.py" does in the standard library.
    601                 PYTHON_VERSION=$($PYTHON_ROOT/bin/python -c "import sys; print sys.version[[:3]]")
    602                 AC_MSG_RESULT($PYTHON_VERSION)
    603 
     602                if test "x$PYTHON_VERSION" = "xno" ; then
     603                        AC_MSG_CHECKING([for python version])
     604                        dnl Query Python for its version number. Getting [:3] seems to be the
     605                        dnl best way to do this; it's what "site.py" does in the standard library.
     606                        PYTHON_VERSION=$($PYTHON_ROOT/bin/python -c "import sys; print sys.version[[:3]]")
     607                        AC_MSG_RESULT($PYTHON_VERSION)
     608                else
     609                        AC_MSG_RESULT([enforced  python version is ]$PYTHON_VERSION)
     610                fi
    604611                dnl recover major
    605612                PYTHON_MAJOR=${PYTHON_VERSION%.*}
     
    622629                fi
    623630                AC_MSG_RESULT(found)
    624 
    625                 PYTHONLIB="-L$PYTHON_ROOT/lib -lpython$PYTHON_VERSION"
     631                if test "x$PYTHON_MAJOR" = "x3"; then
     632                                PYTHONLIB="-L$PYTHON_ROOT/lib -lpython$PYTHON_VERSION""m"
     633                else
     634                                PYTHONLIB="-L$PYTHON_ROOT/lib -lpython$PYTHON_VERSION"
     635                fi
    626636                PYTHONEXT=.so
    627637                case "${host_os}" in
     
    14341444                fi
    14351445                HAVE_SCALAPACK=yes
     1446                #SCALAPACKLIB=-L"$SCALAPACK_ROOT/ -lscalapack-openmpi"
    14361447                SCALAPACKLIB=-L"$SCALAPACK_ROOT/ -lscalapack"
    14371448        else if test "x$SCALAPACKLIB" != "xno"; then
     
    14761487                  ;;
    14771488                *linux*)
    1478                   BLASLAPACKLIB=-L"$BLASLAPACK_ROOT/lib -lflapack -lfblas "
     1489                        BLASLAPACKLIB=-L"$BLASLAPACK_ROOT/lib -lflapack -lfblas
     1490                  #BLASLAPACKLIB=-L"$BLASLAPACK_ROOT/lib -llapack -lblas "
    14791491                  ;;
    14801492                *darwin*)
     
    21322144        AC_MSG_RESULT($HAVE_KRIGING)
    21332145        dnl }}}
    2134        
    2135         dnl Analyses 
     2146
     2147        dnl Analyses
    21362148        AX_ANALYSES_SELECTION
    21372149
Note: See TracChangeset for help on using the changeset viewer.