Re: Confusion with Jam, confiigure.ac and configure.ac files

Eric Sunshine <[email protected]> Mon, 24 Jun 2013 05:29:10 -0400
Newsgroups gmane.comp.graphics.crystalspace.devel
Message-ID <CAPig+cT8-gvW=hHxiv909SsWjU+FZvoEW4U2VSzvHVVELC0ZCA@mail.gmail.com>
On Mon, Jun 24, 2013 at 1:06 AM, Mohit Taneja <[email protected]> wrote:
> I am trying to get EGL plugin compile on a Ubuntu system. I am having
> trouble understanding how the Jamfile work.
>
> So, just the way we check for glx.available in the jamfile for compiling glx
> plugin, in the same way I want to do it for egl, Now, what I understood with
> little searching around is that somehow configure file defines those
> variables used by jamfile, and the configure file is generated by
> configure.ac.

When you invoke 'configure', it checks for the presence of various
facilities. Some of the results of the checks are emitted as build
values in the generated Jamconfig and others as #defines in the
generated include/csconfig.h. Some checks may emit results to both
Jamconfig and csconfig.h. Jamfiles for individual CS modules can
consult the values emitted to Jamconfig. Source code can consult the
values emitted to csconfig.h.

> So, the only code in configure.ac for checking if glx is available is :
>
> CS_CHECK_GLX
> # Check for GLX extensions.  Define CSGL_EXT_STATIC_ASSERTION if _not_
> present.
> CS_CHECK_GLXEXT([], [CS_HEADER_PROPERTY([CSGL_EXT_STATIC_ASSERTION])])
>
> Now, I am confused about where is CS_CHECK_GLX defined or who interprets
> that what does it mean, and how can I do the same for EGL.

CS_CHECK_GLX is defined in CS/mk/autoconf/checkopengl.m4.
CS/configure.ac contains checks specific to CS. Checks in mk/autoconf
may be useful to external projects and are thus more generalized. Any
check defined in mk/autoconf may be invoked by CS/configure.ac (as is
this one).

You may be able to use one of the existing checks in checkopengl.m4 as
a template for your new check depending upon the nature of what you
need to test to make the determination.

-- ES

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev