10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-12-22 20:35:19 +01:00

Fix ezfio path and ocaml version

This commit is contained in:
TApplencourt 2015-09-30 13:19:45 +02:00
parent 9eae6e0d9c
commit 5dc7810bde
2 changed files with 13 additions and 4 deletions

2
configure vendored
View File

@ -453,7 +453,7 @@ def create_ninja_and_rc(l_installed):
'export IRPF90={0}'.format(path_irpf90), 'export IRPF90={0}'.format(path_irpf90),
'export NINJA={0}'.format(path_ninja), 'export NINJA={0}'.format(path_ninja),
'export QP_PYTHON={0}'.format(":".join(l_python)), "", 'export QP_PYTHON={0}'.format(":".join(l_python)), "",
'export PYTHONPATH="${QP_EZFIO}":"${QP_PYTHON}":"${PYTHONPATH}"', 'export PYTHONPATH="${QP_EZFIO}/Python":"${QP_PYTHON}":"${PYTHONPATH}"',
'export PATH="${QP_PYTHON}":"${QP_ROOT}"/bin:"${QP_ROOT}"/ocaml:"${PATH}"', 'export PATH="${QP_PYTHON}":"${QP_ROOT}"/bin:"${QP_ROOT}"/ocaml:"${PATH}"',
'export LD_LIBRARY_PATH="${QP_ROOT}"/lib:"${LD_LIBRARY_PATH}"', 'export LD_LIBRARY_PATH="${QP_ROOT}"/lib:"${LD_LIBRARY_PATH}"',
'export LIBRARY_PATH="${QP_ROOT}"/lib:"${LIBRARY_PATH}"', "", 'export LIBRARY_PATH="${QP_ROOT}"/lib:"${LIBRARY_PATH}"', "",

View File

@ -7,9 +7,18 @@ cd -
# Normal installation # Normal installation
PACKAGES="core cryptokit ocamlfind sexplib" PACKAGES="core cryptokit ocamlfind sexplib"
declare -i i # return 0 if program version is equal or greater than check version
i=$(gcc -dumpversion | cut -d '.' -f 2) check_version()
if [[ i -lt 6 ]] {
local version=$1 check=$2
local winner=$(echo -e "$version\n$check" | sed '/^$/d' | sort -nr | head -1)
[[ "$winner" = "$version" ]] && return 0
return 1
}
i=$(gcc -dumpversion)
if check_version i 4.6
then then
echo "GCC version $(gcc -dumpversion) too old. GCC >= 4.6 required." echo "GCC version $(gcc -dumpversion) too old. GCC >= 4.6 required."
exit 1 exit 1