From 204504861a2847734a04bd976accb0c730733523 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Fri, 26 Feb 2010 16:27:17 +0100 Subject: Don't hardcode the module version in the source As pointed out by Julien Cristau XORG_RELEASE_VERSION gives us that info from configure.ac. Signed-off-by: Jakob Bornecrantz --- src/vmware.c | 11 ++++------- src/vmwaremodule.c | 18 +++++++----------- 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/src/vmware.c b/src/vmware.c index 426cb64..5e683da 100644 --- a/src/vmware.c +++ b/src/vmware.c @@ -83,14 +83,11 @@ char rcsId_vmware[] = #define VMWARE_NAME "vmwlegacy" #define VMWARE_DRIVER_NAME "vmwlegacy" -#define VMWARE_MAJOR_VERSION 11 -#define VMWARE_MINOR_VERSION 0 -#define VMWARE_PATCHLEVEL 0 #define VMWARE_DRIVER_VERSION \ - (VMWARE_MAJOR_VERSION * 65536 + VMWARE_MINOR_VERSION * 256 + VMWARE_PATCHLEVEL) + (PACKAGE_VERSION_MAJOR * 65536 + PACKAGE_VERSION_MINOR * 256 + PACKAGE_VERSION_PATCHLEVEL) #define VMWARE_DRIVER_VERSION_STRING \ - VMW_STRING(VMWARE_MAJOR_VERSION) "." VMW_STRING(VMWARE_MINOR_VERSION) \ - "." VMW_STRING(VMWARE_PATCHLEVEL) + VMW_STRING(PACKAGE_VERSION_MAJOR) "." VMW_STRING(PACKAGE_VERSION_MINOR) \ + "." VMW_STRING(PACKAGE_VERSION_PATCHLEVEL) static const char VMWAREBuildStr[] = "VMware Guest X Server " VMWARE_DRIVER_VERSION_STRING " - build=$Name$\n"; @@ -194,7 +191,7 @@ static XF86ModuleVersionInfo vmwlegacyVersRec = { MODINFOSTRING1, MODINFOSTRING2, XORG_VERSION_CURRENT, - VMWARE_MAJOR_VERSION, VMWARE_MINOR_VERSION, VMWARE_PATCHLEVEL, + PACKAGE_VERSION_MAJOR, PACKAGE_VERSION_MINOR, PACKAGE_VERSION_PATCHLEVEL, ABI_CLASS_VIDEODRV, ABI_VIDEODRV_VERSION, MOD_CLASS_VIDEODRV, diff --git a/src/vmwaremodule.c b/src/vmwaremodule.c index d46d26d..c512559 100644 --- a/src/vmwaremodule.c +++ b/src/vmwaremodule.c @@ -27,6 +27,9 @@ #include #include +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* * Defines and exported module info. @@ -39,18 +42,11 @@ #define VMW_STRING_INNER(s) #s #define VMW_STRING(str) VMW_STRING_INNER(str) -#define VMWARE_VERSION_MAJOR 11 -#define VMWARE_VERSION_MINOR 0 -#define VMWARE_VERSION_PATCH 0 -#define VMWARE_VERSION_STRING_MAJOR VMW_STRING(VMWARE_VERSION_MAJOR) -#define VMWARE_VERSION_STRING_MINOR VMW_STRING(VMWARE_VERSION_MINOR) -#define VMWARE_VERSION_STRING_PATCH VMW_STRING(VMWARE_VERSION_PATCH) - #define VMWARE_DRIVER_VERSION \ - (VMWARE_VERSION_MAJOR * 65536 + VMWARE_VERSION_MINOR * 256 + VMWARE_VERSION_PATCH) + (PACKAGE_VERSION_MAJOR * 65536 + PACKAGE_VERSION_MINOR * 256 + PACKAGE_VERSION_PATCHLEVEL) #define VMWARE_DRIVER_VERSION_STRING \ - VMWARE_VERSION_STRING_MAJOR "." VMWARE_VERSION_STRING_MINOR \ - "." VMWARE_VERSION_STRING_PATCH + VMW_STRING(PACKAGE_VERSION_MAJOR) "." VMW_STRING(PACKAGE_VERSION_MINOR) \ + "." VMW_STRING(PACKAGE_VERSION_PATCHLEVEL) /* * Standard four digit version string expected by VMware Tools installer. @@ -135,7 +131,7 @@ static XF86ModuleVersionInfo vmware_version = { MODINFOSTRING1, MODINFOSTRING2, XORG_VERSION_CURRENT, - VMWARE_VERSION_MAJOR, VMWARE_VERSION_MINOR, VMWARE_VERSION_PATCH, + PACKAGE_VERSION_MAJOR, PACKAGE_VERSION_MINOR, PACKAGE_VERSION_PATCHLEVEL, ABI_CLASS_VIDEODRV, ABI_VIDEODRV_VERSION, MOD_CLASS_VIDEODRV, -- cgit v1.2.3