]> code.delx.au - gnu-emacs/blobdiff - configure1.in
(read_key_sequence): If we get a quit, and current buffer
[gnu-emacs] / configure1.in
index 5218a22efa9b3ace4f31267c679a7707140820eb..b1da872e20199cd850f931fc80c7669286a50ba2 100755 (executable)
@@ -212,7 +212,7 @@ Set it to either \`yes' or \`no'."
               echo "${short_usage}") >&2
              exit 1
            fi
-            val="$1"; shift
+           val="$1"; shift
          fi
           srcdir="${val}"
        ;;
@@ -256,6 +256,12 @@ Set it to either \`yes' or \`no'."
          run_in_place=1
        ;;
 
+        ## Should this use the "single tree" configuration?
+       "single_tree" )
+          run_in_place=
+          single_tree=1
+       ;;
+
        ## Has the user specified one of the path options?
        prefix | exec_prefix | bindir | libdir | etcdir | datadir | \
        archlibdir | statedir | mandir | infodir | lispdir | lockdir | \
@@ -390,13 +396,14 @@ if [ `pwd` != `(cd ${srcdir} && pwd)` ] \
    echo "   use GNU make.  If you do not have GNU make, then you must"
    echo "   now do \`make distclean' in ${srcdir},"
    echo "   and then run ${progname} again.") >&2
-  # We need a multi-line sed script, which cannot go in a makefile.
-  vpath_sed='-f vpath.sed'
-else
-  # Do the normal substitution for VPATH.  This will not crash non-GNU make.
-  vpath_sed=]'AC_QUOTE_SQUOTE(AC_QUOTE_SQUOTE('-e '\''s|^\(VPATH *=\).*$$|\1 ='\''"${srcdir}/${subdir}|"'))'[
+  extrasub='/^VPATH[    ]*=/c\
+vpath %.c $(srcdir)\
+vpath %.h $(srcdir)\
+vpath %.y $(srcdir)\
+vpath %.l $(srcdir)\
+vpath %.s $(srcdir)\
+vpath %.in $(srcdir)'
 fi
-] AC_SUBST(vpath_sed) [
 
 ### Make the necessary directories, if they don't exist.
 for dir in ./src ./lib-src ./cpp ./oldXMenu ./etc ; do
@@ -998,7 +1005,7 @@ AC_PROG_YACC
 dnl checks for UNIX variants that set `DEFS'
 
 dnl checks for header files
-AC_HAVE_HEADERS(sys/timeb.h sys/time.h)
+AC_HAVE_HEADERS(sys/timeb.h sys/time.h unistd.h)
 AC_STDC_HEADERS
 AC_TIME_WITH_SYS_TIME
 
@@ -1018,7 +1025,6 @@ AC_LONG_FILE_NAMES
 dnl other checks for UNIX variants
 [
 
-
 #### Choose a window system.
 echo "Checking window system."
 
@@ -1391,8 +1397,7 @@ test -n "${prefix}" &&
 test -n "${exec_prefix}" &&
   exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
 ]
-AC_OUTPUT(Makefile lib-src/Makefile oldXMenu/Makefile src/Makefile.in)
-[
+AC_OUTPUT(Makefile lib-src/Makefile oldXMenu/Makefile src/Makefile.in) [
 # Build src/Makefile from ${srcdir}/src/Makefile.in.  This must be done
 # after src/config.h is built, since we rely on that file.  Only do the
 # build if "config.status" is present, since it's non-presence indicates
@@ -1402,10 +1407,15 @@ if [ ! -f ./config.status ]; then
    exit $status
 fi
 topsrcdir=${srcdir}
+  # We discard all lines in Makefile.in that start with `# Generated' or /**/#
+  # because some cpps get confused by them.
+  # Really we should preserve them somehow into Makefile,
+  # but that is beyond my level of shell programming.
 makefile_command='echo "creating src/Makefile";
   topsrcdir='"${topsrcdir}"';
 ( cd ./src;
-  cp Makefile.in junk.c;
+  rm -f junk.c;
+  sed -e '\''s/^# Generated.*//'\'' -e '\''s%/\*\*/#.*%%'\'' < Makefile.in > junk.c;
   eval `echo ${CPP} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`;
   < junk.cpp                                                   '\
 '    sed -e '\''s/^#.*//'\''                                   '\
@@ -1413,7 +1423,6 @@ makefile_command='echo "creating src/Makefile";
 '      -e '\''s/^ /    /'\''                                   '\
 '      | sed -n -e '\''/^..*$/p'\''                            '\
 '      > Makefile.new;
-dnl There is a window of lossage if you mv Makefile.new before chmoding it.
     chmod 444 Makefile.new;
     mv -f Makefile.new Makefile;
     rm -f junk.c junk.cpp;
@@ -1435,4 +1444,3 @@ for file in $MFS; do
 done
 exit 0
 ]
-