[flashrom] [PATCH] More robust libpci detection
Idwer Vollering
vidwer at gmail.com
Sun Feb 28 16:30:48 CET 2010
2010/2/27 Michael Karcher <flashrom at mkarcher.dialup.fu-berlin.de>
> Am Freitag, den 26.02.2010, 15:01 +0100 schrieb Carl-Daniel Hailfinger:
> > Idwer reported problems with the current libpci check on
> >
> > FreeBSD 8.0-RELEASE i386
> As I don't really know what the problem ist, I have to guess here. As I
> understand it, linking against -lpci without linking -lz at the same
> time yields a linker error on FreeBSD.
>
Correct. I worked around that by adding "-c" to line 258 of Makefile (
http://www.flashrom.org/trac/flashrom/browser/trunk/Makefile#L258 );
instructions are at http://flashrom.org/Downloads too.
> > - @printf "Checking for libpci... "
> > + @printf "Checking for libpci (method 1)... "
> > @$(shell ( echo "#include <pci/pci.h>"; \
> > echo "int main(int argc, char **argv)"; \
> > echo "{ return 0; }"; ) > .test1.c )
> > - @$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) .test1.c -o .test1 -lpci
> $(LIBS) >/dev/null 2>&1 && \
> > - echo "found." || ( echo "not found."; echo;
> \
> > - echo "Please install libpci (package pciutils).";
> \
> > - echo "See README for more information."; echo;
> \
> > - rm -f .test1.c .test1; exit 1)
> > + @$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) .test1.c -o .test1 $(LIBS)
> >/dev/null 2>&1 && \
> > + echo "found." || ( echo "not found."; \
> This does not include "-lpci" anymore. It should succeed on every system
> where the include file pci/pci.h can be found. But that has already been
> checked on the previous check. The "--print-file-name" calls thus never
> seem to get executed.
>
> Regards,
> Michael Karcher
>
>
> _______________________________________________
> flashrom mailing list
> flashrom at flashrom.org
> http://www.flashrom.org/mailman/listinfo/flashrom
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.flashrom.org/pipermail/flashrom/attachments/20100228/f1fe24bb/attachment.html>
More information about the flashrom
mailing list