comparison configure1.in @ 3059:2d8952db38ee

* configure.in: Check to see if the source lives in the same directory as the configure script.
author Jim Blandy <jimb@redhat.com>
date Tue, 25 May 1993 04:56:17 +0000
parents b155c80dc2c2
children 572c8024d831
comparison
equal deleted inserted replaced
3058:c2dd834bf827 3059:2d8952db38ee
282 #### Decide where the source is. 282 #### Decide where the source is.
283 case "${srcdir}" in 283 case "${srcdir}" in
284 284
285 ## If it's not specified, see if `.' or `..' might work. 285 ## If it's not specified, see if `.' or `..' might work.
286 "" ) 286 "" )
287 if [ -f "./src/lisp.h" -a -f "./lisp/version.el" ]; then 287 confdir=`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`
288 srcdir=`pwd` 288 if [ -f $confdir/src/lisp.h -a -f $confdir/lisp/version.el ]; then
289 srcdir=$confdir
289 else 290 else
290 if [ -f "../src/lisp.h" -a -f "../lisp/version.el" ]; then 291 if [ -f "./src/lisp.h" -a -f "./lisp/version.el" ]; then
291 srcdir=`(cd .. ; pwd)` 292 srcdir=`pwd`
292 else 293 else
293 (echo "\ 294 if [ -f "../src/lisp.h" -a -f "../lisp/version.el" ]; then
295 srcdir=`(cd .. ; pwd)`
296 else
297 (echo "\
294 ${progname}: Neither the current directory nor its parent seem to 298 ${progname}: Neither the current directory nor its parent seem to
295 contain the Emacs sources. If you do not want to build Emacs in its 299 contain the Emacs sources. If you do not want to build Emacs in its
296 source tree, you should run \`${progname}' in the directory in which 300 source tree, you should run \`${progname}' in the directory in which
297 you wish to build Emacs, using its \`--srcdir' option to say where the 301 you wish to build Emacs, using its \`--srcdir' option to say where the
298 sources may be found." 302 sources may be found."
299 echo "${short_usage}") >&2 303 echo "${short_usage}") >&2
300 exit 1 304 exit 1
305 fi
301 fi 306 fi
302 fi 307 fi
303 ;; 308 ;;
304 309
305 ## Otherwise, check if the directory they specified is okay. 310 ## Otherwise, check if the directory they specified is okay.