Commit 460fcb3b authored by Christian Persch's avatar Christian Persch
Browse files

Bug 535468 – need version check macros

svn path=/trunk/; revision=2061
parent 089b2a4e
2008-06-23 Christian Persch <chpe@gnome.org>
Bug 535468 need version check macros
* configure.in
* doc/reference/tmpl/vteversion.sgml
* doc/reference/vte-sections.txt
* doc/reference/vte.types
* src/Makefile.am
* src/vte.h
A src/vteversion.h.in: Add version check macro.
2008-06-21 Kjartan Maraas <kmaraas@gnome.org>
* src/vte.h: Don't use GTK_CHECK* macros.
......
m4_define([vte_version_major],[0])
m4_define([vte_version_minor],[16])
m4_define([vte_version_micro],[15])
m4_define([vte_version],[vte_version_major.vte_version_minor.vte_version_micro])
AC_PREREQ(2.56)
AC_INIT(vte, [0.16.14],
AC_INIT(vte, [vte_version],
[http://bugzilla.gnome.org/enter_bug.cgi?product=vte])
AC_CONFIG_SRCDIR([src/vte.c])
AM_INIT_AUTOMAKE(1.6)
AM_CONFIG_HEADER([config.h])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-bzip2])
################################################################################
# Libtool shared library versioning stuffs.
......@@ -238,11 +244,12 @@ case $host in
;;
esac
GLIB_REQUIRED=2.14.0
GTK_REQUIRED=2.6.0
AC_DEFINE(GDK_MULTIHEAD_SAFE,1,[Force use of GDK's multihead-safe APIs.])
PKG_CHECK_MODULES(GLIB,glib-2.0 > 2.9.0)
PKG_CHECK_MODULES(GLIB,[glib-2.0 > $GLIB_REQUIRED])
PKG_CHECK_MODULES(GOBJECT,[glib-2.0 gobject-2.0])
PKG_CHECK_MODULES(GTK,[glib-2.0 gobject-2.0 gtk+-2.0 >= 2.6.0])
PKG_CHECK_MODULES(GTK,[glib-2.0 >= $GLIB_REQUIRED gobject-2.0 gtk+-2.0 >= $GTK_REQUIRED])
wantedmodules="glib-2.0 gobject-2.0 gtk+-2.0 fontconfig"
......@@ -613,9 +620,16 @@ GTK_DOC_CHECK([1.0])
################################################################################
AC_SUBST([VTE_MAJOR_VERSION],[vte_version_major])
AC_SUBST([VTE_MINOR_VERSION],[vte_version_minor])
AC_SUBST([VTE_MICRO_VERSION],[vte_version_micro])
################################################################################
AC_CONFIG_FILES([
Makefile
src/Makefile
src/vteversion.h
termcaps/Makefile
python/Makefile
po/Makefile.in
......
<!-- ##### SECTION Title ##### -->
Version Information
<!-- ##### SECTION Short_Description ##### -->
Defines and macros to check the VTE version
<!-- ##### SECTION Long_Description ##### -->
<para>
VTE provides version information, primarily useful in configure checks
for builds that have a configure script, and for use in C preprocessor directives.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### MACRO VTE_MAJOR_VERSION ##### -->
<para>
The major version number of the VTE library used at compile time. (e.g. in VTE version
0.16.15 this is 0.)
</para>
@Since: 0.16.15
<!-- ##### MACRO VTE_MINOR_VERSION ##### -->
<para>
The minor version number of the VTE library used at compile time. (e.g. in VTE version
0.16.15 this is 16.)
</para>
@Since: 0.16.15
<!-- ##### MACRO VTE_MICRO_VERSION ##### -->
<para>
The micro version number of the VTE library used at compile time. (e.g. in VTE version
0.16.15 this is 15.)
</para>
@Since: 0.16.15
<!-- ##### MACRO VTE_CHECK_VERSION ##### -->
<para>
Returns %TRUE if the version of the VTE header files is the same
as or newer than the passed-in version.
</para>
@major: major version to check for
@minor: minor version to check for
@micro: micro version to check for
@Since: 0.16.15
......@@ -97,6 +97,16 @@ vte_terminal_get_row_count
vte_terminal_get_window_title
</SECTION>
<SECTION>
<FILE>vteversion</FILE>
<TITLE>Version Information</TITLE>
<SUBSECTION>
VTE_MAJOR_VERSION
VTE_MINOR_VERSION
VTE_MICRO_VERSION
VTE_CHECK_VERSION
</SECTION>
<SECTION>
<FILE>vteaccess</FILE>
<TITLE>VteTerminalAccessible</TITLE>
......
......@@ -2,6 +2,7 @@
#include <glib-object.h>
#include <gtk/gtk.h>
#include "vte.h"
#include "vteversion.h"
#include "vteaccess.h"
#include "reaper.h"
......
bin_PROGRAMS = vte
pkginclude_HEADERS = pty.h reaper.h vte.h vteaccess.h
pkginclude_HEADERS = pty.h reaper.h vte.h vteaccess.h vteversion.h
lib_LTLIBRARIES = libvte.la
pkglib_PROGRAMS = interpret utf8echo nativeecho utf8mode iso8859mode slowcat vterdb
pkglib_SCRIPTS = decset osc window
......@@ -103,7 +103,9 @@ libvte_la_SOURCES = \
vtetc.c \
vtetc.h \
vtetree.c \
vtetree.h
vtetree.h \
vteversion.h
if BUILD_XFT
libvte_la_SOURCES += \
vtexft.c \
......
......@@ -25,6 +25,8 @@
#include <sys/types.h> /* for pid_t */
#include "vteversion.h"
G_BEGIN_DECLS
/* Private implementation details. */
......
/*
* Copyright © 2008 Christian Persch
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation; either version 2.1 of the License, or (at your
* option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with this library; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02110-1301 USA
*/
#ifndef vte_vteversion_h_included
#define vte_vteversion_h_included
#define VTE_MAJOR_VERSION (@VTE_MAJOR_VERSION@)
#define VTE_MINOR_VERSION (@VTE_MINOR_VERSION@)
#define VTE_MICRO_VERSION (@VTE_MICRO_VERSION@)
#define VTE_CHECK_VERSION(major,minor,micro) \
(VTE_MAJOR_VERSION > (major) || \
(VTE_MAJOR_VERSION == (major) && VTE_MINOR_VERSION > (minor)) || \
(VTE_MAJOR_VERSION == (major) && VTE_MINOR_VERSION == (minor) && VTE_MICRO_VERSION >= (micro)))
#endif /* !vte_vteversion_h_included */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment