add version info the library headers

This commit is contained in:
Dana Jansens 2003-10-27 20:11:14 +00:00
parent def76092b5
commit 13206849ea
5 changed files with 22 additions and 1 deletions

View file

@ -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 \

View file

@ -113,6 +113,7 @@ AC_CONFIG_FILES([
po/Makefile.in
render/obrender-3.0.pc
parser/obparser-3.0.pc
version.h
])
AC_OUTPUT

View file

@ -19,6 +19,8 @@
#ifndef __parse_h
#define __parse_h
#include "version.h"
#include <libxml/parser.h>
#include <glib.h>

View file

@ -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>

15
version.h.in Normal file
View file

@ -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