-#### Make srcdir absolute, if it isn't already. It's important to
-#### avoid running the file name through pwd unnecessarily, since pwd can
-#### give you automounter prefixes, which can go away. We do all this
-#### so Emacs can find its files when run uninstalled.
-## Make sure CDPATH doesn't affect cd (in case PWD is relative).
-unset CDPATH
-case "${srcdir}" in
- [[\\/]]* | ?:[[\\/]]*) ;;
- . )
- ## We may be able to use the $PWD environment variable to make this
- ## absolute. But sometimes PWD is inaccurate.
- ## Note: we used to use $PWD at the end instead of `pwd`,
- ## but that tested only for a well-formed and valid PWD,
- ## it did not object when PWD was well-formed and valid but just wrong.
- if test ".$PWD" != "." && test ".`(cd "$PWD" ; sh -c pwd)`" = ".`pwd`" ;
- then
- srcdir="$PWD"
- else
- srcdir=`(cd "$srcdir"; pwd)`
- fi
- ;;
- * ) srcdir=`(cd "$srcdir"; pwd)` ;;
-esac
-