vte r2061 - in trunk: . doc/reference doc/reference/tmpl src



Author: chpe
Date: Tue Jun 24 18:12:02 2008
New Revision: 2061
URL: http://svn.gnome.org/viewvc/vte?rev=2061&view=rev

Log:
Bug 535468 â need version check macros

Added:
   trunk/doc/reference/tmpl/vteversion.sgml
   trunk/src/vteversion.h.in
Modified:
   trunk/ChangeLog
   trunk/configure.in
   trunk/doc/reference/vte-sections.txt
   trunk/doc/reference/vte.types
   trunk/src/Makefile.am
   trunk/src/vte.h

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Tue Jun 24 18:12:02 2008
@@ -1,9 +1,15 @@
+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 @@
 	;;
 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 @@
 
 ################################################################################
 
+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

Added: trunk/doc/reference/tmpl/vteversion.sgml
==============================================================================
--- (empty file)
+++ trunk/doc/reference/tmpl/vteversion.sgml	Tue Jun 24 18:12:02 2008
@@ -0,0 +1,59 @@
+<!-- ##### 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
+
+

Modified: trunk/doc/reference/vte-sections.txt
==============================================================================
--- trunk/doc/reference/vte-sections.txt	(original)
+++ trunk/doc/reference/vte-sections.txt	Tue Jun 24 18:12:02 2008
@@ -98,6 +98,16 @@
 </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>
 VteTerminalAccessible

Modified: trunk/doc/reference/vte.types
==============================================================================
--- trunk/doc/reference/vte.types	(original)
+++ trunk/doc/reference/vte.types	Tue Jun 24 18:12:02 2008
@@ -2,6 +2,7 @@
 #include <glib-object.h>
 #include <gtk/gtk.h>
 #include "vte.h"
+#include "vteversion.h"
 #include "vteaccess.h"
 #include "reaper.h"
 

Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am	(original)
+++ trunk/src/Makefile.am	Tue Jun 24 18:12:02 2008
@@ -1,5 +1,5 @@
 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 @@
 	vtetc.c \
 	vtetc.h \
 	vtetree.c \
-	vtetree.h
+	vtetree.h \
+	vteversion.h
+
 if BUILD_XFT
 libvte_la_SOURCES += \
 	vtexft.c \

Modified: trunk/src/vte.h
==============================================================================
--- trunk/src/vte.h	(original)
+++ trunk/src/vte.h	Tue Jun 24 18:12:02 2008
@@ -25,6 +25,8 @@
 
 #include <sys/types.h> /* for pid_t */
 
+#include "vteversion.h"
+
 G_BEGIN_DECLS
 
 /* Private implementation details. */

Added: trunk/src/vteversion.h.in
==============================================================================
--- (empty file)
+++ trunk/src/vteversion.h.in	Tue Jun 24 18:12:02 2008
@@ -0,0 +1,31 @@
+/*
+ * 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 */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]