Include major API version in pkg-config file name

This commit is contained in:
Tushar Gohad 2015-12-10 03:47:14 -07:00
parent debb72493d
commit 92bad94311
3 changed files with 29 additions and 5 deletions

View File

@ -31,6 +31,8 @@ thisinclude_HEADERS = \
include/rs_vand/rs_galois.h \
include/rs_vand/liberasurecode_rs_vand.h
pkgconfig_DATA = erasurecode-$(API_VERSION).pc
install-exec-hook:
-(mkdir -p $(DESTDIR)$(includedir) && \
cd $(DESTDIR)$(includedir) && \

View File

@ -1,7 +1,18 @@
################################################################################
# Standard Stuff
################################################################################
AC_INIT(liberasurecode,1.1.0)
# Release version
m4_define([package_version_major],[1])
m4_define([package_version_minor],[1])
m4_define([package_version_micro],[2])
# API version
m4_define([api_version],[1])
AC_INIT(liberasurecode,
[package_version_major.package_version_minor.package_version_micro])
AC_GNU_SOURCE
AC_PREREQ([2.61])
@ -25,6 +36,14 @@ AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_MAKE_SET
PKG_PROG_PKG_CONFIG
PKG_INSTALLDIR
AC_SUBST([PACKAGE_VERSION_MAJOR],package_version_major)
AC_SUBST([PACKAGE_VERSION_MINOR],package_version_minor)
AC_SUBST([PACKAGE_VERSION_MICRO],package_version_micro)
AC_SUBST([API_VERSION],api_version)
AX_EXT()
################################################################################
@ -202,10 +221,13 @@ AC_CONFIG_FILES([\
test/Makefile \
doc/Makefile \
Makefile \
erasurecode.pc \
Xorcode.pc
])
AC_CONFIG_FILES([\
erasurecode-$API_VERSION.pc:erasurecode.pc], [],
[API_VERSION='$API_VERSION'])
AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
AM_COND_IF([HAVE_DOXYGEN],
[AC_CONFIG_FILES([doc/doxygen.cfg])])

View File

@ -7,9 +7,9 @@ includedir=@includedir@
Name: erasurecode
Description: C library with pluggable erasure code backends
Version: @ERASURECODE_VERSION@
Version: @PACKAGE_VERSION@
Requires:
Conflicts:
Libs: -L${libdir} @ERASURECODE_RLD_FLAGS@ -lerasurecode
Libs: -L${libdir} -lerasurecode
Libs.private: @ERASURECODE_STATIC_LIBS@
Cflags: -I${includedir}/ -I${includedir}/liberasurecode @ERASURECODE_CFLAGS@
Cflags: -I${includedir}/ -I${includedir}/liberasurecode