Fix use of HASH_FIND() in RemoveScreenPointerMapping()

Replace HASH_FIND() with the convenience macro HASH_FIND_PTR() in
RemoveScreenPointerMapping() and ScreenFromPointer(), to be consistent
with AddScreenPointerMapping().  This has the side-effect of fixing
invalid usage of the original HASH_FIND() macro in
RemoveScreenPointerMapping().

Signed-Off-By: Brian Nguyen <brnguyen@nvidia.com>
[build] fix more srcdir != builddir mistakes

I missed these in commit debae590e724ee064939982bd3f54a613d5fa650 because my
test system had a compatible glxext.h in /usr/include/GL.  On a system with an
incompatible version (i.e. Ubuntu), this causes build failures.  Fix the include
paths to include the GL headers from the repository instead of the system.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Brian Nguyen <brnguyen@nvidia.com>
[build] enable silent rules by default

Automake still defaults to verbose output unless you explicitly request that the
silent rules be enabled by default.  It's possible to only enable the silent
rules on versions of automake that actually support it, but automake 1.11 has
been around for long enough that it seems easier to just bump the minimum
required version.

Add the boilerplate required to turn on the silent rules by default.  They can
still be disabled by passing --disable-silent-rules to configure or by passing
V=0 on the make command line.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Brian Nguyen <brnguyen@nvidia.com>
[tests] remove unused 'str' variable

 testglxqueryversion.c: In function 'main':
 testglxqueryversion.c:39:17: warning: unused variable 'str' [-Wunused-variable]

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
[build] don't try to create src/GLdispatch/mapi makefiles

The build doesn't recurse into these directories, so their Makefile.in files
aren't propagated to the dist tarball.  That makes configure fail because it
tries to read those files to generate Makefiles in those directories.

Since these directories aren't built, don't try to create Makefiles in them.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Brian Nguyen <brnguyen@nvidia.com>
[build] make mapi a subdirectory of vnd-glapi

Currently, the GLdispatch makefile recurses into the mapi/vnd-glapi
subdirectory, which then uses files out of its parent directory.  This makes it
difficult to include the mapi directory in the dist tarball because just
including it in EXTRA_DIST makes it pick up the generated Makefile in addition
to the checked-in source files.

Instead, exchange the two directories so that mapi is a subdirectory of
vnd-glapi and the former is included wholesale with EXTRA_DIST.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Brian Nguyen <brnguyen@nvidia.com>
[build] distribute files needed to build

Everything needed to actually build the driver needs to be included in something
that makes it end up in the distribution tarball.  For headers, use
noinst_HEADERS.  For everything else, use EXTRA_DIST.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Brian Nguyen <brnguyen@nvidia.com>
[build] add $(BUILT_SOURCES) to $(CLEANFILES)

The 'distclean' target should completely cleans the build directory, so that
$(builddir) contains only directories.  This means that all built sources have
to be included in CLEANFILES, or they're left behind.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Brian Nguyen <brnguyen@nvidia.com>