summaryrefslogtreecommitdiff
path: root/boilerplate/check-link.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2008-09-02 22:03:05 -0400
committerBehdad Esfahbod <behdad@behdad.org>2008-09-02 22:03:05 -0400
commit78127c7fb43db9e020551b04d8f85e0bdcc4c894 (patch)
treea5377240dc84a418931aba57d8326e26a6f3b756 /boilerplate/check-link.c
parentbd9743b318c0f3a76f72d2e05eb71eb918acdfae (diff)
downloadcairo-78127c7fb43db9e020551b04d8f85e0bdcc4c894.tar.gz
[boilerplate/check-link.c] Oops. Add it.
Diffstat (limited to 'boilerplate/check-link.c')
-rw-r--r--boilerplate/check-link.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/boilerplate/check-link.c b/boilerplate/check-link.c
new file mode 100644
index 000000000..f16444878
--- /dev/null
+++ b/boilerplate/check-link.c
@@ -0,0 +1,24 @@
+#define CAIRO_VERSION_H 1
+
+#include <cairo-boilerplate.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 boilerplate library\n");
+ if (cairo_boilerplate_version () == CAIRO_VERSION) {
+ return 0;
+ } else {
+ fprintf (stderr,
+ "Error: linked to cairo boilerplate version %s instead of %s\n",
+ cairo_boilerplate_version_string (),
+ CAIRO_VERSION_STRING);
+ return 1;
+ }
+}