[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cairo
Subject:    Re: [cairo] config.h ?
From:       Emmanuele Bassi <ebassi () gmail ! com>
Date:       2021-05-19 16:20:31
Message-ID: CALnHYQHq2SCBpv7U1yPvbWC_wszbo0d67WGJ_KFgGAxGgM89qw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Wed, 19 May 2021 at 16:24, John Emmas <john@creativepost.co.uk> wrote:

> On 19/05/2021 15:50, Emmanuele Bassi wrote:
>
>
> Yes, it's generated by the `configure` script in Autotools, just like
> Meson.
>
>
> Ah... in my case I'm building with (my own) Visual C++ build projects.  At
> one time, some libraries could generate VC project files either using Meson
> or CMake but I never really found them satisfactory.  Could you maybe
> attach a copy of config.h so I can at least see what kinda stuff it needs
> to contain?  Thanks,
>

The `config.h` file is just a list of `#define FOO` symbols that are
discovered at configuration time depending on your platform, like:

```
/* Define to 1 if the PS backend can be tested (needs ghostscript) */
#define CAIRO_CAN_TEST_PS_SURFACE 1

/* Define to 1 if the SVG backend can be tested */
#define CAIRO_CAN_TEST_SVG_SURFACE 1

/* Define to 1 if the Win32 Printing backend can be tested (needs
ghostscript)
   */
/* #undef CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE */

/* Define to 1 if dlsym is available */
#define CAIRO_HAS_DLSYM 1

/* Define to 1 to enable cairo's cairo-script-interpreter feature */
#define CAIRO_HAS_INTERPRETER 1

/* Define to 1 to enable cairo's pthread feature */
#define CAIRO_HAS_PTHREAD 1

/* Define to 1 if we have full pthread support */
#define CAIRO_HAS_REAL_PTHREAD 1
```

If you're using your own build system, unsanctioned by the Cairo project,
then I'm afraid you're on your own. The reason why `HAVE_CONFIG_H` was
removed was because all the build systems supported by Cairo—i.e. the in
tree ones—generated a `config.h`, so there's literally no point in defining
`HAVE_CONFIG_H` to guard the `config.h` inclusion.

Incidentally, if you relied on that to build Cairo, you probably have been
building a fairly broken version of it—unless, of course, you've also been
injecting symbols like `CAIRO_HAS_DLSYM` or `HAVE_OS_ATOMIC_OPS` or
`HAVE_UINT64_T` in your build environment.

Personally, I'd ask you to use the build system provided by the project
you're building, instead of going at it in your own way.

Ciao,
 Emmanuele.

-- 
https://www.bassi.io
[@] ebassi [@gmail.com]

[Attachment #5 (text/html)]

<div dir="ltr"><div dir="ltr">On Wed, 19 May 2021 at 16:24, John Emmas &lt;<a \
href="mailto:john@creativepost.co.uk" target="_blank">john@creativepost.co.uk</a>&gt; \
wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" \
style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex">  
    
  
  <div bgcolor="#FFFFFF">
    <div>On 19/05/2021 15:50, Emmanuele Bassi
      wrote:</div>
    <blockquote type="cite">
      <div dir="ltr">
        <div class="gmail_quote"><br>
          <div>Yes, it&#39;s generated by the `configure` script in
            Autotools, just like Meson.</div>
          <div> <br>
          </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">  </blockquote>
        </div>
      </div>
    </blockquote>
    <br>
    Ah... in my case I&#39;m building with (my own) Visual C++ build
    projects.   At one time, some libraries could generate VC project
    files either using Meson or CMake but I never really found them
    satisfactory.   Could you maybe attach a copy of config.h so I can at
    least see what kinda stuff it needs to contain?   \
Thanks,<br></div></blockquote></div><div><br></div><div>The `config.h` file is just a \
list of `#define FOO` symbols that are discovered at configuration time depending on \
your platform, like:</div><div><br></div><div>```</div><div>/* Define to 1 if the PS \
backend can be tested (needs ghostscript) */<br>#define CAIRO_CAN_TEST_PS_SURFACE \
1<br><br>/* Define to 1 if the SVG backend can be tested */<br>#define \
CAIRO_CAN_TEST_SVG_SURFACE 1<br><br>/* Define to 1 if the Win32 Printing backend can \
be tested (needs ghostscript)<br>     */<br>/* #undef \
CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE */<br><br>/* Define to 1 if dlsym is available \
*/<br>#define CAIRO_HAS_DLSYM 1<br><br>/* Define to 1 to enable cairo&#39;s \
cairo-script-interpreter feature */<br>#define CAIRO_HAS_INTERPRETER 1<br><br>/* \
Define to 1 to enable cairo&#39;s pthread feature */<br>#define CAIRO_HAS_PTHREAD \
1<br><br>/* Define to 1 if we have full pthread support */<br>#define \
CAIRO_HAS_REAL_PTHREAD 1<br></div><div>```<br></div><div><br></div><div>If you&#39;re \
using your own build system, unsanctioned by the Cairo project, then I&#39;m afraid \
you&#39;re on your own. The reason why `HAVE_CONFIG_H` was removed was because all \
the build systems supported by Cairo—i.e. the in tree ones—generated a \
`config.h`, so there&#39;s literally no point in defining `HAVE_CONFIG_H` to guard \
the `config.h` inclusion.</div><div><br></div><div>Incidentally, if you relied on \
that to build Cairo, you probably have been building a fairly broken version of \
it—unless, of course, you&#39;ve also been injecting symbols like `CAIRO_HAS_DLSYM` \
or `HAVE_OS_ATOMIC_OPS` or `HAVE_UINT64_T` in your build \
environment.</div><div><br></div><div>Personally, I&#39;d ask you to use the build \
system provided by the project you&#39;re building, instead of going at it in your \
own way.<br></div><div><br></div><div>Ciao,</div><div>  \
Emmanuele.<br></div><div><br></div>-- <br><div dir="ltr"><a \
href="https://www.bassi.io" target="_blank">https://www.bassi.io</a><br>[@] ebassi \
[@<a href="http://gmail.com" target="_blank">gmail.com</a>]</div></div>



-- 
cairo mailing list
cairo@cairographics.org
https://lists.cairographics.org/mailman/listinfo/cairo


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic