On Mon, 29 Mar 2021, Peng Yu wrote:

Hi,

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.

This is really an Autoconf (configure script) issue and not an Automake issue. The common approach using Autoconf is to test various known permutations (starting with nothing, and then adding crypt) until linking succeeds.

I expect that there is already a macro from the Autoconf macro archive which handles this case.

Bob
--
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt

Reply via email to