changeset 3193:d4e38dec127d

* configure.in (prefix): Don't run pwd on srcdir unnecessarily.
author Jim Blandy <jimb@redhat.com>
date Fri, 28 May 1993 03:24:51 +0000
parents 0f69ebbf67d1
children 5ffb8017f71c
files configure1.in
diffstat 1 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/configure1.in	Fri May 28 01:53:31 1993 +0000
+++ b/configure1.in	Fri May 28 03:24:51 1993 +0000
@@ -292,13 +292,13 @@
   "" )
     confdir=`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`
     if [ -f $confdir/src/lisp.h -a -f $confdir/lisp/version.el ]; then
-      srcdir=`(cd $confdir ; pwd)`
+      srcdir="${confdir}"
     else
       if [ -f "./src/lisp.h" -a -f "./lisp/version.el" ]; then
-        srcdir=`pwd`
+        srcdir=`.`
       else
         if [ -f "../src/lisp.h" -a -f "../lisp/version.el" ]; then
-	  srcdir=`(cd .. ; pwd)`
+	  srcdir=`..`
         else
 	  (echo "\
 ${progname}: Neither the current directory nor its parent seem to
@@ -315,7 +315,6 @@
 
   ## Otherwise, check if the directory they specified is okay.
   * )
-    srcdir=`(cd ${srcdir}; pwd)`
     if [ ! -d "${srcdir}" -o ! -f "${srcdir}/src/lisp.h" -o ! -f "${srcdir}/lisp/version.el" ]; then
       (echo "\
 ${progname}: The directory specified with the \`--srcdir' option,
@@ -327,9 +326,17 @@
       exit 1
     fi
   ;;
+esac
 
+#### Make srcdir absolute, if it isn't already.  It's important to
+#### avoid running the path through pwd unnecessary, since pwd can
+#### give you automounter prefixes, which can go away.
+case "${srcdir}" in
+  /* ) ;;
+  *  ) srcdir="`(cd ${srcdir}; pwd)`" ;;
 esac
 
+
 ### Make the necessary directories, if they don't exist.
 if [ ! -d ./src ]; then
   mkdir ./src