From 36969de6bb061c2c60409963116e958d32beda96 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Thu, 24 Aug 2000 11:41:40 +0000 Subject: [PATCH] : Unset CDPATH in case $PWD contains a relative path. Protect against unusable values of $PWD. --- configure.in | 8 ++++---- 1 file 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 -- 2.39.2