From 3866ac6b84fe6e5a349d430f317aa4c0f9a2b091 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Wed, 20 Jan 2016 12:17:25 +0200 Subject: configure.ac: use standard macro to set compiler C99 mode v2: s/libdrm/libglvnd/ (Kyle) v3: fix grammar in error message (Arthur Huillet) Signed-off-by: Emil Velikov --- configure.ac | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 98f5a51..4a8127c 100644 --- a/configure.ac +++ b/configure.ac @@ -23,6 +23,7 @@ AC_PROG_AWK AC_PROG_CXX AC_PROG_CC +AC_PROG_CC_C99 AM_PROG_AS AC_PROG_INSTALL AC_PROG_LN_S @@ -31,6 +32,10 @@ AC_PROG_LIBTOOL AC_CHECK_PROGS([PYTHON2], [python2.7 python2 python]) AC_CHECK_PROGS([PERL], [perl]) +if test "x$ac_cv_prog_cc_c99" = xno; then + AC_MSG_ERROR([Building libglvnd requires a C99-enabled compiler]) +fi + dnl dnl Auxiliary ELF symbol filtering support dnl @@ -272,7 +277,7 @@ AX_CHECK_LINK_FLAG([-Xlinker --no-undefined], [AC_SUBST([LINKER_FLAG_NO_UNDEFINED], [""])]) dnl default CFLAGS -CFLAGS="$CFLAGS -Wall -Werror -std=gnu99 -include config.h -fvisibility=hidden $DEFINES" +CFLAGS="$CFLAGS -Wall -Werror -include config.h -fvisibility=hidden $DEFINES" AC_CONFIG_FILES([Makefile libglvnd.pc -- cgit v1.2.3