dnl CF_CHECK_LIBTOOL_VERSION version: 2 updated: 2021/05/01 16:24:34
dnl ------------------------
dnl Show the version of libtool
dnl
dnl Save the version in a cache variable - this is not entirely a good thing,
dnl but the version string from libtool is very ugly, and for bug reports it
dnl might be useful to have the original string.
dnl
dnl There is an imitation in OpenBSD, which has no apparent use other than to
dnl deny that it is GNU libtool.  Just ignore it.
AC_DEFUN([CF_CHECK_LIBTOOL_VERSION],[
if test -n "$LIBTOOL" && test "$LIBTOOL" != none
then
	AC_MSG_CHECKING(version of $LIBTOOL)
	CF_LIBTOOL_VERSION
	AC_MSG_RESULT($cf_cv_libtool_version)
	if test -n "$cf_cv_libtool_version"
	then
		cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[[()]],...,g' -e 's,[[ ]],-,g' -e '2,$d'`
		case "x$cf_check_libtool_version" in
		(*...GNU-libtool...*)
			;;
		(*)
			AC_MSG_ERROR(This is not GNU libtool)
			;;
		esac
	else
		AC_MSG_ERROR(No version found for $LIBTOOL)
	fi
else
	AC_MSG_ERROR(GNU libtool has not been found)
fi
])dnl
