diff --git a/configure b/configure index 96332a32..c43b6593 100755 --- a/configure +++ b/configure @@ -52,7 +52,7 @@ QP_ROOT_INSTALL = join(QP_ROOT, "install") os.environ["PATH"] = os.environ["PATH"] + ":" + QP_ROOT_BIN d_dependency = { - "ocaml": ["m4", "curl", "zlib", "patch", "gcc"], + "ocaml": ["m4", "curl", "zlib", "patch", "gcc", "zeromq"], "m4": ["make"], "curl": ["make"], "zlib": ["gcc", "make"], diff --git a/install/scripts/install_ocaml.sh b/install/scripts/install_ocaml.sh index 4cc64d0a..a2bbc7ba 100755 --- a/install/scripts/install_ocaml.sh +++ b/install/scripts/install_ocaml.sh @@ -7,14 +7,30 @@ cd - # Normal installation PACKAGES="core cryptokit ocamlfind sexplib ZMQ" +# Needed for ZeroMQ +export C_INCLUDE_PATH="${QP_ROOT}"/lib:"${C_INCLUDE_PATH}" +export LIBRARY_PATH="${QP_ROOT}"/lib:"${LIBRARY_PATH}" +export LD_LIBRARY_PATH="${QP_ROOT}"/lib:"${LD_LIBRARY_PATH}" + declare -i i -i=$(gcc -dumpversion | cut -d '.' -f 2) -if [[ i -lt 6 ]] +i=$(gcc -dumpversion | cut -d '.' -f 1) +if [[ i -lt 4 ]] then echo "GCC version $(gcc -dumpversion) too old. GCC >= 4.6 required." exit 1 fi + +if [[ i -eq 4 ]] +then + i=$(gcc -dumpversion | cut -d '.' -f 2) + if [[ i -lt 6 ]] + then + echo "GCC version $(gcc -dumpversion) too old. GCC >= 4.6 required." + exit 1 + fi +fi + if [[ -d ${HOME}/.opam ]] then source ${HOME}/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true