On 31 October 2014 at 08:54, Bjørn Forsman bjorn.forsman@gmail.com wrote:
Using "Libs: -lusb-1.0" assumes the linker knows where libusb is located. Using "Require: libusb-1.0" is more correct as it uses pkg-config to locate the required package and provides correct flags (both -l and -L).
This fix is needed to build programs that depend on librtlsdr on NixOS[1]. (Because there is no "default" linker serach path on NixOS.)
[1]: http://nixos.org/
librtlsdr.pc.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/librtlsdr.pc.in b/librtlsdr.pc.in index 5e55049..76b4190 100644 --- a/librtlsdr.pc.in +++ b/librtlsdr.pc.in @@ -7,5 +7,6 @@ Name: RTL-SDR Library Description: C Utility Library Version: @VERSION@ Cflags: -I${includedir}/ @RTLSDR_PC_CFLAGS@ -Libs: -L${libdir} -lrtlsdr -lusb-1.0 +Libs: -L${libdir} -lrtlsdr Libs.private: @RTLSDR_PC_LIBS@
+Requires: libusb-1.0
Ping.
(Oh, and please fixup my commit message typo (s/serach/search/) if/when you apply it.)
Best regards, Bjørn Forsman