all repos — openbox @ 13206849ea97d9572c0ea23981ee4c61df1ec702

openbox fork - make it a bit more like ryudo

add version info the library headers
Dana Jansens danakj@orodu.net
commit

13206849ea97d9572c0ea23981ee4c61df1ec702

parent

def76092b587e7e9a2b212dc5211773e336525e1

5 files changed, 22 insertions(+), 1 deletions(-)

jump to
M Makefile.amMakefile.am

@@ -260,7 +260,8 @@

pubinclude_HEADERS = \ render/render.h \ render/theme.h \ - parser/parse.h + parser/parse.h \ + version.h nodist_pkgconfig_DATA = \ render/obrender-3.0.pc \
M configure.acconfigure.ac

@@ -113,6 +113,7 @@ m4/Makefile

po/Makefile.in render/obrender-3.0.pc parser/obparser-3.0.pc + version.h ]) AC_OUTPUT
M parser/parse.hparser/parse.h

@@ -19,6 +19,8 @@

#ifndef __parse_h #define __parse_h +#include "version.h" + #include <libxml/parser.h> #include <glib.h>
M render/render.hrender/render.h

@@ -20,6 +20,8 @@

#ifndef __render_h #define __render_h +#include "version.h" + #include <X11/Xlib.h> /* some platforms dont include this as needed for Xft */ #define _XFT_NO_COMPAT_ /* no Xft 1 API */ #include <X11/Xft/Xft.h>
A 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