From ea622e321d500715238214db9d8b994cffe8568e Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sat, 11 May 2019 14:56:56 +0200 Subject: [PATCH] Add nativecomp option to configure --- configure.ac | 13 +++++++++++++ src/Makefile.in | 4 +++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 24d21c7afd9..d059b7d6724 100644 --- a/configure.ac +++ b/configure.ac @@ -463,6 +463,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],[compile with dynamic modules support]) OPTION_DEFAULT_ON([threads],[don't compile with elisp threading support]) +OPTION_DEFAULT_ON([nativecomp],[don't 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)])], @@ -3670,6 +3671,17 @@ if test "${HAVE_ZLIB}" = "yes"; then fi AC_SUBST(LIBZ) +HAVE_LIBGCCJIT=no +LIBGCCJIT_LIB= +if test "${with_nativecomp}" != "no"; then + AC_CHECK_LIB(gccjit, gcc_jit_context_acquire, HAVE_LIBGCCJIT=yes, , -lgccjit) + if test "${HAVE_LIBGCCJIT}" = "yes"; then + LIBGCCJIT_LIB=-lgccjit + AC_DEFINE([HAVE_LIBGCCJIT], 1, [Define to 1 if you have the libgccjit library (-lgccjit).]) + fi +fi +AC_SUBST([LIBGCCJIT_LIB]) + ### Dynamic modules support LIBMODULES= HAVE_MODULES=no @@ -5714,6 +5726,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? ${with_nativecomp} "]) if test -n "${EMACSDATA}"; then diff --git a/src/Makefile.in b/src/Makefile.in index 423c5a3f929..4a66016e976 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -326,6 +326,8 @@ GETLOADAVG_LIBS = @GETLOADAVG_LIBS@ GMP_LIB = @GMP_LIB@ GMP_OBJ = @GMP_OBJ@ +LIBGCCJIT = @LIBGCCJIT_LIB@ + RUN_TEMACS = ./temacs # Whether builds should contain details. '--no-build-details' or empty. @@ -531,7 +533,7 @@ LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \ $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(HARFBUZZ_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \ $(LIBGNUTLS_LIBS) $(LIB_PTHREAD) $(GETADDRINFO_A_LIBS) $(LCMS2_LIBS) \ $(NOTIFY_LIBS) $(LIB_MATH) $(LIBZ) $(LIBMODULES) $(LIBSYSTEMD_LIBS) \ - $(JSON_LIBS) $(GMP_LIB) + $(JSON_LIBS) $(GMP_LIB) $(LIBGCCJIT) ## FORCE it so that admin/unidata can decide whether this file is ## up-to-date. Although since charprop depends on bootstrap-emacs, -- 2.39.5