summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2013-07-03 12:04:31 +0100
committerNeil Roberts <neil@linux.intel.com>2013-07-04 11:43:28 +0100
commit64472027fb5750971e94c0b4c6c624a39e5abe2f (patch)
treef774b4528b703300c8b9fc2659313886002ca587
parent70054199e983c51ff2e37b427c2a684dfc7b83ed (diff)
downloadcogl-64472027fb5750971e94c0b4c6c624a39e5abe2f.tar.gz
Fix the GBM_MICRO macro
The version of gbm can sometimes be suffixed with ‘-devel’. This was making the GBM_MICRO define come out as 0-devel which was generating a warning when it was used in a #if check. This patch makes it chop off anything after a ‘-’ using sed. Reviewed-by: Robert Bragg <robert@linux.intel.com>
-rw-r--r--configure.ac2
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 8d38d90c..5d9094a9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1075,7 +1075,7 @@ AS_IF([test "x$enable_kms_egl_platform" = "xyes"],
GBM_VERSION=`$PKG_CONFIG --modversion gbm`
GBM_MAJOR=`echo $GBM_VERSION | cut -d'.' -f1`
GBM_MINOR=`echo $GBM_VERSION | cut -d'.' -f2`
- GBM_MICRO=`echo $GBM_VERSION | cut -d'.' -f3`
+ GBM_MICRO=`echo $GBM_VERSION | cut -d'.' -f3 | sed 's/-.*//'`
AC_DEFINE_UNQUOTED([COGL_GBM_MAJOR], [$GBM_MAJOR], [The major version for libgbm])
AC_DEFINE_UNQUOTED([COGL_GBM_MINOR], [$GBM_MINOR], [The minor version for libgbm])