summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2012-08-20 15:47:00 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2012-08-27 09:36:25 +1000
commit6c6d8b65b0073fd581344f18adadbe805a11be3c (patch)
treeb2f9cc758e640eede5529b57dc8bb2a7fe4d4287 /configure.ac
parent6d8126b0d4e134820361a0380f2db7dc57148313 (diff)
configure.ac: add check and defines for RHEL
Some tests have different behaviour on RHEL than upstream. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 91242dd..3a6c067 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,6 +50,26 @@ PKG_CHECK_MODULES(XORGGTEST, [xorg-gtest >= 0.4.0])
CHECK_XORG_GTEST([], AC_MSG_ERROR([xorg-gtest or its dependencies not found. Did you specify --with-gtest-source-path?]))
+# Check for RHEL and define as appropriate
+if test -f /etc/redhat-release; then
+ [rhel_version=`grep -o "[5-7].[0-9]\+" /etc/redhat-release`]
+ case "$rhel_version" in
+ 5.*)
+ AC_DEFINE(HAVE_RHEL5, [1], [Building on RHEL5])
+ ;;
+ 6.*)
+ AC_DEFINE(HAVE_RHEL6, [1], [Building on RHEL6])
+ ;;
+ 7.*)
+ AC_DEFINE(HAVE_RHEL7, [1], [Building on RHEL7])
+ ;;
+ **)
+ ;;
+ esac
+ AC_DEFINE_UNQUOTED(RHEL_VERSION, [$rhel_version], "RHEL version")
+fi
+AM_CONDITIONAL(HAVE_RHEL, [test "x$rhel_version" != "x"])
+
AC_CONFIG_FILES([Makefile
doc/Doxyfile
doc/Makefile