automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ***UNCHECKED*** How to autotools figure what library need to be link


From: Simon Richter
Subject: Re: ***UNCHECKED*** How to autotools figure what library need to be linked to?
Date: Mon, 29 Mar 2021 17:01:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0

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

[Prev in Thread] Current Thread [Next in Thread]