[cffi-devel] Grovel default search path for include files

Stelian Ionescu sionescu at cddr.org
Fri Aug 21 07:54:03 UTC 2009


On Thu, 2009-08-20 at 22:37 -0400, Liam Healy wrote:
> System-installed header files sometimes are in different places
> depending on the OS and method of installation.  In particular, the
> file ffi.h that FSBV (http://repo.or.cz/w/fsbv.git) uses from libffi
> seems to be in different places on OS X depending on how it was
> installed (Apple native, Mac ports, etc.).  Not being a user of OS X,
> it is difficult for me to know all the possible locations where this
> file might end up.  Is it possible to specify that the groveler
> should "search system-standard locations" for the header files
> specified in include forms,

The groveler does not do any kind of searching: it merely invokes the
system C compiler which searches for includes in "system-standard
locations". what you need is a way to configure the sources; for
example, a simple ./configure scripts that looks for libffi and
generates a config.lisp would do

>  analogous to load-foreign-library knowing
> where to look for system libraries, and have it find the file based on
> its knowledge of the places it might be for the current OS?

l-f-l does not know where to look for system libraries. it only calls
the implementation's loader which in turn calls dlopen(). it's dlopen()
that which does the lookup based on OS-dependent configuration

-- 
Stelian Ionescu a.k.a. fe[nl]ix
Quidquid latine dictum sit, altum videtur.
http://common-lisp.net/project/iolib
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20090821/a80ee894/attachment.sig>


More information about the cffi-devel mailing list