diff options
author | Jim Blandy <jimb@redhat.com> | 1993-05-25 04:56:17 +0000 |
---|---|---|
committer | Jim Blandy <jimb@redhat.com> | 1993-05-25 04:56:17 +0000 |
commit | 93a6ab21c09e033210ad23f6df8b7a24a4649647 (patch) | |
tree | 4b708054463fca138457be7e0df01243a8785195 /configure1.in | |
parent | 36b9d4a220712a0c04386bd8e23c5134b6253a7d (diff) | |
download | emacs-93a6ab21c09e033210ad23f6df8b7a24a4649647.tar.gz |
* configure.in: Check to see if the source lives in the same
directory as the configure script.
Diffstat (limited to 'configure1.in')
-rwxr-xr-x | configure1.in | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/configure1.in b/configure1.in index 1f230744652..df41927674b 100755 --- a/configure1.in +++ b/configure1.in @@ -284,20 +284,25 @@ case "${srcdir}" in ## 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 ;; |