summaryrefslogtreecommitdiff
path: root/src/check-link.c
blob: 66ca1b2413ca619511b6075b73234ef44fd42e3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#define CAIRO_VERSION_H 1

#include <cairo.h>

/* get the "real" version info instead of dummy cairo-version.h */
#undef CAIRO_VERSION_H
#include "../cairo-version.h"

#include <stdio.h>

int
main (void)
{
  printf ("Check linking to the just built cairo library\n");
  if (cairo_version () == CAIRO_VERSION) {
    return 0;
  } else {
    fprintf (stderr,
	     "Error: linked to cairo version %s instead of %s\n",
	     cairo_version_string (),
	     CAIRO_VERSION_STRING);
    return 1;
  }
}