build: Use the 'x11' pkg-config module to check for X11

Don't look at GLX headers or symbols; we don't use them anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=759191
This commit is contained in:
Emmanuele Bassi 2015-12-08 17:20:13 +00:00
parent dd30595084
commit 7fe12eca54

View File

@ -113,9 +113,6 @@ AM_CONDITIONAL(OS_WIN32, [test "$platform_win32" = "yes"])
AC_CHECK_HEADER([OpenGL/gl.h], [platform_quartz=yes], [platform_quartz=no]) AC_CHECK_HEADER([OpenGL/gl.h], [platform_quartz=yes], [platform_quartz=no])
AM_CONDITIONAL(OS_QUARTZ, [test "$platform_quartz" = "yes"]) AM_CONDITIONAL(OS_QUARTZ, [test "$platform_quartz" = "yes"])
AC_CHECK_HEADER([GL/glx.h], [platform_glx=yes], [platform_glx=no])
AC_CHECK_LIB([GL], [glXCreateContext], [platform_glx=yes], [platform_glx=no])
AM_CONDITIONAL(OS_GLX, [test "$platform_glx" = "yes"])
AM_CONDITIONAL(OS_LINUX, [test "$platform_linux" = "yes"]) AM_CONDITIONAL(OS_LINUX, [test "$platform_linux" = "yes"])
AC_SUBST(CLUTTER_LT_LDFLAGS) AC_SUBST(CLUTTER_LT_LDFLAGS)
@ -285,7 +282,7 @@ AC_ARG_ENABLE([cex100-backend],
dnl Define default values dnl Define default values
AS_IF([test "x$enable_x11" = "xcheck"], AS_IF([test "x$enable_x11" = "xcheck"],
[ [
AS_IF([test "x$platform_glx" = "xyes"], [enable_x11=yes], [enable_x11=no]) PKG_CHECK_EXISTS([x11], [enable_x11=yes], [enable_x11=no])
]) ])
AS_IF([test "x$enable_win32" = "xcheck"], AS_IF([test "x$enable_win32" = "xcheck"],