always define HAVE_CAIRO
authorEric Engestrom <eric.engestrom@imgtec.com>
Fri, 26 Jan 2018 15:15:29 +0000 (15:15 +0000)
committerEric Engestrom <eric.engestrom@imgtec.com>
Mon, 29 Jan 2018 15:41:52 +0000 (15:41 +0000)
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
configure.ac
meson.build
tests/util/pattern.c

index e19fdc9..993c2a2 100644 (file)
@@ -466,6 +466,8 @@ if test "x$CAIRO" = xyes; then
                AC_MSG_ERROR([Cairo support required but not present])
        fi
        AC_DEFINE(HAVE_CAIRO, 1, [Have Cairo support])
+else
+       AC_DEFINE(HAVE_CAIRO, 0)
 fi
 AC_MSG_RESULT([$CAIRO])
 AM_CONDITIONAL(HAVE_CAIRO, [test "x$CAIRO" = xyes])
index c7245dd..15a1d40 100644 (file)
@@ -256,15 +256,13 @@ foreach t : [[with_intel, 'INTEL'], [with_vmwgfx, 'VMWGFX'],
              [with_exynos, 'EXYNOS'],
              [with_vc4, 'VC4'],
              [with_freedreno_kgsl, 'FREEDRENO_KGSL'],
+             [dep_cairo.found(), 'CAIRO'],
              [with_radeon, 'RADEON']]
   config.set10('HAVE_@0@'.format(t[1]), t[0])
 endforeach
 if with_freedreno_kgsl and not with_freedreno
   error('cannot enable freedreno-kgsl without freedreno support')
 endif
-if dep_cairo.found()
-  config.set10('HAVE_CAIRO', true)
-endif
 if dep_valgrind.found()
   config.set10('HAVE_VALGRIND', true)
 endif
index 2366b00..75a458d 100644 (file)
@@ -34,7 +34,7 @@
 
 #include <drm_fourcc.h>
 
-#ifdef HAVE_CAIRO
+#if HAVE_CAIRO
 #include <cairo.h>
 #include <math.h>
 #endif
@@ -546,7 +546,7 @@ static void fill_smpte(const struct util_format_info *info, void *planes[3],
 static void make_pwetty(void *data, unsigned int width, unsigned int height,
                        unsigned int stride, uint32_t format)
 {
-#ifdef HAVE_CAIRO
+#if HAVE_CAIRO
        cairo_surface_t *surface;
        cairo_t *cr;
        cairo_format_t cairo_format;