# HG changeset patch # User Jim Blandy # Date 738305777 0 # Node ID 2d8952db38ee7d792193ef24c4921a566769fc5b # Parent c2dd834bf82784c91f1a14046a0558d0734cf287 * configure.in: Check to see if the source lives in the same directory as the configure script. diff -r c2dd834bf827 -r 2d8952db38ee configure1.in --- a/configure1.in Tue May 25 04:53:07 1993 +0000 +++ b/configure1.in Tue May 25 04:56:17 1993 +0000 @@ -284,20 +284,25 @@ ## If it's not specified, see if `.' or `..' might work. "" ) - if [ -f "./src/lisp.h" -a -f "./lisp/version.el" ]; then - srcdir=`pwd` + confdir=`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'` + if [ -f $confdir/src/lisp.h -a -f $confdir/lisp/version.el ]; then + srcdir=$confdir else - if [ -f "../src/lisp.h" -a -f "../lisp/version.el" ]; then - srcdir=`(cd .. ; pwd)` + if [ -f "./src/lisp.h" -a -f "./lisp/version.el" ]; then + srcdir=`pwd` else - (echo "\ + if [ -f "../src/lisp.h" -a -f "../lisp/version.el" ]; then + srcdir=`(cd .. ; pwd)` + else + (echo "\ ${progname}: Neither the current directory nor its parent seem to contain the Emacs sources. If you do not want to build Emacs in its source tree, you should run \`${progname}' in the directory in which you wish to build Emacs, using its \`--srcdir' option to say where the sources may be found." - echo "${short_usage}") >&2 - exit 1 + echo "${short_usage}") >&2 + exit 1 + fi fi fi ;;