mesa: Disallow TransformFeedbackVaryings when active.

Fixes a subcase of Piglit's new ARB_transform_feedback2 api-errors test.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
mesa: Track the vertex program active at BeginTransformFeedback() time.

The next few patches will use this for API error checking.

All of the drivers appear to CALLOC_STRUCT transform feedback objects,
so this should be properly NULL initialized on creation.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
mesa: Reject ResumeTransformFeedback if the wrong program is bound.

This is actually a pretty important error condition: otherwise, you
could set up transform feedback with one program, and resume it with
a program that generates a completely different set of outputs.

Fixes a subcase of Piglit's new ARB_transform_feedback2 api-errors test.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
mesa: Disallow relinking if a program is used by an active XFB object.

Paused transform feedback objects may refer to a program other than the
current program.  If any active objects refer to a program, LinkProgram
must reject the request to relink.

The code to detect this is ugly since _mesa_HashWalk is awkward to use,
but unfortunately we can't use hash_table_foreach since there's no way
to get at the underlying struct hash_table (and even then, we'd need to
handle locking somehow).

Fixes the last subcase of Piglit's new ARB_transform_feedback2
api-errors test.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
ilo: Fix out-of-tree build.
Suppress clang's warnings about unused CFLAGS and CXXFLAGS.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
configure.ac: Save user {C,CXX}FLAGS and append them at end.

This way the user has the privilege of last decision and so the option to build an optimized debug build again.
radeon: Build and use libradeon the right way.

Better build system integration for:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=91a160b
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5b2855b

The EGL runtime issue should be fixed now.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64810
gallium/targets: Make use of prebuilt libdricommon.la.
Drop support for --enable-static / --disable-shared.
gallium/auxiliary: Build libgallium shared.
Drop last parts of compatibility for the old Mesa build system.
mapi: Build libglapi always shared.
mesa: Build libmesa shared.
Install all internal shared libs to $(libdir)/mesa-$VERSION.
Also do it for egl_gallium.so, pipe_*.so and gbm_gallium_drm.
Makefile.am: s:-no-undefined:-Wl,--no-undefined to make it work.
gallium/drivers: Build libs -shared.
vdpau,xvmc: Add install-data-hooks to remove unneccessary symlinks.

libvdpau_*.so.1 and libXvMC*.so libs are dlopened by wrappers.
So only those libs should be installed.
glx: Get rid of libglx.la.