PKG_REQ='''mingw-w64-x86_64-giflib
mingw-w64-x86_64-gnutls
mingw-w64-x86_64-harfbuzz
-mingw-w64-x86_64-jansson
mingw-w64-x86_64-lcms2
mingw-w64-x86_64-libjpeg-turbo
mingw-w64-x86_64-libpng
DLL_REQ='''libgif
libgnutls
libharfbuzz
-libjansson
liblcms2
libturbojpeg
libpng
OPTION_DEFAULT_ON([xml2],[don't compile with XML parsing support])
OPTION_DEFAULT_OFF([imagemagick],[compile with ImageMagick image support])
OPTION_DEFAULT_ON([native-image-api], [don't use native image APIs (GDI+ on Windows)])
-OPTION_DEFAULT_IFAVAILABLE([json], [compile with native JSON support])
OPTION_DEFAULT_IFAVAILABLE([tree-sitter], [compile with tree-sitter])
OPTION_DEFAULT_ON([xft],[don't use XFT for anti aliased fonts])
passthrough="$passthrough --with-png=$with_png"
passthrough="$passthrough --with-webp=$with_webp"
passthrough="$passthrough --with-gif=$with_gif"
- passthrough="$passthrough --with-json=$with_json"
passthrough="$passthrough --with-jpeg=$with_jpeg"
passthrough="$passthrough --with-xml2=$with_xml2"
passthrough="$passthrough --with-sqlite3=$with_sqlite3"
with_png=no
with_webp=no
with_gif=no
- with_json=no
with_jpeg=no
with_xml2=no
with_sqlite3=no
AC_SUBST([LIBSYSTEMD_LIBS])
AC_SUBST([LIBSYSTEMD_CFLAGS])
-HAVE_JSON=no
-JSON_OBJ=
-
-if test "${with_json}" != no; then
- EMACS_CHECK_MODULES([JSON], [jansson >= 2.7],
- [HAVE_JSON=yes], [HAVE_JSON=no])
- if test "${HAVE_JSON}" = yes; then
- AC_DEFINE([HAVE_JSON], [1], [Define if using Jansson.])
- JSON_OBJ=json.o
- fi
-
- # Windows loads libjansson dynamically
- if test "${opsys}" = "mingw32"; then
- JSON_LIBS=
- fi
-fi
-
-AC_SUBST([JSON_LIBS])
-AC_SUBST([JSON_CFLAGS])
-AC_SUBST([JSON_OBJ])
-
HAVE_TREE_SITTER=no
TREE_SITTER_OBJ=
NEED_DYNLIB=no
*) MISSING="$MISSING gnutls"
WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-gnutls=ifavailable";;
esac
-case $with_json,$HAVE_JSON in
- no,* | ifavailable,* | *,yes) ;;
- *) MISSING="$MISSING json"
- WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-json=ifavailable";;
-esac
case $with_tree_sitter,$HAVE_TREE_SITTER in
no,* | ifavailable,* | *,yes) ;;
*) MISSING="$MISSING tree-sitter"
optsep=
emacs_config_features=
for opt in ACL BE_APP CAIRO DBUS FREETYPE GCONF GIF GLIB GMP GNUTLS GPM GSETTINGS \
- HARFBUZZ IMAGEMAGICK JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 \
+ HARFBUZZ IMAGEMAGICK JPEG LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 \
M17N_FLT MODULES NATIVE_COMP NOTIFY NS OLDXMENU PDUMPER PGTK PNG RSVG SECCOMP \
SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER \
UNEXEC WEBP X11 XAW3D XDBE XFT XIM XINPUT2 XPM XWIDGETS X_TOOLKIT \
Does Emacs use -lotf? ${HAVE_LIBOTF}
Does Emacs use -lxft? ${HAVE_XFT}
Does Emacs use -lsystemd? ${HAVE_LIBSYSTEMD}
- Does Emacs use -ljansson? ${HAVE_JSON}
Does Emacs use -ltree-sitter? ${HAVE_TREE_SITTER}
Does Emacs use the GMP library? ${HAVE_GMP}
Does Emacs directly use zlib? ${HAVE_ZLIB}
@cindex JSON
@cindex JavaScript Object Notation
- When Emacs is compiled with @acronym{JSON} (@dfn{JavaScript Object
-Notation}) support, it provides several functions to convert
-between Lisp objects and JSON values. Any JSON value can be converted
-to a Lisp object, but not vice versa. Specifically:
+ The Emacs @acronym{JSON} (@dfn{JavaScript Object Notation}) support
+provides several functions to convert between Lisp objects and JSON
+values. Any JSON value can be converted to a Lisp object, but not vice
+versa. Specifically:
@itemize
@item
@code{false}, or an empty array, all of which are different JSON
values.
-@defun json-available-p
-This predicate returns non-@code{nil} if Emacs has been built with
-@acronym{JSON} support, and the library is available on the current
-system.
-@end defun
-
If some Lisp object can't be represented in JSON, the serialization
functions will signal an error of type @code{wrong-type-argument}.
The parsing functions can also signal the following errors:
Linux and BSD versions of ALSA. Use '--with-sound=alsa' to build with
ALSA on these operating systems instead.
+---
+** Native JSON support is now always available; libjansson is no longer used.
+No external library is required. The '--with-json' configure option has
+been removed. 'json-available-p' now always returns non-nil and is only
+kept for compatibility.
+
\f
* Startup Changes in Emacs 30.1
However, the old ``Android.mk'' Makefiles are still present in older
branches, and can be easily adapted to newer versions.
-In addition, some Emacs dependencies provide `ndk-build' support
-themselves:
-
- libjansson - https://github.com/akheron/jansson
- (You must add LOCAL_EXPORT_INCLUDES := $(LOCAL_C_INCLUDES) before
- its Android.mk includes $(BUILD_SHARED_LIBRARY), then copy
- android/jansson_config.h to android/jansson_private_config.h.)
-
Emacs developers have ported the following dependencies to ARM Android
systems:
"gnutls_emacs", "gmp_emacs",
"nettle_emacs", "p11-kit_emacs",
"tasn1_emacs", "hogweed_emacs",
- "jansson_emacs", "jpeg_emacs",
+ "jpeg_emacs",
"tiff_emacs", "xml2_emacs",
"icuuc_emacs", "harfbuzz_emacs",
"tree-sitter_emacs", };
(internal--fill-string-single-line (apply #'format string objects)))
(defun json-available-p ()
- "Return non-nil if Emacs has libjansson support."
- (and (fboundp 'json--available-p)
- (json--available-p)))
+ "Return non-nil if Emacs has native JSON support."
+ t)
(defun ensure-list (object)
"Return OBJECT as a list.
'(libxml2 "libxml2-2.dll" "libxml2.dll")
'(zlib "zlib1.dll" "libz-1.dll")
'(lcms2 "liblcms2-2.dll")
- '(json "libjansson-4.dll")
'(gccjit "libgccjit-0.dll")
;; MSYS2 distributes libtree-sitter.dll, without API version
;; number...
# This is a map between pkg-config style package names and Android
# ones.
-ndk_package_map="libwebpdemux:webpdemux libxml-2.0:libxml2 jansson:libjansson"
+ndk_package_map="libwebpdemux:webpdemux libxml-2.0:libxml2"
ndk_package_map="$ndk_package_map sqlite3:libsqlite_static_minimal"
ndk_package_map="$ndk_package_map MagickWand:libmagickwand-7 lcms2:liblcms2"
/^CANNOT_DUMP *=/s/@CANNOT_DUMP@/no/
/^W32_OBJ *=/s/@W32_OBJ@//
/^W32_LIBS *=/s/@W32_LIBS@//
-/^JSON_OBJ *=/s/@JSON_OBJ@//
-/^JSON_CFLAGS *=/s/@JSON_CFLAGS@//
-/^JSON_LIBS *=/s/@JSON_LIBS@//
/^LIBGCCJIT_OBJ *=/s/@LIBGCCJIT_OBJ@//
/^LIBGCCJIT_CFLAGS *=/s/@LIBGCCJIT_CFLAGS@//
/^LIBGCCJIT_LIBS *=/s/@LIBGCCJIT_LIBS@//
Does Emacs use -lotf? no
Does Emacs use -lxft? no
Does Emacs use -lsystemd? no
- Does Emacs use -ljansson? yes
Does Emacs use the GMP library? yes
Does Emacs directly use zlib? yes
Does Emacs have dynamic modules support? yes
Prebuilt binaries of lcms2 DLL (for 32-bit builds of Emacs) are
available from the ezwinports site and from the MSYS2 project.
-* Optional support for JSON
-
- Emacs can provide built-in support for JSON parsing and
- serialization using the libjansson library. Prebuilt binaries of
- the libjansson DLL (for 32-bit builds of Emacs) are available from
- the ezwinports site and from the MSYS2 project.
-
* Optional support for HarfBuzzz shaping library
Emacs supports display of complex scripts and Arabic shaping. The
mingw-w64-x86_64-librsvg \
mingw-w64-x86_64-libwebp \
mingw-w64-x86_64-lcms2 \
- mingw-w64-x86_64-jansson \
mingw-w64-x86_64-libxml2 \
mingw-w64-x86_64-zlib \
mingw-w64-x86_64-harfbuzz \
LIBSYSTEMD_LIBS = @LIBSYSTEMD_LIBS@
LIBSYSTEMD_CFLAGS = @LIBSYSTEMD_CFLAGS@
-JSON_LIBS = @JSON_LIBS@
-JSON_CFLAGS = @JSON_CFLAGS@
-JSON_OBJ = @JSON_OBJ@
-
TREE_SITTER_LIBS = @TREE_SITTER_LIBS@
TREE_SITTER_CFLAGS = @TREE_SITTER_CFLAGS@
$(XINPUT_CFLAGS) $(WEBP_CFLAGS) $(WEBKIT_CFLAGS) $(LCMS2_CFLAGS) \
$(SETTINGS_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) \
$(HARFBUZZ_CFLAGS) $(LIBOTF_CFLAGS) $(M17N_FLT_CFLAGS) $(DEPFLAGS) \
- $(LIBSYSTEMD_CFLAGS) $(JSON_CFLAGS) $(XSYNC_CFLAGS) $(TREE_SITTER_CFLAGS) \
+ $(LIBSYSTEMD_CFLAGS) $(XSYNC_CFLAGS) $(TREE_SITTER_CFLAGS) \
$(LIBGNUTLS_CFLAGS) $(NOTIFY_CFLAGS) $(CAIRO_CFLAGS) \
$(WERROR_CFLAGS) $(HAIKU_CFLAGS) $(XCOMPOSITE_CFLAGS) $(XSHAPE_CFLAGS) \
$(ANDROID_BUILD_CFLAGS) $(GIF_CFLAGS) $(JPEG_CFLAGS) $(SQLITE3_CFLAGS) \
itree.o \
$(if $(HYBRID_MALLOC),sheap.o) \
$(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_OBJ) \
- $(W32_OBJ) $(WINDOW_SYSTEM_OBJ) $(XGSELOBJ) $(JSON_OBJ) \
+ $(W32_OBJ) $(WINDOW_SYSTEM_OBJ) $(XGSELOBJ) \
$(HAIKU_OBJ) $(PGTK_OBJ) $(ANDROID_OBJ)
doc_obj = $(base_obj) $(NS_OBJC_OBJ)
obj = $(doc_obj) $(HAIKU_CXX_OBJ)
$(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) $(LIBGMP) $(LIBGCCJIT_LIBS) $(XINPUT_LIBS) $(HAIKU_LIBS) \
+ $(LIBGMP) $(LIBGCCJIT_LIBS) $(XINPUT_LIBS) $(HAIKU_LIBS) \
$(TREE_SITTER_LIBS) $(SQLITE3_LIBS) $(XCOMPOSITE_LIBS) $(XSHAPE_LIBS) \
$(ANDROID_LIBS)
syms_of_threads ();
syms_of_profiler ();
syms_of_pdumper ();
-
-#ifdef HAVE_JSON
syms_of_json ();
-#endif
keys_of_keyboard ();
}
}
-/* FIXME: Remove completely. */
-DEFUN ("json--available-p", Fjson__available_p, Sjson__available_p, 0, 0, NULL,
- doc: /* Return non-nil if libjansson is available (internal use only). */)
- (void)
-{
- return Qt;
-}
-
/* JSON encoding context. */
typedef struct {
char *buf;
DEFSYM (Qplist, "plist");
DEFSYM (Qarray, "array");
- defsubr (&Sjson__available_p);
defsubr (&Sjson_serialize);
defsubr (&Sjson_insert);
defsubr (&Sjson_parse_string);
extern int x_bitmap_mask (struct frame *, ptrdiff_t);
extern void syms_of_image (void);
-#ifdef HAVE_JSON
/* Defined in json.c. */
extern void syms_of_json (void);
-#endif
/* Defined in insdel.c. */
extern void move_gap_both (ptrdiff_t, ptrdiff_t);