diff options
| author | Gerd Moellmann | 2000-08-24 11:41:40 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-08-24 11:41:40 +0000 |
| commit | 36969de6bb061c2c60409963116e958d32beda96 (patch) | |
| tree | 85cc47ab6d471a7d62f8391feac7a9130708c95a | |
| parent | aa5b8e155dffe1c956de8870c60fe7e1411026f2 (diff) | |
| download | emacs-36969de6bb061c2c60409963116e958d32beda96.tar.gz emacs-36969de6bb061c2c60409963116e958d32beda96.zip | |
<making srcdir absolute>: Unset CDPATH in case $PWD
contains a relative path. Protect against unusable values of
$PWD.
| -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, | |||
| 99 | [ --without-xim don't use X11 XIM]) | 99 | [ --without-xim don't use X11 XIM]) |
| 100 | 100 | ||
| 101 | #### Make srcdir absolute, if it isn't already. It's important to | 101 | #### Make srcdir absolute, if it isn't already. It's important to |
| 102 | #### avoid running the path through pwd unnecessary, since pwd can | 102 | #### avoid running the path through pwd unnecessarily, since pwd can |
| 103 | #### give you automounter prefixes, which can go away. We do all this | 103 | #### give you automounter prefixes, which can go away. We do all this |
| 104 | #### so Emacs can find its files when run uninstalled. | 104 | #### so Emacs can find its files when run uninstalled. |
| 105 | ## Make sure CDPATH doesn't affect cd (in case PWD is relative). | ||
| 106 | unset CDPATH | ||
| 105 | case "${srcdir}" in | 107 | case "${srcdir}" in |
| 106 | /* ) ;; | 108 | /* ) ;; |
| 107 | . ) | 109 | . ) |
| 108 | ## We may be able to use the $PWD environment variable to make this | 110 | ## We may be able to use the $PWD environment variable to make this |
| 109 | ## absolute. But sometimes PWD is inaccurate. | 111 | ## absolute. But sometimes PWD is inaccurate. |
| 110 | ## Make sure CDPATH doesn't affect cd (in case PWD is relative). | 112 | if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".${PWD}" ; |
| 111 | unset CDPATH | ||
| 112 | if test "${PWD}" != "" && test "`(cd ${PWD} ; sh -c pwd)`" = "`pwd`" ; | ||
| 113 | then | 113 | then |
| 114 | srcdir="$PWD" | 114 | srcdir="$PWD" |
| 115 | else | 115 | else |