[syslinux] pkg-config
Shao Miller
sha0.miller at gmail.com
Sun Dec 2 17:43:46 PST 2012
On 11/26/2012 18:04, Jeffrey Hutzelman wrote:
> 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'
>
Maybe it is not needed. I'll have to test. But if it is, this seems
promising. :) Thanks, folks. - Shao
More information about the Syslinux
mailing list