This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Headers installation into libdir?


On Sat, Jul 3, 2010 at 1:40 PM, Samuli Suominen <ssuominen@gentoo.org> wrote:
> On 07/03/2010 07:26 PM, Luis Lavena wrote:
>> Hello,
>>
>> I was wondering why libffi 3.0.9 and current master (in GitHub) both
>> install ffi.h and ffitarget.h into libdir/libffi-X.Y.Z/include
>> directory?
>>
>> I believe that specific behavior is not good for packagers or users
>> trying to install libffi for normal usage.
>>
>> Please find attached a patch against master that corrects this behavior.
>>
>> Thank you.
>
> I think it's because of arch specific headers it installs.
>
> example snippet from ffi.h:
>
> /* Specify which architecture libffi is configured for. */
> #define X86_64
>
> So the way it's installed now is in fact correct.
>
> You should use pkg-config in your projects, like:
>
> gcc `pkg-config --cflags libffi` -lffi main.c
>
> $ pkg-config --cflags libffi
> -I/usr/lib64/libffi-3.0.9/include
> $ pkg-config --libs libffi
> -lffi

The problem is MinGW where there is no working, out of the box
pkg-config utility.

That you for your answer, I couldn't find any reference of other
library doing the same.
-- 
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]