From: Tom Tromey Date: Sun, 12 Aug 2018 21:29:03 +0000 (-0600) Subject: Add configury for JIT X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1bdba1a7141cb88e93bd10aa8af9bb94c6f98a09;p=emacs.git Add configury for JIT * configure.ac: Add --with-libjit. Check for open_memstream. * src/Makefile.in (LIBJIT, LIBJIT_CFLAGS): New variables. (EMACS_CFLAGS): Use LIBJIT_CFLAGS. (base_obj): Add jit.o. (LIBES): Use LIBJIT. --- diff --git a/configure.ac b/configure.ac index 0b8849eea23..8baeba72846 100644 --- a/configure.ac +++ b/configure.ac @@ -384,6 +384,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_OFF([modules],[compile with dynamic modules support]) OPTION_DEFAULT_ON([threads],[don't compile with elisp threading support]) +OPTION_DEFAULT_ON([libjit],[compile with emacs lisp jit 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)])], @@ -3525,6 +3526,17 @@ if test "${HAVE_ZLIB}" = "yes"; then fi AC_SUBST(LIBZ) +HAVE_LIBJIT=no +LIBJIT= +if test "${with_libjit}" != "no"; then + LIBJIT_REQUIRED=0.0.1 + LIBJIT_MODULES="libjit >= $LIBJIT_REQUIRED" + EMACS_CHECK_MODULES([LIBJIT], [$LIBJIT_MODULES]) + if test "${HAVE_LIBJIT}" = "yes"; then + AC_DEFINE([HAVE_LIBJIT], 1, [Define to 1 if you have the libjit library (-ljit).]) + fi +fi + ### Dynamic modules support LIBMODULES= HAVE_MODULES=no @@ -4013,7 +4025,8 @@ pthread_sigmask strsignal setitimer \ sendto recvfrom getsockname getifaddrs freeifaddrs \ gai_strerror sync \ getpwent endpwent getgrent endgrent \ -cfmakeraw cfsetspeed __executable_start log2 prctl) +cfmakeraw cfsetspeed __executable_start log2 prctl \ +open_memstream) LIBS=$OLD_LIBS dnl No need to check for posix_memalign if aligned_alloc works. @@ -5483,6 +5496,7 @@ AS_ECHO([" Does Emacs use -lXaw3d? ${HAVE_XAW3D Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS} Does Emacs support Xwidgets (requires gtk3)? ${HAVE_XWIDGETS} Does Emacs have threading support in lisp? ${threads_enabled} + Does Emacs have lisp JIT support? ${HAVE_LIBJIT} "]) if test -n "${EMACSDATA}"; then diff --git a/src/Makefile.in b/src/Makefile.in index 52ce7605f7b..e86098be7b3 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -239,6 +239,9 @@ LCMS2_CFLAGS = @LCMS2_CFLAGS@ LIBZ = @LIBZ@ +LIBJIT = @LIBJIT_LIBS@ +LIBJIT_CFLAGS = @LIBJIT_CFLAGS@ + ## system-specific libs for dynamic modules, else empty LIBMODULES = @LIBMODULES@ ## dynlib.o emacs-module.o if modules enabled, else empty @@ -369,7 +372,7 @@ EMACS_CFLAGS=-Demacs $(MYCPPFLAGS) -I. -I$(srcdir) \ $(GNUSTEP_CFLAGS) $(CFLAGS_SOUND) $(RSVG_CFLAGS) $(IMAGEMAGICK_CFLAGS) \ $(PNG_CFLAGS) $(LIBXML2_CFLAGS) $(DBUS_CFLAGS) \ $(XRANDR_CFLAGS) $(XINERAMA_CFLAGS) $(XFIXES_CFLAGS) $(XDBE_CFLAGS) \ - $(WEBKIT_CFLAGS) $(LCMS2_CFLAGS) \ + $(WEBKIT_CFLAGS) $(LCMS2_CFLAGS) $(LIBJIT_CFLAGS) \ $(SETTINGS_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) \ $(LIBOTF_CFLAGS) $(M17N_FLT_CFLAGS) $(DEPFLAGS) \ $(LIBSYSTEMD_CFLAGS) $(JSON_CFLAGS) \ @@ -397,7 +400,7 @@ base_obj = dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \ cmds.o casetab.o casefiddle.o indent.o search.o regex-emacs.o undo.o \ alloc.o data.o doc.o editfns.o callint.o \ eval.o floatfns.o fns.o font.o print.o lread.o $(MODULES_OBJ) \ - syntax.o $(UNEXEC_OBJ) bytecode.o \ + syntax.o $(UNEXEC_OBJ) bytecode.o jit.o \ process.o gnutls.o callproc.o \ region-cache.o sound.o atimer.o \ doprnt.o intervals.o textprop.o composite.o xml.o lcms.o $(NOTIFY_OBJ) \ @@ -504,7 +507,7 @@ LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \ $(FREETYPE_LIBS) $(FONTCONFIG_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) $(LIBJIT) ## FORCE it so that admin/unidata can decide whether these files ## are up-to-date. Although since charprop depends on bootstrap-emacs,