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 <guillem@hadrons.org>
-e 's,@LIBDIR@,$(LIBDIR),' \
-e 's,@IDSDIR@,$(IDSDIR),' \
-e 's,@VERSION@,$(VERSION),' \
-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)
init.o: init.c $(INCL)
access.o: access.c $(INCL)
Description: libpci
Version: @VERSION@
Libs: -L${libdir} -lpci
Description: libpci
Version: @VERSION@
Libs: -L${libdir} -lpci
+Libs.private: @LDLIBS@ @WITH_LIBS@