]> code.delx.au - gnu-emacs/blobdiff - configure1.in
Renamed from pending-del.el.
[gnu-emacs] / configure1.in
index b642840db07b2613e9b184f651675f8d66ff1f8a..d5a226bdfa8edc381701cc581e57b24052156767 100755 (executable)
@@ -102,7 +102,7 @@ The --run-in-place option sets up default values for the path
 
 The --srcdir=DIR option specifies that the configuration and build
        processes should look for the Emacs source code in DIR, when
-       DIR is not the current directory.  This option doesn't work yet.
+       DIR is not the current directory.
 
 If successful, ${progname} leaves its status in config.status.  If
 unsuccessful after disturbing the status quo, it removes config.status."
@@ -196,8 +196,6 @@ Set it to either \`yes' or \`no'."
            shift; val="$1"
          fi
           srcdir="${val}"
-
-         echo "${progname}: Beware - the \`--srcdir' option doesn't work yet." >&2
        ;;
 
        ## Has the user tried to tell us where the X files are?
@@ -320,7 +318,9 @@ fi
 if [ ! -d ./oldXMenu ]; then
   mkdir ./oldXMenu
 fi
-
+if [ ! -d ./etc ]; then
+  mkdir ./etc
+fi
 
 #### Given the configuration name, set machfile and opsysfile to the
 #### names of the m/*.h and s/*.h files we should use.
@@ -382,7 +382,7 @@ case "${configuration}" in
 
   ## Appallings - I mean, Apollos - running Domain
   m68*-apollo* )
-    machine=apollo opsysfile=bsd4-2.h
+    machine=apollo opsys=bsd4-2
   ;;
 
   ## AT&T 3b2, 3b5, 3b15, 3b20
@@ -552,6 +552,7 @@ case "${configuration}" in
       *-isc* )                 opsys=isc3-0 ;;
       *-esix* )                        opsys=esix ;;
       *-xenix* )               opsys=xenix ;;
+      *-sco3.2v4* )            opsys=sco4 ;;
       ## Otherwise, we'll fall through to the generic opsys code at the bottom.
     esac
   ;;
@@ -677,7 +678,7 @@ case "${configuration}" in
   ;;
 
   ## Suns
-  *-sun-sunos* | *-sun-bsd* )
+  *-sun-sunos* | *-sun-bsd* | *-sun-solaris* )
     case "${configuration}" in
       m68*-sunos1* )   machine=sun1 ;;
       m68*-sunos2* )   machine=sun2 ;;
@@ -689,6 +690,7 @@ case "${configuration}" in
     case "${configuration}" in
       *-sunos4.0*        ) opsys=sunos4-0 ;;
       *-sunos4* | *-sunos ) opsys=sunos4-1 ;;
+      *-sunos5* | *-solaris* ) opsys=sol2 ;;
       *                          ) opsys=bsd4-2   ;;
     esac
   ;;
@@ -797,31 +799,53 @@ opsysfile="s/${opsys}.h"
 
 ]
 AC_PREPARE(lisp)
+AC_CONFIG_HEADER(src/config.h)
 [
 
 #### Choose a compiler.
-DEFS=-g
 case ${with_gcc} in
   "yes" ) CC="gcc" GCC=1 ;;
   "no"  ) CC="cc"        ;;
   * )
-]
-AC_PROG_CC
-[
+    ] AC_PROG_CC [
 esac
 
-if [ "${GCC}" != "" ]; then
-  DEFS="${DEFS} -O"
+CFLAGS='-g'
+if test -n "${GCC}"; then
+  CFLAGS='-g -O'
 fi
 
-#### Some other nice autoconf tests.
+#### 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.
 ]
+dnl checks for programs
+AC_LN_S
 AC_PROG_CPP
-AC_HAVE_HEADERS(sys/timeb.h)
+
+dnl checks for UNIX variants that set `DEFS'
+
+dnl checks for header files
+AC_HAVE_HEADERS(sys/timeb.h sys/time.h)
+AC_STDC_HEADERS
+AC_TIME_WITH_SYS_TIME
+
+dnl checks for typedefs
 AC_RETSIGTYPE
