Ticket #42886: patch-admin-gildas-env.sh.diff

File patch-admin-gildas-env.sh.diff, 4.3 KB (added by smaret (Sebastien Maret), 10 years ago)
  • admin/gildas-env.sh

    old new  
    418418    fi
    419419    #
    420420    # Check availability of g++. This only has an impact on ATM2009
    421     if \which g++ > /dev/null 2>&1; then
     421    if \which @CXX@ > /dev/null 2>&1; then
    422422        ATM2009_PRESENT=yes
    423423    else
    424424        gagenv_message "g++ not found in your \$PATH"
     
    435435        NUMPY_PRESENT=no
    436436        NUMERIC_PRESENT=no
    437437        SQLITE3_PRESENT=no
    438         if \which python > /dev/null 2>&1; then
     438        if \which @PYTHON@ > /dev/null 2>&1; then
    439439            # Check the version of python the user is currently using
    440             if python -V 2>&1 > /dev/null 2>&1; then
    441                 PY_VERS_FULL=`python -V 2>&1 | cut -d' ' -f2`
     440            if @PYTHON@ -V 2>&1 > /dev/null 2>&1; then
     441                PY_VERS_FULL=`@PYTHON@ -V 2>&1 | cut -d' ' -f2`
    442442                PY_VERS=`echo $PY_VERS_FULL | sed "s%\([0-9]\.[0-9][0-9]*\).*%\1%"`
    443443                # Search for Python header and library. kernel/python/binding/setup.py
    444444                # does exactly the same, so this should be consistent
    445                 PYTHON_INC_DIR=`python -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('INCLUDEPY'))"`
     445                PYTHON_INC_DIR=`@PYTHON@ -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('INCLUDEPY'))"`
    446446                if [ -e "$PYTHON_INC_DIR/Python.h" ]; then PYTHON_INC=yes; else PYTHON_INC=no; fi
    447                 PYTHON_LIB_DIR=`python -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBDIR'))"`
     447                PYTHON_LIB_DIR=`@PYTHON@ -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBDIR'))"`
    448448                PYTHON_LIB=yes  # libpython name on the various supported systems is just
    449449                                # unpredictible. Can not check in advance if the linker will
    450450                                # find it or not.
    451451                #
    452452                # Now search for Numpy or Numeric
    453                 if python -c "import numpy" > /dev/null 2>&1; then
     453                if @PYTHON@ -c "import numpy" > /dev/null 2>&1; then
    454454                    NUMPY_PRESENT=yes
    455                     NUMPY_INC_DIR=`python -c "import numpy; print(numpy.__path__[0] + '/core/include')"`
     455                    NUMPY_INC_DIR=`@PYTHON@ -c "import numpy; print(numpy.__path__[0] + '/core/include')"`
    456456                    if [ -e "$NUMPY_INC_DIR/numpy/arrayobject.h" ]; then
    457457                        NUMPY_INC_PRESENT=yes
    458458                    else
    459459                        NUMPY_INC_PRESENT=no
    460460                    fi
    461                 elif  python -c "import Numeric"> /dev/null 2>&1; then
     461                elif  @PYTHON@ -c "import Numeric"> /dev/null 2>&1; then
    462462                    NUMERIC_PRESENT=yes
    463463                fi
    464464                # Search for sqlite3
    465                 if python -c "import sqlite3" > /dev/null 2>&1; then
     465                if @PYTHON@ -c "import sqlite3" > /dev/null 2>&1; then
    466466                    SQLITE3_PRESENT=yes
    467467                fi
    468468            fi
     
    538538            ATM2003_PRESENT=yes
    539539            ATM2003_LIB_DIR=$DIR
    540540        fi
    541         if file_present "liblapack." "${DIR}"; then
     541        if file_present "libLAPACK." "${DIR}"; then
    542542            LAPACK_PRESENT=yes
    543543            LAPACK_LIB_DIR=$DIR
    544544        fi
    545         if file_present "libblas." "${DIR}"; then
     545        if file_present "libBLAS." "${DIR}"; then
    546546            BLAS_PRESENT=yes
    547547            BLAS_LIB_DIR=$DIR
    548548        fi
     
    550550            SLATEC_PRESENT=yes
    551551            SLATEC_LIB_DIR=$DIR
    552552        fi
    553         if file_present "libfftw3." "${DIR}"; then
    554             FFTW3_PRESENT=yes
    555             FFTW3_LIB_DIR=$DIR
    556             if file_present "libfftw3f." "${DIR}"; then
    557                 FFTW3F_PRESENT=yes
    558             fi
    559         fi
     553#        if file_present "libfftw3." "${DIR}"; then
     554#            FFTW3_PRESENT=yes
     555#            FFTW3_LIB_DIR=$DIR
     556#            if file_present "libfftw3f." "${DIR}"; then
     557#               FFTW3F_PRESENT=yes
     558#            fi
     559#        fi
    560560        if file_present "libasdmStandalone." "${DIR}"; then
    561561            SDM_PRESENT=yes
    562562            if [ "$SDM_PRESENT" = "yes" ]; then
     
    590590    XML_PRESENT="yes"
    591591    #
    592592    unset GAG_LIB_DEP_PATH GAG_INC_DEP_PATH
     593    GAG_INC_DEP_PATH=$GAG_INC_DEP_PATH:@PREFIX@/include
     594    GAG_LIB_DEP_PATH=$GAG_INC_DEP_PATH:@PREFIX@/lib
    593595    #
    594596    if [ "$X11_INC" = "yes" ]; then
    595597        gagenv_message "Found X11 header  in $X11_INC_DIR"