[poppler] configure.ac glib/poppler-features.h.in glib/reference
Carlos Garcia Campos
carlosgc at kemper.freedesktop.org
Fri Jun 5 00:52:38 PDT 2009
configure.ac | 11 +++-
glib/poppler-features.h.in | 9 +++
glib/reference/poppler-docs.sgml | 1
glib/reference/poppler-sections.txt | 10 +++
glib/reference/tmpl/poppler-features.sgml | 80 ++++++++++++++++++++++++++++++
5 files changed, 110 insertions(+), 1 deletion(-)
New commits:
commit 0ca7e214fb5f9c9fb59792149bd23c1617d38cac
Author: Christian Persch <chpe at gnome.org>
Date: Thu Jun 4 22:35:40 2009 +0200
Add poppler version defines and version check macro
Add POPPLER_[MAJOR|MINOR|MICRO]_VERSION defines and
POPPLER_CHECK_VERSION macro. FDO bug #22091.
diff --git a/configure.ac b/configure.ac
index 1eb8fd1..605251e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,10 @@
+m4_define([poppler_version_major],[0])
+m4_define([poppler_version_minor],[11])
+m4_define([poppler_version_micro],[0])
+m4_define([poppler_version],[poppler_version_major.poppler_version_minor.poppler_version_micro])
+
AC_PREREQ(2.59)
-AC_INIT(poppler, 0.11.0)
+AC_INIT([poppler],[poppler_version],[https://bugs.freedesktop.org/enter_bug.cgi?product=poppler])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign])
AM_CONFIG_HEADER(config.h)
@@ -496,6 +501,10 @@ esac
AC_SUBST(PC_REQUIRES)
AC_SUBST(PC_REQUIRES_PRIVATE)
+AC_SUBST([POPPLER_MAJOR_VERSION],[poppler_version_major])
+AC_SUBST([POPPLER_MINOR_VERSION],[poppler_version_minor])
+AC_SUBST([POPPLER_MICRO_VERSION],[poppler_version_micro])
+
AC_OUTPUT([
Makefile
goo/Makefile
diff --git a/glib/poppler-features.h.in b/glib/poppler-features.h.in
index 7b72569..99c7ed8 100644
--- a/glib/poppler-features.h.in
+++ b/glib/poppler-features.h.in
@@ -22,4 +22,13 @@
@CAIRO_FEATURE@
@GDK_FEATURE@
+#define POPPLER_MAJOR_VERSION (@POPPLER_MAJOR_VERSION@)
+#define POPPLER_MINOR_VERSION (@POPPLER_MINOR_VERSION@)
+#define POPPLER_MICRO_VERSION (@POPPLER_MICRO_VERSION@)
+
+#define POPPLER_CHECK_VERSION(major,minor,micro) \
+ (POPPLER_MAJOR_VERSION > (major) || \
+ (POPPLER_MAJOR_VERSION == (major) && POPPLER_MINOR_VERSION > (minor)) || \
+ (POPPLER_MAJOR_VERSION == (major) && POPPLER_MINOR_VERSION == (minor) && POPPLER_MICRO_VERSION >= (micro)))
+
#endif /* __POPPLER_FEATURES_H__ */
diff --git a/glib/reference/poppler-docs.sgml b/glib/reference/poppler-docs.sgml
index e75d4cd..33dc2c4 100644
--- a/glib/reference/poppler-docs.sgml
+++ b/glib/reference/poppler-docs.sgml
@@ -17,5 +17,6 @@
<xi:include href="xml/poppler-enums.xml"/>
<xi:include href="xml/poppler-annot.xml"/>
<xi:include href="xml/poppler-layer.xml"/>
+ <xi:include href="xml/poppler-features.xml"/>
</chapter>
</book>
diff --git a/glib/reference/poppler-sections.txt b/glib/reference/poppler-sections.txt
index 5388be0..070fdc9 100644
--- a/glib/reference/poppler-sections.txt
+++ b/glib/reference/poppler-sections.txt
@@ -308,3 +308,13 @@ poppler_layer_hide
poppler_layer_is_parent
poppler_layer_get_radio_button_group_id
</SECTION>
+
+<SECTION>
+<FILE>poppler-features</FILE>
+POPPLER_HAS_CAIRO
+POPPLER_WITH_GDK
+POPPLER_MAJOR_VERSION
+POPPLER_MINOR_VERSION
+POPPLER_MICRO_VERSION
+POPPLER_CHECK_VERSION
+</SECTION>
diff --git a/glib/reference/tmpl/poppler-features.sgml b/glib/reference/tmpl/poppler-features.sgml
new file mode 100644
index 0000000..22f90b0
--- /dev/null
+++ b/glib/reference/tmpl/poppler-features.sgml
@@ -0,0 +1,80 @@
+<!-- ##### SECTION Title ##### -->
+Version and Features Information
+
+<!-- ##### SECTION Short_Description ##### -->
+Variables and functions to check the poppler version and features
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+Poppler provides version information, and information about features
+enabled at compile time. This is primarily useful in configure checks
+for builds that have a configure script, or for allowing code to optionally
+depend but not require a specific poppler version.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### MACRO POPPLER_HAS_CAIRO ##### -->
+<para>
+Defined if poppler was compiled with cairo support.
+</para>
+
+
+
+<!-- ##### MACRO POPPLER_WITH_GDK ##### -->
+<para>
+Defined if poppler was compiled with GDK support.
+</para>
+
+
+
+<!-- ##### MACRO POPPLER_MAJOR_VERSION ##### -->
+<para>
+The major version number of the poppler header files (e.g. in poppler version
+0.1.2 this is 0.)
+</para>
+
+Since: 0.11
+
+
+
+<!-- ##### MACRO POPPLER_MINOR_VERSION ##### -->
+<para>
+
+</para>
+The major version number of the poppler header files (e.g. in poppler version
+0.1.2 this is 1.)
+
+Since: 0.11
+
+
+
+<!-- ##### MACRO POPPLER_MICRO_VERSION ##### -->
+<para>
+The micro version number of the poppler header files (e.g. in poppler version
+0.1.2 this is 2.)
+</para>
+
+Since: 0.11
+
+
+
+<!-- ##### MACRO POPPLER_CHECK_VERSION ##### -->
+<para>
+Returns %TRUE if the version of the poppler header files is the same
+as or newer than the passed-in version.
+</para>
+
+ at major: major version (e.g. 0 for version 0.1.2)
+ at minor: minor version (e.g. 1 for version 0.1.2)
+ at micro: micro version (e.g. 2 for version 0.1.2)
+
+Since: 0.11
+
+
More information about the poppler
mailing list