dnl To rebuild the `configure' script from this, execute the command
dnl autoconf
dnl in the directory containing this script.
-AC_PREREQ(1.111)dnl
+AC_PREREQ(2.0)dnl
AC_INIT(src/lisp.h)
AC_CONFIG_HEADER(src/config.h)
bindir='${exec_prefix}/bin'
-datadir='${prefix}/lib'
-statedir='${prefix}/lib'
-libdir='${exec_prefix}/lib'
+datadir='${prefix}/share'
+sharedstatedir='${prefix}/com'
+libexecdir='${exec_prefix}/libexec'
mandir='${prefix}/man/man1'
infodir='${prefix}/info'
lispdir='${datadir}/emacs/${version}/lisp'
locallisppath='${datadir}/emacs/site-lisp'
lisppath='${locallisppath}:${lispdir}'
etcdir='${datadir}/emacs/${version}/etc'
-lockdir='${statedir}/emacs/lock'
-archlibdir='${libdir}/emacs/${version}/${configuration}'
+lockdir='${sharedstatedir}/emacs/lock'
+archlibdir='${libexecdir}/emacs/${version}/${configuration}'
docdir='${datadir}/emacs/${version}/etc'
AC_ARG_WITH(gcc,
-[ --with-gcc Use GCC to compile Emacs])
+[ --with-gcc use GCC to compile Emacs])
+AC_ARG_WITH(pop,
+[ --with-pop support POP for mail retrieval],
+[AC_DEFINE(MAIL_USE_POP)])
+AC_ARG_WITH(kerberos,
+[ --with-kerberos support Kerberos-authenticated POP],
+[AC_DEFINE(KERBEROS)])
+AC_ARG_WITH(hesiod,
+[ --with-hesiod support Hesiod to get the POP server host],
+[AC_DEFINE(HESIOD)])
+dnl This should be the last --with option, because --with-x is
+dnl added later on when we find the path of X, and it's best to
+dnl keep them together visually.
AC_ARG_WITH(x-toolkit,
-[ --with-x-toolkit=KIT Use an X toolkit (KIT = lucid or athena)],
+[ --with-x-toolkit=KIT use an X toolkit (KIT = yes/lucid/athena/motif)],
[ case "${withval}" in
y | ye | yes ) val=athena ;;
n | no ) val=no ;;
l | lu | luc | luci | lucid ) val=lucid ;;
a | at | ath | athe | athena ) val=athena ;;
+ m | mo | mot | moti | motif ) val=motif ;;
dnl These don't currently work.
-dnl m | mo | mot | moti | motif ) val=motif ;;
dnl o | op | ope | open | open- | open-l | open-lo \
dnl | open-loo | open-look ) val=open-look ;;
* )
dnl AC_MSG_ERROR([the \`--with-x-toolkit' option is supposed to have a value
dnl which is \`yes', \`no', \`lucid', \`athena', \`motif' or \`open-look'.])
AC_MSG_ERROR([the \`--with-x-toolkit' option is supposed to have a value
-which is \`yes', \`no', \`lucid', or \`athena'.
+which is \`yes', \`no', \`lucid', \`athena', or \`motif'.
Currently, \`yes', \`athena' and \`lucid' are synonyms.])
;;
esac
with_x_toolkit=$val
])
-dnl AC_ARG_ENABLE(single-tree,
-dnl [ --enable-single-tree Create a directory tree at DIR which looks like:
-dnl .../DIR/bin/CONFIGNAME (emacs, etags, etc.)
-dnl .../DIR/bin/CONFIGNAME/etc (movemail, etc.)
-dnl .../DIR/common/lisp (emacs' lisp files)
-dnl .../DIR/common/site-lisp (local lisp files)
-dnl .../DIR/common/lib (DOC, TUTORIAL, etc.)
-dnl .../DIR/common/lock (lockfiles)])
#### Make srcdir absolute, if it isn't already. It's important to
#### avoid running the path through pwd unnecessary, since pwd can
-#### give you automounter prefixes, which can go away.
+#### give you automounter prefixes, which can go away. We do all this
+#### so Emacs can find its files when run uninstalled.
case "${srcdir}" in
/* ) ;;
. )
now do \`make distclean' in ${srcdir},
and then run $0 again.])
+changequote(, )dnl
extrasub='/^VPATH[ ]*=/c\
+changequote([, ])dnl
vpath %.c $(srcdir)\
vpath %.h $(srcdir)\
vpath %.y $(srcdir)\
esac
;;
+ ## Acorn RISCiX:
+ arm-acorn-riscix1.1* )
+ machine=acorn opsys=riscix1-1
+ ;;
+ arm-acorn-riscix1.2* | arm-acorn-riscix )
+ machine=acorn opsys=riscix1-2
+ ;;
+
## Alliant machines
## Strictly speaking, we need the version of the alliant operating
## system to choose the right machine file, but currently the
machine=alliant-2800 opsys=bsd4-3
;;
+ alpha-dec-osf* )
+ machine=alpha opsys=osf1
+ ;;
+
## Altos 3068
m68*-altos-sysv* )
machine=altos opsys=usg5-2
## Appallings - I mean, Apollos - running Domain
m68*-apollo* )
- machine=apollo opsys=bsd4-2
+ machine=apollo opsys=domain NON_GNU_CPP=/usr/lib/cpp
;;
## AT&T 3b2, 3b5, 3b15, 3b20
rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
machine=ibmrs6000 opsys=aix3-2-5
;;
+ rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
+ machine=ibmrs6000 opsys=aix4-1
+ ;;
+ rs6000-ibm-aix4* | powerpc-ibm-aix4* )
+ machine=ibmrs6000 opsys=aix4
+ ;;
rs6000-ibm-aix* | powerpc-ibm-aix* )
machine=ibmrs6000 opsys=aix3-2
;;
machine=i386 opsys=usg5-3
;;
- ## Sequent Symmetry
+ ## Sequent Symmetry running Dynix
i[345]86-sequent-bsd* )
machine=symmetry opsys=bsd4-3
;;
+ ## Sequent Symmetry running DYNIX/ptx
+ ## Use the old cpp rather than the newer ANSI one.
+ i[345]86-sequent-ptx* )
+ machine=sequent-ptx opsys=ptx
+ NON_GNU_CPP="/lib/cpp"
+ ;;
+
## Unspecified sysv on an ncr machine defaults to svr4.2.
## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
i[345]86-ncr-sysv* )
machine=intel386 opsys=usg5-4-2
;;
+ ## Intel Paragon OSF/1
+ i860-intel-osf1* )
+ machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
+ ;;
+
## Intel 860
i860-*-sysv4* )
machine=i860 opsys=usg5-4
mips-sgi-irix3* )
machine=iris4d opsys=irix3-3
;;
- mips-sgi-irix5* )
+ mips-sgi-irix4* )
+ machine=iris4d opsys=irix4-0
+ ;;
+ mips-sgi-irix5.[01]* )
machine=iris4d opsys=irix5-0
;;
- mips-sgi-irix4* | mips-sgi-irix* )
- machine=iris4d opsys=irix4-0
+ mips-sgi-irix5* | mips-sgi-irix* )
+ machine=iris4d opsys=irix5-2
;;
## SONY machines
m68*-sony-bsd4.3* )
machine=news opsys=bsd4-3
;;
- m68*-sony-newsos3*)
+ m68*-sony-newsos3* | m68*-sony-news3*)
machine=news opsys=bsd4-3
;;
- mips-sony-bsd* | mips-sony-newsos4* )
+ mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
machine=news-risc opsys=bsd4-3
;;
- mips-sony-newsos* )
+ mips-sony-news* )
machine=news-risc opsys=newsos5
;;
*-sunos4.1.3* ) opsys=sunos4-1-3
NON_GCC_TEST_OPTIONS=-Bstatic
GCC_TEST_OPTIONS=-static
+ NON_GNU_CPP=/usr/lib/cpp
+ ;;
+ *-sunos4shr* ) opsys=sunos4shr
+ NON_GNU_CPP=/usr/lib/cpp
;;
- *-sunos4shr* ) opsys=sunos4shr ;;
*-sunos4* | *-sunos ) opsys=sunos4-1
NON_GCC_TEST_OPTIONS=-Bstatic
GCC_TEST_OPTIONS=-static
*-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
*-isc2.2* ) opsys=isc2-2 ;;
*-isc4.0* ) opsys=isc4-0 ;;
+ *-isc4.* ) opsys=isc4-1 ;;
*-isc* ) opsys=isc3-0 ;;
*-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
*-esix* ) opsys=esix ;;
*-sysv4.1 | *-sysvr4.1 )
NON_GNU_CPP=/usr/lib/cpp
opsys=usg5-4 ;;
- *-sysv4.2 | *-sysvr4.2 ) opsys=usg5-4-2 ;;
+ *-sysv4.2 | *-sysvr4.2 )
+ if [ x$NON_GNU_CPP = x ]; then
+ NON_GNU_CPP=/usr/ccs/lib/cpp
+ fi
+ opsys=usg5-4-2 ;;
* )
unported=yes
;;
case ${with_gcc} in
"yes" ) CC="gcc" GCC=yes ;;
- "no" ) test -z "$CC" && CC=cc ;;
+ "no" ) : ${CC=cc} ;;
* ) AC_PROG_CC
esac
#### #undef clause to src/config.h.in for autoconf to modify.
dnl checks for programs
-AC_LN_S
+AC_PROG_LN_S
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_YACC
+dnl checks for Unix variants
+AC_AIX
+
dnl checks for header files
-AC_HAVE_HEADERS(sys/timeb.h sys/time.h unistd.h)
-AC_STDC_HEADERS
-AC_TIME_WITH_SYS_TIME
-AC_SYS_SIGLIST_DECLARED
+AC_CHECK_HEADERS(sys/timeb.h sys/time.h unistd.h utime.h)
+AC_HEADER_STDC
+AC_HEADER_TIME
+AC_DECL_SYS_SIGLIST
+
+dnl Some systems have utime.h but don't declare the struct anyplace.
+AC_MSG_CHECKING(for struct utimbuf)
+AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
+#include <sys/time.h>
+#include <time.h>
+#else
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#else
+#include <time.h>
+#endif
+#endif
+#ifdef HAVE_UTIME_H
+#include <utime.h>
+#endif], [static struct utimbuf x; x.actime = x.modtime;],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_STRUCT_UTIMBUF)],
+ AC_MSG_RESULT(no))
dnl checks for typedefs
-AC_RETSIGTYPE
+AC_TYPE_SIGNAL
+
+AC_MSG_CHECKING(for struct timeval)
+AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
+#include <sys/time.h>
+#include <time.h>
+#else
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#else
+#include <time.h>
+#endif
+#endif], [static struct timeval x; x.tv_sec = x.tv_usec;],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_TIMEVAL)],
+ AC_MSG_RESULT(no))
dnl checks for structure members
AC_STRUCT_TM
-AC_TIMEZONE
+AC_STRUCT_TIMEZONE
dnl checks for compiler characteristics
-AC_CONST
+AC_C_CONST
dnl check for Make feature
-AC_SET_MAKE
+AC_PROG_MAKE_SET
dnl checks for operating system services
-AC_LONG_FILE_NAMES
-
-dnl other checks for UNIX variants
+AC_SYS_LONG_FILE_NAMES
#### Choose a window system.
-AC_FIND_X
+AC_PATH_X
if test "$no_x" = yes; then
window_system=none
else
window_system=x11
fi
-test "${x_libraries}" != NONE && LD_SWITCH_X_SITE="-L${x_libraries}"
-test "${x_libraries}" != NONE && LD_SWITCH_X_SITE_AUX="-R${x_libraries}"
-test "${x_includes}" != NONE && C_SWITCH_X_SITE="-I${x_includes}"
+if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
+ LD_SWITCH_X_SITE="-L${x_libraries}"
+ LD_SWITCH_X_SITE_AUX="-R${x_libraries}"
+fi
+if test "${x_includes}" != NONE && test -n "${x_includes}"; then
+ C_SWITCH_X_SITE="-I${x_includes}"
+fi
+
+if test x"${x_includes}" = x; then
+ bitmapdir=/usr/include/X11/bitmaps
+else
+ bitmapdir="${x_includes}/bitmaps"
+fi
case "${window_system}" in
x11 )
HAVE_X11=yes
case "${with_x_toolkit}" in
athena | lucid ) USE_X_TOOLKIT=LUCID ;;
-dnl motif ) USE_X_TOOLKIT=MOTIF ;;
+ motif ) USE_X_TOOLKIT=MOTIF ;;
dnl open-look ) USE_X_TOOLKIT=OPEN_LOOK ;;
* ) USE_X_TOOLKIT=none ;;
esac
AC_MSG_CHECKING(for XFree86)
if test -d /usr/X386/include; then
- AC_MSG_RESULT(yes)
HAVE_XFREE386=yes
- test -z "${C_SWITCH_X_SITE}" && C_SWITCH_X_SITE="-I/usr/X386/include"
+ : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
else
- AC_MSG_RESULT(no)
+ HAVE_XFREE386=no
fi
+AC_MSG_RESULT($HAVE_XFREE386)
# We change CFLAGS temporarily so that C_SWITCH_X_SITE gets used
# for the tests that follow.
DEFS="$C_SWITCH_X_SITE $DEFS"
LIBS="$LD_SWITCH_X_SITE $LIBX $LIBS"
CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
- AC_HAVE_FUNCS(XrmSetDatabase XScreenResourceString \
+ AC_CHECK_FUNCS(XrmSetDatabase XScreenResourceString \
XScreenNumberOfScreen XSetWMProtocols)
fi
if test "${USE_X_TOOLKIT}" != "none"; then
AC_MSG_CHECKING(X11 toolkit version)
- AC_COMPILE_CHECK(, [#include <X11/Intrinsic.h>],
+ AC_TRY_LINK([#include <X11/Intrinsic.h>],
[#if XtSpecificationRelease < 6
fail;
#endif
# If netdb.h doesn't declare h_errno, we must declare it by hand.
AC_MSG_CHECKING(whether netdb declarares h_errno)
-AC_COMPILE_CHECK(, [#include <netdb.h>],
-[int
-foo ()
-{
- return h_errno;
-}
-], [AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_H_ERRNO)],
- [AC_MSG_RESULT(no)])
-
-AC_ALLOCA
+AC_TRY_LINK([#include <netdb.h>],
+ [return h_errno;],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_H_ERRNO)],
+ [AC_MSG_RESULT(no)])
+
+AC_FUNC_ALLOCA
# logb and frexp are found in -lm on most systems.
AC_CHECK_LIB(m, logb)
-AC_HAVE_FUNCS(gettimeofday gethostname dup2 rename closedir mkdir rmdir \
-random lrand48 bcopy bcmp logb frexp fmod drem ftime res_init setsid strerror \
-fpathconf)
+AC_CHECK_FUNCS(gettimeofday gethostname dup2 rename closedir mkdir rmdir \
+random lrand48 bcopy bcmp logb frexp fmod drem ftime res_init setsid \
+strerror fpathconf select mktime eaccess getpagesize)
ok_so_far=yes
-AC_FUNC_CHECK(socket, , ok_so_far=no)
+AC_CHECK_FUNC(socket, , ok_so_far=no)
if test $ok_so_far = yes; then
- AC_HEADER_CHECK(netinet/in.h, , ok_so_far=no)
+ AC_CHECK_HEADER(netinet/in.h, , ok_so_far=no)
fi
if test $ok_so_far = yes; then
- AC_HEADER_CHECK(arpa/inet.h, , ok_so_far=no)
+ AC_CHECK_HEADER(arpa/inet.h, , ok_so_far=no)
fi
if test $ok_so_far = yes; then
AC_DEFINE(HAVE_INET_SOCKETS)
### Use configuration here uncanonicalized to avoid exceeding size limits.
AC_SUBST(version)
AC_SUBST(configuration)
+AC_SUBST(canonical)
AC_SUBST(srcdir)
AC_SUBST(prefix)
AC_SUBST(exec_prefix)
AC_SUBST(bindir)
AC_SUBST(datadir)
-AC_SUBST(statedir)
-AC_SUBST(libdir)
+AC_SUBST(sharedstatedir)
+AC_SUBST(libexecdir)
AC_SUBST(mandir)
AC_SUBST(infodir)
AC_SUBST(lispdir)
AC_SUBST(lockdir)
AC_SUBST(archlibdir)
AC_SUBST(docdir)
+AC_SUBST(bitmapdir)
AC_SUBST(c_switch_system)
AC_SUBST(c_switch_machine)
AC_SUBST(LD_SWITCH_X_SITE)
AC_SUBST(machfile)
AC_SUBST(opsysfile)
-AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "${configuration}")
+AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "${canonical}")
+AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "${config_options}")
AC_DEFINE_UNQUOTED(config_machfile, "${machfile}")
AC_DEFINE_UNQUOTED(config_opsysfile, "${opsysfile}")
AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE})
AC_DEFINE(LISP_FLOAT_TYPE)
fi
-dnl # ====================== Developer's configuration =======================
-dnl
-dnl # The following assignments make sense if you're running Emacs on a single
-dnl # machine, one version at a time, and you want changes to the lisp and etc
-dnl # directories in the source tree to show up immediately in your working
-dnl # environment. It saves a great deal of disk space by not duplicating the
-dnl # lisp and etc directories.
-dnl
-dnl if test "$enable_single_tree" = "yes"; then
-dnl bindir='${exec_prefix}/bin/${configuration}'
-dnl datadir='${prefix}/common'
-dnl statedir='${prefix}/common'
-dnl libdir='${bindir}'
-dnl lispdir='${prefix}/common/lisp'
-dnl locallisppath='${prefix}/common/site-lisp'
-dnl lockdir='${prefix}/common/lock'
-dnl archlibdir='${libdir}/etc'
-dnl etcdir='${prefix}/common/data'
-dnl docdir='${prefix}/common/data'
-dnl fi
-
#### Report on what we decided to do.
echo "
changequote([, ])dnl
AC_OUTPUT(Makefile lib-src/Makefile.in oldXMenu/Makefile \
- lwlib/Makefile src/Makefile.in, [
+ man/Makefile lwlib/Makefile src/Makefile.in, [
### Make the necessary directories, if they don't exist.
-for dir in ./src ./lib-src ./cpp ./oldXMenu ./lwlib ./etc ; do
- if test ! -d ${dir}; then
- mkdir ${dir}
- fi
+for dir in cpp etc ; do
+ test -d ${dir} || mkdir ${dir}
done
# Build src/Makefile from ${srcdir}/src/Makefile.in. This must be done
# after src/config.h is built, since we rely on that file.
-changequote(,)dnl The horror, the horror.
+changequote(, )dnl The horror, the horror.
# Now get this: Some word that is part of the ${srcdir} directory name
# or the ${configuration} value might, just might, happen to be an
# identifier like `sun4' or `i386' or something, and be predefined by
sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
-e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
`"
-changequote([,])dnl
+changequote([, ])dnl
echo creating lib-src/Makefile
( cd lib-src