From 679b9cc9ff3c65b4b6d3da2987703e0dfd3001be Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Wed, 16 Mar 2022 15:24:35 +0100 Subject: Link with libdl when using pgtk * configure.ac: Define LIBMODULES on GNU/Linux when using pgtk, even when not using modules, since pgtkterm.c uses dlsym. (Bug#54378) --- configure.ac | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index a315eeb6bd2..bc17935eb13 100644 --- a/configure.ac +++ b/configure.ac @@ -3940,6 +3940,16 @@ case "${opsys}" in darwin) MODULES_SECONDARY_SUFFIX='.so' ;; *) MODULES_SECONDARY_SUFFIX='' ;; esac + +# pgtkterm.c uses dlsym +if test $window_system = pgtk; then + case $opsys in + gnu|gnu-linux) + LIBMODULES="-ldl" + ;; + esac +fi + if test "${with_modules}" != "no"; then case $opsys in gnu|gnu-linux) -- cgit v1.2.1 From 1467b04f5cf586c0f44b7df00591986fa8d40c66 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sat, 19 Mar 2022 09:11:09 +0800 Subject: Handle composite overlay window during drag and drop sessions * configure.ac: Test for the composite extension and use it if available. * msdos/sed1v2.inp: Update. * src/Makefile.in (XCOMPOSITE_LIBS, XCOMPOSITE_CFLAGS): New variables. (EMACS_CFLAGS, LIBES): Add new libs and cflags. * src/xterm.c (x_dnd_get_target_window): Look for proxy on composite overlay window if mapped. (x_term_init): Test if the composite extension is available. * src/xterm.h (struct x_display_info): New fields for composite extension presence. --- configure.ac | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index bc17935eb13..6e637477334 100644 --- a/configure.ac +++ b/configure.ac @@ -4538,6 +4538,24 @@ fi AC_SUBST(XDBE_CFLAGS) AC_SUBST(XDBE_LIBS) +### Use Xcomposite (-lXcomposite) if available +HAVE_XCOMPOSITE=no +if test "${HAVE_X11}" = "yes"; then + AC_CHECK_HEADER(X11/extensions/Xcomposite.h, + [AC_CHECK_LIB(Xcomposite, XCompositeRedirectWindow, HAVE_XCOMPOSITE=yes)], + [], + [#include + ]) + if test $HAVE_XCOMPOSITE = yes; then + XCOMPOSITE_LIBS=-lXcomposite + fi + if test $HAVE_XCOMPOSITE = yes; then + AC_DEFINE(HAVE_XCOMPOSITE, 1, [Define to 1 if you have the XCOMPOSITE extension.]) + fi +fi +AC_SUBST(XCOMPOSITE_CFLAGS) +AC_SUBST(XCOMPOSITE_LIBS) + ### Use libxml (-lxml2) if available ### mingw32 doesn't use -lxml2, since it loads the library dynamically. HAVE_LIBXML2=no -- cgit v1.2.1 From f38bdb0327c5806286ab97687e2823d65d8e184a Mon Sep 17 00:00:00 2001 From: Po Lu Date: Fri, 25 Mar 2022 16:15:57 +0800 Subject: Take window shapes into account when processing drag and drop * configure.ac: Test for the Nonrectangular Window Shape extension. * msdos/sed1v2.inp: Update. * src/xterm.c (struct x_client_list_window): New fields for shapes. (x_dnd_free_toplevels): Free shapes. (x_dnd_compute_toplevels): Populate window shapes. (x_dnd_get_target_window_2): New function. (x_dnd_get_target_window_1): Test WM state of window before taking it into account. (x_dnd_begin_drag_and_drop): Use outer window as the initial last seen window. (x_dnd_update_state): Small fixes to frame tracking. (handle_one_xevent): Handle ShapeNotify events correctly. (x_term_init): Test for the Nonrectangular Window Shape extension. * src/xterm.h (struct x_display_info): New atom `WM_STATE'. --- configure.ac | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 6e637477334..4ac8c143e53 100644 --- a/configure.ac +++ b/configure.ac @@ -4538,6 +4538,24 @@ fi AC_SUBST(XDBE_CFLAGS) AC_SUBST(XDBE_LIBS) +### Use the Nonrectangular Window Shape extension if available. +HAVE_XSHAPE=no +if test "${HAVE_X11}" = "yes"; then + AC_CHECK_HEADER(X11/extensions/shape.h, + [AC_CHECK_LIB(Xext, XShapeQueryVersion, HAVE_XSHAPE=yes)], + [], + [#include + ]) + if test $HAVE_XSHAPE = yes; then + XSHAPE_LIBS=-lXext + fi + if test $HAVE_XSHAPE = yes; then + AC_DEFINE(HAVE_XSHAPE, 1, [Define to 1 if you have the Nonrectangular Window Shape extension.]) + fi +fi +AC_SUBST(XSHAPE_CFLAGS) +AC_SUBST(XSHAPE_LIBS) + ### Use Xcomposite (-lXcomposite) if available HAVE_XCOMPOSITE=no if test "${HAVE_X11}" = "yes"; then -- cgit v1.2.1 From a4d45f1efd669bae3ea21a0c2cf0e3302a8379f2 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sat, 26 Mar 2022 17:10:42 +0800 Subject: Also fetch shapes via XCB for drag and drop * configure.ac: Also look for xcb-shape. * src/xterm.c (HAVE_XCB_SHAPE_INPUT_RECTS): New define. (x_dnd_compute_toplevels): Use XCB for input shapes if possible. --- configure.ac | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 4ac8c143e53..35ebbb2db0e 100644 --- a/configure.ac +++ b/configure.ac @@ -4540,6 +4540,7 @@ AC_SUBST(XDBE_LIBS) ### Use the Nonrectangular Window Shape extension if available. HAVE_XSHAPE=no +HAVE_XCB_SHAPE=no if test "${HAVE_X11}" = "yes"; then AC_CHECK_HEADER(X11/extensions/shape.h, [AC_CHECK_LIB(Xext, XShapeQueryVersion, HAVE_XSHAPE=yes)], @@ -4548,6 +4549,14 @@ if test "${HAVE_X11}" = "yes"; then ]) if test $HAVE_XSHAPE = yes; then XSHAPE_LIBS=-lXext + AC_CHECK_HEADER(xcb/shape.h, + [AC_CHECK_LIB(xcb-shape, xcb_shape_combine, HAVE_XCB_SHAPE=yes)], [], + [#include ]) + + if test $HAVE_XCB_SHAPE = yes && test "$XCB_LIBS" != ""; then + XSHAPE_LIBS="$XSHAPE_LIBS -lxcb-shape" + AC_DEFINE(HAVE_XCB_SHAPE, 1, [Define to 1 if XCB supports the Nonrectangular Window Shape extension.]) + fi fi if test $HAVE_XSHAPE = yes; then AC_DEFINE(HAVE_XSHAPE, 1, [Define to 1 if you have the Nonrectangular Window Shape extension.]) -- cgit v1.2.1 From dc0ee78d93c36606e7e8502d8ccff5f8c6116550 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Mon, 28 Mar 2022 18:41:12 +0800 Subject: Improve portability of XCB configure checks * configure.ac: Look for xcb_aux_sync in -lxcb-aux if it's not in -lxcb-util. --- configure.ac | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 35ebbb2db0e..10358c2b645 100644 --- a/configure.ac +++ b/configure.ac @@ -3747,6 +3747,14 @@ if test "${HAVE_X11}" = "yes"; then [Define to 1 if you have the XCB library and X11-XCB library for mixed X11/XCB programming.]) XCB_LIBS="-lX11-xcb -lxcb -lxcb-util" + else + AC_CHECK_LIB(xcb-aux, xcb_aux_sync, HAVE_XCB_AUX=yes) + if test "${HAVE_XCB_AUX}" = "yes"; then + AC_DEFINE(USE_XCB, 1, +[Define to 1 if you have the XCB library and X11-XCB library for mixed + X11/XCB programming.]) + XCB_LIBS="-lX11-xcb -lxcb -lxcb-aux" + fi fi fi fi -- cgit v1.2.1 From 62c779cbde658d29498c3f0b6ccc4f63ba9c5413 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Wed, 30 Mar 2022 11:25:50 +0800 Subject: Disallow building with non-toolkit scroll bars on non-X systems * configure.ac: Prevent building without toolkit scroll bars on non-X systems, where they're not implemented. (bug#54629) --- configure.ac | 2 ++ 1 file changed, 2 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 10358c2b645..93c821eda08 100644 --- a/configure.ac +++ b/configure.ac @@ -3357,6 +3357,8 @@ if test "${with_toolkit_scroll_bars}" != "no"; then AC_DEFINE(USE_TOOLKIT_SCROLL_BARS) USE_TOOLKIT_SCROLL_BARS=yes fi +elif test "${window_system}" != "x11"; then + AC_MSG_ERROR(Non-toolkit scroll bars are not implemented for your system) fi dnl See if XIM is available. -- cgit v1.2.1 From c5af19cba5924de89a38e7a177c07f42fd3cd543 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 31 Mar 2022 19:15:45 +0300 Subject: Fix a bug in configure.ac that failed the --without-x build * configure.ac (USE_TOOLKIT_SCROLL_BARS): Fix test for unsupported scroll-bars configuration. (Bug#54629) --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 93c821eda08..254f15bef3e 100644 --- a/configure.ac +++ b/configure.ac @@ -3357,7 +3357,7 @@ if test "${with_toolkit_scroll_bars}" != "no"; then AC_DEFINE(USE_TOOLKIT_SCROLL_BARS) USE_TOOLKIT_SCROLL_BARS=yes fi -elif test "${window_system}" != "x11"; then +elif test "${window_system}" != "x11" && "${window_system}" != "none"; then AC_MSG_ERROR(Non-toolkit scroll bars are not implemented for your system) fi -- cgit v1.2.1 From c51d7c9e43f5bb0b030a992b291f31d31702437d Mon Sep 17 00:00:00 2001 From: Po Lu Date: Tue, 5 Apr 2022 09:07:36 +0800 Subject: * configure.ac (HAVE_GIF): Respect --with-gif on PGTK. (bug#54633) --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 254f15bef3e..cda2a04be95 100644 --- a/configure.ac +++ b/configure.ac @@ -4292,7 +4292,8 @@ if test "${opsys}" = "mingw32"; then fi elif test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no" \ || test "${HAVE_W32}" = "yes" || test "${HAVE_NS}" = "yes" \ - || test "${HAVE_BE_APP}" = "yes" || test "$window_system" = "pgtk"; then + || test "${HAVE_BE_APP}" = "yes" || test "$window_system" = "pgtk" \ + && test "${with_gif}" != "no"; then AC_CHECK_HEADER(gif_lib.h, # EGifPutExtensionLast only exists from version libungif-4.1.0b1. # Earlier versions can crash Emacs, but version 5.0 removes EGifPutExtensionLast. -- cgit v1.2.1 From 13c8cc58bbd829ca4616dea09cb050dc977db9ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= Date: Fri, 8 Apr 2022 14:57:17 +0200 Subject: Enable warnings when building as a developer with Clang The configure-script logic that automatically enables warnings when building in a development tree didn't work for Clang because it was identified as an old GCC version. * configure.ac: Don't test Clang version as if it were GCC. --- configure.ac | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index cda2a04be95..6b834a2f655 100644 --- a/configure.ac +++ b/configure.ac @@ -965,6 +965,17 @@ AC_DEFUN([gl_GCC_VERSION_IFELSE], ] ) +# clang is unduly picky about some things. +AC_CACHE_CHECK([whether the compiler is clang], [emacs_cv_clang], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ + #ifndef __clang__ + error "not clang"; + #endif + ]])], + [emacs_cv_clang=yes], + [emacs_cv_clang=no])]) + AC_ARG_ENABLE([gcc-warnings], [AS_HELP_STRING([--enable-gcc-warnings@<:@=TYPE@:>@], [control generation of GCC warnings. The TYPE 'yes' @@ -984,7 +995,11 @@ AC_ARG_ENABLE([gcc-warnings], # just a release imported into Git for patch management. gl_gcc_warnings=no if test -e "$srcdir"/.git && test ! -f "$srcdir"/.tarball-version; then - gl_GCC_VERSION_IFELSE([5], [3], [gl_gcc_warnings=warn-only]) + # Clang typically identifies itself as GCC 4.2 or something similar + # even if it is recent enough to accept the warnings we enable. + AS_IF([test "$emacs_cv_clang" = yes], + [gl_gcc_warnings=warn-only], + [gl_GCC_VERSION_IFELSE([5], [3], [gl_gcc_warnings=warn-only])]) fi]) AC_ARG_ENABLE([check-lisp-object-type], @@ -996,17 +1011,6 @@ if test "$enable_check_lisp_object_type" = yes; then [Define to enable compile-time checks for the Lisp_Object data type.]) fi -# clang is unduly picky about some things. -AC_CACHE_CHECK([whether the compiler is clang], [emacs_cv_clang], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[ - #ifndef __clang__ - error "not clang"; - #endif - ]])], - [emacs_cv_clang=yes], - [emacs_cv_clang=no])]) - WERROR_CFLAGS= # When compiling with GCC, prefer -isystem to -I when including system # include files, to avoid generating useless diagnostics for the files. -- cgit v1.2.1 From d82e1a873df381b2c35bc9036da5665468bdfd31 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sun, 10 Apr 2022 13:12:30 +0200 Subject: Add support for animated webp images * configure.ac (HAVE_RSVG): Also include the webpdemux library. It was new in version 0.4.4, and we require 0.6.0, so it should be safe. * src/image.c: Include demux.h. (enum webp_keyword_index, webp_format): Include :index for animations. (init_webp_functions): Add Windows LOAD_DLLs. (struct webp_cache, webp_create_cache) (webp_prune_animation_cache, webp_get_animation_cache): New functions. (webp_load): Support animated webp images (bug#54242). --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 6b834a2f655..185e4d08623 100644 --- a/configure.ac +++ b/configure.ac @@ -2695,6 +2695,9 @@ if test "${with_webp}" != "no"; then WEBP_MODULE="libwebp >= $WEBP_REQUIRED" EMACS_CHECK_MODULES([WEBP], [$WEBP_MODULE]) + if test "$HAVE_WEBP" = "yes"; then + WEBP_LIBS="-lwebp -lwebpdemux" + fi AC_SUBST(WEBP_CFLAGS) AC_SUBST(WEBP_LIBS) fi -- cgit v1.2.1 From e91cbdfaee57052e0cbfecd08f77d95915ea532a Mon Sep 17 00:00:00 2001 From: Po Lu Date: Wed, 13 Apr 2022 11:13:28 +0800 Subject: Bump minimum GTK for PGTK builds * configure.ac: Require GTK 3.20 or later if building with PGTK. It has already been required for some time now, but the requirement was not reflected in the configure script. * src/pgtkterm.c (pgtk_any_window_to_frame): Remove version check. --- configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 185e4d08623..1e66acf52fe 100644 --- a/configure.ac +++ b/configure.ac @@ -2797,7 +2797,11 @@ gtk3_pkg_errors= if test "${opsys}" != "mingw32"; then if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then GLIB_REQUIRED=2.37.5 - GTK_REQUIRED=3.10 + if test "${window_system}" = "x"; then + GTK_REQUIRED=3.10 + else + GTK_REQUIRED=3.20 + fi GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" dnl Checks for libraries. -- cgit v1.2.1 From 199606499606c3f2fc75161da2f286a12cb608c2 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Wed, 13 Apr 2022 11:17:34 +0800 Subject: Fix last change in configure.ac * configure.ac: Test window system against "x11", not "x". --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 1e66acf52fe..721cf16684a 100644 --- a/configure.ac +++ b/configure.ac @@ -2797,7 +2797,7 @@ gtk3_pkg_errors= if test "${opsys}" != "mingw32"; then if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then GLIB_REQUIRED=2.37.5 - if test "${window_system}" = "x"; then + if test "${window_system}" = "x11"; then GTK_REQUIRED=3.10 else GTK_REQUIRED=3.20 -- cgit v1.2.1 From de306d3e5dfecb336d5f66312e3e14ed8a27a81c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= Date: Sat, 16 Apr 2022 11:31:58 +0200 Subject: Disable annoying Clang warnings * configure.ac (CHECK_LISP_OBJECT_TYPE): Disable -Wimplicit-const-int-float-conversion and -Wint-in-bool-context, which currently only have false positives. --- configure.ac | 2 ++ 1 file changed, 2 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 721cf16684a..7c8638a4715 100644 --- a/configure.ac +++ b/configure.ac @@ -1105,6 +1105,8 @@ AS_IF([test $gl_gcc_warnings = no], if test "$emacs_cv_clang" = yes; then gl_WARN_ADD([-Wno-missing-braces]) gl_WARN_ADD([-Wno-null-pointer-arithmetic]) + gl_WARN_ADD([-Wno-implicit-const-int-float-conversion]) + gl_WARN_ADD([-Wno-int-in-bool-context]) fi # This causes too much noise in the MinGW build -- cgit v1.2.1 From faa29fa2c9e9d5a5d7544a1a39b2a89cf57a8439 Mon Sep 17 00:00:00 2001 From: Eugene Ha Date: Thu, 28 Apr 2022 23:48:38 +0200 Subject: Find libgccjit.dylib on Homebrew Macos * configure.ac: Also find libggcjit on Homebrew (bug#55173). Copyright-paperwork-exempt: yes --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 7c8638a4715..53e5779e2f7 100644 --- a/configure.ac +++ b/configure.ac @@ -4126,7 +4126,7 @@ if test "${with_native_compilation}" != "no"; then MAC_CFLAGS="-I$(dirname $($BREW ls -v libgccjit | \ grep libgccjit.h))" MAC_LIBS="-L$(dirname $($BREW ls -v libgccjit| \ - grep libgccjit.so\$))" + grep -E 'libgccjit\.(so|dylib)$'))" fi fi -- cgit v1.2.1 From 29f3d4d2c69a0e9d2ab0a13ee6952fa9cf4d6035 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sun, 1 May 2022 11:51:35 +0200 Subject: Add new function `malloc-trim' * configure.ac (PGTK_LIBS): Check for malloc_trim. * src/alloc.c (Fmalloc_trim): Add new function (bug#45200). --- configure.ac | 2 ++ 1 file changed, 2 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 53e5779e2f7..b7189593a63 100644 --- a/configure.ac +++ b/configure.ac @@ -2939,6 +2939,8 @@ fi AC_SUBST(PGTK_OBJ) AC_SUBST(PGTK_LIBS) +AC_CHECK_FUNCS(malloc_trim) + dnl D-Bus has been tested under GNU/Linux only. Must be adapted for dnl other platforms. HAVE_DBUS=no -- cgit v1.2.1 From 0105a4ddb8a58146f3fc71c265e57291c873af0b Mon Sep 17 00:00:00 2001 From: Po Lu Date: Wed, 4 May 2022 16:48:24 +0800 Subject: Turn on XInput 2 support by default The support doesn't interfere with compatibility, since Emacs built with XInput 2 support transparently falls back to Core Input when a suitable version of the input extension is not available. It also matured much sooner than expected, so enabling this by default will lead to new features being available to more users. * INSTALL: * configure.ac: * etc/NEWS: Enable XInput 2 support by default. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index b7189593a63..484ce980a52 100644 --- a/configure.ac +++ b/configure.ac @@ -490,7 +490,7 @@ 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]) OPTION_DEFAULT_OFF([cygwin32-native-compilation],[use native compilation on 32-bit Cygwin]) -OPTION_DEFAULT_OFF([xinput2],[use version 2 of the X Input Extension for input]) +OPTION_DEFAULT_ON([xinput2],[don't use version 2 of the X Input Extension for input]) 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)])], -- cgit v1.2.1