diff options
author | Aaron Conole <aconole@redhat.com> | 2017-01-16 14:06:27 -0500 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-01-18 14:19:49 -0800 |
commit | cb991590239e1709f20ce3fc992a7b2f8cda5dc0 (patch) | |
tree | 4ad9821e52a222ad4b7a17e2c8174d10a5661a69 /m4 | |
parent | 3a77e83153b4a9cc2349b48b237ef37a17285038 (diff) | |
download | openvswitch-cb991590239e1709f20ce3fc992a7b2f8cda5dc0.tar.gz |
libX: add new release / version info tags
This commit uses the $PACKAGE_VERSION automake variable to construct a
release and version info combination which sets the library name to be:
libfoo-$(OVS_MAJOR_VERSION).so.$(OVS_MINOR_VERSION).0.$(OVS_MICRO_VERSION)
where formerly, it was always:
libfoo.so.1.0.0
This allows releases of Open vSwitch libraries to reflect which specific
versions they came with, and sets up a psuedo ABI-versioning scheme. In
this fashion, future releases of Open vSwitch could be installed
alongside older releases, allowing 3rd party utilities linked against
previous versions to continue to function.
ex:
$ ldd /path/to/utility
linux-vdso.so.1 (0x00007ffe92cf6000)
libopenvswitch-2.so.6 => /lib64/libopenvswitch-2.so.6 (0x00007f733b7a3000)
libssl.so.10 => /lib64/libssl.so.10 (0x00007f733b530000)
...
Note the library name and version information.
Signed-off-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'm4')
-rw-r--r-- | m4/openvswitch.m4 | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4 index 6515ed7bb..07c61911a 100644 --- a/m4/openvswitch.m4 +++ b/m4/openvswitch.m4 @@ -601,3 +601,18 @@ AC_DEFUN([OVS_CHECK_PRAGMA_MESSAGE], [AC_DEFINE(HAVE_PRAGMA_MESSAGE,1,[Define if compiler supports #pragma message directive])]) ]) + +dnl OVS_LIBTOOL_VERSIONS sets the major, minor, micro version information for +dnl OVS_LTINFO variable. This variable locks libtool information for shared +dnl objects, allowing multiple versions with different ABIs to coexist. +AC_DEFUN([OVS_LIBTOOL_VERSIONS], + [AC_MSG_CHECKING(linker output version information) + OVS_MAJOR=`echo "$PACKAGE_VERSION" | sed -e 's/[[.]].*//'` + OVS_MINOR=`echo "$PACKAGE_VERSION" | sed -e "s/^$OVS_MAJOR//" -e 's/^.//' -e 's/[[.]].*//'` + OVS_MICRO=`echo "$PACKAGE_VERSION" | sed -e "s/^$OVS_MAJOR.$OVS_MINOR//" -e 's/^.//' -e 's/[[^0-9]].*//'` + OVS_LT_RELINFO="-release $OVS_MAJOR" + OVS_LT_VERINFO="-version-info $OVS_MINOR:$OVS_MICRO" + OVS_LTINFO="$OVS_LT_RELINFO $OVS_LT_VERINFO" + AC_MSG_RESULT([libX-$OVS_MAJOR.so.$OVS_MINOR.0.$OVS_MICRO)]) + AC_SUBST(OVS_LTINFO) + ]) |