diff options
author | Gerd Moellmann <gerd@gnu.org> | 2000-08-24 11:41:40 +0000 |
---|---|---|
committer | Gerd Moellmann <gerd@gnu.org> | 2000-08-24 11:41:40 +0000 |
commit | 36969de6bb061c2c60409963116e958d32beda96 (patch) | |
tree | 85cc47ab6d471a7d62f8391feac7a9130708c95a /configure.in | |
parent | aa5b8e155dffe1c956de8870c60fe7e1411026f2 (diff) | |
download | emacs-36969de6bb061c2c60409963116e958d32beda96.tar.gz |
<making srcdir absolute>: Unset CDPATH in case $PWD
contains a relative path. Protect against unusable values of
$PWD.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/configure.in b/configure.in index 41767306736..f5a425c886a 100644 --- a/configure.in +++ b/configure.in @@ -99,17 +99,17 @@ AC_ARG_WITH(xim, [ --without-xim don't use X11 XIM]) #### Make srcdir absolute, if it isn't already. It's important to -#### avoid running the path through pwd unnecessary, since pwd can +#### avoid running the path 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. - ## Make sure CDPATH doesn't affect cd (in case PWD is relative). - unset CDPATH - if test "${PWD}" != "" && test "`(cd ${PWD} ; sh -c pwd)`" = "`pwd`" ; + if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".${PWD}" ; then srcdir="$PWD" else |