Hi,

On 29.03.21 16:20, Peng Yu wrote:

> crypt(3) does not need -lcrypt on macOS, but need -lcrypt on Linux.
> How does autotools determine what library is need to be linked based
> on the source code? Thanks.

It compiles a short test program that calls crypt, then tries to link it
without any extra libraries, and if that fails, retries with -lcrypt.

It does not look at the source code of the project at all, the
configure.ac just includes a reference to the test to be run, and a copy
of the test is included in the configure script.

   Simon

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to