From: Dana Jansens Date: Mon, 27 Oct 2003 20:11:14 +0000 (+0000) Subject: add version info the library headers X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=13206849ea97d9572c0ea23981ee4c61df1ec702;p=chaz%2Fopenbox add version info the library headers --- diff --git a/Makefile.am b/Makefile.am index e111dab5..7286ca37 100644 --- a/Makefile.am +++ b/Makefile.am @@ -260,7 +260,8 @@ dist_thebear_theme_DATA = \ pubinclude_HEADERS = \ render/render.h \ render/theme.h \ - parser/parse.h + parser/parse.h \ + version.h nodist_pkgconfig_DATA = \ render/obrender-3.0.pc \ diff --git a/configure.ac b/configure.ac index 1cec49e1..982c3bb5 100644 --- a/configure.ac +++ b/configure.ac @@ -113,6 +113,7 @@ AC_CONFIG_FILES([ po/Makefile.in render/obrender-3.0.pc parser/obparser-3.0.pc + version.h ]) AC_OUTPUT diff --git a/parser/parse.h b/parser/parse.h index 99780113..da754cbe 100644 --- a/parser/parse.h +++ b/parser/parse.h @@ -19,6 +19,8 @@ #ifndef __parse_h #define __parse_h +#include "version.h" + #include #include diff --git a/render/render.h b/render/render.h index 3e76ed8b..ab481b40 100644 --- a/render/render.h +++ b/render/render.h @@ -20,6 +20,8 @@ #ifndef __render_h #define __render_h +#include "version.h" + #include /* some platforms dont include this as needed for Xft */ #define _XFT_NO_COMPAT_ /* no Xft 1 API */ #include diff --git a/version.h.in b/version.h.in new file mode 100644 index 00000000..da3f02ef --- /dev/null +++ b/version.h.in @@ -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