Skip to content

Commit

Permalink
Include a useful version number on installed shared libraries
Browse files Browse the repository at this point in the history
Prompted by Ole Streicher for use with the Debian AST package. It uses
the numering scheme described at

https://phab.enlightenment.org/w/autotoolsintegration/

under "Versioning of the shared library"? That is:

soname_current = package_minor + package_major
soname_revision = package_micro
soname_age = package_minor
  • Loading branch information
dsberry committed Oct 8, 2019
1 parent c81720d commit 35bf99a
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1,579 deletions.
11 changes: 11 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,7 @@ libast_la_SOURCES = \
$(CMINPACK_FILES) \
$(WCSLIB_FILES) \
ast_err.h
libast_la_LDFLAGS = -version-info @version_info@

# Ensure libast links against libraries containing functions used within
# libast. If AST is configured --with-external-pal, then the internal
Expand All @@ -691,37 +692,47 @@ nodist_libast_la_SOURCES = \

# The default error reporting module.
libast_err_la_SOURCES = err_null.c
libast_err_la_LDFLAGS = -version-info @version_info@

# The error reporting module that uses EMS to deliver errors.
libast_ems_la_SOURCES = err_ems.c
libast_ems_la_LDFLAGS = -version-info @version_info@

# The error reporting module that uses DRAMA Ers to deliver errors.
libast_drama_la_SOURCES = err_drama.c
libast_drama_la_LDFLAGS = -version-info @version_info@

# The module containing null implementations of the 3D graphics routines
# required by AST
libast_grf3d_la_SOURCES = grf3d.c
libast_grf3d_la_LDFLAGS = -version-info @version_info@

# The module containing null implementations of the graphics routines
# required by AST V2.0
libast_grf_2_0_la_SOURCES = grf_2.0.c
libast_grf_2_0_la_LDFLAGS = -version-info @version_info@

# The module containing null implementations of the graphics routines
# added by AST V3.2 and not present in V2.0
libast_grf_3_2_la_SOURCES = grf_3.2.c
libast_grf_3_2_la_LDFLAGS = -version-info @version_info@

# The module containing null implementations of the graphics routines
# added by AST V5.6 and not present in V3.2
libast_grf_5_6_la_SOURCES = grf_5.6.c
libast_grf_5_6_la_LDFLAGS = -version-info @version_info@

# The graphics module that uses PGPLOT for 2D graphical output.
libast_pgplot_la_SOURCES = $(GRF_PGPLOT_SOURCES)
libast_pgplot_la_LDFLAGS = -version-info @version_info@

# The graphics module that uses PGPLOT for 3D graphical output.
libast_pgplot3d_la_SOURCES = $(GRF3D_PGPLOT_SOURCES)
libast_pgplot3d_la_LDFLAGS = -version-info @version_info@

# Positional astronomy libraries.
libast_pal_la_SOURCES = $(PAL_FILES)
libast_pal_la_LDFLAGS = -version-info @version_info@

# The following files are built by the targets in this makefile.
MAINTAINERCLEANFILES = version.h builddocs addversion \
Expand Down
2 changes: 1 addition & 1 deletion component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!DOCTYPE component SYSTEM "componentinfo.dtd">

<component id="ast" support="S">
<version>9.0.0</version>
<version>9.0.1</version>
<path>libext/ast</path>
<description>WCS library</description>
<abstract>
Expand Down
13 changes: 12 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,20 @@ dnl 1.5. It should work with autoconf versions 2.50 or better, and
dnl automake 1.6 or better.

dnl Initialisation: package name and version number
AC_INIT([ast],[9.0.0],[[email protected]])
m4_define([v_maj], [9])
m4_define([v_min], [0])
m4_define([v_mic], [1])
m4_define([project_version], [v_maj.v_min.v_mic])
AC_INIT([ast],[project_version],[[email protected]])
AC_CONFIG_AUX_DIR([build-aux])

dnl Shared library versioning
m4_define([lt_cur], [m4_eval(v_maj + v_min)])
m4_define([lt_rev], [v_mic])
m4_define([lt_age], [v_min])
version_info="lt_cur:lt_rev:lt_age"
AC_SUBST([version_info])

dnl Require autoconf-2.50 at least
AC_PREREQ([2.69])
dnl Require Starlink automake
Expand Down
Loading

0 comments on commit 35bf99a

Please sign in to comment.