Providing --with-ocaml-libdir for ./configure. The default is the
stdlib if it's beneath --prefix, and is libdir/ocaml otherwise.

If someone has a better way than this to test whether $B is a path
within $A, I'd love to hear it:

  if test "$A" \< "$B" -a "$B" \< "${A}~"


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42532 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/bindings/ocaml/Makefile.ocaml b/bindings/ocaml/Makefile.ocaml
index 8ad085e..b157c31 100644
--- a/bindings/ocaml/Makefile.ocaml
+++ b/bindings/ocaml/Makefile.ocaml
@@ -14,12 +14,6 @@
 
 include $(LEVEL)/Makefile.config
 
-# Find the ocaml stdlib root. /usr/local/lib/ocaml is the default when built
-# from source; distros use something like /usr/lib/ocaml/3.10.0.
-ifndef OCAML_LIBDIR
-OCAML_LIBDIR := $(shell $(OCAMLC) -where)
-endif
-
 # CFLAGS needs to be set before Makefile.rules is included. Yes, ocaml puts its
 # includes under its libdir.
 CFLAGS += -I$(OCAML_LIBDIR)
@@ -27,7 +21,7 @@
 include $(LEVEL)/Makefile.common
 
 # Intentionally ignore PROJ_prefix here. We want the ocaml stdlib. However, the
-# user can override this with OCAML_LIBDIR.
+# user can override this with OCAML_LIBDIR or configure --with-ocaml-libdir=.
 PROJ_libocamldir := $(DESTDIR)$(OCAML_LIBDIR)
 OcamlDir := $(LibDir)/ocaml