On Tue, 5 Dec 2023 13:03:22 GMT, Magnus Ihse Bursie <i...@openjdk.org> wrote:

>> Thanks for the suggestion @magicus !
>> 
>> The check in current `lib-sleef.m4` is very common:
>> 
>> -  If user has specified libsleef root by '--with-libsleef', we assume it is 
>> the manually built sleef lib. So only `lib/` and `include/` is checked. And 
>> the flags are set based on that path.
>> - If user has not specified the libsleef root, and no `SYSROOT` is set, we 
>> try `PKG_CHECK` (like what you suggested)
>> - Otherwise, check `sleef.h`   
>>    - We assume the sleef module is installed under one of the valid system 
>> paths if the header can be found. So just linking with `-lsleef` will 
>> success.
>> 
>> It's an issue in current flow like what @theRealAph met. I will add the 
>> options like `--with-libsleef-lib` and `--with-libsleef-include` like ffi. 
>> Regarding to extending the check for`--with-libsleef`, I think we can just 
>> make it simple like what it is now. Or, we have to check all the potential 
>> valid lib paths like `lib/`, `lib64/`, or maybe `lib/aarch64-linux-gnu`. The 
>> same to the `include` part.  @theRealAph @magicus , WDYT?
>
> I'm fine with adding just --with-libsleef-lib and --with-libsleef-include to 
> specify them directly. This makes it at least possible to use, if not overly 
> convenient, for people using a system like Andrew's. If it annoys someone too 
> much, we can extend it later.

Added these two options in latest commit. Thanks!

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16234#discussion_r1416962901

Reply via email to