mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-21 06:55:39 +00:00
<making srcdir absolute>: Unset CDPATH in case $PWD
contains a relative path. Protect against unusable values of $PWD.
This commit is contained in:
parent
aa5b8e155d
commit
36969de6bb
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user