dnl CF_WITH_LOCALE_ALIAS version: 6 updated: 2011/10/26 04:23:30
dnl --------------------
dnl Configure option to specify the location of locale.alias, for programs that
dnl must read it directly.
AC_DEFUN([CF_WITH_LOCALE_ALIAS],
[
AC_MSG_CHECKING(for location of locale alias file)
AC_ARG_WITH(locale-alias,
[  --with-locale-alias=XXX file used for locale aliases (default: auto)],
[LOCALE_ALIAS_FILE=$withval],
[LOCALE_ALIAS_FILE=auto])

CF_VERBOSE()
case "x$LOCALE_ALIAS_FILE" in #(vi
xauto|xyes|xno)
	LOCALE_ALIAS_FILE=unknown
	for cf_path in \
		/usr/openwin/lib/locale \
		/usr/lib/X11/locale \
		/usr/share/X11/locale \
		/usr/X11R7/lib/X11/locale \
		/usr/X11R6/lib/X11/locale \
		/usr/X11R5/lib/X11/locale \
		/usr/X11/lib/X11/locale \
		/usr/X11/share/X11/locale
		do
			cf_alias_file=$cf_path/locale.alias
			CF_VERBOSE(testing $cf_alias_file)
			if test -f $cf_alias_file ; then
				LOCALE_ALIAS_FILE=$cf_alias_file
				break
			fi
		done
	;; #(vi
*)
	if test ! -f "$LOCALE_ALIAS_FILE" ; then
		AC_MSG_WARN(Alias file not found: $LOCALE_ALIAS_FILE)
	fi
	;;
esac
AC_MSG_RESULT($LOCALE_ALIAS_FILE)
AC_SUBST(LOCALE_ALIAS_FILE)
])dnl
