--- gildas-src-dec22a/admin/gildas-env.sh.orig 2022-12-01 05:00:13 +++ gildas-src-dec22a/admin/gildas-env.sh 2022-12-02 09:35:21 @@ -238,19 +238,19 @@ FFTW3_PRESENT=no FFTW3F_PRESENT=no # - OLDIFS=$IFS - IFS=: - for DIR in $GAGENV_SEARCH_PATH; do - # Note: libfftw3 and libfftw3f must be in the same directory - if file_present "libfftw3." "${DIR}"; then - FFTW3_PRESENT=yes - FFTW3_LIB_DIR=$DIR - if file_present "libfftw3f." "${DIR}"; then - FFTW3F_PRESENT=yes - fi - fi - done - IFS=$OLDIFS +# OLDIFS=$IFS +# IFS=: +# for DIR in $GAGENV_SEARCH_PATH; do +# # Note: libfftw3 and libfftw3f must be in the same directory +# if file_present "libfftw3." "${DIR}"; then +# FFTW3_PRESENT=yes +# FFTW3_LIB_DIR=$DIR +# if file_present "libfftw3f." "${DIR}"; then +# FFTW3F_PRESENT=yes +# fi +# fi +# done +# IFS=$OLDIFS # if [ "$GAG_CONFIG" = -openmp ]; then gagenv_message "FFTW v3 are not supported in OpenMP mode. Default to GILDAS FFT." @@ -397,24 +397,24 @@ SQLITE3_PRESENT=no SETUPTOOLS_PRESENT=no PYTHONCONFIG_PRESENT=no - if \which python > /dev/null 2>&1; then + if \which @PYTHON@ > /dev/null 2>&1; then # Check the version of python the user is currently using - if python -V 2>&1 > /dev/null 2>&1; then - PYTHON_VERS_FULL=`python -V 2>&1 | cut -d' ' -f2` + if @PYTHON@ -V 2>&1 > /dev/null 2>&1; then + PYTHON_VERS_FULL=`@PYTHON@ -V 2>&1 | cut -d' ' -f2` PYTHON_VERS=`echo $PYTHON_VERS_FULL | \sed "s%\([0-9]\.[0-9][0-9]*\).*%\1%"` # Search for Python header and library. kernel/python/binding/setup.py # does exactly the same, so this should be consistent - PYTHON_INC_DIR=`python -c "import sysconfig; print(sysconfig.get_config_var('INCLUDEPY'))"` + PYTHON_INC_DIR=`@PYTHON@ -c "import sysconfig; print(sysconfig.get_config_var('INCLUDEPY'))"` if [ -e "$PYTHON_INC_DIR/Python.h" ]; then PYTHON_INC=yes; else PYTHON_INC=no; fi - PYTHON_LIB_DIR=`python -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))"` + PYTHON_LIB_DIR=`@PYTHON@ -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))"` PYTHON_LIB=yes # libpython name on the various supported systems is just # unpredictible. Can not check in advance if the linker will # find it or not. See also our script python-config-ldflags.py # # Now search for Numpy - if python -c "import numpy" > /dev/null 2>&1; then + if @PYTHON@ -c "import numpy" > /dev/null 2>&1; then NUMPY_PRESENT=yes - NUMPY_INC_DIR=`python -c "import numpy; print(numpy.__path__[0] + '/core/include')"` + NUMPY_INC_DIR=`@PYTHON@ -c "import numpy; print(numpy.__path__[0] + '/core/include')"` if [ -e "$NUMPY_INC_DIR/numpy/arrayobject.h" ]; then NUMPY_INC_PRESENT=yes else @@ -422,15 +422,15 @@ fi fi # Search for sqlite3 - if python -c "import sqlite3" > /dev/null 2>&1; then + if @PYTHON@ -c "import sqlite3" > /dev/null 2>&1; then SQLITE3_PRESENT=yes fi # Search for setuptools - if python -c "import setuptools" > /dev/null 2>&1; then + if @PYTHON@ -c "import setuptools" > /dev/null 2>&1; then SETUPTOOLS_PRESENT=yes fi # Search for python-config - if \which python-config > /dev/null 2>&1; then + if \which @PYTHON@-config > /dev/null 2>&1; then PYTHONCONFIG_PRESENT=yes fi fi @@ -740,6 +740,8 @@ # environment variables: # unset GAG_LIB_DEP_PATH GAG_INC_DEP_PATH # Incremented by detection functions + GAG_INC_DEP_PATH=@PREFIX@/include + GAG_LIB_DEP_PATH=@PREFIX@/lib # gagenv_detect_atm gagenv_message ""