dnl CF_LIB_SUFFIX version: 18 updated: 2012/02/25 15:20:07
dnl -------------
dnl Compute the library file-suffix from the given model name
dnl $1 = model name
dnl $2 = variable to set (the nominal library suffix)
dnl $3 = dependency variable to set (actual filename)
dnl The variable $LIB_SUFFIX, if set, prepends the variable to set.
AC_DEFUN([CF_LIB_SUFFIX],
[
	AC_REQUIRE([CF_SUBST_NCURSES_VERSION])
	case $1 in #(vi
	libtool) #(vi
		$2='.la'
		$3=[$]$2
		;;
	normal) #(vi
		$2='.a'
		$3=[$]$2
		;;
	debug) #(vi
		$2='_g.a'
		$3=[$]$2
		;;
	profile) #(vi
		$2='_p.a'
		$3=[$]$2
		;;
	shared) #(vi
		case $cf_cv_system_name in
		aix[[5-7]]*) #(vi
			$2='.a'
			$3=[$]$2
			;;
		cygwin*|mingw*) #(vi
			$2='.dll'
			$3='.dll.a'
			;;
		darwin*) #(vi
			$2='.dylib'
			$3=[$]$2
			;;
		hpux*) #(vi
			case $target in
			ia64*) #(vi
				$2='.so'
				$3=[$]$2
				;;
			*) #(vi
				$2='.sl'
				$3=[$]$2
				;;
			esac
			;;
		*)	$2='.so'
			$3=[$]$2
			;;
		esac
	esac
	test -n "$LIB_SUFFIX" && $2="${LIB_SUFFIX}[$]{$2}"
	test -n "$LIB_SUFFIX" && $3="${LIB_SUFFIX}[$]{$3}"
])dnl
