dnl CF_DISABLE_LIBTOOL_VERSION version: 3 updated: 2015/04/17 21:13:04
dnl --------------------------
dnl Check if we should use the libtool 1.5 feature "-version-number" instead of
dnl the older "-version-info" feature.  The newer feature allows us to use
dnl version numbering on shared libraries which make them compatible with
dnl various systems.
AC_DEFUN([CF_DISABLE_LIBTOOL_VERSION],
[
AC_MSG_CHECKING(if libtool -version-number should be used)
CF_ARG_DISABLE(libtool-version,
	[  --disable-libtool-version  enable to use libtool's incompatible naming scheme],
	[cf_libtool_version=no],
	[cf_libtool_version=yes])
AC_MSG_RESULT($cf_libtool_version)

if test "$cf_libtool_version" = yes ; then
	LIBTOOL_VERSION="-version-number"
else
	LIBTOOL_VERSION="-version-info"
	case "x$VERSION" in
	(x)
		AC_MSG_WARN(VERSION was not set)
		;;
	(x*.*.*)
		ABI_VERSION="$VERSION"
		CF_VERBOSE(ABI_VERSION: $ABI_VERSION)
		;;
	(x*:*:*)
		ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
		CF_VERBOSE(ABI_VERSION: $ABI_VERSION)
		;;
	(*)
		AC_MSG_WARN(unexpected VERSION value: $VERSION)
		;;
	esac
fi

AC_SUBST(ABI_VERSION)
AC_SUBST(LIBTOOL_VERSION)
])dnl
