Jeremy Henty wrote:
> I am working on a new  Ruby/FLTK binding (for FLTK-1.1.x) and my build
> system  parses  the FLTK  header  files  to  extract things  like  the
> contents of enumerations etc.  So,  I'd like to know the most portable
> way of finding where the headers are in the file system.
> 
> At the  moment I'm  preprocessing a wrapper  file that  #include-s the
> header I'm  interested in.   However, parsing the  preprocessed output
> has turned  out to  be a  pain, so I'd  like to  just open  the header
> directly  and  read it.   That  means  finding  it.  Unfortunately  it
> doesn't seem to be possible to query fltk-config to find out where the
> headers were installed.  (Unless I've missed a trick.)
> 
> So, how do I find things  like Enumerations.H in the most portable way
> possible?

        Hmm, I have a question.

        Are you trying to determine this at runtime (ie. when the user
        is running the ruby script), or is this something being done to
        'pre-build' the ruby extensions, so that you can then release
        binaries/ruby files that users would then install and use as a
        package.

        If the former, yes, I guess you'd have to interrogate the user's
        system to figure out which version of fltk they have installed,
        which I suppose could be anywhere; /usr/local/include/FL, 
/usr/include/FL, etc.

        If the latter, I'd think that when you do your build, you would
        specify the path to the FLTK directory for the version being built
        against, which is always the directory that contains the /FL/ include 
dir,
        eg:

                /usr/local/src/fltk-1.1.7/
                /usr/local/src/fltk-1.1.9/
                /usr/local/src/fltk-1.3.x-svn/

        I myself often have several versions of fltk on my machine, esp. when
        testing new releases, or when upgrading.
        
        I'd think all fltk bindings to perl/python/ruby/etc are 'packages'
        that include binaries, so that the user doesn't have to have FLTK
        'installed' on the machine in question; the package includes whatever
        the script language binding needs all within the package.. and not 
include
        any of the C++ compiler oriented files.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to