summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac290
1 files changed, 240 insertions, 50 deletions
diff --git a/configure.ac b/configure.ac
index 08f3c0cd857..eff55915436 100644
--- a/configure.ac
+++ b/configure.ac
@@ -187,7 +187,8 @@ dnl It is important that variables on the RHS not be expanded here,
dnl hence the single quotes. This is per the GNU coding standards, see
dnl (autoconf) Installation Directory Variables
dnl See also epaths.h below.
-lispdir='${datadir}/emacs/${version}/lisp'
+lispdirrel='${version}/lisp'
+lispdir='${datadir}/emacs/'${lispdirrel}
standardlisppath='${lispdir}'
locallisppath='${datadir}/emacs/${version}/site-lisp:'\
'${datadir}/emacs/site-lisp'
@@ -409,19 +410,18 @@ dnl This should be the last --with option, because --with-x is
dnl added later on when we find the file name of X, and it's best to
dnl keep them together visually.
AC_ARG_WITH([x-toolkit],[AS_HELP_STRING([--with-x-toolkit=KIT],
- [use an X toolkit (KIT one of: yes or gtk, gtk2, gtk3, lucid or athena, motif, no)])],
+ [use an X toolkit (KIT one of: yes or gtk, gtk2, gtk3, lucid or athena, no)])],
[ case "${withval}" in
y | ye | yes ) val=gtk ;;
n | no ) val=no ;;
l | lu | luc | luci | lucid ) val=lucid ;;
a | at | ath | athe | athen | athena ) val=athena ;;
- m | mo | mot | moti | motif ) val=motif ;;
g | gt | gtk ) val=gtk ;;
gtk2 ) val=gtk2 ;;
gtk3 ) val=gtk3 ;;
* )
AC_MSG_ERROR(['--with-x-toolkit=$withval' is invalid;
-this option's value should be 'yes', 'no', 'lucid', 'athena', 'motif', 'gtk',
+this option's value should be 'yes', 'no', 'lucid', 'athena', 'gtk',
'gtk2' or 'gtk3'. 'yes' and 'gtk' are synonyms.
'athena' and 'lucid' are synonyms.])
;;
@@ -460,7 +460,7 @@ OPTION_DEFAULT_ON([harfbuzz],[don't use HarfBuzz for text shaping])
OPTION_DEFAULT_ON([libotf],[don't use libotf for OpenType font support])
OPTION_DEFAULT_ON([m17n-flt],[don't use m17n-flt for text shaping])
-OPTION_DEFAULT_ON([toolkit-scroll-bars],[don't use Motif/Xaw3d/GTK toolkit scroll bars])
+OPTION_DEFAULT_ON([toolkit-scroll-bars],[don't use Xaw3d/GTK toolkit scroll bars])
OPTION_DEFAULT_ON([xaw3d],[don't use Xaw3d])
OPTION_DEFAULT_ON([xim],[at runtime, default X11 XIM to off])
OPTION_DEFAULT_ON([xdbe],[don't use X11 double buffering support])
@@ -484,6 +484,7 @@ OPTION_DEFAULT_ON([gnutls],[don't use -lgnutls for SSL/TLS support])
OPTION_DEFAULT_ON([zlib],[don't compile with zlib decompression support])
OPTION_DEFAULT_ON([modules],[don't compile with dynamic modules support])
OPTION_DEFAULT_ON([threads],[don't compile with elisp threading support])
+OPTION_DEFAULT_OFF([native-compilation],[compile with Emacs Lisp native compiler support])
AC_ARG_WITH([file-notification],[AS_HELP_STRING([--with-file-notification=LIB],
[use a file notification library (LIB one of: yes, inotify, kqueue, gfile, w32, no)])],
@@ -507,11 +508,6 @@ otherwise for the first of 'inotify', 'kqueue' or 'gfile' that is usable.])
OPTION_DEFAULT_OFF([xwidgets],
[enable use of xwidgets in Emacs buffers (requires gtk3 or macOS Cocoa)])
-## For the times when you want to build Emacs but don't have
-## a suitable makeinfo, and can live without the manuals.
-dnl https://lists.gnu.org/r/emacs-devel/2008-04/msg01844.html
-OPTION_DEFAULT_ON([makeinfo],[don't require makeinfo for building manuals])
-
## Makefile.in needs the cache file name.
AC_SUBST(cache_file)
@@ -1190,9 +1186,6 @@ AC_DEFUN([AM_CONDITIONAL],
dnl Prefer silent make output. For verbose output, use
dnl 'configure --disable-silent-rules' or 'make V=1' .
-dnl This code is adapted from Automake.
-dnl Although it can be simplified now that GNU Make is assumed,
-dnl the simplification hasn't been done yet.
AC_ARG_ENABLE([silent-rules],
[AS_HELP_STRING(
[--disable-silent-rules],
@@ -1202,11 +1195,8 @@ if test "$enable_silent_rules" = no; then
else
AM_DEFAULT_VERBOSITY=0
fi
-AM_V='$(V)'
-AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
-AC_SUBST([AM_V])
-AC_SUBST([AM_DEFAULT_V])
AC_SUBST([AM_DEFAULT_VERBOSITY])
+AC_CONFIG_FILES([src/verbose.mk])
dnl Some other nice autoconf tests.
AC_PROG_INSTALL
@@ -1344,15 +1334,17 @@ if test -n "$BREW"; then
[`$BREW --prefix texinfo 2>/dev/null`/bin$PATH_SEPARATOR$PATH])
fi
+# Check MacPorts on macOS.
+AC_PATH_PROG(HAVE_MACPORTS, port)
+
## Require makeinfo >= 4.13 (last of the 4.x series) to build the manuals.
-if test "${MAKEINFO:=makeinfo}" != "no"; then
- case `($MAKEINFO --version) 2>/dev/null` in
- *' (GNU texinfo) '4.1[[3-9]]* | \
- *' (GNU texinfo) '[[5-9]]* | \
- *' (GNU texinfo) '[[1-9][0-9]]* ) ;;
- *) MAKEINFO=no;;
- esac
-fi
+: ${MAKEINFO:=makeinfo}
+case `($MAKEINFO --version) 2>/dev/null` in
+ *' (GNU texinfo) '4.1[[3-9]]* | \
+ *' (GNU texinfo) '[[5-9]]* | \
+ *' (GNU texinfo) '[[1-9][0-9]]* ) ;;
+ *) MAKEINFO=no;;
+esac
## Makeinfo is unusual. For a released Emacs, the manuals are
## pre-built, and not deleted by the normal clean rules. makeinfo is
@@ -1363,21 +1355,19 @@ fi
## should test for it as it does for any other build requirement.
## We use the presence of $srcdir/info/emacs to distinguish a release,
## with pre-built manuals, from a repository checkout.
-HAVE_MAKEINFO=yes
-
if test "$MAKEINFO" = "no"; then
MAKEINFO=makeinfo
- if test "x${with_makeinfo}" = "xno"; then
- HAVE_MAKEINFO=no
- elif test ! -e "$srcdir/info/emacs" && test ! -e "$srcdir/info/emacs.info"; then
+ if test ! -e "$srcdir/info/emacs" && test ! -e "$srcdir/info/emacs.info"; then
AC_MSG_ERROR( [You do not seem to have makeinfo >= 4.13, and your
source tree does not seem to have pre-built manuals in the 'info' directory.
-Either install a suitable version of makeinfo, or re-run configure
-with the '--without-makeinfo' option to build without the manuals.] )
+Please install a suitable version of makeinfo.] )
+ else
+ AC_MSG_WARN( [You do not seem to have makeinfo >= 4.13.
+You will not be able to rebuild the manuals if you delete them or change
+their sources.] )
fi
fi
AC_SUBST([MAKEINFO])
-AC_SUBST(HAVE_MAKEINFO)
if test $opsys = mingw32; then
DOCMISC_W32=efaq-w32
@@ -1768,8 +1758,8 @@ fi
dnl On Solaris 8 there's a compilation warning for term.h because
dnl it doesn't define 'bool'.
-AC_CHECK_HEADERS(term.h, , , -)
-AC_HEADER_TIME
+AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[#include <term.h>]],[[]])],
+ AC_DEFINE(HAVE_TERM_H, 1, [Define to 1 if you have the <term.h> header file.]))
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS_ONCE(sys/socket.h)
@@ -1907,6 +1897,8 @@ if test "${with_ns}" != no; then
NS_IMPL_COCOA=yes
ns_appdir=`pwd`/nextstep/Emacs.app
ns_appbindir=${ns_appdir}/Contents/MacOS
+ ns_applibexecdir=${ns_appdir}/Contents/MacOS/libexec
+ ns_applibdir=${ns_appdir}/Contents/Frameworks
ns_appresdir=${ns_appdir}/Contents/Resources
ns_appsrc=Cocoa/Emacs.base
ns_fontfile=macfont.o
@@ -1964,6 +1956,8 @@ fail;
if test $NS_IMPL_GNUSTEP = yes; then
ns_appdir=`pwd`/nextstep/Emacs.app
ns_appbindir=${ns_appdir}
+ ns_applibexecdir=${ns_appdir}/libexec
+ ns_applibdir=${ns_appdir}/Frameworks
ns_appresdir=${ns_appdir}/Resources
ns_appsrc=GNUstep/Emacs.base
ns_fontfile=nsfont.o
@@ -2020,12 +2014,13 @@ if test "${HAVE_NS}" = yes; then
window_system=nextstep
# set up packaging dirs
if test "${EN_NS_SELF_CONTAINED}" = yes; then
+ AC_DEFINE(NS_SELF_CONTAINED, 1, [Build an NS bundled app])
ns_self_contained=yes
prefix=${ns_appresdir}
exec_prefix=${ns_appbindir}
dnl This one isn't really used, only archlibdir is.
- libexecdir="\${ns_appbindir}/libexec"
- archlibdir="\${ns_appbindir}/libexec"
+ libexecdir="\${ns_applibexecdir}"
+ archlibdir="\${ns_applibexecdir}"
etcdocdir="\${ns_appresdir}/etc"
etcdir="\${ns_appresdir}/etc"
dnl FIXME maybe set datarootdir instead.
@@ -2033,7 +2028,8 @@ if test "${HAVE_NS}" = yes; then
infodir="\${ns_appresdir}/info"
mandir="\${ns_appresdir}/man"
lispdir="\${ns_appresdir}/lisp"
- test "$locallisppathset" = no && locallisppath=""
+ lispdirrel="\${ns_appresdir}/lisp"
+ test "$locallisppathset" = no && locallisppath="\${ns_appresdir}/site-lisp"
INSTALL_ARCH_INDEP_EXTRA=
fi
@@ -2252,7 +2248,7 @@ if test "$window_system" = none && test "X$with_x" != "Xno"; then
then
AC_MSG_ERROR([You seem to be running X, but no X development libraries
were found. You should install the relevant development files for X
-and for the toolkit you want, such as Gtk+ or Motif. Also make
+and for the toolkit you want, such as Gtk+. Also make
sure you have development files for image handling, i.e.
tiff, gif, jpeg, png and xpm.
If you are sure you want Emacs compiled without X window support, pass
@@ -2285,6 +2281,9 @@ doug_lea_malloc=$emacs_cv_var_doug_lea_malloc
hybrid_malloc=
system_malloc=yes
+dnl This must be before the test of $ac_cv_func_sbrk below.
+AC_CHECK_FUNCS_ONCE([sbrk])
+
test $with_unexec = yes &&
case "$opsys" in
## darwin ld insists on the use of malloc routines in the System framework.
@@ -2901,6 +2900,11 @@ fi
AC_SUBST(SETTINGS_CFLAGS)
AC_SUBST(SETTINGS_LIBS)
+USE_STARTUP_NOTIFICATION=no
+if test "${HAVE_GTK}" = "yes"; then
+ USE_STARTUP_NOTIFICATION=yes
+fi
+AC_SUBST(USE_STARTUP_NOTIFICATION)
dnl SELinux is available for GNU/Linux only.
HAVE_LIBSELINUX=no
@@ -3675,6 +3679,7 @@ AC_SUBST(LIBZ)
LIBMODULES=
HAVE_MODULES=no
MODULES_OBJ=
+NEED_DYNLIB=no
case $opsys in
cygwin|mingw32) MODULES_SUFFIX=".dll" ;;
darwin) MODULES_SUFFIX=".dylib" ;;
@@ -3710,7 +3715,8 @@ if test "${with_modules}" != "no"; then
fi
if test "${HAVE_MODULES}" = yes; then
- MODULES_OBJ="dynlib.o emacs-module.o"
+ MODULES_OBJ="emacs-module.o"
+ NEED_DYNLIB=yes
AC_DEFINE(HAVE_MODULES, 1, [Define to 1 if dynamic modules are enabled])
AC_DEFINE_UNQUOTED(MODULES_SUFFIX, "$MODULES_SUFFIX",
[System extension for dynamic libraries])
@@ -3737,6 +3743,147 @@ module_env_snippet_28="$srcdir/src/module-env-28.h"
emacs_major_version="${PACKAGE_VERSION%%.*}"
AC_SUBST(emacs_major_version)
+### Emacs Lisp native compiler support
+
+AC_DEFUN([libgccjit_smoke_test], [
+ AC_LANG_SOURCE(
+ [[#include <libgccjit.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ int
+ main (int argc, char **argv)
+ {
+ gcc_jit_context *ctxt;
+ gcc_jit_result *result;
+ ctxt = gcc_jit_context_acquire ();
+ if (!ctxt)
+ exit (1);
+ gcc_jit_type *int_type =
+ gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_INT);
+ gcc_jit_function *func =
+ gcc_jit_context_new_function (ctxt, NULL,
+ GCC_JIT_FUNCTION_EXPORTED,
+ int_type, "foo", 0, NULL, 0);
+ gcc_jit_block *block = gcc_jit_function_new_block (func, "foo");
+ gcc_jit_block_end_with_return (
+ block,
+ NULL,
+ gcc_jit_context_new_rvalue_from_int (ctxt, int_type, 1));
+ result = gcc_jit_context_compile (ctxt);
+ if (!result)
+ exit (1);
+ typedef int (*fn_type) (void);
+ fn_type foo =
+ (fn_type)gcc_jit_result_get_code (result, "foo");
+ if (!foo)
+ exit (1);
+ if (foo () != 1)
+ exit (1);
+ gcc_jit_context_release (ctxt);
+ gcc_jit_result_release (result);
+ return 0;
+ }]])])
+
+AC_DEFUN([libgccjit_not_found], [
+ AC_MSG_ERROR([ELisp native compiler was requested, but libgccjit was not found.
+Please try installing libgccjit or a similar package.
+If you are sure you want Emacs be compiled without ELisp native compiler,
+pass the --without-native-compilation option to configure.])])
+
+AC_DEFUN([libgccjit_dev_not_found], [
+ AC_MSG_ERROR([ELisp native compiler was requested, but libgccjit header files were
+not found.
+Please try installing libgccjit-dev or a similar package.
+If you are sure you want Emacs be compiled without ELisp native compiler,
+pass the --without-nativecomp option to configure.])])
+
+AC_DEFUN([libgccjit_broken], [
+ AC_MSG_ERROR([The installed libgccjit failed to compile and run a test program using
+the libgccjit library; see config.log for the details of the failure.
+The test program can be found here:
+<https://gcc.gnu.org/onlinedocs/jit/intro/tutorial01.html>.
+You can try compiling it yourself to investigate the issues.
+Please report the issue to your distribution if libgccjit was installed
+through that.
+You can find the instructions on how to compile and install libgccjit from
+source on this site:
+<https://gcc.gnu.org/wiki/JIT>.])])
+
+HAVE_NATIVE_COMP=no
+LIBGCCJIT_LIBS=
+LIBGCCJIT_CFLAGS=
+if test "${with_native_compilation}" != "no"; then
+ if test "${HAVE_PDUMPER}" = no; then
+ AC_MSG_ERROR(['--with-nativecomp' requires '--with-dumping=pdumper'])
+ fi
+ if test "${HAVE_ZLIB}" = no; then
+ AC_MSG_ERROR(['--with-nativecomp' requires zlib])
+ fi
+
+ # Ensure libgccjit installed by Homebrew can be found.
+ if test -n "$BREW"; then
+ BREW_LIBGCCJIT_PREFIX=`$BREW --prefix --installed libgccjit 2>/dev/null`
+ if test "$BREW_LIBGCCJIT_PREFIX"; then
+ brew_libdir=`find ${BREW_LIBGCCJIT_PREFIX}/ -name \*.so \
+ | sed -e '1!d;s|/[[^/]]*\.so$||'`
+ CFLAGS="$CFLAGS -I${BREW_LIBGCCJIT_PREFIX}/include"
+ LDFLAGS="$LDFLAGS -L${brew_libdir} -I${BREW_LIBGCCJIT_PREFIX}/include"
+ fi
+ fi
+
+ # Ensure libgccjit installed by MacPorts can be found.
+ if test -n "$HAVE_MACPORTS"; then
+ # Determine which gcc version has been installed (gcc11, for
+ # instance).
+ PORT_PACKAGE=$(port installed active | grep '^ *gcc@<:@0-9@:>@* ' | \
+ awk '{ print $1; }')
+ MACPORTS_LIBGCCJIT_INCLUDE=$(dirname $(port contents $PORT_PACKAGE | \
+ grep libgccjit.h))
+ MACPORTS_LIBGCCJIT_LIB=$(dirname $(port contents $PORT_PACKAGE | \
+ grep libgccjit.dylib))
+ CFLAGS="$CFLAGS -I${MACPORTS_LIBGCCJIT_INCLUDE}"
+ LDFLAGS="$LDFLAGS -L${MACPORTS_LIBGCCJIT_LIB}"
+ fi
+
+ # Check if libgccjit is available.
+ AC_CHECK_LIB(gccjit, gcc_jit_context_acquire, [], [libgccjit_not_found])
+ AC_CHECK_HEADERS(libgccjit.h, [], [libgccjit_dev_not_found])
+ emacs_save_LIBS=$LIBS
+ LIBS="-lgccjit"
+ # Check if libgccjit really works.
+ AC_RUN_IFELSE([libgccjit_smoke_test], [], [libgccjit_broken])
+ LIBS=$emacs_save_LIBS
+ HAVE_NATIVE_COMP=yes
+ case "${opsys}" in
+ # mingw32 loads the library dynamically.
+ mingw32) ;;
+ # OpenBSD doesn't have libdl, all the functions are in libc
+ netbsd|openbsd)
+ LIBGCCJIT_LIBS="-lgccjit" ;;
+ *)
+ LIBGCCJIT_LIBS="-lgccjit -ldl" ;;
+ esac
+ NEED_DYNLIB=yes
+ AC_DEFINE(HAVE_NATIVE_COMP, 1, [Define to 1 if native compiler is available.])
+
+ # Ensure libgccjit installed by MacPorts can be found.
+ if test -n "$HAVE_MACPORTS"; then
+ LIBGCCJIT_CFLAGS="$LIBGCCJIT_CFLAGS -I${MACPORTS_LIBGCCJIT_INCLUDE}"
+ LIBGCCJIT_LIBS="-L${MACPORTS_LIBGCCJIT_LIB} $LIBGCCJIT_LIBS"
+ fi
+fi
+AC_DEFINE_UNQUOTED(NATIVE_ELISP_SUFFIX, ".eln",
+ [System extension for native compiled elisp])
+AC_SUBST(HAVE_NATIVE_COMP)
+AC_SUBST(LIBGCCJIT_CFLAGS)
+AC_SUBST(LIBGCCJIT_LIBS)
+
+DYNLIB_OBJ=
+if test "${NEED_DYNLIB}" = yes; then
+ DYNLIB_OBJ="dynlib.o"
+fi
+AC_SUBST(DYNLIB_OBJ)
+
### Use -lpng if available, unless '--with-png=no'.
HAVE_PNG=no
LIBPNG=
@@ -3912,6 +4059,11 @@ case $with_json,$HAVE_JSON in
WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-json=ifavailable";;
esac
if test "X${MISSING}" != X; then
+ # If we have a missing library, and we don't have pkg-config installed,
+ # the missing pkg-config may be the reason. Give the user a hint.
+ if test "X${PKG_CONFIG}" = X; then
+ AC_MSG_WARN([Unable to locate a usable pkg-config])
+ fi
AC_MSG_ERROR([The following required libraries were not found:
$MISSING
Maybe some development libraries/packages are missing?
@@ -4189,6 +4341,22 @@ fi
AC_SUBST([BLESSMAIL_TARGET])
AC_SUBST([LIBS_MAIL])
+HAVE_SECCOMP=no
+AC_CHECK_HEADERS(
+ [linux/seccomp.h linux/filter.h],
+ [AC_CHECK_DECLS(
+ [SECCOMP_SET_MODE_FILTER, SECCOMP_FILTER_FLAG_TSYNC],
+ [HAVE_SECCOMP=yes], [],
+ [[
+ #include <linux/seccomp.h>
+ ]])])
+AC_SUBST([HAVE_SECCOMP])
+
+EMACS_CHECK_MODULES([LIBSECCOMP], [libseccomp >= 2.4.0])
+AC_SUBST([HAVE_LIBSECCOMP])
+AC_SUBST([LIBSECCOMP_LIBS])
+AC_SUBST([LIBSECCOMP_CFLAGS])
+
OLD_LIBS=$LIBS
LIBS="$LIB_PTHREAD $LIB_MATH $LIBS"
AC_CHECK_FUNCS(accept4 fchdir gethostname \
@@ -4196,7 +4364,7 @@ getrusage get_current_dir_name \
lrand48 random rint trunc \
select getpagesize setlocale newlocale \
getrlimit setrlimit shutdown \
-pthread_sigmask strsignal setitimer timer_getoverrun \
+pthread_sigmask strsignal setitimer \
sendto recvfrom getsockname getifaddrs freeifaddrs \
gai_strerror sync \
getpwent endpwent getgrent endgrent \
@@ -4548,7 +4716,7 @@ AC_CHECK_HEADERS(valgrind/valgrind.h)
AC_CHECK_MEMBERS([struct unipair.unicode], [], [], [[#include <linux/kd.h>]])
-AC_CHECK_FUNCS_ONCE([__lsan_ignore_object sbrk])
+AC_CHECK_FUNCS_ONCE([__lsan_ignore_object])
AC_FUNC_FORK
@@ -4717,10 +4885,10 @@ if test "$USE_X_TOOLKIT" != "none"; then
else
OTHERLIBS="-lXt -$LIBXMU"
fi
- AC_TRY_LINK(
- [#include <X11/Intrinsic.h>
- #include <X11/Xmu/Editres.h>],
- [_XEditResCheckMessages (0, 0, 0, 0);],
+ AC_LINK_IFELSE([AC_LANG_PROGRAM(
+ [[#include <X11/Intrinsic.h>
+ #include <X11/Xmu/Editres.h>]],
+ [[_XEditResCheckMessages (0, 0, 0, 0);]])],
[AC_DEFINE([X_TOOLKIT_EDITRES], 1,
[Define to 1 if we should use XEditRes.])])
LIBS=$OLDLIBS
@@ -4741,7 +4909,7 @@ emacs_broken_SIGIO=no
case $opsys in
dnl SIGIO exists, but the feature doesn't work in the way Emacs needs.
- hpux* | nacl | openbsd | solaris | unixware )
+ hpux* | nacl | solaris | unixware )
emacs_broken_SIGIO=yes
;;
@@ -5252,6 +5420,7 @@ AC_SUBST(sharedstatedir)
AC_SUBST(libexecdir)
AC_SUBST(mandir)
AC_SUBST(infodir)
+AC_SUBST(lispdirrel)
AC_SUBST(lispdir)
AC_SUBST(standardlisppath)
AC_SUBST(locallisppath)
@@ -5275,6 +5444,8 @@ AC_SUBST(CFLAGS)
AC_SUBST(X_TOOLKIT_TYPE)
AC_SUBST(ns_appdir)
AC_SUBST(ns_appbindir)
+AC_SUBST(ns_applibexecdir)
+AC_SUBST(ns_applibdir)
AC_SUBST(ns_appresdir)
AC_SUBST(ns_appsrc)
AC_SUBST(GNU_OBJC_CFLAGS)
@@ -5493,6 +5664,12 @@ gl_INIT
CFLAGS=$SAVE_CFLAGS
LIBS=$SAVE_LIBS
+# timer_getoverrun needs the same libarary as timer_settime
+OLD_LIBS=$LIBS
+LIBS="$LIB_TIMER_TIME $LIBS"
+AC_CHECK_FUNCS(timer_getoverrun)
+LIBS=$OLD_LIBS
+
if test "${opsys}" = "mingw32"; then
CPPFLAGS="$CPPFLAGS -DUSE_CRT_DLL=1 -I \${abs_top_srcdir}/nt/inc"
# Remove unneeded switches from the value of CC that goes to Makefiles
@@ -5508,7 +5685,8 @@ case "$opsys" in
if test "$HAVE_NS" = "yes"; then
libs_nsgui="-framework AppKit"
if test "$NS_IMPL_COCOA" = "yes"; then
- libs_nsgui="$libs_nsgui -framework IOKit -framework Carbon -framework IOSurface"
+ libs_nsgui="$libs_nsgui -framework IOKit -framework Carbon \
+ -framework IOSurface -framework QuartzCore"
fi
else
libs_nsgui=
@@ -5548,6 +5726,13 @@ case "$opsys" in
x86_64-*-*) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x400000000 -Wl,-entry,__start -Wl,-Map,./temacs.map" ;;
*) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,__start -Wl,-Map,./temacs.map" ;;
esac
+ ## If they want unexec, disable Windows ASLR for the Emacs binary
+ if test "$with_dumping" = "unexec"; then
+ case "$canonical" in
+ x86_64-*-*) LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS -Wl,-disable-dynamicbase -Wl,-disable-high-entropy-va -Wl,-default-image-base-low" ;;
+ *) LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS -Wl,-disable-dynamicbase" ;;
+ esac
+ fi
;;
*) LD_SWITCH_SYSTEM_TEMACS= ;;
@@ -5682,7 +5867,8 @@ optsep=
emacs_config_features=
for opt in ACL CAIRO DBUS FREETYPE GCONF GIF GLIB GMP GNUTLS GPM GSETTINGS \
HARFBUZZ IMAGEMAGICK JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 \
- M17N_FLT MODULES NOTIFY NS OLDXMENU PDUMPER PNG RSVG SOUND THREADS TIFF \
+ M17N_FLT MODULES NATIVE_COMP NOTIFY NS OLDXMENU PDUMPER PNG RSVG SECCOMP \
+ SOUND THREADS TIFF \
TOOLKIT_SCROLL_BARS UNEXEC X11 XAW3D XDBE XFT XIM XPM XWIDGETS X_TOOLKIT \
ZLIB; do
@@ -5758,6 +5944,7 @@ AS_ECHO([" Does Emacs use -lXaw3d? ${HAVE_XAW3D
Does Emacs support the portable dumper? ${with_pdumper}
Does Emacs support legacy unexec dumping? ${with_unexec}
Which dumping strategy does Emacs use? ${with_dumping}
+ Does Emacs have native lisp compiler? ${HAVE_NATIVE_COMP}
"])
if test -n "${EMACSDATA}"; then
@@ -5860,10 +6047,13 @@ dnl the use of force in the 'epaths-force' rule in Makefile.in.
AC_CONFIG_COMMANDS([src/epaths.h], [
if test "${opsys}" = "mingw32"; then
${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force-w32
+elif test "$HAVE_NS" = "yes" && test "$EN_NS_SELF_CONTAINED" = "yes"; then
+ ${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force-ns-self-contained
else
${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force
fi || AC_MSG_ERROR(['src/epaths.h' could not be made.])
-], [GCC="$GCC" CPPFLAGS="$CPPFLAGS" opsys="$opsys"])
+], [GCC="$GCC" CPPFLAGS="$CPPFLAGS" opsys="$opsys" HAVE_NS="$HAVE_NS"
+ EN_NS_SELF_CONTAINED="$EN_NS_SELF_CONTAINED"])
dnl NB we have to cheat and use the ac_... version because abs_top_srcdir
dnl is not yet set, sigh. Or we could use ../$srcdir/src/.gdbinit,