aboutsummaryrefslogtreecommitdiff
path: root/mesalib
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib')
-rw-r--r--mesalib/bin/extract_git_sha130
-rw-r--r--mesalib/configure.ac4
2 files changed, 22 insertions, 12 deletions
diff --git a/mesalib/bin/extract_git_sha1 b/mesalib/bin/extract_git_sha1
index cf3006f8f..828387016 100644
--- a/mesalib/bin/extract_git_sha1
+++ b/mesalib/bin/extract_git_sha1
@@ -1,10 +1,20 @@
-#!/bin/sh
-touch src/mesa/main/git_sha1.h
-if which git > /dev/null; then
- # Extract the 7-digit "short" SHA1 for the current HEAD, convert
- # it to a string, and wrap it in a #define. This is used in
- # src/mesa/main/version.c to put the GIT SHA1 in the GL_VERSION string.
- git log -n 1 --oneline |\
- sed 's/^\([^ ]*\) .*/#define MESA_GIT_SHA1 "git-\1"/' \
- > src/mesa/main/git_sha1.h
-fi
+#!/bin/sh
+if [ ! -f src/mesa/main/git_sha1.h ]; then
+ touch src/mesa/main/git_sha1.h
+fi
+
+if [ ! -d .git ]; then
+ exit
+fi
+
+if which git > /dev/null; then
+ # Extract the 7-digit "short" SHA1 for the current HEAD, convert
+ # it to a string, and wrap it in a #define. This is used in
+ # src/mesa/main/version.c to put the GIT SHA1 in the GL_VERSION string.
+ git log -n 1 --oneline |\
+ sed 's/^\([^ ]*\) .*/#define MESA_GIT_SHA1 "git-\1"/' \
+ > src/mesa/main/git_sha1.h.tmp
+ if ! cmp -s src/mesa/main/git_sha1.h.tmp src/mesa/main/git_sha1.h; then
+ mv src/mesa/main/git_sha1.h.tmp src/mesa/main/git_sha1.h
+ fi
+fi
diff --git a/mesalib/configure.ac b/mesalib/configure.ac
index 7bd1f2e21..54d9c2968 100644
--- a/mesalib/configure.ac
+++ b/mesalib/configure.ac
@@ -21,8 +21,8 @@ dnl Versions for external dependencies
LIBDRM_REQUIRED=2.4.24
LIBDRM_RADEON_REQUIRED=2.4.24
LIBDRM_INTEL_REQUIRED=2.4.24
-DRI2PROTO_REQUIRED=2.4
-GLPROTO_REQUIRED=1.4.13
+DRI2PROTO_REQUIRED=2.1
+GLPROTO_REQUIRED=1.4.11
LIBDRM_XORG_REQUIRED=2.4.24
LIBKMS_XORG_REQUIRED=1.0.0