(enum syntaxcode): Add Sinherit.
[bpt/emacs.git] / configure1.in
index bcc856c..57f0bd5 100755 (executable)
@@ -79,6 +79,7 @@ lisppath='${locallisppath}:${lispdir}'
 etcdir='${datadir}/emacs/${version}/etc'
 lockdir='${statedir}/emacs/lock'
 archlibdir='${libdir}/emacs/${version}/${configuration}'
+CC=
 
 # We cannot use this variable in the case statement below, because many
 # /bin/sh's have broken semantics for "case".  Unfortunately, you must
@@ -212,7 +213,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 +257,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 +397,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
@@ -697,8 +705,13 @@ case "${canonical}" in
     machine=symmetry opsys=bsd4-3
   ;;
 
+  ## Unspecified sysv on an ncr machine defaults to svr4.
+  i[34]86-ncr-sysv* )
+    machine=intel386 opsys=usg5-4
+  ;;
+
   ## Intel 860
-  i860-*-sysvr4* )
+  i860-*-sysv4* )
     machine=i860 opsys=usg5-4
   ;;
 
@@ -748,6 +761,7 @@ case "${canonical}" in
   ;;
   mips-mips-riscos4* )
     machine=mips4 opsys=bsd4-3
+    NON_GNU_CC="cc -systype bsd43"
   ;;
   mips-mips-bsd* )
     machine=mips opsys=bsd4-3
@@ -757,7 +771,7 @@ case "${canonical}" in
   ;;
 
   ## NeXT
-  m68*-next-mach* | m68*-next-bsd* )
+  m68*-next-* )
     machine=next opsys=mach2
   ;;
 
@@ -839,7 +853,14 @@ case "${canonical}" in
       *-sunos4.0*        ) opsys=sunos4-0 ;;
       *-sunos4.1.3*      ) opsys=sunos4-1-3 ;;
       *-sunos4* | *-sunos ) opsys=sunos4-1 ;;
-      *-sunos5* | *-solaris* ) opsys=sol2 ;;
+      *-sunos5.3* | *-solaris2.3* )
+               opsys=sol2-3
+               NON_GNU_CPP=/usr/ccs/lib/cpp
+               ;;
+      *-sunos5* | *-solaris* )
+               opsys=sol2
+               NON_GNU_CPP=/usr/ccs/lib/cpp
+               ;;
       *                          ) opsys=bsd4-2   ;;
     esac
   ;;
@@ -930,6 +951,7 @@ case "${canonical}" in
       *-bsd386* )              opsys=bsd386 ;;
       *-386bsd* )              opsys=386bsd ;;
       *-netbsd* )              opsys=netbsd ;;
+      *-nextstep* )             opsys=mach2 ;;
       ## Otherwise, we'll fall through to the generic opsys code at the bottom.
     esac
   ;;
@@ -980,11 +1002,29 @@ AC_CONFIG_HEADER(src/config.h)
 #### Choose a compiler.
 case ${with_gcc} in
   "yes" ) CC="gcc" GCC=1 ;;
-  "no"  ) CC="cc"        ;;
+  "no"  ) CC=${CC:-"cc"} ;;
   * )
     ] AC_PROG_CC [
 esac
 
+#### Some systems specify a CPP to use unless we are using GCC.
+#### Now that we know whether we are using GCC, we can decide whether
+#### to use that one.
+if [ x$NON_GNU_CPP = x ] || [ x$GCC = x1 ]
+then true
+else
+  CPP=$NON_GNU_CPP
+fi
+
+#### Some systems specify a CC to use unless we are using GCC.
+#### Now that we know whether we are using GCC, we can decide whether
+#### to use that one.
+if [ x$NON_GNU_CC = x ] || [ x$GCC = x1 ]
+then true
+else
+  CC=$NON_GNU_CC
+fi
+
 #### Some other nice autoconf tests.  If you add a test here which
 #### should make an entry in src/config.h, don't forget to add an
 #### #undef clause to src/config.h.in for autoconf to modify.
@@ -998,7 +1038,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 +1058,6 @@ AC_LONG_FILE_NAMES
 dnl other checks for UNIX variants
 [
 
-
 #### Choose a window system.
 echo "Checking window system."
 
@@ -1228,14 +1267,14 @@ fi
 if test "${HAVE_X11}" = "yes"; then
   DEFS="$C_SWITCH_X_SITE $DEFS"
   LIBS="$LD_SWITCH_X_SITE $LIBX $LIBS"
-  AC_HAVE_FUNCS(XrmSetDatabase XScreenResourceString XScreenNumberOfScreen)
+  AC_HAVE_FUNCS(XrmSetDatabase XScreenResourceString XScreenNumberOfScreen XSetWMProtocols)
 fi
 
 AC_ALLOCA
 
 # logb and frexp are found in -lm on most systems.
 AC_HAVE_LIBRARY(-lm)
-AC_HAVE_FUNCS(gettimeofday gethostname dup2 rename closedir mkdir rmdir random bcopy logb frexp ftime res_init)
+AC_HAVE_FUNCS(gettimeofday gethostname dup2 rename closedir mkdir rmdir random bcopy logb frexp ftime res_init setsid)
 
 ok_so_far=true
 AC_FUNC_CHECK(socket, , ok_so_far=)
@@ -1330,7 +1369,7 @@ fi
 
 if [ "$run_in_place" = "1" ]; then
    lispdir='${srcdir}/lisp'
-   locallisppath='${srcdir}/site-lisp:${datadir}/emacs/site-lisp'
+   locallisppath='${srcdir}/site-lisp'
    etcdir='${srcdir}/etc'
    lockdir='${srcdir}/lock'
    archlibdir='${srcdir}/lib-src'
@@ -1391,8 +1430,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 +1440,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,8 +1456,8 @@ makefile_command='echo "creating src/Makefile";
 '      -e '\''s/^ /    /'\''                                   '\
 '      | sed -n -e '\''/^..*$/p'\''                            '\
 '      > Makefile.new;
+    chmod 444 Makefile.new;
     mv -f Makefile.new Makefile;
-    chmod 444 Makefile;
     rm -f junk.c junk.cpp;
 )'
 eval `echo $makefile_command`
@@ -1434,4 +1477,3 @@ for file in $MFS; do
 done
 exit 0
 ]
-