drop obsolete check for SHM extension

Xlibre Xserver always has SHM extension built-in, so no extra
checks or fallback code pathes needed.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2026-01-12 14:35:30 +01:00
parent 9e5ef5d1a6
commit 68d17e05d9
8 changed files with 1 additions and 80 deletions

View File

@@ -204,27 +204,8 @@ if test "x$cpuid" = "xyes"; then
AC_DEFINE(HAVE_CPUID_H,1,[Found a useable cpuid.h])
fi
shm=yes
AC_CHECK_HEADERS([sys/ipc.h sys/ipc.h], [], [shm="no"])
AC_CHECK_HEADERS([X11/extensions/XShm.h], [], [shm="no"], [
#include <X11/Xlibint.h>
#include <X11/Xproto.h>
])
AC_CHECK_HEADERS([X11/extensions/shmproto.h X11/extensions/shmstr.h], [], [], [
#include <X11/Xlibint.h>
#include <X11/Xproto.h>
])
if test "x$ac_cv_header_X11_extensions_shmproto_h" != "xyes" -a "x$ac_cv_header_X11_extensions_shmstr_h" != "xyes"; then
shm="no"
fi
if test "x$shm" = "xyes"; then
AC_DEFINE([HAVE_MIT_SHM], 1, [Define to 1 if MIT-SHM is available])
fi
PKG_CHECK_MODULES(X11_DRI3, [xcb-dri3 xcb-sync xcb-xfixes xcb-present x11-xcb xshmfence x11 xcomposite xdamage xrender xrandr xxf86vm xext libdrm], [x11_dri3="yes"], [x11_dri3="no"])
AM_CONDITIONAL(X11_DRI3, test "x$x11_dri3" = "xyes" -a "x$shm" = "xyes")
AM_CONDITIONAL(X11_SHM, test "x$shm" = "xyes")
AM_CONDITIONAL(X11_DRI3, test "x$x11_dri3" = "xyes")
PKG_CHECK_MODULES(X11_VM, [xxf86vm], [x11_vm="yes"], [x11_vm="no"])
AM_CONDITIONAL(X11_VM, test "x$x11_vm" = "xyes")
@@ -233,12 +214,6 @@ AC_ARG_ENABLE(tools,
AS_HELP_STRING([--disable-tools],
[Enable building and installing the miscellaneous tools [default=auto]]),
[tools="$enableval"], [tools="auto"])
if test "x$shm" != "xyes"; then
if test "x$tools" = "xyes"; then
AC_MSG_ERROR([Incomplete requirements for extra tools, X11 MIT-SHM extension required])
fi
tools="no"
fi
if test "x$tools" != "xno"; then
ivo_requires="xrandr xdamage xfixes xcursor xtst xrender xscrnsaver xext x11 pixman-1"
extra_cflags=""

View File

@@ -107,16 +107,6 @@ if cc.links(cpuid_code, name : '__cpuid()')
config.set('HAVE_CPUID_H', 1)
endif
has_shm = (cc.has_header('sys/ipc.h') and
cc.has_header('X11/extensions/XShm.h') and
cc.has_header('X11/extensions/shmproto.h') and
cc.has_header('X11/extensions/shmstr.h'))
if has_shm
config.set('HAVE_MIT_SHM', 1)
config.set('HAVE_X11_EXTENSIONS_SHMPROTO_H', 1)
config.set('HAVE_X11_EXTENSIONS_SHMSTR_H', 1)
endif
if cc.has_header('X11/extensions/Xinerama.h')
config.set('HAVE_X11_EXTENSIONS_XINERAMA_H', 1)
endif

View File

@@ -28,13 +28,7 @@
#include <X11/Xlibint.h>
#include <X11/extensions/Xrender.h>
#include <X11/extensions/XShm.h>
#if HAVE_X11_EXTENSIONS_SHMPROTO_H
#include <X11/extensions/shmproto.h>
#elif HAVE_X11_EXTENSIONS_SHMSTR_H
#include <X11/extensions/shmstr.h>
#else
#error Failed to find the right header for X11 MIT-SHM protocol definitions
#endif
#include <xf86drm.h>
#include <i915_drm.h>

