libpcap
libpcap copied to clipboard
Invalid hardcoded path in libpcap configure.in
The libpcap configure.in contains V_INCLS="$V_INCLS -I/usr/include/libnl3", which is fundamentally wrong for cross-compilation.
Would it be possible to use pkg-config to detect libnl instead, and get the right cflags/ldflags?
@dragorn (author of respective change), could you review and update? Thank you.
Currently (as of 1.10), we try to find libnl3 using pkg-config, and only fall back on hardcoding the include path if that doesn't work.
If that doesn't suffice, it appears that either 1) we should change includes of netlink/XXX.h to includes of libnl3/netlink/XXX.h or 2) find the appropriately libnl3, for pkg-config-less configuring, in some fashion.
(Ultimately, I'd like to do 3) stop using libnl and talk to netlink in some other fashion.)
And given that:
$ pkg-config --cflags libnl-genl-3.0
-I/usr/include/libnl3
solution 1) would be wrong (as it would break on a platform where pkg-config worked, unless we tweaked its output to remove the /libnl3, but that would probably be the wrong thing to do). I.e., it appears that the intent is that the -I flag argument used when building with libnl3 include /libnl3, presumably so that you can have multiple versions of libnl installed for developers.
If 1.10 doesn't fix the problem, please speak up, otherwise we'll close this.
Sorry for not following up on this. I confirm that 1.10 apparently fixed our issue, and we're now relying on the pkg-config based detection, which works fine. Thanks a lot!