[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to autotools figure what library need to be linked to?
From: |
Bob Friesenhahn |
Subject: |
Re: How to autotools figure what library need to be linked to? |
Date: |
Tue, 30 Mar 2021 09:52:51 -0500 (CDT) |
User-agent: |
Alpine 2.20 (GSO 67 2015-01-07) |
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
bfriesen@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