Author: xan
Date: Sun Feb 17 18:08:13 2008
New Revision: 7958
URL: http://svn.gnome.org/viewvc/epiphany?rev=7958&view=rev

Log:
Add EPHY_CHECK_VERSION (#513128)


Added:
   trunk/src/ephy-version.h.in
Modified:
   trunk/configure.ac
   trunk/src/Makefile.am

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac  (original)
+++ trunk/configure.ac  Sun Feb 17 18:08:13 2008
@@ -42,6 +42,11 @@
 
AC_SUBST([EPIPHANY_API_VERSION],[epiphany_version_major.epiphany_version_minor])
 AC_SUBST([EPIPHANY_UA_VERSION])
 
+# for EPHY_CHECK_VERSION
+AC_SUBST([EPIPHANY_MAJOR_VERSION], [epiphany_version_major])
+AC_SUBST([EPIPHANY_MINOR_VERSION], [epiphany_version_minor])
+AC_SUBST([EPIPHANY_MICRO_VERSION], [epiphany_version_micro])
+
 # Build ID
 BUILDID="$(TZ=UTC0 date +'%Y%m%d')"
 AC_SUBST([BUILDID])
@@ -794,6 +799,7 @@
 embed/webkit/Makefile
 src/Makefile
 src/bookmarks/Makefile
+src/ephy-version.h
 help/Makefile
 plugins/Makefile
 plugins/desktop-file/Makefile

Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am       (original)
+++ trunk/src/Makefile.am       Sun Feb 17 18:08:13 2008
@@ -52,6 +52,7 @@
        ephy-shell.h                    \
        ephy-statusbar.h                \
        ephy-window.h                   \
+       ephy-version.h                  \
        $(NULL)
 
 libephymain_la_SOURCES = \

Added: trunk/src/ephy-version.h.in
==============================================================================
--- (empty file)
+++ trunk/src/ephy-version.h.in Sun Feb 17 18:08:13 2008
@@ -0,0 +1,35 @@
+/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
+/*  Copyright © 2008 Xan Lopez <[EMAIL PROTECTED]>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2, or (at your option)
+ *  any later version.
+ *
+ *  This program 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 General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA.
+ *
+ */
+
+#ifndef __EPHY_VERSION_H__
+#define __EPHY_VERSION_H__
+
+/* From GTK_CHECK_VERSION */
+
+#define EPHY_MAJOR_VERSION (@EPIPHANY_MAJOR_VERSION@)
+#define EPHY_MINOR_VERSION (@EPIPHANY_MINOR_VERSION@)
+#define EPHY_MICRO_VERSION (@EPIPHANY_MICRO_VERSION@)
+
+#define EPHY_CHECK_VERSION(major, minor, micro)\
+  (EPHY_MAJOR_VERSION > (major) || \
+   (EPHY_MAJOR_VERSION == (major) && EPHY_MINOR_VERSION > (minor)) ||  \
+    (EPHY_MAJOR_VERSION == (major) && EPHY_MINOR_VERSION == (minor) && \
+     EPHY_MICRO_VERSION >= (micro)))
+
+#endif
_______________________________________________
SVN-commits-list mailing list (read only)
http://mail.gnome.org/mailman/listinfo/svn-commits-list

Want to limit the commits to a few modules? Go to above URL, log in to edit 
your options and select the modules ('topics') you want.
Module maintainer? It is possible to set the reply-to to your development 
mailing list. Email [EMAIL PROTECTED] if interested.

Reply via email to