Skip to content
Browse files

[fix] fedora,configure: work with non fresh install

  • Loading branch information...
1 parent 489c62b commit 62e3dc8b445993009838fb096fa6e161cacfc0a5 @OpaOnWindowsNow OpaOnWindowsNow committed Jan 13, 2012
Showing with 7 additions and 5 deletions.
  1. +7 −5 configure
View
12 configure
@@ -194,9 +194,11 @@ else
echo "Ocaml 3.12 or newer is required. It's usually found in package 'ocaml'."
false
fi
+OCAMLOPT_DIR=$(dirname $(which $OCAMLOPT))
+
echo-check ocamlbuild
-: ${OCAMLBUILD:=$(dirname $OCAMLOPT)/ocamlbuild}
+: ${OCAMLBUILD:=$OCAMLOPT_DIR/ocamlbuild}
if [ -n "$IS_RELEASE" ]; then
OCAMLBUILD_FLAGS="${OCAMLBUILD_FLAGS:-} -tag release -tag noassert"
else
@@ -279,8 +281,8 @@ EOF
check-ocaml
echo-check for camlp4
-: ${CAMLP4O:=$(dirname $OCAMLOPT)/camlp4o}
-: ${CAMLP4ORF:=$(dirname $OCAMLOPT)/camlp4orf}
+: ${CAMLP4O:=$OCAMLOPT_DIR/camlp4o}
+: ${CAMLP4ORF:=$OCAMLOPT_DIR/camlp4orf}
if [ -x "$CAMLP4O" ] && [ -x "$CAMLP4ORF" ]
then echo-ok $CAMLP4O
else
@@ -319,7 +321,7 @@ if [ "X$NO_CAMLIDL" = "X1" ]; then
echo-ok Disabled
elif
[ -e $OCAMLLIB/libcamlidl.a ] &&
- CAMLIDL=${CAMLIDL:-$(dirname "$OCAMLOPT")/camlidl} && [ -x "$CAMLIDL" ] ||
+ CAMLIDL=${CAMLIDL:-$OCAMLOPT_DIR)/camlidl} && [ -x "$CAMLIDL" ] ||
CAMLIDL=$(which camlidl)
then
HAS_CAMLIDL=1
@@ -423,7 +425,7 @@ if [ -n "${NO_OCAMLFIND:-}" ]; then
OCAMLFIND=
echo-skip Disabled
elif [ -z "${OCAMLFIND:-}" ]; then
- OCAMLFIND=$(dirname $OCAMLOPT)/ocamlfind
+ OCAMLFIND=$OCAMLOPT_DIR/ocamlfind
if [ ! -x "$OCAMLFIND" ]; then
OCAMLFIND=$OCAMLLIB/../../bin/ocamlfind
fi

0 comments on commit 62e3dc8

Please sign in to comment.
Something went wrong with that request. Please try again.