[Mesa-dev] [PATCH] glx: Refactor the configure options for glx implementation choice

Chuck Atkins chuck.atkins at kitware.com
Fri Apr 15 18:58:23 UTC 2016


On Fri, Apr 15, 2016 at 2:07 PM, Emil Velikov <emil.l.velikov at gmail.com>
wrote:

> On 15 April 2016 at 16:36, Chuck Atkins <chuck.atkins at kitware.com> wrote:
> > Instead of cascading support for various different implementations of
> > GLX, all three options are now specified through the --enable-glx
> > option:
> >
> Bth having the single switch looks a lot cleaner imho. Wondering if
> one shouldn't use --with-glx as this is the strange we handle non
> "yes/no" kind of things in mesa.
>
> I'm leaning that's a bad idea since people already use --enable-glx
>

I thought about that too but if I used --with, the it would make the most
sense to split the options with --enable-glx and
--wth-glx-implementation=[dri|xlib|gallium-xlib].  Since you can accomplish
all of this with a single --enable option I chose to stick with reduced
option complexity.


>   --enable-glx[=yes]        : Defaults to dri if DRI is enabled, else
> >                               gallium-xlib if gallium is enabled, else
> >                               xlib
> This final option changes things in a subtle way although I doubt it
> will cause any issues in reality.
>

It does change it a bit, but I wanted to let somebody use ./configure
--enable-glx [other options] and produce a functioning libGL.



> > built causing differnt versioned and conflicting libGL libraries to be
> "differently versioned",


Fixed in new patch.


> installed.
>
> Please add the following to the commit message (and any r-b, acked-by...
> tags)
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94086


Fixed in new patch.


>  AC_ARG_ENABLE([glx],
> > -    [AS_HELP_STRING([--enable-glx],
> > -        [enable GLX library @<:@default=enabled@:>@])],
> > +    [AS_HELP_STRING([--enable-glx[=dri|xlib|gallium-xlib]],
> > +        [enable the GLX library and choose an implementation
> > @<:@default=dri@:>@])],
> >      [enable_glx="$enableval"],
> >      [enable_glx=yes])
> "enable_glx=dri" to reflect the help string.
>

Changed help string to [default=auto] to better reflect that some heuristic
is used to try to chose which one gets used.



> > +    xxlib | xgallium-xlib )
> > +        if test "x$enable_dri" = xyes; then
> > +            AC_MSG_ERROR([Xlib-based GLX cannot be built with DRI
> enabled])
> > +        fi
> As the user can explicitly request gallium-xlib, in which case we
> should check for test -n "$with_gallium_drivers".
>

Fixed in new patch.


> +*)
> > +    AC_MSG_ERROR([Illegal value for --enable-dri: $enable_dri])
> Typos s/dri/glx/
>

Fixed in new patch.


> +AM_CONDITIONAL(NEED_LIBMESA, test "x$enable_glx" = xxlib -o \
> > +                                  "x$enable_glx" = xgallium-xlib -o \
> I think that we don't need libmesa for the gallium one. Did you try
> building without it ?
>

It seems you are correct.  Fixed in new patch.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160415/67099cdb/attachment.html>


More information about the mesa-dev mailing list