[cairo] Advertising the version of cairo
Behdad Esfahbod
behdad at cs.toronto.edu
Mon Aug 8 20:12:39 PDT 2005
On Mon, 8 Aug 2005, Carl Worth wrote:
> I don't know what the right autofoo is to make this reasonable to work
> with. We do already have one generated header file, (cairo-features.h),
> so we could lodge this stuff in there. Suggestions, (and
> implementation), would be quite welcome.
Attached is enough autofoo magic that enables you hack it however
you like.
> -Carl
>
--behdad
http://behdad.org/
-------------- next part --------------
Index: configure.in
===================================================================
RCS file: /cvs/cairo/cairo/configure.in,v
retrieving revision 1.118
diff -u -p -r1.118 configure.in
--- configure.in 3 Aug 2005 17:32:50 -0000 1.118
+++ configure.in 9 Aug 2005 03:09:17 -0000
@@ -1,12 +1,7 @@
AC_PREREQ(2.54)
-AC_INIT(src/cairo.h)
-
dnl ===========================================================================
-# Package version number, (as distinct from shared library version)
-CAIRO_VERSION=0.6.0-head
-
# libtool shared library version
# Increment if the interface has additions, changes, removals.
@@ -24,13 +19,35 @@ LT_AGE=0
VERSION_INFO="$LT_CURRENT:$LT_REVISION:$LT_AGE"
AC_SUBST(VERSION_INFO)
+# cairo version
+
+m4_define(cairo_version_major, 0)
+m4_define(cairo_version_minor, 6)
+m4_define(cairo_version_micro, 0)
+m4_define(cairo_version_other, -head)
+
dnl ===========================================================================
-AM_INIT_AUTOMAKE(cairo, $CAIRO_VERSION)
-AM_CONFIG_HEADER(config.h)
+AC_INIT([cairo],
+ cairo_version_major.cairo_version_minor.cairo_version_micro[]cairo_version_other,
+ [http://bugs.freedesktop.org/enter_bug.cgi?product=cairo])
+AC_REVISION([$Id: $])
+AC_CONFIG_SRCDIR(src/cairo.h)
+AC_CONFIG_HEADERS(config.h)
+AM_INIT_AUTOMAKE([1.7 gnu])
+
+CAIRO_VERSION_MAJOR=cairo_version_major()
+CAIRO_VERSION_MINOR=cairo_version_minor()
+CAIRO_VERSION_MICRO=cairo_version_micro()
+CAIRO_VERSION_OTHER=cairo_version_other()
+AC_SUBST(CAIRO_VERSION_MAJOR)
+AC_SUBST(CAIRO_VERSION_MINOR)
+AC_SUBST(CAIRO_VERSION_MICRO)
+AC_SUBST(CAIRO_VERSION_OTHER)
AM_MAINTAINER_MODE
+AC_GNU_SOURCE
AC_PROG_CC
AC_PROG_CPP
AM_PROG_LIBTOOL
@@ -58,14 +75,11 @@ AC_DEFUN([_CHECK_FUNCS_WITH_FLAGS],
dnl ===========================================================================
-AC_CHECK_FUNCS(vasnprintf)
-
+AC_CHECK_FUNCS(vasnprintf, sincos)
AC_CHECK_LIBM
LIBS="$LIBS $LIBM"
-AC_CHECK_FUNCS(sincos)
-
dnl ===========================================================================
AC_ARG_ENABLE(xlib,
Index: src/cairo-features.h.in
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-features.h.in,v
retrieving revision 1.20
diff -u -p -r1.20 cairo-features.h.in
--- src/cairo-features.h.in 1 Aug 2005 20:33:47 -0000 1.20
+++ src/cairo-features.h.in 9 Aug 2005 03:09:17 -0000
@@ -45,6 +45,11 @@
# define CAIRO_END_DECLS
#endif
+#define CAIRO_VERSION_MAJOR @CAIRO_VERSION_MAJOR@
+#define CAIRO_VERSION_MINOR @CAIRO_VERSION_MINOR@
+#define CAIRO_VERSION_MICRO @CAIRO_VERSION_MICRO@
+#define CAIRO_VERSION_STRING "@CAIRO_VERSION_MAJOR at .@CAIRO_VERSION_MINOR at .@CAIRO_VERSION_MICRO@@CAIRO_VERSION_OTHER@"
+
@PS_SURFACE_FEATURE@
@PDF_SURFACE_FEATURE@
More information about the cairo
mailing list