diff options
author | Baruch Siach <baruch@tkos.co.il> | 2021-09-02 12:56:00 +0300 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2021-09-02 15:06:14 +0200 |
commit | 194ec61843b9598ce90873c812b817c4b96e2e0d (patch) | |
tree | c3909a9cfd9864802ccf5b07f635f3f5238c26ac /configure | |
parent | dc5783816136f5569622193cdaba22571b20d81e (diff) |
Detect libpcap dependencies using pkg-config
When building statically the link command line must include all
dependencies of all libraries. libpcap can optionally depend on libnl.
mausezahn can't build statically in this case.
Use pkg-config in configure and in the link command to construct the
library flags we need to link with libpcap.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -588,7 +588,9 @@ int main(void) } EOF - $CC -o $TMPDIR/pcaptest $TMPDIR/pcaptest.c -lpcap >> config.log 2>&1 + $CC -o $TMPDIR/pcaptest $TMPDIR/pcaptest.c \ + $($PKG_CONFIG --libs libpcap 2>> config.log) \ + >> config.log 2>&1 if [ ! -x $TMPDIR/pcaptest ] ; then echo "[NO]" echo "CONFIG_LIBPCAP=0" >> Config |