[syslinux] pkg-config

Jeffrey Hutzelman jhutz at cmu.edu
Mon Nov 26 15:04:06 PST 2012


On Mon, 2012-11-26 at 14:28 -0800, H. Peter Anvin wrote:
> On 11/10/2012 04:04 AM, Geert Stappers wrote:
> > On Fri, Nov 09, 2012, Shao Miller wrote more as:
> >>
> >> Does anyone know of a clever, Linux-distribution-independent way to find out
> >> where MinGW has its lib/ and include/ dirs?  Right now, I've hard-coded the
> >> path for Fedora 17 in the Makefiles.
> >>
> > 
> > #
> > #  pkg-config
> > #
> > CFLAGS=$(shell pkg-config --cflags uuid )
> > LIBS=$(shell pkg-config --libs uuid )
> > 
> > proofofconcept:
> > 	echo PoC ${CFLAGS}  ${LIBS}
> > 
> > # last line of this Makefile
> 
> Slightly confused... what is this needed for?  In most cases you
> shouldn't need this, and instead should let the MinGW gcc pick up the
> proper headers.
> 
> Either way, if you know the appropriate name for gcc (as found by
> find-mingw32.sh and find-mingw64.sh) you can do:
> 
> $(GCC) -print-search-dirs | sed -e 's/^libraries: =//p' -e d
> 
> ... to get a colon-separated list of library directories.
> 
> Unfortunately I don't know of a way to get the full include path.

You'll be sorry you asked, but this should work:

$(GCC) -xc -E -v /dev/null |& sed -ne '/^#include </,/^[^ ]/s/^  *//p'






More information about the Syslinux mailing list