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."
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?
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.
## 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
*-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
;;
;;
## Suns
- *-sun-sunos* | *-sun-bsd* )
+ *-sun-sunos* | *-sun-bsd* | *-sun-solaris* )
case "${configuration}" in
m68*-sunos1* ) machine=sun1 ;;
m68*-sunos2* ) machine=sun2 ;;
case "${configuration}" in
*-sunos4.0* ) opsys=sunos4-0 ;;
*-sunos4* | *-sunos ) opsys=sunos4-1 ;;
+ *-sunos5* | *-solaris* ) opsys=sol2 ;;
* ) opsys=bsd4-2 ;;
esac
;;
]
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
[
@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}
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) [
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+
### 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)