build-sys: use the appropriate autoconf macros for cflags

Don't bust CFLAGS passed on make command line please.

[airlied: wrap config.h include]
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
macos/master
Marc-André Lureau 9 years ago committed by Dave Airlie
parent 5058068a28
commit 1c820951dc
  1. 10
      configure.ac
  2. 4
      src/virgl_egl_context.c

@ -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])

@ -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 <dirent.h>
#include <fcntl.h>

Loading…
Cancel
Save