+
+dnl checks for functions
 AC_ALLOCA
 AC_HAVE_FUNCS(gettimeofday gethostname dup2)
+
+dnl checks for structure members
+AC_STRUCT_TM
+
+dnl checks for compiler characteristics
 AC_CONST
+
+dnl checks for operating system services
+
+dnl other checks for UNIX variants
 [
 
 
@@ -942,7 +966,10 @@ echo '
 @configure@ system_malloc=no
 #endif
 ' > ${tempcname}
-eval `${CPP} ${tempcname} \
+# The value of CPP is a quoted variable reference, so we need to do this
+# to get its actual value...
+foo=`eval "echo $CPP"`
+eval `${foo} ${tempcname} \
        | grep '@configure@' \
        | sed -e 's/^@configure@ \([^=]*=\)\(.*\)$/\1"\2"/'`
 rm ${tempcname}
@@ -974,19 +1001,32 @@ if [ ! "${version}" ]; then
 fi
 
 
-#### Specify what sort of things we'll be editing into our Makefiles.
+#### Specify what sort of things we'll be editing into Makefile and config.h.
 ]
 AC_SUBST(configuration)
 AC_SUBST(version)
 AC_SUBST(srcdir)
 AC_SUBST(c_switch_system)
 AC_SUBST(libsrc_libs)
-AC_SUBST(machfile)
-AC_SUBST(opsysfile)
 AC_SUBST(rip_paths)
 AC_SUBST(inst_paths)
 AC_SUBST(LD_SWITCH_X_SITE)
 AC_SUBST(C_SWITCH_X_SITE)
+AC_SUBST(CFLAGS)
+
+dnl   This is hopefully a temporary hack.  In autoconf version 1.3,
+dnl   the second argument to AC_DEFINE is quoted in every which way,
+dnl   so (as far as I can tell) there's no way to compute the value
+dnl   the CPP macro should receive.  We cripple that quoting for a
+dnl   bit, invoke AC_DEFINE, and then uncripple it.
+
+pushdef([AC_DEFINE_SEDQUOTE],[$1])
+AC_DEFINE(config_machfile,  "\"${machfile}\"")
+AC_DEFINE(config_opsysfile, "\"${opsysfile}\"")
+popdef([AC_DEFINE_SEDQUOTE])
+
+AC_DEFINE(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE})
+AC_DEFINE(C_SWITCH_X_SITE,  ${C_SWITCH_X_SITE})
 [
 if [ "${HAVE_X_WINDOWS}" = "yes" ] ; then
   ] AC_DEFINE(HAVE_X_WINDOWS) [
@@ -1018,7 +1058,7 @@ Configured for \`${configuration}'.
 
   What operating system and machine description files should Emacs use?
         \`${opsysfile}' and \`${machfile}'
-  What compiler should emacs be built with?               ${CC} -g
+  What compiler should emacs be built with?               ${CC} ${CFLAGS}
   Should Emacs use the GNU version of malloc?             ${GNU_MALLOC}${GNU_MALLOC_reason}
   Should Emacs use the relocating allocator for buffers?  ${REL_ALLOC}
   What window system should Emacs use?                    ${window_system}${x_includes+
@@ -1031,13 +1071,4 @@ Configured for \`${configuration}'.
 ### in the config.status file.
 set - ${arguments}
 ]
-AC_OUTPUT(Makefile src/config.h)
-[
-
-### Autoconf likes to add a Makefile comment to the top of
-### src/config.h.  Do you have a better idea?
-(cd src
- sed < config.h > conftemp.$$ '1d'
- mv conftemp.$$ config.h)
-
-]
+AC_OUTPUT(Makefile)