Skip to content

Commit

Permalink
Merge pull request #203 from alexlarsson/library-soname
Browse files Browse the repository at this point in the history
Add soname for libcomposefs
  • Loading branch information
alexlarsson authored Sep 26, 2023
2 parents afd88bf + 959bf59 commit 4b7695b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
29 changes: 29 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,40 @@ AC_CONFIG_SRCDIR([tools/mkcomposefs.c])
AC_CONFIG_HEADERS([config.h])
AC_SYS_LARGEFILE

# Library soname versioning:
#
# Note that this is different from the package version, as the package
# version is more of a human-oriented version for the tools, and does
# not encode library compatibility.
#
# Making releases:
# If library added functions or features:
# LIBCOMPOSEFS_VERSION_MICRO = 0;
# LIBCOMPOSEFS_VERSION_MINOR += 1;
# else, if library code changes:
# LIBCOMPOSEFS_VERSION_MICRO += 1;
#
# Only touch LIBCOMPOSEFS_VERSION_MAJOR if breaking ABI.
# (And never do that lightly)

m4_define([LIBCOMPOSEFS_VERSION_MAJOR], [1])
m4_define([LIBCOMPOSEFS_VERSION_MINOR], [0])
m4_define([LIBCOMPOSEFS_VERSION_MICRO], [0])

LT_PREREQ([2.2.6])
LT_INIT()

AM_INIT_AUTOMAKE([1.11.2 -Wno-portability foreign tar-ustar no-dist-gzip dist-xz subdir-objects])

m4_define([lt_current], [m4_eval(LIBCOMPOSEFS_VERSION_MINOR + LIBCOMPOSEFS_VERSION_MAJOR)])
m4_define([lt_revision], [LIBCOMPOSEFS_VERSION_MICRO])
m4_define([lt_age], [LIBCOMPOSEFS_VERSION_MINOR])
LT_VERSION_INFO="lt_current:lt_revision:lt_age"
AC_SUBST(LT_VERSION_INFO)

LIBCOMPOSEFS_RELEASE_ARGS="-version-info $LT_VERSION_INFO"
AC_SUBST([LIBCOMPOSEFS_RELEASE_ARGS])

AC_PROG_CC
PKG_PROG_PKG_CONFIG
m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR], AC_SUBST([pkgconfigdir], ${libdir}/pkgconfig))
Expand Down
2 changes: 1 addition & 1 deletion libcomposefs/Makefile-lib.am
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ libcomposefs_la_SOURCES = \
$(COMPOSEFSDIR)/lcfs-mount.h \
$(COMPOSEFSDIR)/xalloc-oversized.h
libcomposefs_la_CFLAGS = $(WARN_CFLAGS) $(COMPOSEFS_HASH_CFLAGS) $(LCFS_DEP_CRYPTO_CFLAGS) $(HIDDEN_VISIBILITY_CFLAGS)
libcomposefs_la_LIBADD = $(LCFS_DEP_CRYPTO_LIBS)
libcomposefs_la_LIBADD = $(LCFS_DEP_CRYPTO_LIBS) $(LIBCOMPOSEFS_RELEASE_ARGS)

0 comments on commit 4b7695b

Please sign in to comment.