"ocamlc -where" is supposed to "print the location of the standard library
and exit". While this directory contains core OCaml C header files, it
does not contain hivex-related C header files. Trim "guestfsd_CPPFLAGS"
accordingly.
Furthermore, the hivex module for OCaml may exist elsewhere than under the
OCaml standard library directory. Invoke "ocamlfind query hivex" to find
this module. This is what AC_CHECK_OCAML_PKG(hivex) does too, in
"m4/guestfs-ocaml.m4" and "m4/ocaml.m4".
Signed-off-by: Laszlo Ersek <lersek(a)redhat.com>
---
daemon/Makefile.am | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index 6f13bd43cf55..83bf39975e04 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -215,7 +215,7 @@ guestfsd_SOURCES = \
guestfsd_LDFLAGS = \
-L$(shell $(OCAMLC) -where) \
- -L$(shell $(OCAMLC) -where)/hivex \
+ -L$(shell $(OCAMLFIND) query hivex) \
-L../common/mlutils \
-L../common/mlstdutils \
-L../bundled/ocaml-augeas \
@@ -246,7 +246,6 @@ guestfsd_LDADD = \
guestfsd_CPPFLAGS = \
-DCAML_NAME_SPACE \
-I$(shell $(OCAMLC) -where) \
- -I$(shell $(OCAMLC) -where)/hivex \
-I$(top_srcdir)/gnulib/lib \
-I$(top_builddir)/gnulib/lib \
-I$(top_srcdir)/lib \
--
2.19.1.3.g30247aa5d201