add version info the library headers
[mikachu/openbox.git] / version.h.in
diff --git a/version.h.in b/version.h.in
new file mode 100644 (file)
index 0000000..da3f02e
--- /dev/null
@@ -0,0 +1,15 @@
+#ifndef ob__version_h
+#define ob__version_h
+
+#define OB_MAJOR_VERSION @OB_MAJOR_VERSION@
+#define OB_MINOR_VERSION @OB_MINOR_VERSION@
+#define OB_MICRO_VERSION @OB_MICRO_VERSION@
+#define OB_VERSION OB_MAJOR_VERSION.OB_MINOR_VERSION.OB_MICRO_VERSION
+
+#define OB_CHECK_VERSION(major,minor,micro) \
+    (OB_MAJOR_VERSION > (major) || \
+     (OB_MAJOR_VERSION == (major) && OB_MINOR_VERSION > (minor)) || \
+     (OB_MAJOR_VERSION == (major) && OB_MINOR_VERSION == (minor) && \
+      OB_MICRO_VERSION >= (micro)))
+
+#endif