On Tue, Oct 08 2019, Christopher Zimmermann <madro...@gmerlin.de> wrote:
> On Mon, Oct 07, 2019 at 09:09:50PM +0100, Stuart Henderson wrote:
>> On 2019/10/07 21:37, Christopher Zimmermann wrote:
>> > I am trying to use this to fix this issue:
>> > https://github.com/Drup/ocaml-lmdb/issues/27
>> > 
>> > It might well be that I'm on the wrong path here. And since this is a
>> > problem I've been wondering about for several years now let me ask more
>> > generically:
>> > How is an arbitrary piece of software supposed to
>> > discover /usr/local/include and /usr/local/lib?
>> 
>> The same way it will discover /opt/include and /opt/lib on a linux box -
>> you tell it to look there.
>
> Yes, of course I do. But there are two perspectives here. That of the
> port's maintainer and that of the upstream mainainer:
>
> - What's the preferred way to teach a build system our search paths ?
> - What's the preferred / most portable way for a piece of software to
>   discover the search paths?
>
> Is it pkg-config, $CPATH / $LIBRARY_PATH, autoconf, something else?

Many build systems have support for pkg-config (eg pkg.m4 for autoconf).
autoconf honours (at least) CPPFLAGS/CFLAGS/LDFLAGS.
CPATH and LIBRARY_PATH are OCaml idioms AFAIK.

There's no single answer.

Can opam simply inject -I/usr/local/include and -L/usr/local/lib in the
dune build system used by ocaml-lmdb?

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Attachment: signature.asc
Description: PGP signature

Reply via email to