changeset 31149:c4890f38091b

<making srcdir absolute>: Unset CDPATH in case $PWD contains a relative path. Protect against unusable values of $PWD.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 24 Aug 2000 11:41:40 +0000
parents b06672496fad
children ee4380880f0d
files configure.in
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/configure.in	Thu Aug 24 11:06:09 2000 +0000
+++ b/configure.in	Thu Aug 24 11:41:40 2000 +0000
@@ -99,17 +99,17 @@
 [  --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