# SPDX-License-Identifier: Apache-2.0 OR ISC OR MIT
diff --git a/hol_4.14.sh b/hol_4.14.sh
index 1311255..8b2bc36 100755
--- a/hol_4.14.sh
+++ b/hol_4.14.sh
@@ -5,7 +5,7 @@ export HOLLIGHT_DIR=__DIR__

 if [ "$#" -eq 1 ]; then
   if [ "$1" == "-pp" ]; then
-    echo "camlp5r pa_lexer.cmo pa_extend.cmo q_MLast.cmo -I "__DIR__" pa_j.cmo"
+    echo "camlp5r pa_lexer.cmo pa_extend.cmo q_MLast.cmo -I ${HOLLIGHT_DIR} pa_j.cmo"
     exit 0
   elif [ "$1" == "-dir" ]; then
     echo "${HOLLIGHT_DIR}"
@@ -32,4 +32,13 @@ if [ "${HOL_ML_PATH}" == "" ]; then
   HOL_ML_PATH="${HOLLIGHT_DIR}/hol.ml"
 fi

-${LINE_EDITOR} ${HOLLIGHT_DIR}/ocaml-hol -init ${HOL_ML_PATH} -I ${HOLLIGHT_DIR}
+# Add site-lib directory for topfind
+SITELIB=$(dirname $(ocamlfind query findlib 2>/dev/null) 2>/dev/null)
+
+# Set HOLLIGHT_LOAD_PATH to include S2N_BIGNUM_DIR and mldsa-native proofs
+export HOLLIGHT_LOAD_PATH="${S2N_BIGNUM_DIR}:${PROOF_DIR_X86_64}:${HOLLIGHT_LOAD_PATH}"
+
+# Change to mldsa-native proofs directory if set, so define_from_elf can find object files
+[ -n "${PROOF_DIR_X86_64}" ] && cd "${PROOF_DIR_X86_64}"
+
+${LINE_EDITOR} ${HOLLIGHT_DIR}/ocaml-hol -init ${HOL_ML_PATH} -I ${HOLLIGHT_DIR} ${SITELIB:+-I "$SITELIB"}
diff --git a/hol_4.sh b/hol_4.sh
index 0aaa5c7..5adaf4c 100755
--- a/hol_4.sh
+++ b/hol_4.sh
@@ -5,7 +5,7 @@ export HOLLIGHT_DIR=__DIR__

 if [ "$#" -eq 1 ]; then
   if [ "$1" == "-pp" ]; then
-    echo "camlp5r pa_lexer.cmo pa_extend.cmo q_MLast.cmo -I "__DIR__" pa_j.cmo"
+    echo "camlp5r pa_lexer.cmo pa_extend.cmo q_MLast.cmo -I "${HOLLIGHT_DIR}" pa_j.cmo"
     exit 0
   elif [ "$1" == "-dir" ]; then
     echo "${HOLLIGHT_DIR}"
@@ -32,4 +32,4 @@ if [ "${HOL_ML_PATH}" == "" ]; then
   HOL_ML_PATH="${HOLLIGHT_DIR}/hol.ml"
 fi

-${LINE_EDITOR} ${HOLLIGHT_DIR}/ocaml-hol -I `camlp5 -where` camlp5o.cma -init ${HOL_ML_PATH} -safe-string -I ${HOLLIGHT_DIR}
+${LINE_EDITOR} ${HOLLIGHT_DIR}/ocaml-hol -I $(camlp5 -where) camlp5o.cma -init ${HOL_ML_PATH} -safe-string -I ${HOLLIGHT_DIR}
