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 12:06:36 +0100
commitba5e5410babf705f53b591579c104181dd752bec (patch)
tree79fa430edc7082d34e85034a4a8c48c9cd14114a
parent6f1debaa34785ad639861078584677a9de645283 (diff)
downloadcogl-ba5e5410babf705f53b591579c104181dd752bec.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> (cherry picked from commit 64472027fb5750971e94c0b4c6c624a39e5abe2f)
-rw-r--r--configure.ac2
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 24220235..3d57980c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -957,7 +957,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])