aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11')
-rw-r--r--nx-X11/config/cf/Imakefile3
-rw-r--r--nx-X11/config/cf/nxversion.def.in4
-rw-r--r--nx-X11/config/cf/xorg.cf26
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Imakefile7
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Init.c5
5 files changed, 40 insertions, 5 deletions
diff --git a/nx-X11/config/cf/Imakefile b/nx-X11/config/cf/Imakefile
index 2eb7e995c..cbcec409e 100644
--- a/nx-X11/config/cf/Imakefile
+++ b/nx-X11/config/cf/Imakefile
@@ -27,7 +27,8 @@ xorgsite.def \
$(VERSIONDEFFILES) \
$(HOSTDEFFILES) \
site.def \
-xorgversion.def
+xorgversion.def \
+nxversion.def
RULEFILES = \
Imake.rules \
diff --git a/nx-X11/config/cf/nxversion.def.in b/nx-X11/config/cf/nxversion.def.in
new file mode 100644
index 000000000..03ac921f4
--- /dev/null
+++ b/nx-X11/config/cf/nxversion.def.in
@@ -0,0 +1,4 @@
+#define NX_VERSION_MAJOR ###NX_VERSION_MAJOR###
+#define NX_VERSION_MINOR ###NX_VERSION_MINOR###
+#define NX_VERSION_MICRO ###NX_VERSION_MICRO###
+#define NX_VERSION_PATCH ###NX_VERSION_PATCH###
diff --git a/nx-X11/config/cf/xorg.cf b/nx-X11/config/cf/xorg.cf
index 6c42574aa..71dab5631 100644
--- a/nx-X11/config/cf/xorg.cf
+++ b/nx-X11/config/cf/xorg.cf
@@ -54,6 +54,31 @@ XCOMM $Xorg: xfree86.cf,v 1.4 2000/08/17 19:41:49 cpqbld Exp $
XORG_VERSION_CURRENT = XorgVersion
RELEASE_VERSION = ReleaseVersion
+#if NXAgentServer
+#include "nxversion.def"
+
+#if !defined(nxVersionString) && \
+ defined(NX_VERSION_MAJOR) && defined(NX_VERSION_MINOR) && \
+ defined(NX_VERSION_MICRO) && defined(NX_VERSION_PATCH)
+# define nxVersionString `echo NX_VERSION_MAJOR NX_VERSION_MINOR NX_VERSION_MICRO NX_VERSION_PATCH | sed 's/ /./g'`
+#endif
+
+/*
+ * NX versions are M.m.µ.p, and NXVersion is:
+ *
+ * M * 10000000 + m * 100000 + µ * 1000 + p
+ *
+ */
+
+#if !defined(nxVersion) && defined(nxVersionString)
+# define nxVersion (((NX_VERSION_MAJOR) * 10000000) + ((NX_VERSION_MINOR) * 100000) + ((NX_VERSION_MICRO) * 1000) + NX_VERSION_PATCH)
+
+NX_VERSION_CURRENT = nxVersion
+NX_VERSION_CURRENT_STRING = nxVersionString
+
+#endif
+#endif /* NXAgentServer */
+
#if !defined(XorgManVersionString) && \
defined(XORG_VERSION_MAJOR) && defined(XORG_VERSION_MINOR) && \
defined(XORG_VERSION_PATCH) && defined(XORG_VERSION_SNAP)
@@ -1686,4 +1711,3 @@ XFREE86JAPANESEDOCDIR = $(DOCDIR)/Japanese
#include <cross.def>
#endif
#include <xf86.rules>
-
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Imakefile b/nx-X11/programs/Xserver/hw/nxagent/Imakefile
index d812c7f70..6c075fa9f 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Imakefile
+++ b/nx-X11/programs/Xserver/hw/nxagent/Imakefile
@@ -189,7 +189,12 @@ UPG_DEFINES=-DNXAGENT_UPGRADE
UPG_DEFINES=
#endif
-DEFINES = -g $(OS_DEFINES) $(EXT_DEFINES) $(UPG_DEFINES) \
+#if nxVersion
+NX_DEFINES=-DNX_VERSION_CURRENT="$(NX_VERSION_CURRENT)" \
+ -DNX_VERSION_CURRENT_STRING="\"$(NX_VERSION_CURRENT_STRING)\""
+#endif
+
+DEFINES = -g $(OS_DEFINES) $(EXT_DEFINES) $(UPG_DEFINES) $(NX_DEFINES) \
-UXF86VIDMODE -UXFreeXDGA -UXF86MISC -UXF86DRI -UXFree86LOADER \
-DNXAGENT_SERVER \
-DNXAGENT_CONSTRAINCURSOR \
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.c b/nx-X11/programs/Xserver/hw/nxagent/Init.c
index 8d4eed2b6..dbc706cfe 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Init.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Init.c
@@ -74,7 +74,8 @@ is" without express or implied warranty.
#undef DEBUG
#undef DUMP
-#define NXAGENT_VERSION "3.5.0"
+#define NXAGENT_VERSION NX_VERSION_CURRENT
+#define NXAGENT_VERSION_STRING NX_VERSION_CURRENT_STRING
/*
* ProcVector array defined in tables.c.
@@ -226,7 +227,7 @@ void InitOutput(ScreenInfo *screenInfo, int argc, char *argv[])
if (serverGeneration <= 1)
{
- fprintf(stderr, "\nNXAGENT - Version " NXAGENT_VERSION "\n\n");
+ fprintf(stderr, "\nNXAGENT - Version " NXAGENT_VERSION_STRING "\n\n");
fprintf(stderr, "Copyright (C) 2001, 2011 NoMachine.\n");
fprintf(stderr, "See http://www.nomachine.com/ for more information.\n\n");