aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2024-02-20 12:59:25 +0100
committerPierre Ossman <ossman@cendio.se>2024-06-19 16:39:07 +0200
commit55ef4dbc9b04a2a3312488e95de6c7cf5909913a (patch)
tree8ba52393a034fb2d891e7eaa74fb20815ce74f97
parent28c3f121613807df6d53dde9ac653916dcf8902d (diff)
downloadtigervnc-55ef4dbc9b04a2a3312488e95de6c7cf5909913a.tar.gz
tigervnc-55ef4dbc9b04a2a3312488e95de6c7cf5909913a.zip
Simplify Xorg version handling
VENDOR_RELEASE has been available as a #define since Xorg 1.7, so let's use that and remove all of our custom magic.
-rw-r--r--unix/xserver/hw/vnc/Makefile.am9
-rw-r--r--unix/xserver/hw/vnc/vncModule.c2
-rw-r--r--unix/xserver/hw/vnc/xorg-version.h6
-rw-r--r--unix/xserver/hw/vnc/xvnc.c2
-rw-r--r--unix/xserver116.patch17
-rw-r--r--unix/xserver117.patch17
-rw-r--r--unix/xserver118.patch17
-rw-r--r--unix/xserver119.patch17
-rw-r--r--unix/xserver120.patch17
-rw-r--r--unix/xserver21.1.1.patch17
10 files changed, 10 insertions, 111 deletions
diff --git a/unix/xserver/hw/vnc/Makefile.am b/unix/xserver/hw/vnc/Makefile.am
index 40eba4f2..e0200026 100644
--- a/unix/xserver/hw/vnc/Makefile.am
+++ b/unix/xserver/hw/vnc/Makefile.am
@@ -20,8 +20,9 @@ libvnccommon_la_SOURCES = $(HDRS) \
vncBlockHandler.c XorgGlue.c RandrGlue.c RFBGlue.cc XserverDesktop.cc \
vncInput.c vncInputXKB.c qnum_to_xorgevdev.c qnum_to_xorgkbd.c
-libvnccommon_la_CPPFLAGS = -DVENDOR_RELEASE="$(VENDOR_RELEASE)" -I$(TIGERVNC_SRCDIR)/unix/common \
- -DVENDOR_STRING="\"$(VENDOR_STRING)\"" -I$(TIGERVNC_SRCDIR)/common -UHAVE_CONFIG_H \
+libvnccommon_la_CPPFLAGS = \
+ -I$(TIGERVNC_SRCDIR)/unix/common \
+ -I$(TIGERVNC_SRCDIR)/common -UHAVE_CONFIG_H \
-I$(TIGERVNC_SRCDIR)/unix/vncconfig $(XVNC_CPPFLAGS) ${XSERVERLIBS_CFLAGS} \
-I$(top_srcdir)/include
@@ -40,8 +41,8 @@ nodist_EXTRA_Xvnc_SOURCES = dummy.cxx
Xvnc_CPPFLAGS = $(XVNC_CPPFLAGS) -DTIGERVNC -DNO_MODULE_EXTS \
-UHAVE_CONFIG_H \
- -DXFree86Server -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \
- -DVENDOR_STRING="\"$(VENDOR_STRING)\"" -I$(TIGERVNC_SRCDIR)/common -I$(TIGERVNC_SRCDIR)/unix/common \
+ -I$(TIGERVNC_SRCDIR)/common \
+ -I$(TIGERVNC_SRCDIR)/unix/common \
-I$(top_srcdir)/include ${XSERVERLIBS_CFLAGS}
LOCAL_LIBS = \
diff --git a/unix/xserver/hw/vnc/vncModule.c b/unix/xserver/hw/vnc/vncModule.c
index fb8ce047..68900804 100644
--- a/unix/xserver/hw/vnc/vncModule.c
+++ b/unix/xserver/hw/vnc/vncModule.c
@@ -53,7 +53,7 @@ static XF86ModuleVersionInfo vncVersRec =
"TigerVNC Project",
MODINFOSTRING1,
MODINFOSTRING2,
- XORG_VERSION_CURRENT,
+ VENDOR_RELEASE,
1, 0, 0,
ABI_CLASS_EXTENSION, /* needs the server extension ABI */
ABI_EXTENSION_VERSION,
diff --git a/unix/xserver/hw/vnc/xorg-version.h b/unix/xserver/hw/vnc/xorg-version.h
index a0d44d92..0ed1c93b 100644
--- a/unix/xserver/hw/vnc/xorg-version.h
+++ b/unix/xserver/hw/vnc/xorg-version.h
@@ -24,10 +24,12 @@
#include <dix-config.h>
#endif
+#include <version-config.h>
+
#define XORG_AT_LEAST(major, minor, patch) \
- (XORG_VERSION_CURRENT >= ((major * 10000000) + (minor * 100000) + (patch * 1000)))
+ (VENDOR_RELEASE >= ((major * 10000000) + (minor * 100000) + (patch * 1000)))
#define XORG_OLDER_THAN(major, minor, patch) \
- (XORG_VERSION_CURRENT < ((major * 10000000) + (minor * 100000) + (patch * 1000)))
+ (VENDOR_RELEASE < ((major * 10000000) + (minor * 100000) + (patch * 1000)))
#if XORG_OLDER_THAN(1, 16, 0)
#error "X.Org older than 1.16 is not supported"
diff --git a/unix/xserver/hw/vnc/xvnc.c b/unix/xserver/hw/vnc/xvnc.c
index 706c9d5a..6065cc49 100644
--- a/unix/xserver/hw/vnc/xvnc.c
+++ b/unix/xserver/hw/vnc/xvnc.c
@@ -67,8 +67,6 @@ from the X Consortium.
#include <X11/keysym.h>
extern char buildtime[];
-#undef VENDOR_RELEASE
-#undef VENDOR_STRING
#include "version-config.h"
#define XVNCVERSION "TigerVNC 1.13.80"
diff --git a/unix/xserver116.patch b/unix/xserver116.patch
index 2edcd307..79809f4e 100644
--- a/unix/xserver116.patch
+++ b/unix/xserver116.patch
@@ -20,23 +20,6 @@ diff -up xorg-server-1.16.0/configure.ac.vnc xorg-server-1.16.0/configure.ac
dnl Xnest DDX
-@@ -1830,6 +1835,8 @@ if test "x$XORG" = xauto; then
- fi
- AC_MSG_RESULT([$XORG])
-
-+AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version])
-+
- if test "x$XORG" = xyes; then
- XORG_DDXINCS='-I$(top_srcdir)/hw/xfree86 -I$(top_srcdir)/hw/xfree86/include -I$(top_srcdir)/hw/xfree86/common'
- XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os'
-@@ -2051,7 +2058,6 @@ if test "x$XORG" = xyes; then
- AC_DEFINE(XORG_SERVER, 1, [Building Xorg server])
- AC_DEFINE(XORGSERVER, 1, [Building Xorg server])
- AC_DEFINE(XFree86Server, 1, [Building XFree86 server])
-- AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version])
- AC_DEFINE(NEED_XF86_TYPES, 1, [Need XFree86 typedefs])
- AC_DEFINE(NEED_XF86_PROTOTYPES, 1, [Need XFree86 helper functions])
- AC_DEFINE(__XSERVERNAME__, "Xorg", [Name of X server])
@@ -2589,6 +2595,7 @@ hw/dmx/Makefile
hw/dmx/man/Makefile
hw/vfb/Makefile
diff --git a/unix/xserver117.patch b/unix/xserver117.patch
index f4cb94c3..59e96a55 100644
--- a/unix/xserver117.patch
+++ b/unix/xserver117.patch
@@ -20,23 +20,6 @@ diff -up xorg-server-1.17.1/configure.ac.vnc xorg-server-1.17.1/configure.ac
dnl Xnest DDX
-@@ -1830,6 +1835,8 @@ if test "x$XORG" = xauto; then
- fi
- AC_MSG_RESULT([$XORG])
-
-+AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version])
-+
- if test "x$XORG" = xyes; then
- XORG_DDXINCS='-I$(top_srcdir)/hw/xfree86 -I$(top_srcdir)/hw/xfree86/include -I$(top_srcdir)/hw/xfree86/common'
- XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os'
-@@ -2059,7 +2066,6 @@ if test "x$XORG" = xyes; then
- AC_DEFINE(XORG_SERVER, 1, [Building Xorg server])
- AC_DEFINE(XORGSERVER, 1, [Building Xorg server])
- AC_DEFINE(XFree86Server, 1, [Building XFree86 server])
-- AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version])
- AC_DEFINE(NEED_XF86_TYPES, 1, [Need XFree86 typedefs])
- AC_DEFINE(NEED_XF86_PROTOTYPES, 1, [Need XFree86 helper functions])
- AC_DEFINE(__XSERVERNAME__, "Xorg", [Name of X server])
@@ -2599,6 +2605,7 @@ hw/dmx/Makefile
hw/dmx/man/Makefile
hw/vfb/Makefile
diff --git a/unix/xserver118.patch b/unix/xserver118.patch
index 1c03317f..c173d742 100644
--- a/unix/xserver118.patch
+++ b/unix/xserver118.patch
@@ -20,23 +20,6 @@ diff -ur xorg-server.orig/configure.ac xorg-server/configure.ac
dnl Xnest DDX
-@@ -1863,6 +1868,8 @@
- fi
- AC_MSG_RESULT([$XORG])
-
-+AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version])
-+
- if test "x$XORG" = xyes; then
- XORG_DDXINCS='-I$(top_srcdir)/hw/xfree86 -I$(top_srcdir)/hw/xfree86/include -I$(top_srcdir)/hw/xfree86/common'
- XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os'
-@@ -2081,7 +2088,6 @@
- AC_DEFINE(XORG_SERVER, 1, [Building Xorg server])
- AC_DEFINE(XORGSERVER, 1, [Building Xorg server])
- AC_DEFINE(XFree86Server, 1, [Building XFree86 server])
-- AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version])
- AC_DEFINE(NEED_XF86_TYPES, 1, [Need XFree86 typedefs])
- AC_DEFINE(NEED_XF86_PROTOTYPES, 1, [Need XFree86 helper functions])
- AC_DEFINE(__XSERVERNAME__, "Xorg", [Name of X server])
@@ -2653,6 +2659,7 @@
hw/dmx/man/Makefile
hw/vfb/Makefile
diff --git a/unix/xserver119.patch b/unix/xserver119.patch
index 7adf314d..accd2c7d 100644
--- a/unix/xserver119.patch
+++ b/unix/xserver119.patch
@@ -20,23 +20,6 @@ diff -up xserver/configure.ac.xserver116-rebased xserver/configure.ac
dnl Xnest DDX
-@@ -1898,6 +1903,8 @@ if test "x$XORG" = xauto; then
- fi
- AC_MSG_RESULT([$XORG])
-
-+AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version])
-+
- if test "x$XORG" = xyes; then
- XORG_DDXINCS='-I$(top_srcdir)/hw/xfree86 -I$(top_srcdir)/hw/xfree86/include -I$(top_srcdir)/hw/xfree86/common'
- XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os'
-@@ -2116,7 +2123,6 @@ if test "x$XORG" = xyes; then
- AC_DEFINE(XORG_SERVER, 1, [Building Xorg server])
- AC_DEFINE(XORGSERVER, 1, [Building Xorg server])
- AC_DEFINE(XFree86Server, 1, [Building XFree86 server])
-- AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version])
- AC_DEFINE(NEED_XF86_TYPES, 1, [Need XFree86 typedefs])
- AC_DEFINE(NEED_XF86_PROTOTYPES, 1, [Need XFree86 helper functions])
- AC_DEFINE(__XSERVERNAME__, "Xorg", [Name of X server])
@@ -2691,6 +2697,7 @@ hw/dmx/Makefile
hw/dmx/man/Makefile
hw/vfb/Makefile
diff --git a/unix/xserver120.patch b/unix/xserver120.patch
index d8598494..b20b7ea3 100644
--- a/unix/xserver120.patch
+++ b/unix/xserver120.patch
@@ -21,23 +21,6 @@ Index: xserver/configure.ac
dnl Xnest DDX
-@@ -1812,6 +1817,8 @@ if test "x$XORG" = xauto; then
- fi
- AC_MSG_RESULT([$XORG])
-
-+AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version])
-+
- if test "x$XORG" = xyes; then
- XORG_DDXINCS='-I$(top_srcdir)/hw/xfree86 -I$(top_srcdir)/hw/xfree86/include -I$(top_srcdir)/hw/xfree86/common'
- XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os'
-@@ -2029,7 +2036,6 @@ if test "x$XORG" = xyes; then
- AC_DEFINE(XORG_SERVER, 1, [Building Xorg server])
- AC_DEFINE(XORGSERVER, 1, [Building Xorg server])
- AC_DEFINE(XFree86Server, 1, [Building XFree86 server])
-- AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version])
- AC_DEFINE(NEED_XF86_TYPES, 1, [Need XFree86 typedefs])
- AC_DEFINE(NEED_XF86_PROTOTYPES, 1, [Need XFree86 helper functions])
- AC_DEFINE(__XSERVERNAME__, "Xorg", [Name of X server])
@@ -2565,6 +2571,7 @@ hw/dmx/Makefile
hw/dmx/man/Makefile
hw/vfb/Makefile
diff --git a/unix/xserver21.1.1.patch b/unix/xserver21.1.1.patch
index a349af75..56331d18 100644
--- a/unix/xserver21.1.1.patch
+++ b/unix/xserver21.1.1.patch
@@ -20,23 +20,6 @@ diff -urpN xorg-server-1.20.0/configure.ac xorg-server-1.20.0/configure.ac
dnl Xnest DDX
-@@ -1812,6 +1817,8 @@ if test "x$XORG" = xauto; then
- fi
- AC_MSG_RESULT([$XORG])
-
-+AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version])
-+
- if test "x$XORG" = xyes; then
- XORG_DDXINCS='-I$(top_srcdir)/hw/xfree86 -I$(top_srcdir)/hw/xfree86/include -I$(top_srcdir)/hw/xfree86/common'
- XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os'
-@@ -2029,7 +2036,6 @@ if test "x$XORG" = xyes; then
- AC_DEFINE(XORG_SERVER, 1, [Building Xorg server])
- AC_DEFINE(XORGSERVER, 1, [Building Xorg server])
- AC_DEFINE(XFree86Server, 1, [Building XFree86 server])
-- AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version])
- AC_DEFINE(NEED_XF86_TYPES, 1, [Need XFree86 typedefs])
- AC_DEFINE(NEED_XF86_PROTOTYPES, 1, [Need XFree86 helper functions])
- AC_DEFINE(__XSERVERNAME__, "Xorg", [Name of X server])
@@ -2565,6 +2571,7 @@ hw/dmx/Makefile
hw/dmx/man/Makefile
hw/vfb/Makefile