[PATCH] hsakmt: allow building with gcc 4.x v2

Bridgman, John John.Bridgman at amd.com
Tue Mar 29 23:12:23 UTC 2016


The hsakmt code requires C99 compiler support, however gcc 4.x
defaults to C89 (gcc 5 defaults to C11). v2 patch copies code
from libdrm, using AC_PROG_CC_C99 and checking success.

v1 used AC_PROG_CC_STDC and did not check C99 was enabled.

Signed-off-by: John Bridgman <john.bridgman at amd.com>
---
 configure.ac | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/configure.ac b/configure.ac
index b8e9bea..0111067 100644
--- a/configure.ac
+++ b/configure.ac
@@ -66,6 +66,12 @@ AC_CANONICAL_HOST
 AC_PROG_AWK
 test_CFLAGS=${CFLAGS+set} # We may override autoconf default CFLAGS.
 AC_PROG_CC
+AC_PROG_CC_C99
+
+if test "x$ac_cv_prog_cc_c99" = xno; then
+	AC_MSG_ERROR([Building hsakmt requires C99 enabled compiler])
+fi
+
 AC_PROG_INSTALL
 AC_PROG_LIBTOOL
 AC_PROG_MAKE_SET
-- 
1.9.1



More information about the dri-devel mailing list