View File

@@ -34,15 +34,7 @@
#include <X11/Xutil.h> /* for XDestroyImage */
#include <X11/Xlibint.h>
#include <X11/extensions/Xrender.h>
#if HAVE_MIT_SHM
#include <X11/extensions/XShm.h>
#if HAVE_X11_EXTENSIONS_SHMPROTO_H
#include <X11/extensions/shmproto.h>
#elif HAVE_X11_EXTENSIONS_SHMSTR_H
#include <X11/extensions/shmstr.h>
#else
#error Failed to find the right header for X11 MIT-SHM protocol definitions
#endif
#include <sys/ipc.h>
#include <sys/shm.h>
#endif
@@ -227,7 +219,6 @@ static Picture source_radial_generic(struct test_display *t, struct test_target
return XRenderCreateRadialGradient(t->dpy, &gradient, stops, colors, 2);
}
#if HAVE_MIT_SHM
static XShmSegmentInfo shmref, shmout;
static void setup_shm(struct test *t)
@@ -290,10 +281,6 @@ static Picture source_shm(struct test_display *t, struct test_target *target)
return picture;
}
#else
static void setup_shm(struct test *t) { }
static Picture source_shm(struct test_display *t, struct test_target *target) { return 0; }
#endif
static const struct {
Picture (*create)(struct test_display *, struct test_target *);

View File

@@ -34,13 +34,7 @@
#include <X11/extensions/Xrandr.h>
#include <X11/extensions/Xrender.h>
#include <X11/extensions/XShm.h>
#if HAVE_X11_EXTENSIONS_SHMPROTO_H
#include <X11/extensions/shmproto.h>
#elif HAVE_X11_EXTENSIONS_SHMSTR_H
#include <X11/extensions/shmstr.h>
#else
#error Failed to find the right header for X11 MIT-SHM protocol definitions
#endif
#include <xcb/xcb.h>
#include <xcb/present.h>
#include <xcb/xfixes.h>

View File

@@ -34,13 +34,7 @@
#include <X11/extensions/Xrandr.h>
#include <X11/extensions/Xrender.h>
#include <X11/extensions/XShm.h>
#if HAVE_X11_EXTENSIONS_SHMPROTO_H
#include <X11/extensions/shmproto.h>
#elif HAVE_X11_EXTENSIONS_SHMSTR_H
#include <X11/extensions/shmstr.h>
#else
#error Failed to find the right header for X11 MIT-SHM protocol definitions
#endif
#include <xcb/xcb.h>
#include <xcb/present.h>
#include <xcb/xfixes.h>

View File

@@ -28,14 +28,7 @@
#include <X11/Xlibint.h>
#include <X11/extensions/Xrender.h>
#include <X11/extensions/XShm.h>
#if HAVE_X11_EXTENSIONS_SHMPROTO_H
#include <X11/extensions/shmproto.h>
#elif HAVE_X11_EXTENSIONS_SHMSTR_H
#include <X11/extensions/shmstr.h>
#else
#error Failed to find the right header for X11 MIT-SHM protocol definitions
#endif
#include <stdio.h>
#include <string.h>
#include <fcntl.h>

View File

@@ -30,13 +30,7 @@
#include <X11/extensions/record.h>
#include <X11/extensions/scrnsaver.h>
#include <X11/extensions/XShm.h>
#if HAVE_X11_EXTENSIONS_SHMPROTO_H
#include <X11/extensions/shmproto.h>
#elif HAVE_X11_EXTENSIONS_SHMSTR_H
#include <X11/extensions/shmstr.h>
#else
#error Failed to find the right header for X11 MIT-SHM protocol definitions
#endif
#include <X11/extensions/Xdamage.h>
#if HAVE_X11_EXTENSIONS_XINERAMA_H
#include <X11/extensions/Xinerama.h>