diff options
author | Olaf Hering <olaf@aepfle.de> | 2013-02-05 11:31:11 +0000 |
---|---|---|
committer | Olaf Hering <olaf@aepfle.de> | 2013-02-05 11:31:11 +0000 |
commit | a2a9b63b48a0f3440929cad1d60c691900430c3d (patch) | |
tree | ca864d2b64a33ef63275935121c402b083fbbd93 /tools/configure | |
parent | c23e8e7d5082cbf68611135af24d4a8ec38cb708 (diff) | |
download | xen-a2a9b63b48a0f3440929cad1d60c691900430c3d.tar.gz xen-a2a9b63b48a0f3440929cad1d60c691900430c3d.tar.bz2 xen-a2a9b63b48a0f3440929cad1d60c691900430c3d.zip |
tools: update ocamlfind handling
configure checks just for ocamlc, but the tools in tools/ocaml depend
also on ocamlfind. On my workstation I have just ocamlc installed, but
no ocamlfind. As a result make will fail.
Update configure.ac to check also for OCAMLFIND, update various
Makefiles and replace hardcoded ocamlfind string with $(OCAMLFIND)
Please rerun autogen.sh after applying this patch.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/configure')
-rwxr-xr-x | tools/configure | 99 |
1 files changed, 98 insertions, 1 deletions
diff --git a/tools/configure b/tools/configure index 898dd17809..66d588a1f8 100755 --- a/tools/configure +++ b/tools/configure @@ -620,6 +620,7 @@ GREP CPP pyconfig PYTHONPATH +OCAMLFIND OCAMLBUILD OCAMLDOC OCAMLMKLIB @@ -4796,7 +4797,103 @@ else fi - if test "x$OCAMLC" = "xno"; then : + + # checking for ocamlfind + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ocamlfind", so it can be a program name with args. +set dummy ${ac_tool_prefix}ocamlfind; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_OCAMLFIND+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OCAMLFIND"; then + ac_cv_prog_OCAMLFIND="$OCAMLFIND" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_OCAMLFIND="${ac_tool_prefix}ocamlfind" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OCAMLFIND=$ac_cv_prog_OCAMLFIND +if test -n "$OCAMLFIND"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLFIND" >&5 +$as_echo "$OCAMLFIND" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OCAMLFIND"; then + ac_ct_OCAMLFIND=$OCAMLFIND + # Extract the first word of "ocamlfind", so it can be a program name with args. +set dummy ocamlfind; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_OCAMLFIND+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OCAMLFIND"; then + ac_cv_prog_ac_ct_OCAMLFIND="$ac_ct_OCAMLFIND" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_OCAMLFIND="ocamlfind" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OCAMLFIND=$ac_cv_prog_ac_ct_OCAMLFIND +if test -n "$ac_ct_OCAMLFIND"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLFIND" >&5 +$as_echo "$ac_ct_OCAMLFIND" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OCAMLFIND" = x; then + OCAMLFIND="no" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OCAMLFIND=$ac_ct_OCAMLFIND + fi +else + OCAMLFIND="$ac_cv_prog_OCAMLFIND" +fi + + + + if test "x$OCAMLC" = "xno" || test "x$OCAMLFIND" = "xno"; then : if test "x$enable_ocamltools" = "xyes"; then : |