From: Brice Goglin Date: Fri, 4 Jan 2013 16:31:14 +0000 (+0100) Subject: pkgconfig: Fix libpci.pc for static linking X-Git-Tag: v3.8.0~105^2 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=a6665cfbcba00059be5aefad88da9fd64e3b5a1e;p=pciutils.git pkgconfig: Fix libpci.pc for static linking The libpci.pc file does not seem to be correct for static linking. $ pkg-config --libs --static libpci -lpci It brings no dependencies while -lresolv (and likely -lz) seems needed: /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/ libpci.a(names-net.o):function pci_id_net_lookup: error: undefined reference to '__res_query' Something like: Libs.private: -lresolv -lz Signed-off-by: Guillem Jover --- diff --git a/lib/Makefile b/lib/Makefile index d89cd6c..0332508 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -77,7 +77,8 @@ $(PCILIBPC): libpci.pc.in -e 's,@LIBDIR@,$(LIBDIR),' \ -e 's,@IDSDIR@,$(IDSDIR),' \ -e 's,@VERSION@,$(VERSION),' \ - -e 's,@LDLIBS@,$(LDLIBS),' + -e 's,@LDLIBS@,$(LDLIBS),' \ + -e 's,@WITH_LIBS@,$(WITH_LIBS),' init.o: init.c $(INCL) access.o: access.c $(INCL) diff --git a/lib/libpci.pc.in b/lib/libpci.pc.in index 9d7e8a0..29c6910 100644 --- a/lib/libpci.pc.in +++ b/lib/libpci.pc.in @@ -7,5 +7,5 @@ Name: libpci Description: libpci Version: @VERSION@ Libs: -L${libdir} -lpci -Libs.private: @LDLIBS@ +Libs.private: @LDLIBS@ @WITH_LIBS@ Cflags: -I${includedir}