<div dir="ltr">The problem this is trying to solve is that they both get installed and create an ambiguous situation for which one get's used:<br><pre class="" id="comment_text_0">libGL.so -> libGL.so.1.5.0
libGL.so.1 -> libGL.so.1.6.0
libGL.so.1.5.0
libGL.so.1.6.0</pre>I could adjust it so that you can build both versions and if more than one is specified then generate a configure-time warning and leave them out of the install target but it seems to me that things should be getting built if they can't be safely installed.<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr">- Chuck<br></div></div></div>
<br><div class="gmail_quote">On Fri, Apr 15, 2016 at 12:08 PM, Brian Paul <span dir="ltr"><<a href="mailto:brianp@vmware.com" target="_blank">brianp@vmware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 04/15/2016 09:36 AM, Chuck Atkins wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Instead of cascading support for various different implementations of<br>
GLX, all three options are now specified through the --enable-glx<br>
option:<br>
<br>
--enable-glx=dri : Enable the DRI-based GLX<br>
--enable-glx=xlib : Enable the classic Xlib-based GLX<br>
--enable-glx=gallium-xlib : Enable the gallium Xlib-based GLX<br>
--enable-glx[=yes] : Defaults to dri if DRI is enabled, else<br>
gallium-xlib if gallium is enabled, else<br>
xlib<br>
<br>
This removes the --enable-xlib-glx option and fixes a bug in which both<br>
the classic xlib-glx and gallium xlib-glx implementations were getting<br>
built causing differnt versioned and conflicting libGL libraries to be<br>
installed.<br>
</blockquote>
<br></span>
So we'll no longer be able to build both the "xlib" and "gallium-xlib" at the same time, right? I sometimes switch between the old swrast and gallium libs with LD_LIBRARY_PATH to compare things. But I guess I can live without that since I don't do that as much as I used to.<span class="HOEnZb"><font color="#888888"><br>
<br>
-Brian</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
---<br>
<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a> | 108 +++++++++++++++++++++++++-----------------------<br>
src/gallium/Makefile.am | 2 +-<br>
src/mesa/Makefile.am | 2 +-<br>
3 files changed, 59 insertions(+), 53 deletions(-)<br>
<br>
diff --git a/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a> b/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
index 8c82c43..090b7af 100644<br>
--- a/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
+++ b/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
@@ -858,8 +858,8 @@ AC_ARG_ENABLE([dri3],<br>
[enable_dri3="$enableval"],<br>
[enable_dri3="$dri3_default"])<br>
AC_ARG_ENABLE([glx],<br>
- [AS_HELP_STRING([--enable-glx],<br>
- [enable GLX library @<:@default=enabled@:>@])],<br>
+ [AS_HELP_STRING([--enable-glx[=dri|xlib|gallium-xlib]],<br>
+ [enable the GLX library and choose an implementation<br>
@<:@default=dri@:>@])],<br>
[enable_glx="$enableval"],<br>
[enable_glx=yes])<br>
AC_ARG_ENABLE([osmesa],<br>
@@ -925,11 +925,6 @@ AC_ARG_ENABLE([opencl_icd],<br>
@<:@default=disabled@:>@])],<br>
[enable_opencl_icd="$enableval"],<br>
[enable_opencl_icd=no])<br>
-AC_ARG_ENABLE([xlib-glx],<br>
- [AS_HELP_STRING([--enable-xlib-glx],<br>
- [make GLX library Xlib-based instead of DRI-based<br>
@<:@default=disabled@:>@])],<br>
- [enable_xlib_glx="$enableval"],<br>
- [enable_xlib_glx=no])<br>
<br>
AC_ARG_ENABLE([gallium-tests],<br>
[AS_HELP_STRING([--enable-gallium-tests],<br>
@@ -988,35 +983,47 @@ AM_CONDITIONAL(NEED_OPENGL_COMMON, test<br>
"x$enable_opengl" = xyes -o \<br>
"x$enable_gles1" = xyes -o \<br>
"x$enable_gles2" = xyes)<br>
<br>
-if test "x$enable_glx" = xno; then<br>
- AC_MSG_WARN([GLX disabled, disabling Xlib-GLX])<br>
- enable_xlib_glx=no<br>
-fi<br>
-<br>
-if test "x$enable_dri$enable_xlib_glx" = xyesyes; then<br>
- AC_MSG_ERROR([DRI and Xlib-GLX cannot be built together])<br>
-fi<br>
-<br>
-if test "x$enable_opengl$enable_xlib_glx" = xnoyes; then<br>
- AC_MSG_ERROR([Xlib-GLX cannot be built without OpenGL])<br>
-fi<br>
-<br>
-# Disable GLX if OpenGL is not enabled<br>
-if test "x$enable_glx$enable_opengl" = xyesno; then<br>
- AC_MSG_WARN([OpenGL not enabled, disabling GLX])<br>
- enable_glx=no<br>
+# Validate GLX options<br>
+if test "x$enable_glx" = xyes; then<br>
+ if test "x$enable_dri" = xyes; then<br>
+ enable_glx=dri<br>
+ elif test -n "$with_gallium_drivers"; then<br>
+ enable_glx=gallium-xlib<br>
+ else<br>
+ enable_glx=xlib<br>
+ fi<br>
fi<br>
+case "x$enable_glx" in<br>
+xdri | xxlib | xgallium-xlib)<br>
+ # GLX requires OpenGL<br>
+ if test "x$enable_opengl" = xno; then<br>
+ AC_MSG_ERROR([GLX cannot be built without OpenGL])<br>
+ fi<br>
<br>
-# Disable GLX if DRI and Xlib-GLX are not enabled<br>
-if test "x$enable_glx" = xyes -a \<br>
- "x$enable_dri" = xno -a \<br>
- "x$enable_xlib_glx" = xno; then<br>
- AC_MSG_WARN([Neither DRI nor Xlib-GLX enabled, disabling GLX])<br>
- enable_glx=no<br>
-fi<br>
+ # Check individual dependencies<br>
+ case "x$enable_glx" in<br>
+ xdri)<br>
+ if test "x$enable_dri" = xno; then<br>
+ AC_MSG_ERROR([DRI-based GLX requires DRI to be enabled])<br>
+ fi<br>
+ ;;<br>
+ xxlib | xgallium-xlib )<br>
+ if test "x$enable_dri" = xyes; then<br>
+ AC_MSG_ERROR([Xlib-based GLX cannot be built with DRI enabled])<br>
+ fi<br>
+ ;;<br>
+ esac<br>
+ ;;<br>
+xno)<br>
+ ;;<br>
+*)<br>
+ AC_MSG_ERROR([Illegal value for --enable-dri: $enable_dri])<br>
+ ;;<br>
+esac<br>
<br>
-AM_CONDITIONAL(HAVE_DRI_GLX, test "x$enable_glx" = xyes -a \<br>
- "x$enable_dri" = xyes)<br>
+AM_CONDITIONAL(HAVE_DRI_GLX, test "x$enable_glx" = xdri)<br>
+AM_CONDITIONAL(HAVE_XLIB_GLX, test "x$enable_glx" = xxlib)<br>
+AM_CONDITIONAL(HAVE_GALLIUM_XLIB_GLX, test "x$enable_glx" = xgallium-xlib)<br>
<br>
# Check for libdrm<br>
PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED],<br>
@@ -1072,10 +1079,6 @@ dnl<br>
dnl Driver specific build directories<br>
dnl<br>
<br>
-if test -n "$with_gallium_drivers" -a "x$enable_glx$enable_xlib_glx"<br>
= xyesyes; then<br>
- NEED_WINSYS_XLIB="yes"<br>
-fi<br>
-<br>
if test "x$enable_gallium_osmesa" = xyes; then<br>
if ! echo "$with_gallium_drivers" | grep -q 'swrast'; then<br>
AC_MSG_ERROR([gallium_osmesa requires the gallium swrast driver])<br>
@@ -1268,8 +1271,8 @@ AC_ARG_ENABLE([driglx-direct],<br>
dnl<br>
dnl libGL configuration per driver<br>
dnl<br>
-case "x$enable_glx$enable_xlib_glx" in<br>
-xyesyes)<br>
+case "x$enable_glx" in<br>
+xxlib | xgallium-xlib)<br>
# Xlib-based GLX<br>
dri_modules="x11 xext xcb"<br>
PKG_CHECK_MODULES([XLIBGL], [$dri_modules])<br>
@@ -1279,7 +1282,7 @@ xyesyes)<br>
GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm $PTHREAD_LIBS $DLOPEN_LIBS"<br>
GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $SELINUX_LIBS -lm $PTHREAD_LIBS"<br>
;;<br>
-xyesno)<br>
+xdri)<br>
# DRI-based GLX<br>
PKG_CHECK_MODULES([GLPROTO], [glproto >= $GLPROTO_REQUIRED])<br>
<br>
@@ -1368,11 +1371,11 @@ AC_SUBST([HAVE_XF86VIDMODE])<br>
dnl<br>
dnl More GLX setup<br>
dnl<br>
-case "x$enable_glx$enable_xlib_glx" in<br>
-xyesyes)<br>
+case "x$enable_glx" in<br>
+xxlib | xgallium-xlib)<br>
DEFINES="$DEFINES -DUSE_XSHM"<br>
;;<br>
-xyesno)<br>
+xdri)<br>
DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING"<br>
if test "x$driglx_direct" = xyes; then<br>
DEFINES="$DEFINES -DGLX_DIRECT_RENDERING"<br>
@@ -1546,7 +1549,8 @@ if test -n "$with_dri_drivers"; then<br>
fi<br>
<br>
AM_CONDITIONAL(NEED_MEGADRIVER, test -n "$DRI_DIRS")<br>
-AM_CONDITIONAL(NEED_LIBMESA, test "x$enable_xlib_glx" = xyes -o \<br>
+AM_CONDITIONAL(NEED_LIBMESA, test "x$enable_glx" = xxlib -o \<br>
+ "x$enable_glx" = xgallium-xlib -o \<br>
"x$enable_osmesa" = xyes -o \<br>
-n "$DRI_DIRS")<br>
<br>
@@ -1561,7 +1565,7 @@ AC_ARG_WITH([osmesa-bits],<br>
[osmesa_bits="$withval"],<br>
[osmesa_bits=8])<br>
if test "x$osmesa_bits" != x8; then<br>
- if test "x$enable_dri" = xyes -o "x$enable_glx" = xyes; then<br>
+ if test "x$enable_dri" = xyes -o "x$enable_glx" != xno; then<br>
AC_MSG_WARN([Ignoring OSMesa channel bits because of<br>
non-OSMesa driver])<br>
osmesa_bits=8<br>
fi<br>
@@ -2402,7 +2406,7 @@ AM_CONDITIONAL(HAVE_SWRAST_DRI, test<br>
x$HAVE_SWRAST_DRI = xyes)<br>
AM_CONDITIONAL(NEED_RADEON_DRM_WINSYS, test "x$HAVE_GALLIUM_R300" = xyes -o \<br>
"x$HAVE_GALLIUM_R600" = xyes -o \<br>
"x$HAVE_GALLIUM_RADEONSI" = xyes)<br>
-AM_CONDITIONAL(NEED_WINSYS_XLIB, test "x$NEED_WINSYS_XLIB" = xyes)<br>
+AM_CONDITIONAL(NEED_WINSYS_XLIB, test "x$enable_glx" = xgallium-xlib)<br>
AM_CONDITIONAL(NEED_RADEON_LLVM, test x$NEED_RADEON_LLVM = xyes)<br>
AM_CONDITIONAL(HAVE_GALLIUM_COMPUTE, test x$enable_opencl = xyes)<br>
AM_CONDITIONAL(HAVE_MESA_LLVM, test x$MESA_LLVM = x1)<br>
@@ -2412,7 +2416,6 @@ if test "x$USE_VC4_SIMULATOR" = xyes -a<br>
"x$HAVE_GALLIUM_ILO" = xyes; then<br>
fi<br>
<br>
AM_CONDITIONAL(HAVE_LIBDRM, test "x$have_libdrm" = xyes)<br>
-AM_CONDITIONAL(HAVE_X11_DRIVER, test "x$enable_xlib_glx" = xyes)<br>
AM_CONDITIONAL(HAVE_OSMESA, test "x$enable_osmesa" = xyes)<br>
AM_CONDITIONAL(HAVE_GALLIUM_OSMESA, test "x$enable_gallium_osmesa" = xyes)<br>
<br>
@@ -2602,12 +2605,15 @@ if test "x$enable_dri" != xno; then<br>
echo " DRI driver dir: $DRI_DRIVER_INSTALL_DIR"<br>
fi<br>
<br>
-case "x$enable_glx$enable_xlib_glx" in<br>
-xyesyes)<br>
+case "x$enable_glx" in<br>
+xdri)<br>
+ echo " GLX: DRI-based"<br>
+ ;;<br>
+xxlib)<br>
echo " GLX: Xlib-based"<br>
;;<br>
-xyesno)<br>
- echo " GLX: DRI-based"<br>
+xgallium-xlib)<br>
+ echo " GLX: Xlib-based (Gallium)"<br>
;;<br>
*)<br>
echo " GLX: $enable_glx"<br>
diff --git a/src/gallium/Makefile.am b/src/gallium/Makefile.am<br>
index ef2bc10..34671ca 100644<br>
--- a/src/gallium/Makefile.am<br>
+++ b/src/gallium/Makefile.am<br>
@@ -138,7 +138,7 @@ if HAVE_DRICOMMON<br>
SUBDIRS += state_trackers/dri targets/dri<br>
endif<br>
<br>
-if HAVE_X11_DRIVER<br>
+if HAVE_GALLIUM_XLIB_GLX<br>
SUBDIRS += state_trackers/glx/xlib targets/libgl-xlib<br>
endif<br>
<br>
diff --git a/src/mesa/Makefile.am b/src/mesa/Makefile.am<br>
index 3903818..2c77fa8 100644<br>
--- a/src/mesa/Makefile.am<br>
+++ b/src/mesa/Makefile.am<br>
@@ -21,7 +21,7 @@<br>
<br>
SUBDIRS = . main/tests<br>
<br>
-if HAVE_X11_DRIVER<br>
+if HAVE_XLIB_GLX<br>
SUBDIRS += drivers/x11<br>
endif<br>
<br>
</blockquote>
<br>
</div></div></blockquote></div><br></div>