From 7b3c9cef49cdedef03112054925005fa21120bd5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=B8ren=20Sandmann=20Pedersen?= Date: Mon, 6 Aug 2007 17:24:44 -0400 Subject: [PATCH] Change the library name to pixman-1 Set the soname to something based on the library version. --- Makefile.am | 4 ++-- configure.ac | 45 ++++++++++++++++++++++++++++++++++++++++-- pixman.pc.in => pixman-1.pc.in | 4 ++-- pixman/Makefile.am | 11 ++++++----- test/Makefile.am | 4 ++-- 5 files changed, 55 insertions(+), 13 deletions(-) rename pixman.pc.in => pixman-1.pc.in (64%) diff --git a/Makefile.am b/Makefile.am index 25be5f3..70035a1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ SUBDIRS = pixman test pkgconfigdir=$(libdir)/pkgconfig -pkgconfig_DATA=pixman.pc +pkgconfig_DATA=pixman-1.pc -$(pkgconfig_DATA): pixman.pc.in +$(pkgconfig_DATA): pixman-1.pc.in diff --git a/configure.ac b/configure.ac index b759c7f..518e7e8 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,31 @@ dnl Process this file with autoconf to create configure. AC_PREREQ([2.57]) -AC_INIT(pixman, 0.9.3, "sandmann@daimi.au.dk", pixman) +# Pixman versioning scheme +# +# - If the changes don't affect API or ABI, then increment pixman_micro +# - If API is added, then increment PIXMAN_MINOR, and set MICRO to 0 +# +# - If you break ABI, then +# - In the first development release where you break ABI, find all instances of +# "pixman-n" and change it to pixman-(n+1) +# +# This needs to be done at least in +# configure.ac +# all Makefile.am's +# pixman-n.pc.in +# +# This ensures that binary incompatible versions can be installed in parallel. +# See http://www106.pair.com/rhp/parallel.html for more information +# + +m4_define([pixman_major], 0) +m4_define([pixman_minor], 9) +m4_define([pixman_micro], 3) + +m4_define([pixman_version],[pixman_major.pixman_minor.pixman_micro]) + +AC_INIT(pixman, pixman_version, "sandmann@daimi.au.dk", pixman) AM_INIT_AUTOMAKE([dist-bzip2]) AM_CONFIG_HEADER(config.h) @@ -32,6 +56,23 @@ AC_PROG_LIBTOOL AC_CHECK_FUNCS([getisax]) AC_C_BIGENDIAN +# +# We ignore pixman_major in the version here because the major version should +# always be encoded in the actual library name. Ie., the soname is: +# +# pixman-$(pixman_major).0.minor.micro +# +m4_define([lt_current], [pixman_minor)]) +m4_define([lt_revision], [pixman_micro]) +m4_define([lt_age], [pixman_minor]) + +LT_VERSION_INFO="lt_current:lt_revision:lt_age" + +PIXMAN_MAJOR=pixman_major +AC_SUBST(AC_MAJOR) + +AC_SUBST(LT_VERSION_INFO) + # Check for dependencies #PKG_CHECK_MODULES(DEP, x11) @@ -84,7 +125,7 @@ AC_SUBST(GTK_LIBS) AC_SUBST(DEP_CFLAGS) AC_SUBST(DEP_LIBS) -AC_OUTPUT([pixman.pc +AC_OUTPUT([pixman-1.pc Makefile pixman/Makefile test/Makefile]) diff --git a/pixman.pc.in b/pixman-1.pc.in similarity index 64% rename from pixman.pc.in rename to pixman-1.pc.in index 08c3abf..4cf163a 100644 --- a/pixman.pc.in +++ b/pixman-1.pc.in @@ -4,8 +4,8 @@ libdir=@libdir@ includedir=@includedir@ Name: Pixman -Description: The pixman library +Description: The pixman library (version 1) Version: @PACKAGE_VERSION@ -Cflags: -I${includedir} @DEP_CFLAGS@ +Cflags: -I${includedir}/pixman-1 @DEP_CFLAGS@ Libs: -L${libdir} -lpixman @DEP_LIBS@ diff --git a/pixman/Makefile.am b/pixman/Makefile.am index 90c6436..708e0dd 100644 --- a/pixman/Makefile.am +++ b/pixman/Makefile.am @@ -1,6 +1,7 @@ -lib_LTLIBRARIES = libpixman.la -libpixman_la_LIBADD = @DEP_LIBS@ -lm libpixmanwrapper.la -libpixman_la_SOURCES = \ +lib_LTLIBRARIES = libpixman-1.la +libpixman_1_la_LDFLAGS = -version-info $(LT_VERSION_INFO) +libpixman_1_la_LIBADD = @DEP_LIBS@ -lm libpixmanwrapper.la +libpixman_1_la_SOURCES = \ pixman.h \ pixman-region.c \ pixman-private.h \ @@ -14,7 +15,7 @@ libpixman_la_SOURCES = \ pixman-compute-region.c \ pixman-timer.c -libpixmanincludedir = $(includedir)/pixman +libpixmanincludedir = $(includedir)/pixman-1/ libpixmaninclude_HEADERS = pixman.h # wrapper library @@ -34,5 +35,5 @@ libpixman_mmx_la_SOURCES = \ pixman-mmx.h libpixman_mmx_la_CFLAGS = $(DEP_CFLAGS) $(MMX_CFLAGS) libpixman_mmx_la_LIBADD = $(DEP_LIBS) -libpixman_la_LIBADD += libpixman-mmx.la +libpixman_1_la_LIBADD += libpixman-mmx.la endif diff --git a/test/Makefile.am b/test/Makefile.am index 6389b5b..6548ba5 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -7,7 +7,7 @@ noinst_PROGRAMS = $(TESTPROGRAMS) INCLUDES = -I$(top_srcdir)/pixman $(GTK_CFLAGS) -composite_test_LDADD = $(top_builddir)/pixman/libpixman.la $(GTK_LIBS) -gradient_test_LDADD = $(top_builddir)/pixman/libpixman.la $(GTK_LIBS) +composite_test_LDADD = $(top_builddir)/pixman/libpixman-1.la $(GTK_LIBS) +gradient_test_LDADD = $(top_builddir)/pixman/libpixman-1.la $(GTK_LIBS) endif \ No newline at end of file -- 2.7.4