Prevent Mesa from including X11 headers if X11 is disabled
authorPaul Cercueil <paul@crapouillou.net>
Mon, 02 Mar 2020 15:14:02 -0800
changeset 135795669d9183f75
parent 13578 3e9f11265172
child 13580 7d5111ab6f88
Prevent Mesa from including X11 headers if X11 is disabled
This fixes compilation errors that occur when trying to compile SDL2 for
a X11-less target. The errors were due to the fact that Mesa will
include X11 headers unless a couple of macros are defined.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
configure.ac
     1.1 --- a/configure.ac	Mon Mar 02 15:06:47 2020 -0800
     1.2 +++ b/configure.ac	Mon Mar 02 15:14:02 2020 -0800
     1.3 @@ -2035,6 +2035,9 @@
     1.4                  SUMMARY_video_x11="${SUMMARY_video_x11} xvidmode"
     1.5              fi
     1.6          fi
     1.7 +    else
     1.8 +        # Prevent Mesa from including X11 headers
     1.9 +        EXTRA_CFLAGS="$EXTRA_CFLAGS -DMESA_EGL_NO_X11_HEADERS -DEGL_NO_X11"
    1.10      fi
    1.11  }
    1.12