summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am12
-rw-r--r--configure.in48
-rw-r--r--src/Makefile.am4
3 files changed, 28 insertions, 36 deletions
diff --git a/Makefile.am b/Makefile.am
index 401af2c5d..56026ccd4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -135,7 +135,7 @@ developer_zip_file = /tmp/$(PACKAGE)-dev-$(VERSION).zip
$(runtime_zip_file): install
-$(RM) $@
cd $(prefix); \
- zip $@ bin/libcairo-$(LT_CURRENT_MINUS_AGE).dll
+ zip $@ bin/libcairo-$(CAIRO_VERSION_SONUM).dll
$(developer_zip_file): install
-$(RM) $@
@@ -156,14 +156,6 @@ release-verify-sane-tests:
@echo "Checking that the test suite is sane..."
@cd test && $(MAKE) $(AM_MAKEFLAGS) release-verify-sane-tests
-release-verify-soname-major:
- @echo -n "Checking that the cairo soname major number is 2..."
- @test "$(LT_CURRENT_MINUS_AGE)" = "2" \
- || (echo "Ouch." && echo "The soname major number is $(LT_CURRENT_MINUS_AGE) instead of 2." \
- && echo "The libtool shared library version numbers in configure.in must be incremented properly." \
- && false)
- @echo "Good."
-
release-verify-even-micro:
@echo -n "Checking that $(VERSION) has an even micro component..."
@test "$(CAIRO_VERSION_MICRO)" = "`echo $(CAIRO_VERSION_MICRO)/2*2 | bc`" \
@@ -191,7 +183,7 @@ release-remove-old:
release-cleanup-group-sticky:
find . -type f | xargs chmod g-s
-release-check: release-verify-sane-changelogs release-verify-sane-tests release-verify-soname-major release-verify-even-micro release-verify-newer release-remove-old release-cleanup-group-sticky distcheck
+release-check: release-verify-sane-changelogs release-verify-sane-tests release-verify-even-micro release-verify-newer release-remove-old release-cleanup-group-sticky distcheck
release-upload: release-check $(tar_file) $(sha1_file) $(gpg_file)
mkdir -p releases
diff --git a/configure.in b/configure.in
index 5b0bde97c..4144c53ec 100644
--- a/configure.in
+++ b/configure.in
@@ -1,16 +1,12 @@
AC_PREREQ(2.58)
+dnl Parse Version.mk and declare m4 variables out of it
m4_define([cairo_version_macro],
m4_bpatsubst(m4_include(Version.mk),
[^\([a-zA-Z0-9_]*\) *= *\(.*\)],
[[m4_define(\1, \[\2\])]]))
cairo_version_macro
-m4_define([cairo_release_status],
- [m4_if(m4_eval(cairo_version_micro % 2), [1], [git],
- [m4_if(m4_eval(cairo_version_minor % 2), [1], [snapshot],
- [release])])])
-
AC_INIT([cairo],
cairo_version_major.cairo_version_minor.cairo_version_micro,
[http://bugs.freedesktop.org/enter_bug.cgi?product=cairo])
@@ -26,36 +22,40 @@ AM_INIT_AUTOMAKE([1.8])
dnl ===========================================================================
-# libtool shared library version
+dnl This macro expands to one of 'git', 'snapshot', or 'release'
+m4_define([cairo_release_status],
+ [m4_if(m4_eval(cairo_version_micro % 2), [1], [git],
+ [m4_if(m4_eval(cairo_version_minor % 2), [1], [snapshot],
+ [release])])])
-# Increment if the interface has additions, changes, removals.
-m4_define(LT_CURRENT, 22)
+dnl This is the .so/dll number. 2 for cairo-1.x.x
+m4_define(cairo_version_sonum, m4_eval(cairo_version_major + 1))
-# Increment any time the source changes; set to
-# 0 if you increment CURRENT
-m4_define(LT_REVISION, 0)
+dnl libtool shared library version
-# Increment if any interfaces have been added; set to 0
-# if any interfaces have been removed. removal has
-# precedence over adding, so set to 0 if both happened.
-m4_define(LT_AGE, 20)
+dnl Increment if the interface has additions, changes, removals.
+m4_define(cairo_libtool_current, 22)
-dnl ===========================================================================
+dnl Increment any time the source changes;
+dnl set to 0 if you increment cairo_libtool_current
+m4_define(cairo_libtool_revision, 0)
-VERSION_INFO=LT_CURRENT():LT_REVISION():LT_AGE()
-AC_SUBST(VERSION_INFO)
+m4_define(cairo_libtool_age, m4_eval(cairo_libtool_current - cairo_version_sonum))
-LT_CURRENT_MINUS_AGE=m4_eval(LT_CURRENT() - LT_AGE())
-AC_SUBST(LT_CURRENT_MINUS_AGE)
+dnl ===========================================================================
-CAIRO_VERSION_MAJOR=cairo_version_major()
-CAIRO_VERSION_MINOR=cairo_version_minor()
-CAIRO_VERSION_MICRO=cairo_version_micro()
-CAIRO_RELEASE_STATUS=cairo_release_status()
+CAIRO_VERSION_MAJOR=cairo_version_major
+CAIRO_VERSION_MINOR=cairo_version_minor
+CAIRO_VERSION_MICRO=cairo_version_micro
+CAIRO_VERSION_SONUM=cairo_version_sonum
+CAIRO_RELEASE_STATUS=cairo_release_status
+CAIRO_LIBTOOL_VERSION_INFO=cairo_libtool_current:cairo_libtool_revision:cairo_libtool_age
AC_SUBST(CAIRO_VERSION_MAJOR)
AC_SUBST(CAIRO_VERSION_MINOR)
AC_SUBST(CAIRO_VERSION_MICRO)
+AC_SUBST(CAIRO_VERSION_SONUM)
AC_SUBST(CAIRO_RELEASE_STATUS)
+AC_SUBST(CAIRO_LIBTOOL_VERSION_INFO)
dnl ===========================================================================
diff --git a/src/Makefile.am b/src/Makefile.am
index bbec01103..2b9459b3b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -313,7 +313,7 @@ cairo_all_source_files = \
$(cairo_all_sources) \
$(cairo_special_sources)
-libcairo_la_LDFLAGS = -version-info @VERSION_INFO@ -no-undefined $(export_symbols)
+libcairo_la_LDFLAGS = -version-info $(CAIRO_LIBTOOL_VERSION_INFO) -no-undefined $(export_symbols)
libcairo_la_CFLAGS = -I$(srcdir) $(CAIRO_CFLAGS)
@@ -345,7 +345,7 @@ cairo.def: $(cairo_headers) cairo-features.h
grep -E '^cairo_.* \(' | \
sed -e 's/[ ].*//' | \
sort; \
- echo LIBRARY libcairo-$(LT_CURRENT_MINUS_AGE).dll; \
+ echo LIBRARY libcairo-$(CAIRO_VERSION_SONUM).dll; \
) >$@
@ ! grep -q cairo_ERROR $@ || ($(RM) $@; false)