On Mon, Aug 12, 2024 at 07:59:22AM -0500, Eric Blake wrote:
> On Mon, Aug 12, 2024 at 11:31:34AM GMT, Richard W.M. Jones wrote:
> > On Mon, Aug 12, 2024 at 11:41:22AM +0200, Antonio Caggiano wrote:
> > > Add INSTALL_OCAMLLIB parameter for allowing ocaml install to a user
> > > defined path. If not defined, fallback to `ocamlc -where`.
> > 
> > Can't the usual destdir mechanism be used?
> > 
> > > Signed-off-by: Antonio Caggiano <quic_acagg...@quicinc.com>
> > > ---
> > >  m4/ocaml.m4       |  3 +++
> > >  ocaml/Makefile.am | 14 +++++++-------
> > >  2 files changed, 10 insertions(+), 7 deletions(-)
> > > 
> > > diff --git a/m4/ocaml.m4 b/m4/ocaml.m4
> > > index fddd6a0c2..91896f386 100644
> > > --- a/m4/ocaml.m4
> > > +++ b/m4/ocaml.m4
> > > @@ -17,6 +17,9 @@ AC_DEFUN([AC_PROG_OCAML],
> > >       OCAMLVERSION=`$OCAMLC -v | sed -n -e 's|.*version* *\(.*\)$|\1|p'`
> > >       AC_MSG_RESULT([OCaml version is $OCAMLVERSION])
> > >       OCAMLLIB=`$OCAMLC -where 2>/dev/null || $OCAMLC -v|tail -1|cut -d ' 
> > > ' -f 4`
> > > +     if test "x$INSTALL_OCAMLLIB" = "x"; then
> > > +        INSTALL_OCAMLLIB=$OCAMLLIB
> > > +     fi
> > >       AC_MSG_RESULT([OCaml library path is $OCAMLLIB])
> > >  
> > >       AC_SUBST([OCAMLVERSION])
> > 
> > Note this is a copy-in file from another project, I don't know if we
> > can really modify it here.  (Unfortunately I'm not sure of the
> > upstream status ...)
> > 
> > Eric, any idea about this?
> >
> 
> Which upstream?  The file was added in commit acf90002 in 2009, and
> the git log does not state what the upstream source would be (only
> that there is supposed to be an ocaml.m4 man page somewhere?)
> 
> Okay, a quick google search found:
> https://manpages.ubuntu.com/manpages/mantic/man1/ocaml.m4.1.html
> 
> which says upstream is:
> https://forge.ocamlcore.org/projects/ocaml-autoconf/

Yes that's the one.  I don't think we've updated since 2009 on the
basis that if it ain't broken, don't fix it.  And while I was involved
upstream two decades ago I haven't made any recent contributions
upstream either so I'm not sure about the upstream status.

> and sure enough, Fedora 40 has the ocaml-autoconf-1.1-40.fc40.noarch
> package available for use, and which appears newer than the copy we
> are using (I think it was copied from ocaml-autoconf-1.0), although
> upstream still carries only a 2009 copyright date, so it's hard to
> tell if upstream has any recent maintenance.
> 
> The beauty of open source is that we can fork the file to meet our
> needs; the curse of open source is that if we fork and don't push the
> improvements upstream, no one else will benefit.  But given how little
> upstream seems to change, I don't know that there are many users in
> the first place.
> 
> It may also be possible to accomplish what you want by adding your
> code to configure.ac after the call to AC_PROG_OCAML, rather than
> modifying the imported file.

This is probably better in this case.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW
_______________________________________________
Libguestfs mailing list -- guestfs@lists.libguestfs.org
To unsubscribe send an email to guestfs-le...@lists.libguestfs.org

Reply via email to