mesa: Include GIT SHA1 in GL version string

Reviewed-by: Corbin Simpson <MostAwesomeDude@gmail.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c
index c7a0d69..80fa0c2 100644
--- a/src/mesa/main/version.c
+++ b/src/mesa/main/version.c
@@ -25,6 +25,7 @@
 #include "imports.h"
 #include "mtypes.h"
 #include "version.h"
+#include "git_sha1.h"
 
 
 
@@ -185,7 +186,11 @@
    ctx->VersionString = (char *) malloc(max);
    if (ctx->VersionString) {
       _mesa_snprintf(ctx->VersionString, max,
-		     "%u.%u Mesa " MESA_VERSION_STRING,
+		     "%u.%u Mesa " MESA_VERSION_STRING
+#ifdef MESA_GIT_SHA1
+		     " (" MESA_GIT_SHA1 ")"
+#endif
+		     ,
 		     ctx->VersionMajor, ctx->VersionMinor);
    }
 }