From 1c820951dcd82b3a7486c0da56ffcdad70bc5d3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Mon, 18 Jan 2016 13:56:13 +0100 Subject: [PATCH] build-sys: use the appropriate autoconf macros for cflags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don't bust CFLAGS passed on make command line please. [airlied: wrap config.h include] Signed-off-by: Marc-André Lureau Signed-off-by: Dave Airlie --- configure.ac | 10 +++------- src/virgl_egl_context.c | 4 ++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 59a0bb4..04aa1aa 100644 --- a/configure.ac +++ b/configure.ac @@ -11,6 +11,9 @@ AC_CONFIG_MACRO_DIR([build-aux]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) +AC_USE_SYSTEM_EXTENSIONS +AC_PROG_CC_C99 + # Support silent build rules, requires at least automake-1.11. Disable # by either passing --disable-silent-rules to configure or passing V=1 # to make @@ -25,8 +28,6 @@ AC_SYS_LARGEFILE AC_CHECK_PROGS([PYTHON2], [python2 python]) AX_CODE_COVERAGE -DEFINES="-D_GNU_SOURCE" - AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug], [use debug compiler flags and macros @<:@default=disabled@:>@])], @@ -79,11 +80,6 @@ XORG_DEFAULT_OPTIONS LIBDRM_REQUIRED=2.4.50 -dnl Add flags for gcc -if test "x$GCC" = xyes; then - CFLAGS="$CFLAGS -Wall -std=c99" -fi - PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED]) PKG_CHECK_MODULES([EPOXY], [epoxy]) diff --git a/src/virgl_egl_context.c b/src/virgl_egl_context.c index 2b7647b..5306fab 100644 --- a/src/virgl_egl_context.c +++ b/src/virgl_egl_context.c @@ -26,6 +26,10 @@ /* if we are using EGL and rendernodes then we talk via file descriptors to the remote node */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #define EGL_EGLEXT_PROTOTYPES #include #include